Skip to content

fix(roadmap): write each stage and alternatives item when done - #4080

Merged
dan-petty merged 5 commits into
mainfrom
fix/4034-write-each-stage-alternatives-item
Nov 7, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/4034-write-each-stage-alternatives-item

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage row and the alternatives row of the Service planned every selected item first and wrote the results after. A stop of the Service, or a kill of the worker, lost every finished plan of the round, and a stage plan can use up to 1.5 million input tokens. Now each row writes the result of an item when the item is done, with StageWriter and AlternativesWriter, as RefineWriter does for the refine row (#3631). A stop of the Service ends a stage round after it records the failures of the finished items. A rate limit on a write ends an alternatives round at once. The plan-only command writes nothing.

Closes #4034

Change: openspec/changes/archive/2026-11-07-4034-write-each-stage-alternatives-item/

@dan-petty dan-petty added type/bug Defect, regression, or incorrect runtime behavior scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 7, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test record for this pull request (before the final rebase, then re-run).

fail-to-pass (devops ci fail-to-pass --base origin/main), run on the base tree:

  • failed on base, pass now (6): stage killed_between_items, stage service_stopping, stage phase order (removals before the first plan call), stage phase order (moved paths per item), alternatives killed_between_items, alternatives rate_limit.
  • guards that pass on base and now (3): both plan-only tests and the rejection order of a selected item.

Full devops ci on the tree before the archive commit: exit 0, 25 rows pass. The test row took 21 min 5 s, over the 5 min budget, because of the slow replays in tests/roadmap/stage/test_roadmap_stage_eval_*.py. This change does not touch them (known class #3593).

After the rebase onto origin/main (two merged changes, one conflict in openspec/specs/roadmap-stage/spec.md, kept both sides): test_roadmap_stage_item_writes.py 6 passed, test_roadmap_alternatives_item_writes.py 3 passed, test_roadmap_stage_apply.py 34 passed, test_roadmap_stage_plan.py 163 passed. devops docs generate --check, devops openspec check and mypy on the three changed source files pass.

@dan-petty
dan-petty marked this pull request as ready for review November 7, 2026 22:08
@dan-petty
dan-petty merged commit a224adb into main Nov 7, 2026
25 checks passed
@dan-petty
dan-petty deleted the fix/4034-write-each-stage-alternatives-item branch November 7, 2026 22:08
@dan-petty

Copy link
Copy Markdown
Owner Author

Update: the Fail-to-Pass check failed on the first push. The pytest plugin tests/support/roadmap_stage.py imported StageWriter at module level, so the replay on the base tree could not load it. The two test helpers now import StageWriter and AlternativesWriter inside the function (c31a450). Local devops ci fail-to-pass --base origin/main now reports 125 tests failed on base and pass on this branch. All 25 checks pass.

dan-petty pushed a commit that referenced this pull request Nov 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.84.1](v0.84.0...v0.84.1)
(2026-11-07)


### Bug Fixes

* **roadmap:** retitle records a skip mark for an item it leaves
([#4077](#4077))
([ede93e1](ede93e1))
* **roadmap:** write each stage and alternatives item when done
([#4080](#4080))
([a224adb](a224adb))

---
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/bug Defect, regression, or incorrect runtime behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): write each stage and alternatives item when done

1 participant