Skip to content

refactor(roadmap): stage pushes the plan commit on the phases - #6710

Merged
dan-petty merged 3 commits into
mainfrom
refactor/6704-stage-on-phases
Nov 22, 2026
Merged

dan-petty merged 3 commits into
mainfrom
refactor/6704-stage-on-phases

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

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.

  • prepare clones the issue branch into a new run folder (clone_branch).
  • The agent work writes the change folder on the staged commit and the patch (write_patch).
  • publish applies the patch to the tip of the default branch as one bot commit and pushes it with a lease (publish_patch): stage.sha for a re-stage, else the tip that prepare found. A re-stage branch that moved past stage.sha stops the item.
  • A refused draft deletes the pushed branch where the push went.
  • _worktree, _commit_and_push, _push, _rebase_onto_default and the base of add_worktree go.

The planner does not change; --phase and --work come with #6705.

Closes #6704
Change: openspec/changes/archive/2026-11-21-6704-stage-on-phases/

@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 21, 2026
@dan-petty
dan-petty force-pushed the refactor/6704-stage-on-phases branch from 16c91eb to d2fdeb2 Compare November 22, 2026 00:25
- 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
dan-petty force-pushed the refactor/6704-stage-on-phases branch from d2fdeb2 to b5fbe9a Compare November 22, 2026 01:16
@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 01:24
@dan-petty
dan-petty merged commit f075f16 into main Nov 22, 2026
30 checks passed
@dan-petty
dan-petty deleted the refactor/6704-stage-on-phases branch November 22, 2026 01:29
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(roadmap): stage runs on the phases

1 participant