Repository navigation
Description
Problem
A stop in the scoped checks phase discards finished work. The implement job pushes nothing in this phase, so the commits of the finished groups stay in the worktree of the Job. The job then removes that worktree.
Evidence on origin/main at cfcbd3d:
_scoped_checksinsrc/devops_cli/roadmap/implement_run.pysetsstop.push = Falsefor each stop in this phase.stopcalls_kept_noteonly whenstop.pushis true. The stop comment then does not say what the job kept._keepdoes not push thewip:commit of the last task of a group. A step that ends done folds itswip:commits into its own commit.test_a_check_that_no_fix_repairs_stops_the_item_and_pushes_nothingasserts thatoriginholds only the plan commit after two groups passed.test_a_fix_step_that_stops_in_the_scoped_checks_pushes_nothingasserts the same for a fix step that stops.openspec/specs/roadmap-implement-job/spec.mdanddocs/ROADMAP_WORKFLOW.mdstate the rule: "The Job pushes only a head that passed."
This is the case of #3020 and #3078 in #3098: all groups are done and a check is red. A budget stop in a fix step of this phase also loses the work. Thus #3054 keeps the work of a stopped group, but not the work of an item whose groups all passed.
Expected
A stop in the scoped checks phase keeps the finished commits on origin, and the next Job continues from them. The stop comment says what the job kept and where. A pull request that holds this work stays a draft, because draft_readiness decides the ready mark. The plan must name the place: the item branch or a separate ref. The plan must also say how the rule "pushes only a head that passed" changes, and why.
Acceptance criteria
- A test: two groups pass, a scoped check fails after all fix rounds, and
originholds the work of both groups. - A test: a fix step that reaches a budget in this phase leaves the work on
origin, the item Blocked, and a comment that lists the kept work and the next action. - A test: the next Job takes the kept work, runs no finished group again, and runs the scoped checks.
- A test: the draft of a stop in this phase does not get the ready mark.
-
openspec/specs/roadmap-implement-job/spec.mdanddocs/ROADMAP_WORKFLOW.mdstate the new rule.
Existing tool considered
The job already has _push_passed, _kept_note and kept_commits (#3054). This change reuses them and adds no tool.
Related
Moved from #3098, acceptance criteria 3 and 5. Related: #3054, #3043, #3273.
Proposed design
Problem statement
The implement job discards the commits of finished task groups when a scoped check stops the item. _scoped_checks sets stop.push to false, so stop pushes nothing, and the job removes the worktree with the commits. The next Job starts from the staged branch and runs every group again. The change keeps the finished commits on origin, names them in the stop comment, and states the new push rule in the spec and the workflow page.
Acceptance criteria
Requirement: A failed scoped check keeps the finished groups
The job SHALL push the commits of the finished task groups to origin when a scoped check fails after every fix round.
Scenario: Two groups pass and the pre-push check fails
- WHEN Two task groups pass,
repair_roundsis 3, and thepre-pushscoped check exits 1 after the third fix round - THEN
originholds the item branch with the commits of both groups, the item is Blocked at the stepscoped checks, and the stop comment names the branch and the last commit
Requirement: A fix step that spends a budget keeps the work
The job SHALL keep the commits that passed on origin when a fix step in the scoped checks stops with the class limit_reached.
Scenario: A fix step reaches the step token budget
- WHEN The fix step of a failed scoped check stops because it spent
roadmap.implement.step_token_budget - THEN
originholds the item branch with the work of the groups, the item is Blocked, and the comment names the kept work and the action leftraise_limit
Requirement: An error in the scoped checks keeps the work
The job SHALL push the commits that passed when an error or a command that runs out of time stops the item in the scoped checks.
Scenario: Git fails in the scoped checks
- WHEN git fails while the job reads the hook configuration in the scoped checks, after the archive
- THEN
originholds the item branch with the commits of the groups, and the stop comment names the kept work
Requirement: The next Job resumes from the kept work
The next run SHALL take the kept branch from origin, run no step for a group whose every task is ticked, and run the scoped checks.
Scenario: A retry after a stop in the scoped checks
- WHEN A person comments
implement: retryafter a stop in the scoped checks, and the next Job takes the item - THEN the next Job runs no step for a finished group, runs the scoped checks, and its push holds the commits of the first Job
Requirement: The job does not mark a stopped draft ready
The job SHALL stop the item before _ready and SHALL send no ready request when the scoped checks stop it.
Scenario: A stop in the scoped checks
- WHEN The scoped checks stop the item after the job pushed the head
- THEN the job sends no
gh pr readyrequest, and the pull request stays a draft
Requirement: The spec and the workflow page state the new rule
openspec/specs/roadmap-implement-job/spec.md and docs/ROADMAP_WORKFLOW.md SHALL state that a stop in the scoped checks keeps the commits that passed on the item branch, and why.
Scenario: A test reads the two documents
- WHEN A test reads the two documents
- THEN neither states that a stop in the scoped checks pushes nothing, and each states that the job keeps the commits that passed on the item branch
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need: the change is a small change to the job's own push path, and git, already in use, is the tool that pushes. It reuses _push_passed, _push_with_lease, _publish and kept_commits. The cost is about 40,000 tokens to build the code, the tests and the documents, about 5,000 tokens a year to keep and fix them, and less than one day of elapsed time.
Key questions
- Where does the job keep the commits that passed when the scoped checks stop the item?: On the item branch,
/-, with the push that the job already makes for a stop. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:1460, src/devops_cli/roadmap/implement_run.py:973, CONTEXT.md]- Chosen: the item branch.
_push_passed,_push_with_leaseand_publishalready push it, and the next Job takes it fromoriginwith_worktree. - Rejected: a separate ref, such as
refs/implement/. The next Job must fetch it, merge it and delete it, and no draft pull request shows the work; that is new code for no gain. - Rejected: the worktree of the Job.
_worktreeremoves the worktree when the run ends, so the commits are lost.
- Chosen: the item branch.
- How does the rule "The Job pushes only a head that passed" change?: The job pushes only a head that passed the scoped checks, or the commits that passed at a stop in that phase. A pushed head that failed a scoped check stays a draft, and
draft_readinessdecides the ready mark. (best practice) [sources: openspec/specs/roadmap-implement-job/spec.md, docs/ROADMAP_WORKFLOW.md, openspec/changes/archive/2026-11-01-3043-runner-hooks-and-scoped-ci/design.md:13]- Chosen: push the commits that passed at a stop. The scoped checks are a pre-push filter, and the required checks of the draft pull request stay the gate. A stop loses hours of finished work otherwise.
- Rejected: keep the rule and push nothing. That is the defect of this issue: the job removes the worktree and the next Job runs every group again.
- Rejected: push only the
wip:commits. After every group passes there are nowip:commits, so the work is still lost.
- Which stops in the scoped checks keep the work?: Every stop: a check that fails after the last round, a fix step that stops, an error, and a command that runs out of time. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:997, src/devops_cli/roadmap/implement_run.py:1379]
- Chosen: every stop in the phase. Each of these stops ends the run with the worktree removed, so each loses the same finished work.
- Rejected: only the exhausted check budget. A fix step that spends a budget and an error in the phase lose the same work.
- What does the stop comment say about the work that the job kept?: It names the branch on
originand the last commit. When the branch holdswip:commits, it says how many work-in-progress commits it kept. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:927, src/devops_cli/roadmap/implement_run.py:1381, openspec/specs/roadmap-implement-job/spec.md]- Chosen: extend
_kept_notewith a branch fallback. One function and one sentence cover both cases, and the stop calls it once. - Rejected: a second note function for this phase. Two places would write the same sentence.
- Rejected: reuse the
wip:message for the group commits. That message names work-in-progress commits, and the kept commits are group commits.
- Chosen: extend
- Does the pushed head of a stop in the scoped checks get the ready mark?: No. The job stops before
_ready, anddraft_readinessanswers from the checks of the pushed head. (best practice) [sources: src/devops_cli/roadmap/implement_run.py, src/devops_cli/roadmap/implement_pull.py, docs/roadmap/implement.md:72]- Chosen: the job stops before
_readyanddraft_readinessdecides. The pushed head failed a scoped check, so its checks refuse or wait, and a draft cannot merge. - Rejected: add a rule to
draft_readinessfor a stopped item. The issue states that the existing function decides, and the checks of a failed head already refuse.
- Chosen: the job stops before
- Which documents state the new rule?:
openspec/specs/roadmap-implement-job/spec.mdanddocs/ROADMAP_WORKFLOW.md. [sources: openspec/specs/roadmap-implement-job/spec.md, docs/ROADMAP_WORKFLOW.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 5, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.A stop in scoped checks deletes all finished group work, which costs a full re-run of expensive model calls.It prevents loss of multiple completed groups of work and the token cost of redoing them.The building blocks (_push_passed, _kept_note, kept_commits) already exist from #3054; the change reuses them and updates tests, specs, and docs.Both are about the implement job keeping partial work on stop; #3098 is the umbrella covering all stop phases, while this candidate covers only the scoped-checks phase.devops-cli-service commentedon Nov 5, 2026
Status set to Ready at cfcbd3d (see proposed design in issue body).
docs(openspec): plan the scoped checks stop that keeps the work (#3645)
fix(roadmap): a stop in the scoped checks keeps the finished work (#3645
docs(roadmap): a stop in the scoped checks keeps the finished work (#…
docs(openspec): archive the scoped checks stop that keeps the work (#…
docs(roadmap): re-wrap the implement job docstring (#3645)
docs(openspec): plan the scoped checks stop that keeps the work (#3645)
fix(roadmap): a stop in the scoped checks keeps the finished work (#3645
docs(roadmap): a stop in the scoped checks keeps the finished work (#…
docs(openspec): archive the scoped checks stop that keeps the work (#…
docs(roadmap): re-wrap the implement job docstring (#3645)
devops-cli-service commentedon Nov 6, 2026
Released in v0.71.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.71.1
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 19:47 UTC