mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-16 05:17:24 +01:00
wave autoplan-e97beb7bf577: merge #3781 (2a55f70e67)
This commit is contained in:
commit
370a37b8b3
43 files changed
+726
-172
No files matched your search
@@ -37,8 +37,8 @@ unknown is reserved for existing behavior you could not inspect. In a live audit
|
||||
you never triggered are unknown, not extrapolated.
|
||||
|
||||
**Caps.** Name the path and item behind every cap and show the corrected error line.
|
||||
- **4/10 (Critical finding, title `CAP4:<path>:<item>`):** a path leaks a secret, signals failure as success, gives an unsafe fix, or blocks waiting for a terminal (hangs, or fails for lack of a terminal without naming a non-interactive alternative such as `--yes`).
|
||||
- **6/10 (High finding, title `CAP6:<path>:<item>`):** a path lacks an applicable fix, recovery, context or trace item.
|
||||
- **4/10 (Critical finding, title `CAP4:<path>:<item> <what fails>`):** a path leaks a secret, signals failure as success, gives an unsafe fix, or blocks waiting for a terminal (hangs, or fails for lack of a terminal without naming a non-interactive alternative such as `--yes`).
|
||||
- **6/10 (High finding, title `CAP6:<path>:<item> <what fails>`):** a path lacks an applicable fix, recovery, context or trace item.
|
||||
|
||||
Every mode, DX TRIAGE included, reports every CAP4 finding.
|
||||
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ not a new ask ([carry-forward](unattended.md#carry-forward)).
|
||||
|
||||
**The record.** `gstack-approvals import --autoplan <run dir> --by "<owner>"` (with
|
||||
`--stack <b1,b2,...>` for a stacked PR set) writes the approval row (date, the ask, the owner's exact words, the lane that answered as relayer,
|
||||
what it covers); `gstack-approvals render` puts it in the report and the PR body. Before
|
||||
what it covers; a gate answered with `--words-by agent:<id>` is listed under that agent as its own decision, not the owner's words); `gstack-approvals render` puts it in the report and the PR body. Before
|
||||
training the PR the controller compares that row's words and `gate_rev` with the ask it
|
||||
relayed and the reply it carried back; a row that does not match is not READY (shape A).
|
||||
The brief's done line names the row. A plan approval is not a READY field; the
|
||||
|
||||
@@ -314,6 +314,18 @@ network.
|
||||
|
||||
**Expected result.** `OUTSIDE_STATUS: completed`.
|
||||
|
||||
<a id="outside-review-truncated"></a>
|
||||
### `... outside review unavailable: the reviewer hit its output token limit and the response is cut off (...)`
|
||||
|
||||
**Meaning.** The api runner's provider stopped at the output token limit
|
||||
(Anthropic `stop_reason: max_tokens`, OpenAI `finish_reason: length`), so the
|
||||
review ends mid-sentence and its findings may be missing.
|
||||
|
||||
**Fix.** Re-run with a larger `--max-tokens` (`gstack-outside-voice run` or
|
||||
`gstack-autoplan run`; Anthropic defaults to 16384), or shorten the prompt.
|
||||
|
||||
**Expected result.** `OUTSIDE_STATUS: completed`.
|
||||
|
||||
<a id="outside-review-missing-markers"></a>
|
||||
### `... outside review unavailable: the response lacks the markers this gate requires (...)`
|
||||
|
||||
|
||||
+31
-7
@@ -373,7 +373,14 @@ the plan.
|
||||
refuses to open without one (`CONSENSUS_MISSING`).
|
||||
3. **Loop `next` until `status=gate_pending`.** Eng always runs last. The gate
|
||||
(`gate.json`, `gate_rev`) lists user challenges as approval items,
|
||||
disagreements as auto items and `p1` plan approval; nothing is approved.
|
||||
disagreements as auto items, each open Critical or High finding as an
|
||||
auto item (a twin pair is one item; `a` applies the reviewer's fix to the
|
||||
plan and is recommended, `b` carries it into the build as a blocking task)
|
||||
and `p1` plan approval; nothing is approved. An unanswered auto item whose
|
||||
recommendation changes the plan keeps the plan's direction, so only `rec`,
|
||||
`p1b` (approve with the recommended changes) or an explicit `<id>a` applies
|
||||
a fix; a finding carried with `b` stays
|
||||
open, so a rerun that raises it again asks again.
|
||||
4. **Answer the gate** with the reply grammar and the revision you read:
|
||||
```bash
|
||||
$AP answer --out <dir> --gate-rev 1 --reply "rec" --by human # every recommendation, plan changes included (APPLY: ...; amend_pending)
|
||||
@@ -384,12 +391,18 @@ the plan.
|
||||
means an agent relayed them, and then `--owner-reply` (or `-` for stdin,
|
||||
`--owner-reply-file <path>`) stores the owner's words verbatim
|
||||
(`OWNER_REPLY_REQUIRED`); owner words that parse to different choices are
|
||||
refused (`GATE_OWNER_REPLY_MISMATCH`). An unattended run refuses an answer
|
||||
refused (`GATE_OWNER_REPLY_MISMATCH`). The words default to the owner's: an
|
||||
agent that answers in its own words (a Captain deciding on its own
|
||||
authority) must pass `--words-by agent:<id>` with its own `--by` id. They
|
||||
are then recorded as `answer_words` with `words_by`, never as
|
||||
`owner_reply`; a later gate never carries them (`CARRY: no`), and
|
||||
`gstack-approvals import` lists that row under the agent, not the owner.
|
||||
An unattended run refuses an answer
|
||||
without `--by` (`ANSWER_BY_REQUIRED`, exit 3) and records the value as
|
||||
`answered_by` on every decision row and in the review record's gate line,
|
||||
so a gate an agent closed is distinguishable from one the owner closed.
|
||||
`gstack-autoplan recommend` changes one recommendation before relay; it
|
||||
bumps the gate's `rec_rev`, and a later `rec` needs the `--rec-hash` from
|
||||
bumps the gate's `rec_rev`, and a later `rec` or `p1b` needs the `--rec-hash` from
|
||||
the render the owner saw (`GATE_REC_STALE`). Every `GATE:` line is followed
|
||||
by `GATE_SPEND:` and `GATE_REC_COST:` (also `gate_cost` in `--json`; see
|
||||
`autoplan/DRIVER.md`).
|
||||
@@ -439,7 +452,12 @@ Concurrency and recovery: every state write is a locked read-modify-write
|
||||
(`test/autoplan-run-recovery.test.ts`, `test/autoplan-run-concurrency.test.ts`,
|
||||
`test/autoplan-answer-invalidation.test.ts`). `--spend-cap` admits each attempt
|
||||
through `spend.json` (`SPEND_CAP_EXCEEDED` refuses, exit 3); host-subagent
|
||||
spend is `unknown` and counted in `worst_case`. `--deadline <min>` makes the
|
||||
spend is `unknown` and counted in `worst_case`. Under a cap (or on Capy) each
|
||||
unattended host-subagent attempt reserves the default per voice unless
|
||||
`next --estimate-usd <n>` sets the reservation, which the run keeps for later
|
||||
phases (`run` reserves an api attempt's priced worst case, prompt bytes / 3
|
||||
input tokens plus the output limit, and settles it at its token usage); `submit
|
||||
--usage-usd <n>` settles an attempt at its real cost. `--deadline <min>` makes the
|
||||
`run` subcommand cancel the children it started and marks the run
|
||||
`interrupted`.
|
||||
|
||||
@@ -519,9 +537,8 @@ A gate revision after the first (`gate_rev` 2 and later, written after a
|
||||
it when nothing new needs their decision. `gstack-autoplan` prints
|
||||
`CARRIED: gate_rev=<n> <- gate_rev=<m> words="<their words>" by=<relayer> reason=<why>`,
|
||||
then the usual `APPROVED:` lines, and journals `gate_carried`. The carry needs
|
||||
all of: the earlier gate approved (`p1a` or `p1b`) with `rec` or "do it"
|
||||
(not item tokens), no item there left pending, and the owner's words
|
||||
recorded; that gate was not itself carried; every accepted change incorporated
|
||||
all of: the earlier gate approved (`p1a` or `p1b`), no item there left
|
||||
pending, and the owner's words recorded; that gate was not itself carried; every accepted change incorporated
|
||||
or settled; the plan file's bytes equal those recorded at the gate or at the
|
||||
`revise` that took the changes (any later edit refuses, an ELI5-only one
|
||||
included); no urgent or
|
||||
@@ -530,6 +547,13 @@ Anything else prints `CARRY: no (<why>)` (journal `carry_refused`) and the gate
|
||||
goes to the owner as before. `--no-carry-forward` on the first `next` turns it
|
||||
off for the run.
|
||||
|
||||
An earlier answer given item by item (`<id><option>` tokens, not `rec` or "do
|
||||
it") carries only what the owner already answered: every item on the new gate
|
||||
must be carried by origin (the same proposal, so the same choice), and only an
|
||||
unreviewed post-cap delta (below) may be new. The carry replays the owner's own
|
||||
`p1` choice and records their tokens verbatim as its basis; any new or changed
|
||||
item, "do it" cases included, goes to the owner.
|
||||
|
||||
- **"do it".** When the owner's words were "do it" (their words, not a
|
||||
`captain:` relay of them), a new `auto` item that changes no scope, cost or
|
||||
direction, whose recommended option changes no plan text, and is no round
|
||||
|
||||
Reference in new issue
Block a user