feat(ci): derive test-subproject selection from the consumer graph #6941
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 372 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6941"
general
weight: 0.35
endurthiabhilash
Motivation
TheRock CI selects which GPU test suites to run from the set of changed projects, via a hand-maintained
TEST_SUBPROJECTSlist on eachtherock_cmake_subproject_declare(). That list is only partially populated, so a change to most subprojects selects nothing beyond itself, producing passing CI runs that never exercised the affected downstream suite (false greens).This PR makes test selection a derived property of the dependency edges the build already declares, rather than a parallel list kept in sync by hand. Selection walks the reverse-dependency (consumer) graph to a per-component level on a 1–5 gating ladder — default level 4 (the changed component + its direct consumers), with broader/narrower tiers available per component. See
RFC0013 for the design and gating background.
Issue ID: #3343
Technical Details
therock_cmake_subproject_declare()records a reverse edge perBUILD_DEPS/RUNTIME_DEPS;therock_emit_consumer_graph()serializes it at configure time. The graph is committed totest_tools/therock_consumer_graph.jsonso the per-PR change-detection job reads it directly — no fetch or configure on the hot path. Removes theTEST_SUBPROJECTSkeyword and its per-component uses.determine_rocm_test_dependencies.pyloads the committed graph and, for each changed subproject, walks consumer edges to the depth set by its policy level (5 = self only, 4 = direct consumers, 3 = transitive closure). Build stage is not consulted.test_tools/test_policies.toml). A small, hand-reviewed file layers explicit intent on the graph: per-componentlevel, plustest_include(additive) andtest_exclude(subtractive, applied last) for couplings the graph can't express, test-only targets with no link edge (e.g.rocgdb-cpu,hipinfo) and reverse edges absent from forward deps. Broad-blast-radius runtimes (e.g.rocr-runtime) uselevel = 3to auto-derive their downstream set instead of listing it by hand.consumer_graph_drift.ymlregenerates the graph from a full-tree configure and fails if the committed copy is stale, so the checked-in graph can never silently diverge from the declared dependency edges.Test Plan
test_tools/tests/determine_rocm_test_dependencies_test.pycovers the level walk (each depth),test_include/test_exclude, and policy validation against the committed graph.build_tools/github_actions/tests/check_consumer_graph_drift_test.pycovers the drift check's normalization and pass/fail behavior.Test Result
<!-- fill in: unit tests pass; selection matches prior behavior for known changes -->
Submission Checklist
- [ ] Reviewed CONTRIBUTING.md
- [ ] Unit tests pass
- [ ] RFC0013 reflects the merged design