Fix ready notes, landing decisions, release PR descriptions and squash messages (GST-3343) (#4596)

Landing a ready PR now reads its gate decisions from the PR's ready
note, and the ready note, a reopened release PR and a stacked PR's
squash message now say the right thing.

Each of these stopped a landing or left a wrong public record until
someone fixed it by hand; the goal is unattended shipping that lands on
its own.

Nothing to do as a reader.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 08:52:11 +00:00
1 parent b281effa07
commit 7fe1900f8b
18 files changed
+304 -42

No files matched your search

+16
View File
@@ -309,6 +309,22 @@ change `resume --run <id>` restores both. A corrupt ledger
([BUDGET_LEDGER_INVALID](troubleshooting.md#budget-ledger-invalid)) is rebuilt from the
record's block with `--rebuild-from-record`; open reservations are then charged as unknown.
### A stopped run whose ledger is closed
A /ship run that stopped after its ledger closed (the run's last step closes it) can't be resumed:
`resume` refuses with `run <id> is closed`. To continue that run's remaining steps, open a new
observe ledger on the same record:
```bash
gstack-ship-budget start --record <record> --mode observe --reading <cost.tokens>
```
`start` reuses a record's ledger only while it is open, so on a closed one it mints a new run id
and ledger for the same record and prints its `BUDGET_RUN:` line. The new ledger meters from its own
first reading: spend under the closed ledger stays in that ledger and is not carried into the new
one, so add the two when you report what the run cost. On Capy, `--reading` is the thread's
`cost.tokens`; without a reading the start is unmetered.
### Successor handoff
When another thread takes over a /ship run (a successor handoff, routine under the 75%-of-hard-stop
+10 -2
View File
@@ -1961,8 +1961,16 @@ merges one only when the lander passes `--accept-gate-disposition <approval id>`
for it.
Land works the dispositions out again at the pin from the PR branch's approval
store: the local record and its mirror. A lander on another machine reads the
mirror the owner recorded into, so set `GSTACK_APPROVALS_DIR` to that directory
store: the local record and its mirror, plus the rows `ready` copied into the
READY note. The store lives on the machine that recorded the row, often the
/ship machine, so `ready` copies each disposition it applies at the head into the
READY note on `refs/notes/gstack-trains`, signed and whole, and land on any
machine reads those rows beside its own store under the same checks: the
writer's fields, the digest, the PR's branch and the head in the pin's history.
An edited note row counts for nothing, and the lander still accepts each one
explicitly (#4581). A security-class disposition stays out of the note, because
the notes ref is public, so for one of those a lander on another machine reads
the mirror the owner recorded into: set `GSTACK_APPROVALS_DIR` to that directory
when it isn't the default. Land counts every disposition whose head the pin
contains. In a full clone, a row whose head commit is gone (the branch was
rewritten and garbage-collected, or the name reused) doesn't apply, because the
+5 -3
View File
@@ -6360,9 +6360,11 @@ receipt's `gate_dispositions`, or the PR body's `Gate disposition:` lines, diffe
from the store (`ready` refuses those too). Nothing was merged. The
`GATE_DISPOSITION:` lines above the refusal are what the store holds at the pin;
the receipt and the body aren't trusted for this, because the lane writes them.
A receipt id the store lacks usually means this lander reads another
`GSTACK_STATE_ROOT` or approvals mirror than the owner recorded into, or that the row
was removed after the receipt was written. A pin missing from the clone, a shallow
Land also reads the signed non-security rows `ready` copied into the READY note at
the pin, under the same checks. A receipt id the store lacks usually means this
lander reads another `GSTACK_STATE_ROOT` or approvals mirror than the owner recorded
into (security-class rows never go in the note), or that the row was removed after
the receipt was written. A pin missing from the clone, a shallow
clone that can't prove whether a row's head is in the pin's history, and any other
git error while checking a head also refuse here. In a full clone, a row whose head
commit is gone after a rewrite and gc just doesn't apply.
+4 -2
View File
@@ -1097,9 +1097,11 @@ opening line is not. The reader's read is a trail row with phase `trail-read`
whose decision names the reader (`gstack-decision-trail <file> trail-read
"openai/gpt-6.2-sol (Subagent 4)" <why> <evidence> <flags>`).
`gstack-ship-queue ready --trail <file>` prints the opening line from that row
for a risk-class receipt, or `MISSING: cross-family trail read` when the trail
for a risk-class receipt, then that row's flags (`Flags (trail row <n>): …`, or
`No flags (trail row <n>)`), or `MISSING: cross-family trail read` when the trail
has none, and one `TRIAL_MERGES` line per open PR that shares a file, from
`git merge-tree` at both heads. `decisions.jsonl` stays the typed record `gstack-artifact` validates; the
`git merge-tree` at both heads. A PR from a fork is labelled as an outside PR
and never fetched or merged. `decisions.jsonl` stays the typed record `gstack-artifact` validates; the
trail is the plain one a person reads, and `column -s$'\t' -t decisions.tsv`
renders it in a terminal.