Repository navigation
Description
Problem or Motivation
The stage job opens a plan pull request as a draft with the label plan/needs-fix when its last verification review has an open finding (#3264). No job revisits such a pull request. The row stage_ready refuses it, a later stage round does not take the item again, and the pull request stays a draft until a person fixes it. On 2026-11-12, 6 plan pull requests are open with plan/needs-fix: #4849, #4917, #4963, #4980, #5032 and #5053. #5059 makes the stage job send every open finding back to the planner during the stage round, but a plan that is still open after the last repair round, and each plan that opened before #5059, needs a later repair.
Proposed Solution & Architectural Design
A step job fix-plan (src/devops_cli/roadmap/steps/fix_plan.py, CLI devops roadmap step fix-plan --pull N) repairs one open plan pull request with plan/needs-fix for each call:
- Read the open findings from the marked stage comment of the pull request, and the plan from its branch.
- Run the stage planner on the existing branch with the plan as
previousand the open findings asproblem, as the stage repair round does (StageJob._repaired). Then run the stage gates and the verification review (StageJob._review) on the revision. - Push the revision with the push step, so that the push holds
origin/main(feat(git): refuse a push that does not hold origin/main #4879, fix(roadmap): the final push of the implement Job can miss the latest main #4957). - Update the marked stage comment with the findings of the new review.
- When the review has no open finding, remove
plan/needs-fix, so thatstage_readycan mark the draft ready. Otherwise record the attempt and keep the label.
Bounds: bot plan pull requests only; at most 2 attempts for each plan, at least 6 hours apart; no attempt while the Service drains (the drain guard of #4925); stop on an owner/* label or on a head that is not the head that the step read. Record keys fix_plan.attempts, fix_plan.last_at and fix_plan.result.
The step reuses the stage planner, gates and verification code. It does not copy them. A seam in stage.py that runs one repair round for a given plan and findings, which the stage repair loop and this step both call, is the expected shape.
First input: the 6 open pull requests above.
Target Subsystem
Roadmap steps (src/devops_cli/roadmap/steps/) and the stage verification repair (src/devops_cli/roadmap/stage/stage.py, stage_verify.py).
Existing Tool Considered
No open tool repairs an OpenSpec plan from review findings. The step reuses the stage job code, the push step (#4957) and the marked-comment writer (#5025). Cost to build: about 1M tokens and 1 agent-day; at run time at most 2 planner runs and 2 reviews for each plan.
Acceptance Criteria
- A test: a plan pull request with
plan/needs-fixand a quotedcriterion_droppedfinding gets one planner request with the finding asproblem, and a clean review removes the label. - A test: a review that still has an open finding records the attempt and keeps the label.
- A test: a third attempt, an attempt within 6 hours of the last, and an attempt during a drain each make no model request.
- A test: the push holds
origin/main. - A dry-run test sees 0 requests.
Dependencies
- fix(roadmap): stage returns every open review finding to the planner #5059 (fix(roadmap): stage returns every open review finding to the planner), merged first, so the repair round returns every open finding.
- fix(roadmap): the final push of the implement Job can miss the latest main #4957 (push step) and refactor(roadmap): one marked-comment writer for every job #5025 (marked-comment writer).
- Part of feat(roadmap): track the Service step jobs #5014 (track the Service step jobs).
Source: #5014
Activity
dan-petty commentedon Nov 12, 2026
Both repair plan PRs with plan/needs-fix by re-running the planner and review. #5059 fixes the in-stage repair round to return all findings; the candidate adds a separate step job callable after the stage to repair a plan still open with fifeat(roadmap): a fix-plan step repairs a plan PR with open findings
test(roadmap): count the row fix_plan and its limits in the row tests
feat(roadmap): fix-plan reads the open findings of the last plan comment
feat(roadmap): the fix-plan report shows the counts of the attempt
test(roadmap): keep the stage comment fixture as text
test(config): declare the variable of roadmap.fix_plan.mode
docs(openspec): archive the fix-plan change
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