← Back to Pull requests

fix(hipdnn): deep-review TheRock lane uses the current skip helper; orient gate lists every citation site #16659

Closed
unknown closed this pull request without merging on Nov 26, 2026 20:01 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 18:58 UTC
Author

Summary

Follow-ups to #16005 for the hipdnn-deep-review skill. The first two fix the TheRock lane, which crashed on one step and described PR CI tiers wrongly; the last two improve the orient gate.

  • The TheRock lane's "does TheRock CI run at all?" check works again. Its skip-pattern snippet called _is_path_skippable_for_patterns / _is_path_skippable, which do not exist at the pinned TheRock, so it failed with AttributeError. It now calls _is_path_unrelated_to_ci with an empty workflow allowlist (the external-repository case). A lane-wide Helper drift rule checks every TheRock function or field the lane names at the pinned commit: a missing one prints HELPER-DRIFT: on stderr and the lane reports an IMPORTANT finding that the skill needs updating. The skip snippet then looks for a replacement (a function using fnmatch that classifies a known docs file as skip and a known .cpp file as CI) and ends the lane with STOP: when none passes.

  • The lanes predict the tier from code instead of restating rules. lanes/therock.md, lanes/author-testing.md, lanes/test-tiers.md and policy.md said a run-all PR or a dispatch runs quick, which is wrong. The deep review often runs before a PR or CI exists, so the TheRock lane now predicts from the code that decides: _determine_test_type, is_external_repo_ci_only_change, _apply_external_family_overrides and test_type_for_family in TheRock at the pinned commit, plus rocm-libraries' own .github/workflows/therock-multi-arch-ci.yml at the PR's head. Once CI has run, the latest run's per-family Configure test matrix log is authoritative, but only for families whose GPU Test jobs ran. The prediction is UNVERIFIED when a name is missing, and n/a (CI skipped) when every file is skippable. The other files point to that instead of listing rules.

  • The orient gate lists every place a missing path is cited. A path cited in several places was reported at its first site with +<n> more. The gate now prints every site, e.g. not at base: src/gone.hpp (cited at CONTEXT.md:1, orient/a.md:1).

  • The orient-gate tests cover a self-reference written in prose. The gate accepts an orient/<slug>.md link wherever it appears, but the test only cited it from a table row. The docstring and RUNBOOK now say the link can appear anywhere in CONTEXT.md or orient/*.md. Raised in review: https://github.com/ROCm/rocm-libraries/pull/16005#discussion_r4672238296
  • JIRA ID : ALMIOPEN-3357

    Risk Assessment

    Risk 1 (low). Only AI tooling under projects/hipdnn/tools/ai/. No library, provider or build code is touched.

    Testing Summary

  • New unit tests (tests/test_deep_review_therock_skip_snippet.py) extract the lane's skip snippet and tier drift check from lanes/therock.md and run them against fake TheRock modules: helper present, renamed (HELPER-DRIFT:, same classification) and absent (STOP:); all tier names present ("found" line) and each missing (one HELPER-DRIFT: naming it). Orient-gate tests cover the listing and the prose self-reference. Every new assertion was mutation-checked.

  • The TheRock lane was trial-run as written on three PRs and its predictions compared with what CI did: #16592 (skills/docs only: CI skipped), #16485 (hipDNN C++: standard on gfx94X and gfx110X) and #16507 (test_filter:standard, hipBLASLt CI: standard on gfx94X, gfx110X and gfx950 hipBLASLt). All match.

  • Skill tooling tests: 737 passed, 7 skipped. One local-only failure, test_tier_scope_covers_every_test_in_the_tree, comes from googletest sample files in untracked build/ folders and does not occur in a clean checkout.
  • Testing Checklist

  • Skill tooling tests - python -m pytest -q tests/ (from projects/hipdnn/tools/ai) - Status: Passed

  • TheRock lane trial on #16592, #16485, #16507 - predictions vs CI logs - Status: Match

  • PR CI - GitHub PR checks - Status: Pending
  • Technical Changes

  • lanes/therock.md: Helper drift rule; section 1 skip snippet with renamed-helper lookup; Families and Tier read TheRock's code at the pin and the PR's own workflow, with a four-name drift check; Timing base and section 6 refer to Tier.

  • lanes/author-testing.md, lanes/test-tiers.md, policy.md: wrong tier claims removed; point to the TheRock lane's Tier.

  • scripts/partition.py: cmd_orient_gate prints every citation site; docstring updated.

  • RUNBOOK.md: orient-gate description matches.

  • tests/test_deep_review_partition.py: prose self-reference case; the two-site test expects both sites.

  • tests/test_deep_review_therock_skip_snippet.py: new.
  • 🤖 Generated with Claude Code

    Diff: 587 lines (+440 / -147) across 7 files Reviewer: BrianHarrisonAMD Review duration: 2942m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 587 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16659"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.7% · Safe to merge
    19.7%