CI: give scope-stats the DFX smoke step the other four have - #1983
Conversation
`tests/st/{a2a3,a5}/tensormap_and_ringbuffer/dfx/scope_stats/` is the only test
of the scope-stats capture pipeline, and its artifact validation never ran in any
pipeline. `_validate_scope_stats_artifact` returns early unless
`--enable-scope-stats` is on (`test_scope_stats.py:117`), and no workflow or
action passed it — `grep -rn "scope_stats\|enable-scope-stats" .github/` came
back empty, while dep_gen, chip_swimlane, PMU and args_dump each own a dedicated
step in the same two workflows.
The scene half of that test did run: the class is an ordinary `SceneTestCase`, so
the main sweep compiled and ran its `vector_example` and checked the golden. What
never ran is the part that matters for this feature — the `scope_stats.jsonl`
assertions: at least four begin/end records, `dropped == 0`, the metadata schema,
and the required per-record fields. A collector that silently emitted nothing, or
dropped every record, would have kept CI green.
Both new steps copy the shape of the args_dump step beside them, including the
`manual_mode` mapping that keeps `only` as `only` and otherwise uses `include`,
since these steps own the whole corpus under their path.
`docs/ci.md` recorded the omission as a fact ("Scope-stats has no dedicated CI
smoke"). It now describes the step and why scope-stats needed one where the
others' reasoning does not apply: for the other four the dedicated step exists to
survive a case being marked manual, whereas here the scene test runs either way
and only the artifact assertions were gated off.
Verified by running both steps exactly as the workflows invoke them:
pytest tests/st/a2a3/tensormap_and_ringbuffer/dfx/scope_stats/ \
--platform a2a3sim --device 0-15 -p no:xdist --pto-session-timeout 600 \
--require-pto-isa --manual include --enable-scope-stats
1 passed
pytest tests/st/a5/tensormap_and_ringbuffer/dfx/scope_stats/ \
--platform a5sim ... --manual include --enable-scope-stats
1 passed
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe CI workflows add dedicated scope-stats smoke steps for A2A3 and A5. The CI documentation describes their mode selection and ChangesScope-stats CI coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This adds the missing scope-stats artifact checks to the two relevant CI workflows and documents the coverage change; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tests/st/{a2a3,a5}/tensormap_and_ringbuffer/dfx/scope_stats/is the only test of the scope-stats capture pipeline, and its artifact validation never ran in any pipeline._validate_scope_stats_artifactreturns early unless--enable-scope-statsis on (test_scope_stats.py:117), and nothing passed it:To be precise about what was and wasn't covered: the scene half did run. The class is an ordinary
SceneTestCase, so the main sweep compiled and ran itsvector_exampleand checked the golden. What never ran is the part that matters for this feature — thescope_stats.jsonlassertions: at least four begin/end records,dropped == 0, the metadata schema, and the required per-record fields. A collector that silently emitted nothing, or dropped every record, would have kept CI green.Both new steps copy the shape of the
args_dumpstep beside them, including themanual_modemapping that keepsonlyasonlyand otherwise usesinclude, since these steps own the whole corpus under their path.docs/ci.mdhad recorded the omission as a fact — "Scope-stats has no dedicated CI smoke: its ordinary scene test stays in the main sweep, and artifact validation runs only when--enable-scope-statsis supplied explicitly." It now describes the step, and why scope-stats needed one for a different reason than the others: for the other four the dedicated step exists so coverage survives a case being marked manual, whereas here the scene test runs either way and only the artifact assertions were gated off.Testing
check-yamlequivalent (yaml.safe_load) on both workflows;markdownlint-cli2clean ondocs/ci.mdBoth new steps run exactly as the workflows invoke them, including
--manual include:The assertions are not vacuous — the validator checks record count,
dropped == 0, schema and per-record fields, so the step fails if the collector stops producing.This touches
.github/workflows/_*.yml, which.claude/rules/ci-change-detection.md§2 keeps out ofNON_CODEprecisely so a CI-implementation change runs the whole matrix — including the two jobs this PR modifies.