Repository navigation
Description
Problem or Motivation
The implement job takes a Staged item when its branch is on origin and its draft pull request is open, and then runs the task groups of the change folder. It does not check the plan content first. PR #3335 is a Staged plan for #3321 that the stage job opened at 2026-11-03T04:37:55Z with x in every text (commit 837e157), before the content gate of #3200 merged. devops roadmap implement --item 3321 would parse tasks.md, take the group that changes src/devops_cli/roadmap/stage_change.py, and run a step for the task 1.1 x. The step would spend a model call and stop.
The stage job now refuses placeholder text (#3367). A plan that fails any later gate, or a plan whose branch main changed, reaches the same state. #3387 covers the stage side: the stage job replaces a draft whose plan fails the check. The implement side has no such rule, so a plan that the current gate refuses can still start a runner Job.
Proposed Solution & Architectural Design
- In
src/devops_cli/roadmap/implement.py, read the plan of a Staged item from its branch,openspec/changes/<change>/, and callcheck_proposalwith the tree and the change name. When it returns problems, leave the item out with a reason that names the first problem, or stop it with a recorded failure. - Do the same for a Planned item from
tasks_on_defaultbefore the job makes a branch. - Add a test in
tests/roadmap/test_roadmap_implement_job.pyfor a plan with a placeholder task and for a plan that passes. - Name the reason in
devops roadmap explainand in the implement report.
Target Subsystem
src/devops_cli/roadmap/implement.py, src/devops_cli/roadmap/implement_run.py, src/devops_cli/roadmap/planned.py.
Existing Tool Considered
check_proposal and its gates already exist in src/devops_cli/roadmap/stage_change.py, and planned.py already reads tasks.md from the default branch. The change calls the existing check and builds no new rule. Cost: about 20k tokens to build and 1 hour of elapsed time. The change deletes no code.
Proposed design
Problem statement
The implement job can take a Staged or Planned item whose OpenSpec plan fails check_proposal. It then starts a runner Job and spends model calls on invalid tasks. The change adds the existing plan check to implement selection before any branch or step. It reports the first problem in devops roadmap explain and in the implement report.
Acceptance criteria
Requirement: Staged plan check
The implement selection SHALL leave a Staged item out when check_proposal returns problems for its branch plan.
Scenario: A Staged item with a placeholder task
- WHEN The Staged branch holds a plan with the placeholder task
1.1 x. - THEN
plan_implementreturns no target for the item and its reason holds the first problem.
Requirement: Planned plan check
The implement selection SHALL leave a Planned item out when check_proposal returns problems for its default-branch plan.
Scenario: A Planned item with a placeholder task
- WHEN The default branch holds the plan of the item with the placeholder task
1.1 x. - THEN
plan_implementreturns no target and makes no branch for the item.
Requirement: Valid plan selected
The implement selection SHALL select a Staged or Planned item whose plan passes check_proposal.
Scenario: A plan that passes the check
- WHEN The plan of the item passes every
check_proposalgate. - THEN
plan_implementreturns the item as a target.
Requirement: First problem in explain and report
The implement report and devops roadmap explain SHALL show the first check_proposal problem for an item left out by the plan check.
Scenario: A plan with two problems
- WHEN The plan returns two or more problems and the item is left out.
- THEN The report and
explainhold the first problem and do not hold the later problem.
Requirement: Same problem text as stage
The implement plan check SHALL use the problem text of check_proposal without a new rule.
Scenario: A defect that the stage gate refuses
- WHEN A plan holds a defect that
check_proposalrefuses for the stage job. - THEN The implement reason holds the same problem text.
Existing Tool Considered
No alternatives check has run. No external tool covers this repository-specific gate; the change reuses check_proposal and its gates in src/devops_cli/roadmap/stage_change.py and builds no new rule. Written cost: about 20k tokens and 1 hour to build, keep and fix the reader and the wiring.
Key questions
- Where does the implement job run the plan check?: It runs in
_Judge.judgeduringplan_implement, before it returns a target. A refused item never reachesapply_implement, so no runner Job starts. (best practice) [sources: src/devops_cli/roadmap/implement.py, src/devops_cli/roadmap/implement_run.py]- Chosen: In
_Judge.judge. It runs before selection and keepsplan_implementfree of writes. - Rejected: In
apply_implement. The runner Job already started, and the item would spend resources before the check.
- Chosen: In
- What does the job do when
check_proposalreturns problems?: It leaves the item out with a reason that names the first problem. It does not stop the item with a recorded failure. (best practice) [sources: src/devops_cli/roadmap/implement.py, CONTEXT.md]- Chosen: Leave out with the first problem.
plan_implementselects and plans without a write to git or GitHub, and the reason reachesexplainand the report. - Rejected: Stop with a recorded failure. A stop writes the item status and comment, which the selection step does not do, and it needs a runner Job.
- Chosen: Leave out with the first problem.
- How does the job read a Staged plan from its branch?: It adds one reader that builds a
StageProposalfromopenspec/changes//atorigin/, then callscheck_proposalwith that proposal. (best practice) [sources: openspec/changes/3201-add-a-plan-check-command-for/design.md, src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/implement.py]- Chosen: Add one reader for the change folder.
check_proposaltakes aStageProposal, so one reader joins the files to the existing gate. - Rejected: Add a second rule set that reads raw files. It duplicates the stage gates and lets the two jobs disagree.
- Chosen: Add one reader for the change folder.
- Which tree does
check_proposaluse for a Staged item?: It uses the tree oforigin/, because the plan paths must exist at the staged commit that the job will use. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/implement.py]- Chosen: Tree of
origin/. The plan paths must exist at the staged commit that the job will use. - Rejected: Tree of the default branch. A file that the staged branch adds would look missing.
- Chosen: Tree of
- Which tree does
check_proposaluse for a Planned item?: It uses the tree oforigin/, because the plan is on the default branch and the job makes the new branch at that commit. (best practice) [sources: src/devops_cli/roadmap/planned.py, src/devops_cli/roadmap/implement.py]- Chosen: Tree of
origin/. The plan is on the default branch and the job makes the new branch at that commit. - Rejected: Tree of the new branch. The job makes no branch before the check.
- Chosen: Tree of
- Which inputs does the implement plan check give to
check_proposal?: It gives the item body, the base spec facts, the plan tree and the change folder. The criteria gate and the spec-delta gate then judge the same plan as the stage job. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/implement.py]- Chosen: Pass the item body and the base spec facts. The criteria gate and the spec-delta gate need them.
- Rejected: Pass an empty body and no base facts. The criteria gate then skips and the spec-delta gate cannot judge duplicates.
- How does the reason reach
devops roadmap explainand the implement report?:_Judgereturns aLeftOutwith the reason,plan_implementputs it inImplementPlan.left_out, and the report andexplainrender that reason. [sources: src/devops_cli/roadmap/implement.py, src/devops_cli/roadmap/explain.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 3, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The defect wastes a model call and may produce a partial run, but it does not corrupt data or block other work.It stops the implement job from spending a model call on a plan that the gate already refuses, saving cost and avoiding a confusing partial run.The body states the change calls the existing check_proposal function, adds one test, and deletes no code, at about 20k tokens and 1 hour.Both handle a plan that fails the plan check, but #3387 acts on the stage job to replace the draft while the candidate acts on the implement job to refuse execution.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 283a606 (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 2026
Staged: branch
fix/3393-the-implement-job-refuses-a-plan, draft pull request #3403. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 3 model request(s), and used 232224 input tokens and 9050 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
criterion_droppedat group 1: Item 4 of the issue asks to name the reason indevops roadmap explainand in the implement report. No task changes, reads or tests the explain or report code. The plan assumes theLeftOutreason reaches both, but it never readsexplain.pyand no test asserts it. Evidence: "4. Name the reason indevops roadmap explainand in the implement report."docs(openspec): plan #3393 reuse the plan reader and refuse unreadabl…
docs(openspec): plan #3393 Refuse an item whose plan fails the check (#…
15 remaining items
devops-cli-service commentedon Nov 5, 2026
Stopped at group 1.
Failure class:
parser.Action taken: none.
Action left:
change_tier: run the item with a stronger model tier.Reason:
Last message of the agent (a claim that no check verified): Now let's move the helper functions from
plan_check.pytoplan_read.py:The job discarded this work. The diff is cut to 20000 characters. Read it before you retry:
The item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.devops-cli-service commentedon Nov 5, 2026
The runner Job devops-cli-runner-20261105-012359-b184 ended: succeeded.
Image digest: sha256:65ddae4ab7e02eb61aaf58a2e8842f5e879df79a7609976ab3efbfdef7e4dcfa
The last lines of its log:
fix(roadmap): the implement job refuses a plan that fails the plan check
devops-cli-service commentedon Nov 5, 2026
Released in v0.62.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.62.2
fix(roadmap): guardrail for the implement job plan check (#3626)
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 14:22 UTC
feat(roadmap): rewrite a merged plan with plan-recheck (#3832)
docs(openspec): plan #3428 Name the plan reader in the stage context (#…