Skip to content

fix(roadmap): keep the last valid plan on a schema error - #6484

Merged
dan-petty merged 5 commits into
mainfrom
fix/6357-keep-the-last-valid-stage-plan
Nov 20, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/6357-keep-the-last-valid-stage-plan

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

A stage reply to a gate return or to a repair round that broke the reply schema ended the item with the class parser, and the earlier valid plan was lost. From 2026-11-18 to 2026-11-20, 15 of 21 parser failures had such a plan: 9 after a gate return, 6 after a review round.

The new method _ask_return asks each reply that has an earlier plan, in _returned and in _repaired. When that reply breaks the schema, the planner gets the earlier plan again, with the problem of the request and the violations (stage_schema_return). The return counts against roadmap.stage.gate_returns, so the bound of planner calls stays. A schema failure after the last return ends the item as parser. A first reply has no earlier plan and keeps its one output retry.

_returned compares the findings of a reply only with a reply that the checks refused in the same call.

Closes #6357

Change: openspec/changes/archive/2026-11-20-6357-keep-the-last-valid-stage-plan/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 20, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the fix/6357-keep-the-last-valid-stage-plan branch 2 times, most recently from fe1b34d to 22ade22 Compare November 20, 2026 01:32
@devops-cli-service devops-cli-service Bot changed the title docs(openspec): plan #6357 keep the last valid plan on a schema error fix(roadmap): keep the last valid plan on a schema error Nov 20, 2026
@devops-cli-service devops-cli-service Bot added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them and removed type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 20, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the fix/6357-keep-the-last-valid-stage-plan branch from 22ade22 to 48678c0 Compare November 20, 2026 01:42
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Step Status Attempts Tokens in/out Last failing command
group 1 done 1 5346890/16228 pytest on base: tests/roadmap/stage/test_roadmap_stage_repair_return.py
group 2 done 1 348161/3072 -
  • tools: read_file 27, run_command 27, edit_file 13, grep 12
  • scoped check pre-push: passed, 27 s
  • scoped check static: passed, 118 s
  • scoped check tests: passed, 34 s
  • scoped check strength: passed, 0 s
  • scoped check tests: the changed files select more than 30 test modules, so only the changed test modules ran. The required checks of CI run the others
  • group 2: skipped, group 2: kind other
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.roadmap.stage.test_roadmap_stage_repair_return::test_the_return_of_a_revision_schema_failure_names_the_violations, tests.roadmap.stage.test_roadmap_stage_repair_return::test_the_last_gate_return_of_a_revision_schema_failure_ends_as_parser, tests.roadmap.stage.test_roadmap_stage_repair_return::test_a_revision_that_breaks_the_schema_returns_the_last_valid_plan.
  • verify of group 2: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6357
\u2713 All documentation files are up to date.
Bytecode compiled 23345 files in 2.35s
Bytecode compiled 23345 files in 2.43s

@devops-cli-service

Copy link
Copy Markdown
Contributor Author

Check results

Head commit: 48678c0007fde3caf4010cd0b74ab9928b10cfbb

Check Conclusion Link
Tests & Coverage success run
devops-cli success run
zizmor success run
trivy-config success run
Trivy success run
Plan Check skipped run
CodeQL success run
Test Job Duration skipped run
Dependency Freshness skipped run
Tests on Main skipped run
Tests & Coverage (shard 1 of 5) success run
Runner Image success run
Tests & Coverage (shard 3 of 5) success run
Static Analysis success run
Tests & Coverage (shard 4 of 5) success run
Tests & Coverage (shard 5 of 5) success run
MCP Server Image success run
Changed-Test Independence success run
Tests & Coverage (shard 2 of 5) success run
Design Tokens success run
Service Image success run
Fail-to-Pass Check success run
Semantic PR title success run
Analyze (python) success run
Docs Site Build success run
Analyze (actions) success run

Fail-to-pass run: https://github.com/dan-petty/devops-cli/actions/runs/44655576431/job/136020836478

Skipped check: Plan Check
Skipped check: Test Job Duration
Skipped check: Dependency Freshness
Skipped check: Tests on Main

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 20, 2026 01:49
@dan-petty
dan-petty marked this pull request as draft November 20, 2026 16:15
@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 20, 2026 16:15
devops-cli-service Bot and others added 5 commits November 20, 2026 16:43
A reply to a gate return that breaks the reply schema goes back with the refused plan, its problem and the violations, as one more gate return. The repair round uses the same method, and its return keeps the findings of the review in the problem. A reply is compared only with a reply that the checks refused in the same call.
@dan-petty
dan-petty force-pushed the fix/6357-keep-the-last-valid-stage-plan branch from 48678c0 to 7ed6396 Compare November 20, 2026 16:43
@dan-petty
dan-petty merged commit 9564fb5 into main Nov 20, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/6357-keep-the-last-valid-stage-plan branch November 20, 2026 17:11
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 Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): keep the last valid stage plan on a revision schema error

1 participant