feat(ci): scope the test matrix to the specific superrepo (submodule / external repo) #10434
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #10434"
general
weight: 0.35
erman-gurses
During submodule bumps or external repo runs, for example, rocm-libraries runs rocm-systems tests even though it has no impact. This is a waste of GPU resources + time!
Tests ran here:
Driving the real pipeline —
configure_multi_arch_ci.py→determine_rocm_test_dependencies.py→
fetch_test_configurations.py— ongfx94X-dcgpu/standard:### Coverage — 20/20,
gfx94X-dcgpu/standard| Scenario |
changed_projects| Jobs | rocm-systems jobs ||---|---|---:|---:|
| rocm-libraries (external caller) | | | |
| one project (rocprim) |
['projects/rocprim']| 6/53 | 0/13 || two projects |
['projects/rocblas','projects/rocprim']| 12/53 | 0/13 || shared subtree (rocroller) |
['shared/rocroller']| 7/53 | 0/13 || caller workflow only |
['rocm-libraries']| 40/53 | 0/13 || scheduled, no diff |
['rocm-libraries']| 40/53 | 0/13 || docs only |
['rocm-libraries']| 40/53 | 0/13 || project + workflow |
['projects/rocprim']| 6/53 | 0/13 || rocm-systems (external caller) | | | |
| one project (clr) |
['projects/clr']| 49/53 | 11/13 || leaf project (amdsmi) |
['projects/amdsmi']| 2/53 | 2/13 || caller workflow only |
['rocm-systems']| 53/53 | 13/13 || scheduled, no diff |
['rocm-systems']| 53/53 | 13/13 || TheRock | | | |
| bump rocm-libraries |
['rocm-libraries']| 40/53 | 0/13 || bump rocm-systems |
['rocm-systems']| 53/53 | 13/13 || bump both monorepos |
['rocm-libraries','rocm-systems']| 53/53 | 13/13 || bump amd-llvm |
[]| 53/53 | 13/13 || bump rocm-libraries + loose file |
[]| 53/53 | 13/13 || bump rocm-libraries + amd-llvm |
[]| 53/53 | 13/13 || ordinary PR, no bump |
[]| 53/53 | 13/13 || no git context |
[]| 53/53 | 13/13 || caller pins
changed_projects|['projects/rocblas']| 9/53 | 0/13 |A rocm-libraries bump drops 13 jobs, all rocm-systems components:
amdsmi, aqlprofile, hip-tests, hipfile, profiler-hub, rccl, rocdecode,
rocjpeg, rocprofiler-compute, rocprofiler-sdk, rocprofiler-systems,
rocrtst, rocshmem
---
The rule: start from everything, then drop only what the consumer graph proves
the bump cannot reach — a component is dropped only when the superrepo map
attributes it to a different monorepo and no consumer edge reaches it.
Components with no attribution (amd-llvm, third-party, synthetic nodes like
tensilelite) are never dropped, since absent means unknown, not unaffected.
The asymmetry CI wants falls out of the graph rather than a hardcoded rule.
Nothing in rocm-systems consumes rocm-libraries — an invariant already asserted
by
cmake_consumer_graph_test.py— so a rocm-libraries bump drops all ofrocm-systems, while a rocm-systems bump reaches the whole stack and drops nothing
(it emits
*, exactly today's behavior).## How it works
1.
configure_multi_arch_ci.pydetects a run whose diff touches exactly onesuperrepo submodule and emits its name on a new
changed_projectsoutput.Any other bump (amd-llvm, or a bump alongside other edits) stays empty, i.e.
all tests.
2.
determine_rocm_test_dependencies.pyreads a bare monorepo name as awhole-superrepo bump and scopes from the graph, parsing attribution on demand
via
build_superrepo_map()(~0.4s, no configure, no submodules) rather thanfrom a committed artifact that could go stale.
This reuses the
changed_projectschannel that already reachestest_artifacts.yml, so no new workflow inputs. A caller's project-level liststill wins.
This does not change any build decision
changed_projectsdoes reach one build decision:_drop_stages_affected_by_changed_projectsdrops any prebuilt stage a changed project compiles into, so a caller's
prebuilt_stageslist cannot copy a stage the run invalidated.A bare monorepo name is not a subproject and resolves to no stage, so it is
discarded there and the scope falls back to the
repo_projectsupper bound —exactly what an unscoped run uses. Stage copying therefore comes out identical:
cv-libsstill rebuilds whenprojects/rppis in scope. Stage selection(
build_stages) and artifact reuse are not fed bychanged_projectsat all —reuse comes solely from
compute_auto_stage_reuse().TestMonorepoScopeDoesNotNarrowTheBuildpins this, and fails if the monorepofilter is removed.
The substantive difference from the original: it no longer claims the build is untouched by
construction (that's false), but that the monorepo name specifically is filtered out of the one
build path it reaches, so the decision is provably unchanged. That's a weaker but true claim — and
it's the honest one to make to a reviewer who may already know
_drop_stages_affected_by_changed_projects exists.