workflow-fix: step9c --map-files misses tests importing/source-inspecting a changed src module
Highlight text on any card (body, plan, or an event) to anchor a comment, or leave a whole-task comment here. Mention @claude to summon a reply.
No comments yet.
Overview / Motivation
Auto-filed by the workflow-fix-on-bug protocol from a prose follow-up raised on task #1112 (emitting agent: experiment-implementer, rankem round).
Goal
Make select_step9c_tests.py --map-files map tests that statically import a changed src/ module (and consider symbol-level source-inspection dependencies), or fail loud when a src/ path yields zero mapped tests.
Workflow gap
- Bug observed:
--map-files src/explore_persona_space/train/sft.pyreturns an empty test mapping whiletests/test_artifacts_recipe.pyimportstrain_lorafrom that module (line 47) ANDinspect.getsource-inspects it (line 553); ause_rslorachange totrain_lora(commit d7908a3837) broketest_artifacts_recipe.py::test_rslora_engine_pinand the selector never surfaced it — the implementer caught it only by running sibling tests directly. - Why it is a workflow gap: the Step-9c mapped-scan gate and the inline payload lint gate both rely on this selector; a round can push
src/payload that breaks the fleet-wide test gate without either gate firing. The miss is not only the exotic source-inspection case — a plain static import edge was not mapped. - Confidence (emitter): low (raised to medium by filer verification — the miss reproduces).
- verified-at-filing:
uv run python scripts/select_step9c_tests.py --map-files src/explore_persona_space/train/sft.py→ 0 mapped tests (header only);grep -n 'getsource\|train_lora' tests/test_artifacts_recipe.py→ import at :47,inspect.getsource(train_lora)at :553;grep -rln 'inspect.getsource' tests/→ 10+ test files use source inspection (breadth of the symbol-level blind spot);git log --oneline --since='7 days ago' -- scripts/select_step9c_tests.py→ 5 commits, none adding src-module import mapping (subjects: staged-index verification #1346, guard-surface rounds #1338, digest crash-tails #1316, ruff pin #1307, rules-pin discovery #1270) (2026-07-20).
Proposed change (candidate diff sketch — refine in planning)
(none — synthesized from prose follow-up; the emitter's sketch in words: extend the mapper's dependency edges from filename/import-graph heuristics to (a) tests importing the changed module path and (b) tests source-inspecting a changed symbol; alternatively a fail-loud "0 tests mapped for a src/ change" warning so the gap is visible at gate time.)
Scope / surfaces
- Primary target:
scripts/select_step9c_tests.py - Grep the workflow surface for the pattern before editing
(
grep -rln 'map-files\|map_files' .claude/ CLAUDE.md scripts/) and update every hit; list them in the plan.
Constraints / invariants
- Workflow-surface only — never experiment code,
configs/, ortasks/. scripts/workflow_lint.py --check-askspasses; ruff on touched files passes; ifworkflow.yamlorCLAUDE.mdchange, they stay consistent with the rule file.- This session runs under
EPM_WORKFLOW_FIX_SESSION=1and carries aworkflow_fix_target:Provenance line — it MUST NOT auto-route any of its own subagents' workflow-fix candidates (recursion guard).
Provenance
- workflow_fix_target: scripts/select_step9c_tests.py
- fingerprint: 219c0bffd790
Verbatim surfaced prose (experiment-implementer report, task #1112 rankem round, 2026-07-20):
scripts/select_step9c_tests.py --map-files src/.../train/sft.pyreturned EMPTY, yet my change totrain_lorabroketest_artifacts_recipe.py::test_rslora_engine_pin, whichinspect.getsource(train_lora). The mapped-test oracle misses tests that source-inspect/import the changed SYMBOL (not just import-graph/naming). Backstop (running sibling tests directly) caught it — low confidence, but worth a look for the step9c selector.