Repository navigation
refactor(roadmap): stage pushes the plan commit on the phases - #6710
Merged
Merged
Conversation
1 task
dan-petty
force-pushed
the
refactor/6704-stage-on-phases
branch
from
November 22, 2026 00:25
16c91eb to
d2fdeb2
Compare
- The stage round runs prepare, the agent work and publish of the plan commit in one process (stage_phases.py). prepare clones the issue branch into a new run folder, the agent work writes the change folder on the staged commit and its patch, and publish applies the patch to the tip of the default branch as one commit and pushes it from a new repository with a lease: stage.sha for a re-stage, else the tip that prepare found. - _worktree, _commit_and_push, _push and _rebase_onto_default go. - clone_branch takes the identity of the commit. - The orphan cleanup keeps stage.pending when it keeps the App-only branch of a Ready item, so the next round resumes on it (#6668).
- push_plan refuses a re-stage whose branch moved past stage.sha before it publishes, also when the new tree is the tree of stage.sha and no push would meet the lease. - A draft that GitHub refuses deletes the pushed branch with the delete_branch of the phases, from the repository that the push went to, so the refusal stays the failure of the item. - The base of add_worktree goes: only the old stage push read it. - The orphan cleanup clears stage.pending again, as on main: #6668 waits for #6528. - The staged-commit spec, the CronJob comment, the workflow text of a re-stage and two test comments describe the phases.
- The staged-commit requirement goes as REMOVED, and "A staged plan goes onto the tip of the default branch" replaces it as ADDED, so the delta applies to the specs of main; the living spec is the output of the archive. - The refused-draft test gives a body in the plan form, so the POST that GitHub refuses runs, and the item fails with GitHubOperationError. - The moved re-stage message says "not at the commit", which also holds for a branch that is gone or rewritten.
dan-petty
force-pushed
the
refactor/6704-stage-on-phases
branch
from
November 22, 2026 01:16
d2fdeb2 to
b5fbe9a
Compare
dan-petty
marked this pull request as ready for review
November 22, 2026 01:24
dan-petty
pushed a commit
that referenced
this pull request
Nov 22, 2026
🤖 I have created a release *beep* *boop* --- ## [0.191.1](v0.191.0...v0.191.1) (2026-11-22) ### Bug Fixes * **pr:** Measure the body above its trailer lines ([#6701](#6701)) ([ad63da9](ad63da9)) ### Performance Improvements * **roadmap:** Cut review reads with a snapshot and counts ([#6716](#6716)) ([df731a7](df731a7)) ### Code Refactoring * **roadmap:** fix-conflict runs on the phases ([#6709](#6709)) ([6e497c2](6e497c2)) * **roadmap:** stage pushes the plan commit on the phases ([#6710](#6710)) ([f075f16](f075f16)), closes [#6704](#6704) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stage Job now pushes the plan commit on the phases of ADR 0030, as implement and fix-checks do, so no worktree of the clone that the planner reads pushes.
prepareclones the issue branch into a new run folder (clone_branch).write_patch).publishapplies the patch to the tip of the default branch as one bot commit and pushes it with a lease (publish_patch):stage.shafor a re-stage, else the tip thatpreparefound. A re-stage branch that moved paststage.shastops the item._worktree,_commit_and_push,_push,_rebase_onto_defaultand thebaseofadd_worktreego.The planner does not change;
--phaseand--workcome with #6705.Closes #6704
Change:
openspec/changes/archive/2026-11-21-6704-stage-on-phases/