Let autoplan revise accept a plan without section headings, as next does (GST-3050) (#4470)

`gstack-autoplan revise` now accepts a revised plan whenever the first
`next` accepted its shape, so a run no longer pays for a full review
round and then refuses the owner's edit.

Why: a plan with no section headings is reviewed whole by `next`, but
once the owner added one heading, `revise` stopped with
`PLAN_SECTIONS_INVALID`.

Nothing to do: runs already in progress pick this up too.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-18 02:21:31 +00:00
1 parent c9b6fe0ab3
commit 237371474b
5 files changed
+74 -9

No files matched your search

+4 -1
View File
@@ -5354,7 +5354,10 @@ section is refused before anything is written. The error names the problem.
**Fix.** Add the missing heading, or rerun the first `next` with `--scaffold`:
it writes `<out>/plan-source.md` with the missing heading added, reviews that
copy and prints `SCAFFOLDED:`. Your plan file is never edited. Duplicate,
reversed or empty sections are ambiguous and must be fixed by hand.
reversed or empty sections are ambiguous and must be fixed by hand. On
`revise`, a run whose first plan was scaffolded or had no headings at all gets
the one missing heading added to its own copy (`SCAFFOLDED:`); a run whose first
plan had both headings refuses a revision that drops one, and says so.
<a id="plan-amend-pending"></a>
### `PLAN_AMEND_PENDING`
+3 -1
View File
@@ -690,7 +690,9 @@ by its runner. Result codes: `EXECUTION_UNKNOWN`, `RUN_LOCKED`,
`answer` prints `PLAN_SOURCE_CHANGED` when the source plan moved since the
snapshot. A plan without both `## Implementation plan` and `## Review record`
refuses with `PLAN_SECTIONS_INVALID`; `next --scaffold` reviews a copy with
the missing heading added. `resume` completes an interrupted revise.
the missing heading added, and `revise` does the same (`SCAFFOLDED:`) when
the run's first plan was scaffolded or had no headings. A revise from a
different file prints `PLAN_INPUT: <old> -> <new>`. `resume` completes an interrupted revise.
- **Admission and upgrades.** `next`, `submit`, `answer`, `revise`, `export`
and `run` refuse on a Capy host (`GSTACK_CAPY=1`) without an ok install
verdict for this checkout, HEAD and workflow at `$GSTACK_INSTALL_VERDICT`