mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 01:21:24 +01:00
After a pull request's second review round, an approved extra check now leads to a /ship sign-off (GST-3546) (#4717)
After a pull request's two review rounds, an approved extra check of the fixes now ends in a /ship sign-off instead of a dead end. Why: three projects (gbrain #10068, gskills #23–#25, gstack #4712) had no way to finish after a ruling at the round limit and skipped the sign-off or bent their records. Nothing to do: the next /ship uses it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=security Review-Finding: p1/specialist-batched#2 reader=state-machines Review-Finding: p1/specialist-batched#3 reader=state-machines Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Review-Finding: p2/outside-voice#1 reader=outside-voice Review-Finding: p2/outside-voice#2 reader=outside-voice Review-Finding: p2/outside-voice#3 reader=outside-voice Review-Finding: p2/adversarial-native#1 reader=adversarial-native
This commit is contained in:
1 parent
c2da82e49c
commit
50cc296700
24 files changed
+704
-89
No files matched your search
@@ -280,6 +280,48 @@ dispatch ledger can't be read closes nothing. finish counts the same
|
||||
stamped row, anchored on the grant's stop rather than the newest reviewed tree
|
||||
(#4612).
|
||||
|
||||
<a id="one-grant-path"></a>
|
||||
**One grant path after a ruling at the cap (GST-3546).** Every fix-check grant is
|
||||
the same grant, whichever row records it:
|
||||
|
||||
- **Either row works.** A `gstack-approvals round-grant --kind fix-check` row and
|
||||
an owner's `review_loop_grant <head>` approval row are both fix-check grants
|
||||
for `gstack-review-plan --grant`, `gstack-ship-receipt claim` and write. The
|
||||
older row names no PR, so it binds to the PR whose run claims it.
|
||||
- **A grant needs no stop record.** `round-grant --kind fix-check` with no
|
||||
`--stop-run` and no `--findings` buys one scoped fix-check of the change since
|
||||
`--head`, the reviewed head. Use it for a post-review edit (a Step 14.5 docs
|
||||
audit edit that #4708's one-reader packet doesn't take) or a ruling at the cap
|
||||
whose run recorded no stop (`STOP_UNBOUND`). The run's own claim stands in for
|
||||
the stop record: the grant, the claim and the fix-check's start must be
|
||||
recorded in that order.
|
||||
- **What it closes.** A grant that names findings closes those, as above. A
|
||||
grant with no findings list closes each open blocker the fix list given to
|
||||
its clean fix-check names. A blocker that no ruling, grant or fix list covers
|
||||
still refuses `RECEIPT_BLOCKER_OPEN`, so the Captain's ruling at the cap needs
|
||||
no hand-written per-finding rows, and nothing is closed that no reader read.
|
||||
- **gstack builds the packet.** Once a run has claimed a grant, `gstack-review-plan
|
||||
--fix-check-prompt` and the pass program build the reader's hunks from `git diff
|
||||
<the grant's head> HEAD` themselves (`FIX_CHECK_HUNKS:` says when a `--hunks`
|
||||
file differed and was not used), so the hunks record always covers the whole
|
||||
fix range.
|
||||
- **A grant spends only on a counted fix-check.** A malformed row
|
||||
(`converged:false`, or a claimed row whose hunks or tree don't bind) leaves the
|
||||
grant unspent: the same run logs a correct row. A counted read that found
|
||||
issues spends it like a clean one, so a grant still buys one fix round, and
|
||||
write reads the first counted row only.
|
||||
- **Only the lane or its Captain grants.** A row whose ask or scope mentions
|
||||
`review_loop_grant`, in any spelling or scope, recorded with `gstack-approvals
|
||||
add` inside this checkout's open /ship run is refused unless it relays their
|
||||
message with `--owner-ref` and `--words`, as `round-grant` already required.
|
||||
- **One read per grant.** Receipt write keeps every distinct read stamped with
|
||||
the grant (a copied row counts once) and takes the first that counts; a read
|
||||
whose dispatch ledger collected a finding counts as long as the row records
|
||||
that finding, open or not.
|
||||
- **Long reasons fit.** A `--reason` longer than the approval record's
|
||||
300-character ask is cut there with an ellipsis; `--words` (the reason by
|
||||
default) keeps every word.
|
||||
|
||||
<a id="transitions"></a>
|
||||
### Transitions
|
||||
|
||||
|
||||
+2
-1
@@ -1817,7 +1817,8 @@ record (only when the open PR's body names that run), `gstack-ship-receipt stop`
|
||||
marks it stopped (it may then record the fix-check grant for its own stop, once
|
||||
per run, and a new run's preflight replaces it), `gstack-skill-end` marks it finished on any
|
||||
outcome, and `gstack-ship-run abandon` ends a run that stopped working, never
|
||||
within 60 minutes of its last beat. No timer ends a run. A bare marker from an
|
||||
within 60 minutes of its last beat unless the harness process it ran under is
|
||||
provably gone (GST-3546). No timer ends a run. A bare marker from an
|
||||
older gstack reads as `legacy` and an unreadable record as `unreadable`; both
|
||||
block until abandoned. The record guards against mistakes, such as a base merge
|
||||
under a run's readers or a run granting itself a round; it is not proof of who
|
||||
|
||||
+30
-7
@@ -2037,7 +2037,14 @@ ends (R75: upgrades wait for the workflow boundary); fix: <install> once the
|
||||
run ends (UPGRADE_BUSY))`, for a ship-budget ledger with no `closed_at`
|
||||
written in the last 6 hours, or `review run <token> (<file>)` for a review
|
||||
start under 120 minutes old that `gstack-review-log --finish` has not
|
||||
consumed.
|
||||
consumed. A run that provably ended stops deferring at once
|
||||
(`gstack-ship-run live` prints `RUN_HOLD_RELEASED:` for each, GST-3546): the
|
||||
harness it ran under has exited or the machine restarted, or its own run
|
||||
record in its checkout finished or was abandoned (the record belongs to the
|
||||
newest ledger on that checkout created before it opened). A
|
||||
stopped run keeps deferring, since it may still claim its fix-check grant and
|
||||
resume, and so does an open run on Capy's shared harness; end a run that
|
||||
stopped working with `gstack-ship-run abandon`.
|
||||
|
||||
**Fix.** Wait for those sessions to finish (`bin/gstack-lease list` shows
|
||||
every lease with its age and `alive|idle|dead|stale`; a holder is named as
|
||||
@@ -7957,9 +7964,14 @@ gstack can tie to one commit: the newest `via:ship` reading row since
|
||||
or its commit isn't HEAD or under it. It recorded no stop record, so
|
||||
no fix-check grant can buy that review's fix round.
|
||||
|
||||
**Fix.** Nothing for a grant to answer. The lane's Captain ships with the open
|
||||
notes listed or parks; a fresh `/ship` run gives the head its review
|
||||
([review-policy.md](review-policy.md#rounds-per-pull-request)).
|
||||
**Fix.** The lane's Captain ships with the open notes listed, parks, or rules
|
||||
the fix round with a grant that needs no stop record: `gstack-approvals
|
||||
round-grant --pr <n> --head <the reviewed head> --kind fix-check --reason <why>
|
||||
--by <lane or Captain>` (add `--owner-ref` and `--words` inside an open run).
|
||||
The run then claims it, commits the fix, runs the one scoped fix-check
|
||||
`gstack-review-plan --round-grant <id> --stop <that head>` plans, and write
|
||||
closes the blockers that clean fix-check's fix list named
|
||||
([review-policy.md](review-policy.md#one-grant-path)).
|
||||
|
||||
<a id="ship-run-abandon-refused"></a>
|
||||
### `SHIP_RUN_ABANDON_REFUSED`
|
||||
@@ -7970,6 +7982,13 @@ last 60 minutes, so it may still be working; or the record names another run,
|
||||
or already ended (finished or abandoned); or the record is unreadable and the
|
||||
`--sha256` given isn't its digest. `--by` naming gstack itself is a usage error.
|
||||
|
||||
A run whose owner process is provably gone (preflight records the harness it
|
||||
ran under; that process exited or the machine restarted) is taken at any age,
|
||||
and no longer holds gstack upgrades either (`gstack-ship-run live`, GST-3546).
|
||||
On Capy every session runs under one shared harness, so there the 60 minutes
|
||||
still apply to an open or stopped run; once abandoned or finished it releases
|
||||
the upgrade hold at once.
|
||||
|
||||
**Fix.** Run `gstack-ship-run status`. It prints the run, its state, its
|
||||
`beat_age` and the exact abandon command. Wait until the earliest abandon time
|
||||
when the run may still be working, and pass the run the record names. Abandon
|
||||
@@ -7995,7 +8014,10 @@ The digest binds the abandon to the bytes you inspected.
|
||||
|
||||
**Meaning.** `gstack-ship-receipt claim` found another `/ship` run's grant
|
||||
record for this round grant in the PR body's runs block. A grant buys one round,
|
||||
and a voided run's claim still spends it.
|
||||
and a voided run's claim still spends it. Within the run that claimed it, a
|
||||
fix-check row that doesn't count (`converged:false`, partial hunks) spends
|
||||
nothing: log a correct row in the same run instead of asking for a new grant
|
||||
([review-policy.md](review-policy.md#one-grant-path)).
|
||||
|
||||
**Fix.** Record a new grant for the stop the PR is at now; `gstack-ship-receipt
|
||||
stop` prints the command ([troubleshooting](#pr-round-cap)).
|
||||
@@ -8004,8 +8026,9 @@ stop` prints the command ([troubleshooting](#pr-round-cap)).
|
||||
### `GRANT_UNKNOWN`
|
||||
|
||||
**Meaning.** `gstack-ship-receipt claim --grant <id>` found no approved
|
||||
`review_round_grant` row with that id in the branch's approval record or its
|
||||
mirror.
|
||||
fix-check or round grant with that id in the branch's approval record or its
|
||||
mirror: neither a `gstack-approvals round-grant` row nor an owner's
|
||||
`review_loop_grant <head>` row (both are the same grant since GST-3546).
|
||||
|
||||
**Fix.** Pass the id `gstack-approvals round-grant` printed, from a checkout
|
||||
that sees that record ([troubleshooting](#pr-round-cap)).
|
||||
|
||||
Reference in new issue
Block a user