Skip to content

refactor(roadmap): stage runs its three phases on one run folder - #6822

Closed
dan-petty wants to merge 4 commits into
mainfrom
refactor/6813-stage-three-phases
Closed

dan-petty wants to merge 4 commits into
mainfrom
refactor/6813-stage-three-phases

Conversation

@dan-petty

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

Copy link
Copy Markdown
Owner

The stage Job runs on the phases of ADR 0030 on one run folder, as the implement and fix-checks Jobs do, so that #6705 can give the stage agent a real shell with no GitHub credential. devops roadmap stage --job-item <n> --confirm takes --phase prepare|agent|publish|all and --work. all stays the default and runs the three phases in one process, so CronJob roadmap-stage does not change.

prepare reads the round, makes the writes that need no model and clones the staged commit into work/. agent refuses the App key, each GitHub token and a gh login, plans with the current planner and no store, and hands over only what the model made. publish builds the result from the state of prepare with the steps that the planner runs after the model answers, and writes the plan commit and the draft. plan_stage keeps its behavior.

Closes #6813

Change: openspec/changes/archive/2026-11-23-6813-stage-three-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 23, 2026
@dan-petty
dan-petty force-pushed the refactor/6813-stage-three-phases branch from bc55317 to 53f9d78 Compare November 23, 2026 01:49
The stage Job runs on the phases prepare, agent and publish of ADR 0030
on one run folder, as the implement and fix-checks Jobs do. --phase all
stays the default, so CronJob roadmap-stage does not change.
prepare makes the reads that the planner made in its plan, so an error
of these reads fails the item as _plan_each fails it. The texts say
what the code does, and the CLI test replaces the libc edge.
The agent phase hands over only what the model made: the proposal, the
shorter text of the body, the review findings, the counts and a compact
trace. publish builds the title, the body and the files with the steps
that the planner runs after the model answers, on the staged commit.
The agent phase also refuses a gh login that the token lookup finds.
@dan-petty
dan-petty force-pushed the refactor/6813-stage-three-phases branch from 53f9d78 to 6e611f3 Compare November 23, 2026 02:31
@dan-petty

Copy link
Copy Markdown
Owner Author

Closed unmerged. The owner decided on 2026-11-23 to build #6705, the stock Coder agent, together with its phases as one design, and then the template (#6814). Four review rounds of this PR showed that the old stage engine runs most of its checks in the agent phase, and #6705 deletes that engine. So a split of the old engine would need controls for code that is about to go.

The branch stays for reference. These parts can be reused in #6705:

  • the CLI options --phase and --work, and StageWriter.resume;
  • the failure of the item on a failed read in prepare, and the refusal of a gh login in the agent phase;
  • the store fake fail_read;
  • the probes of the reviews.

Two points to keep in #6705:

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 its three phases on one run folder

1 participant