Repository navigation
Description
Problem Description
uv run devops roadmap eval stage --replay judges neither the module-test gate (#3414) nor the caller gate (#3307). The replay builds StagedTree(self.facts.tracked) in src/devops_cli/roadmap/stage/stage_eval_cases.py, with no checkout, no file reader and no search. record_module_tests then records no test, and StagedTree.callers returns no file. So a change to either gate gives the same replay output before and after, and the golden set cannot show that a change keeps a defect that the gate caught, or stops a false refusal.
Reproduction Steps
- Run
uv run devops roadmap eval stage --replayon a commit before fix(roadmap): the module-test and caller gates refuse correct plans #4467 and on the commit of fix(roadmap): the module-test and caller gates refuse correct plans #4467. - Compare the two outputs.
Expected vs Actual Behavior
Expected: the replay judges each gate that the stage job runs, so a gate change shows in the score. A case can hold the files that the gate reads (the test files and the modules), or a recorded search.
Actual: the two outputs are the same. In the 36 stored refused replies of 2026-11-10 and 2026-11-11, the change of #4467 moved the module-test problems from 35 to 19 and the caller problems from 26 to 4, and the replay showed none of it.
Environment Diagnostics
- DevOps CLI Version: 0.110.0
- Execution Environment: Local Workstation
Logs, Traces, or Terminal Output
Good plans that every gate accepts: 5 of 5.
Result: every gate refuses what it must refuse.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Alternatives check of 2026-11-20: not-applicable.
Class: test, no search.
Tool: none found.
Proposed design
Problem statement
The stage replay builds a tree from tracked paths only. The tree holds no file text and no search. The module-test gate and the caller gate return no problem. A change to either gate gives the same replay output before and after. The replay cannot show that a change keeps a caught defect or stops a false refusal.
Acceptance criteria
Requirement: Case facts hold gate files
The CaseFacts model SHALL hold optional files and search fields for the file text and search hits that the gates read.
Scenario: A case records a module and its test
- WHEN A case's
facts.jsonholds file text forsrc/example.pyandtests/test_example.pyand a search hit for the module import. - THEN The loaded case returns both file texts and the search hit.
Requirement: Replay tree reads recorded callers
StagedTree.callers SHALL read the recorded file text when the tree holds no checkout.
Scenario: The caller gate reads a recorded caller
- WHEN A case records
src/example.pywith a call tohelperandsrc/helper.pythat defineshelper, and the replay builds its tree. - THEN
tree.callers("helper")returnssrc/example.py.
Requirement: Module-test gate uses recorded search
The replay SHALL pass the case search to record_module_tests so that the module-test gate reports a missing test.
Scenario: A behavior group omits the test of its module
- WHEN A case records a behavior group that changes
src/example.pyand recordstests/test_example.pyas a search hit for the module import, but no group names that test. - THEN The replay reports the module-test problem for
src/example.py.
Requirement: Caller gate uses recorded files
The replay SHALL pass the recorded file text to the caller gate so that the gate reports a caller that the plan does not update.
Scenario: A changed symbol has a caller
- WHEN A case records
src/example.pythat calls the changed symbol andsrc/helper.pythat defines it, and the plan changes that symbol but does not namesrc/example.py. - THEN The replay reports the caller problem for
src/example.py.
Requirement: Old cases stay valid
A case with no files and no search SHALL load and replay with the same empty file text and search as before.
Scenario: A case from before the change
- WHEN A stored case holds no
filesand nosearchand names no module-test or caller defect. - THEN
load_casesreturns the case with emptyfilesandsearch, and the replay result is unchanged.
Requirement: Good gate case passes
A good case that records its module, its test and its callers SHALL pass the module-test gate and the caller gate.
Scenario: A good plan names its test and callers
- WHEN A
goodcase recordssrc/example.py,tests/test_example.py, and a caller file, and its groups name the test and the caller. - THEN The replay reports no module-test problem and no caller problem.
Existing Tool Considered
The alternatives check in the issue body records not-applicable for this test-class item: it makes no search and found no tool. The need is the repository's own stage-eval fixture format and replay loop, so the change builds its own code. The written cost is about 10,000 to 20,000 tokens to build, keep and fix that code, and about 2 to 3 days of elapsed time.
Key questions
- Where does the replay build the tree for a case?:
StageCase.tree()insrc/devops_cli/roadmap/stage/stage_eval_cases.pybuildsStagedTree(self.facts.tracked)and then adds the change files. It passes no file reader and no search. [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py] - Why does
StagedTree.callersreturn no file in the replay?:StagedTree.callersreturns[]when itssourceorreaderisNone. Otherwise it runsgit grepin the checkout and reads the matched files. A replay tree has neither a checkout nor a reader. [sources: src/devops_cli/roadmap/stage/stage_paths.py] - How should the replay provide file text and search hits?: Add optional
filesandsearchfields toCaseFacts. BuildStagedTreewith the recorded file text as its text map. Add a search callable toStageCasethat returns the recorded hits. The replay reads no git and stays deterministic. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py, src/devops_cli/roadmap/stage/stage_paths.py]- Chosen: Record file text and search hits in the case. It keeps the replay offline and deterministic.
- Rejected: Check out the base commit for each case. It needs a deep clone, is slow, and breaks offline replay.
- Rejected: Stub the gate results. The replay would not judge the gate.
- How should the replay pass search to the module-test gate?: Add a search callable to
StageCase. Pass it torecord_module_testsin the same place that the stage job passes its search callable. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py, src/devops_cli/roadmap/stage/stage_paths.py, src/devops_cli/roadmap/stage/stage.py]- Chosen: Use the case search callable. It matches the live stage job and lets a gate change show.
- Rejected: Precompute module tests in the case. A gate change would not show.
- Should a case that lacks recorded gate data fail to load?: No. The new
filesandsearchfields default to empty. Old cases and cases without these gates load and replay as before. A case that records a module-test or caller defect needs its data, or the replay fails the case because the gate refuses nothing. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py]- Chosen: Default the new fields to empty. It keeps old cases valid and avoids a large fixture rewrite.
- Rejected: Fail to load a case with no gate data. It would reject old cases and cases that do not use these gates.
- Which files must a case record for the caller gate?: Record the changed module and each file under
src/that calls a changed function. The case author takes that list from the live gate trace.StagedTree.callersreads only recorded file text. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py, src/devops_cli/roadmap/stage/stage_paths.py]- Chosen: Record the changed module and the caller files. It gives the gate the callers it needs and keeps the case small.
- Rejected: Record only the changed module. Callers outside the module stay invisible.
- Rejected: Record every tracked Python file. The case grows large and the replay slows.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(roadmap)scope of the title gives the scope.The golden set cannot verify gate changes, but the gates themselves work in production, so this is a quality gap not a user-facing defect.It closes a blind spot in the regression set for two live gates, but does not change user-facing behaviour.The replay needs a file reader and a search step for two gates, plus updated fixtures and golden expectations.Both items fix a replay that cannot judge a gate because it lacks infrastructure, but #3412 adds reference-hit recording while this adds file reader and search for module-test and caller gates.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 9087b39 (see proposed design in issue body).
devops-cli-service commentedon Nov 11, 2026
Alternatives check: not-applicable
Class: test. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.