Repository navigation
Description
Problem Description
The stage verification pass keeps a plan pull request in draft with the label plan/needs-fix for an open finding, but it sends only some open findings back to the planner. In src/devops_cli/roadmap/stage/stage_verify.py, OPEN_TYPES = RETURN_TYPES | {SPEC_DELTA_WRONG, CRITERION_DROPPED}. The repair loop in stage.py (_verified) starts a repair round only when returning() gives a finding, and returning() takes only RETURN_TYPES. So a plan whose open findings are all spec_delta_wrong, criterion_dropped or a placeholder gets no repair round: it opens as a draft with plan/needs-fix, and no job revisits it.
Reproduction Steps
- Stage an item whose first review gives only a
criterion_droppedfinding that quotes the issue. - Read the log line
stage review round:of the item. - See
round=0 ... returned=0 open=1, and no request to the planner after the review.
Expected vs Actual Behavior
Expected: each open finding (a finding that keeps the plan in draft) sends the plan back to the planner while a repair round remains, as missing_path does.
Actual: spec_delta_wrong, criterion_dropped and placeholder findings keep the plan in draft but never go back to the planner.
Environment Diagnostics
Service roadmap-service, release 0.118.0, origin/main at a172563.
Logs, Traces, or Terminal Output
Loki, last 24 hours, lines stage review round: (2026-11-12). Of 7 plan pull requests, 5 ended with returned=0 and open>=1:
- refactor: Delete unused functions after manual caller check #1910: round 0, open 2
- fix(github): Fix check-readiness base and monitor merged state #2530: round 0, open 1
- fix(telemetry): emit traffic per repository on a schedule #4757: round 1, open 1
- feat(roadmap): Emit inbox gauges, add panel, show digest line #2968: round 1, open 2
- fix(telemetry): keep one metric stream per workload #4697: round 1, open 1
The other 2 (#4472, #4945) used all CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS (2) rounds with findings that return the plan still open; #4851 covers more rounds.
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.
Proposed design
Problem statement
The stage verification pass keeps a plan pull request in draft with plan/needs-fix for an open finding. The repair loop of _verified starts a repair round only for the types of RETURN_TYPES. A plan whose open findings are all spec_delta_wrong, criterion_dropped or a placeholder gets no repair round. It then stays in draft, and no job revisits it. The fix starts a repair round for each open finding while a repair round remains.
Acceptance criteria
Requirement: Open finding starts a repair round
The stage job SHALL start a repair round when the review leaves an open finding and a repair round remains.
Scenario: Only a spec_delta_wrong finding is open
- WHEN The review returns one
spec_delta_wrongfinding that quotes the issue, andCONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDSrounds remain. - THEN The stage job sends one planner request whose problem text names the finding, and it opens no draft in that round.
Requirement: Placeholder finding starts a repair round
The stage job SHALL start a repair round for an open finding that reports a placeholder, whatever its defect type.
Scenario: An other finding reports a placeholder
- WHEN The review returns one
otherfinding whose quote is a placeholder text of the request, and a repair round remains. - THEN The stage job sends one planner request for the plan.
Requirement: Each open finding goes to the planner
The stage job SHALL put each open finding of the round into the problem text that it sends to the planner.
Scenario: Two open findings of different types
- WHEN The round has one
criterion_droppedfinding and onemissing_pathfinding that quote the issue. - THEN The planner request names both findings.
Requirement: The last round keeps the draft label
The stage job SHALL keep the plan pull request in draft with the label plan/needs-fix when an open finding remains after the last repair round.
Scenario: An open finding after the last round
- WHEN Each review of the two repair rounds returns an open
spec_delta_wrongfinding. - THEN The pull request stays a draft with the label
plan/needs-fix, and the job sends no third planner request.
Requirement: Refine keeps its advice rule
The refine judge SHALL NOT return a proposal for a criterion_dropped finding.
Scenario: The refine review reports a dropped criterion
- WHEN The refine review of a proposal returns one
criterion_droppedfinding that quotes the proposal. - THEN The refine judge records no return for that finding.
Requirement: The spec and the doc state the rule
The change SHALL state in the spec delta of roadmap-stage/verification and in docs/roadmap/stage.md that each open finding returns the plan while a repair round remains.
Scenario: The spec delta names the open findings
- WHEN The change is validated with
openspec validateand the verification section ofdocs/roadmap/stage.mdis read. - THEN The validation passes, and the text names
spec_delta_wrong,criterion_droppedand a placeholder finding as open findings that return the plan.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need: the rule lives in the project's own stage job, in src/devops_cli/roadmap/stage/stage_verify.py and src/devops_cli/roadmap/stage/stage.py. The change edits the trigger of the repair loop and reuses open_findings. The cost to build and keep it is about 2,000 tokens and under one hour.
Key questions
- Which findings start a repair round of the stage job?: Each open finding of the round starts a repair round, while
CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDSrounds remain. The stage job usesopen_findingsfor this test, and notreturning. (best practice) [sources: src/devops_cli/roadmap/stage/stage_verify.py:61, src/devops_cli/roadmap/stage/stage.py:1485, docs/roadmap/stage.md:81, openspec/changes/archive/2026-11-06-3039-verifier-reads-repo-two-rounds/design.md:26]- Chosen: Trigger the round on
open_findings. It coversspec_delta_wrong,criterion_droppedand a placeholder finding, and it leavesRETURN_TYPESandreturningas they are. - Rejected: Add
SPEC_DELTA_WRONGandCRITERION_DROPPEDtoRETURN_TYPES. It changes the type set that other readers ofRETURN_TYPESsee, and a placeholder finding of typeotherstill gets no round. - Rejected: Keep the current behavior. The issue logs show 5 of 7 plan pull requests with
returned=0andopen>=1.
- Chosen: Trigger the round on
- Does a finding that reports a placeholder start a repair round when its type is not a return type?: Yes.
open_findingsholds a finding whose quote is a placeholder of the request. The stage job returns the plan for it. (best practice) [sources: src/devops_cli/roadmap/stage/stage_verify.py, src/devops_cli/roadmap/pull_form.py]- Chosen: Return the plan for the placeholder finding. The finding keeps the plan in draft, so it needs the same repair as a typed finding.
- Rejected: Return the plan for typed findings only. The plan then stays in draft with no repair, which is the defect of the issue.
- Does a
criterion_droppedfinding return the plan to the planner in the stage job?: Yes. The archived design of fix(roadmap): the stage review blocks a plan that does not deliver an acceptance criterion #3448 chose the opposite, to save one planner call. That choice leaves the plan in draft with no repair. The stage job returns each open finding, as the design of feat(roadmap): an independent verifier refutes a plan before the draft pull request opens #3039 states. (best practice) [sources: docs/roadmap/stage.md:81, openspec/changes/archive/2026-11-06-3039-verifier-reads-repo-two-rounds/design.md:26, openspec/changes/archive/2026-11-06-3448-criterion-dropped-keeps-plan-draft/design.md:7, src/devops_cli/roadmap/stage/stage.py:1485]- Chosen: Return the plan for
criterion_dropped. It gives the planner the repair that the open finding asks for, and it matches the expected behavior of the issue. - Rejected: Keep the fix(roadmap): the stage review blocks a plan that does not deliver an acceptance criterion #3448 trade-off. A false finding then costs one label and no repair, and a true finding leaves the plan stuck in draft.
- Chosen: Return the plan for
- Where does the stage job hold the repair-round trigger?: In
_verifiedofsrc/devops_cli/roadmap/stage/stage.py. The exported helperreturningand the setRETURN_TYPESstay as they are. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:1485, src/devops_cli/roadmap/stage/stage_verify.py:61, docs/roadmap/stage.md:81]- Chosen: Change
_verifiedonly. The issue names the repair loop of_verified, and the change stays in that loop. - Rejected: Change the exported
returninghelper. The fix needs no change to an exported helper, and a wider change reaches callers that the issue does not name.
- Chosen: Change
- Which documents must the change update?:
docs/roadmap/stage.mdand a spec delta ofroadmap-stage/verification. The requirement "Other findings go into the comment" no longer holds forspec_delta_wrongandcriterion_dropped. (best practice) [sources: docs/roadmap/stage.md:81, openspec/specs/roadmap-stage/verification/spec.md, CONTEXT.md]- Chosen: Update the doc and the spec delta. The doc states the return types, and the spec holds the rule that the change alters.
- Rejected: Update the doc only. The living spec then keeps a rule that the code contradicts.
- Does the change keep the repair-round limit at two?: Yes.
CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDSstays 2, and feat(roadmap): extend stage gate returns while the plan improves #4851 covers more rounds. [sources: src/devops_cli/config/constants.py:3371, docs/ROADMAP_WORKFLOW.md:344]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Five of seven plan pull requests in 24 hours were stuck in draft with no repair round, blocking the pipeline.Both deal with criterion_dropped in the stage verify loop, but #3448 made it keep the plan in draft while the candidate makes it return the plan to the planner for repair.devops-cli-service commentedon Nov 12, 2026
Status set to Ready at acb4e19 (see proposed design in issue body).
devops-cli-service commentedon Nov 12, 2026
Released in v0.119.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.119.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 15:46 UTC