mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-09 18:28:15 +01:00
train S2: merge #3926 at 1b31842a2d v1.95.1.0
This commit is contained in:
commit
37ea27ec78
42 files changed
+801
-93
No files matched your search
@@ -504,7 +504,10 @@ puts in the receipt:
|
||||
| `review_loop.passes` | full review passes this ship ran (1 or 2; up to 3 under `review_scope: all`) |
|
||||
| `review_loop.blocking_found` | every blocker found (GST-951): the rows' blocking findings (classified, or an unclassified CRITICAL), plus each ledger CRITICAL (as collected or judged) that no row finding from the same reviewer at the same path:line accounts for (each row finding pairs with one per ledger), so an adversarial, outside-voice or not-yet-classified blocker counts and one whose newest classification is below the floor does not. An unreadable ledger, merged file or judged set, or a judged set changed since `judge`, is `REVIEW_SCOPE_LEDGER`, never a count |
|
||||
| `review_loop.unrecorded` | blockers found that no row gives a disposition (fixed, deferred, noted, skipped, a gate answer); absent when 0 |
|
||||
| `review_loop.unbound` | what could not bind (GST-1168), each printed as `REVIEW_SCOPE_UNBOUND: <what>: <why>`: a row with no start token and no readable time, a `pN` ledger with no review row of pass N, a row finding's `ledger_id` no ledger collected, a `Review-Finding` trailer naming nothing; absent when 0 |
|
||||
| `review_loop.ledgers_read` | dispatch ledgers the count read; absent under `--no-ledger` |
|
||||
|
||||
Findings bind by id first (GST-1168). A row finding that came from a dispatched reader carries `ledger_id` (`<pass dir>/<merged.jsonl id>`, such as `p2/adversarial-native#3`) and pairs with that ledger entry whatever its path:line says, so a native finding with no path:line, or a row logged after its fix moved the line, still pairs. Each fix commit names what it fixed in a `Review-Finding: <ledger_id or fingerprint> reader=<raised_by>` trailer, and a trailer counts the finding as fixed. A late defer re-logs its finding under the same id, so it counts once. Rows that record their head dedupe by kind, pass, head and finding ids, so a logger command run twice counts once. Rows and findings without an id keep the path:line pairing above. The native reader's own verdict line ("all FIXABLE, and none blocks", with no file:line, list mark, lead label or Severity/Blocks field) collects at FIXABLE, not CRITICAL; the findings it summarizes collect on their own lines.
|
||||
| `review_loop.deferred` | blocking findings in unchanged code filed as issues (a Step 11 late defer, logged as a `review-late-defer` row so it never displaces the newest `review` pass, counts here and is not a pass) |
|
||||
| `review_loop.noted` | below-floor findings listed in the PR body |
|
||||
| `review_loop.fixed` | findings fixed in this PR |
|
||||
|
||||
@@ -1698,6 +1698,13 @@ base context next to the branch's unchanged hunks, which is
|
||||
[`RECEIPT_CARRY_SCOPED_REVIEW`](troubleshooting.md#receipt-carry-scoped-review)
|
||||
until one fix-check reviewer clears the packet; a working tree with uncommitted
|
||||
changes is [`RECEIPT_CARRY_REFUSED`](troubleshooting.md#receipt-carry-refused).
|
||||
A `RECEIPT_CARRY_PRODUCT_CHANGED` on linear history against the reviewed base
|
||||
whose range-diff, plus the diff of the changed product paths, is at most 400
|
||||
lines and 64 KB, with no binary path, no moved base context and a receipt that
|
||||
records its review depth, also prints `RECHECK: eligible … packet=<file>`: one reader on that
|
||||
packet and `carry --recheck <record.json>` rebind the receipt instead of a
|
||||
full second /ship, unless HEAD needs a deeper review depth or another risk
|
||||
class ([scoped re-check](troubleshooting.md#receipt-carry-recheck), J1).
|
||||
|
||||
**Rewritten history.** `write` records `head_tree` (the reviewed head's tree)
|
||||
and `product_patch_id` (its product patch against the base), and every carry
|
||||
|
||||
@@ -6062,6 +6062,30 @@ none of carry's other checks would refuse; carry without `--dry-run` writes it.
|
||||
In /ship Step 1, `gstack-ship-preflight` prints the route as `NEXT: carry
|
||||
route (Step 1.4)`.
|
||||
|
||||
<a id="receipt-carry-recheck"></a>
|
||||
### Scoped re-check after `RECEIPT_CARRY_PRODUCT_CHANGED` (J1)
|
||||
|
||||
**Meaning.** The product diff changed since the receipt's head, so the receipt
|
||||
can't carry as it is. When the history is linear, the base is the one the
|
||||
receipt was reviewed against, and `git range-diff` of the reviewed range
|
||||
against the current one is at most 400 lines (`RECHECK_RANGE_DIFF_CAP` in
|
||||
`lib/ship-recheck.ts`), carry also prints `RECHECK: eligible
|
||||
range_diff_lines=N range_diff_sha256=<sha> packet=<file>`: one reader on that
|
||||
range-diff can clear it instead of a full second /ship. A rebased branch
|
||||
(`RECEIPT_CARRY_TREE_MISMATCH`), a retargeted stack, a receipt with no
|
||||
`review_depth`, more than 20 changed product paths, a binary path, base
|
||||
context moved next to reviewed hunks, an empty or unreadable range-diff and a
|
||||
packet over 400 lines or 64 KB print `RECHECK: not eligible (<why>)` instead.
|
||||
|
||||
**Fix.** Dispatch one reader on the packet (`.git/gstack/recheck-<head12>.md`;
|
||||
`--dry-run` writes none). When it comes back clean, write
|
||||
`{"from":"<reviewed head>","head":"<HEAD>","range_diff_sha256":"<from the RECHECK line>","reader":"<model>","verdict":"clean"}`
|
||||
and rerun `gstack-ship-receipt carry ... --recheck <record.json>`. The carry
|
||||
reason records the reader and the range-diff size. Carry still refuses when
|
||||
HEAD needs a deeper review depth or a different risk class than the receipt
|
||||
recorded; that, or a blocking finding, means /ship on the new head. In /ship
|
||||
Step 1, `gstack-ship-preflight` prints this as `NEXT: carry route (Step 1.4, J1)`.
|
||||
|
||||
<a id="receipt-prose-mismatch"></a>
|
||||
### `RECEIPT_PROSE_MISMATCH`
|
||||
|
||||
|
||||
+16
-12
@@ -87,7 +87,7 @@ Not every workflow writes this line or a run directory today:
|
||||
- **`/ship`** ends with `gstack-ship-receipt result --pr <n>` (or `--body
|
||||
.gstack/tmp/ship-receipt.md` after the handoff section), which binds the
|
||||
receipt to the branch head, writes the run record and prints
|
||||
`GSTACK_RESULT: skill=ship status=complete run=<dir>`. That line and that
|
||||
`GSTACK_RESULT: skill=ship status=complete head=<sha> run=<dir>`. That line and that
|
||||
record are the machine-readable READY evidence; [What /ship leaves for a
|
||||
parent](#ship-evidence) below is the whole contract (the refused and
|
||||
incomplete lines, the one publication an unattended run may make, the
|
||||
@@ -131,7 +131,7 @@ in the PR body (or the handoff file) to HEAD, writes
|
||||
`<state root>/ship/runs/<utc>-<head12>/` and prints the terminal line:
|
||||
|
||||
```
|
||||
GSTACK_RESULT: skill=ship status=complete run=<dir>
|
||||
GSTACK_RESULT: skill=ship status=complete head=<sha> run=<dir>
|
||||
```
|
||||
|
||||
The run directory holds `ship-receipt.md` (the block, copied) and
|
||||
@@ -255,7 +255,7 @@ When the parent merges the base in or fixes a test after the receipt was
|
||||
written, it runs `gstack-ship-receipt carry --pr <n> --base <base> --dry-run`
|
||||
instead of another /ship; on `CARRY: would carry` it runs `gstack-pregate` at HEAD
|
||||
and reruns carry with `--pregate .gstack/tmp/pregate.json`. `CARRY: carried from <old> to <new> (<reason>)` plus the
|
||||
`GSTACK_RESULT: skill=ship status=complete run=<dir>` line means the receipt
|
||||
`GSTACK_RESULT: skill=ship status=complete head=<sha> run=<dir>` line means the receipt
|
||||
now names HEAD with a `carry` object holding the `git range-diff` evidence, and
|
||||
`ship-run.json` gains `carried_from` and `carry_reason`; the `review_loop`
|
||||
counters are kept, because the reviewed product diff is unchanged or its only
|
||||
@@ -901,15 +901,19 @@ decision or action, every evidence pointer resolves and shows what the row
|
||||
claims, and a fork or abandoned approach that shaped the result but is not
|
||||
logged gets a row. The audit corrects the log, never the story: no row is
|
||||
edited or removed, an invented or wrong row stays and a new row supersedes it
|
||||
with what actually happened. Then a reviewer on a different model family from
|
||||
the one that did the work (a Capy subagent on another family, or the outside
|
||||
voice) reads the trail and the transcript and flags what the owner should look
|
||||
at: decisions with weak or missing evidence, verification claimed without
|
||||
proof, choices that look risky in hindsight, gaps a skim would miss. The run's
|
||||
final report ends with an `Attention` section that opens with `reviewed by
|
||||
<model>` on its own line and lists each flag against its rows; `No flags` is a
|
||||
valid body, a missing model line is not. Self-review does not stand in for
|
||||
this. `decisions.jsonl` stays the typed record `gstack-artifact` validates; the
|
||||
with what actually happened. On a risk-class PR (the receipt's `review_depth`
|
||||
has class `gate` or a `risk` class: security, money, auth, secrets, user
|
||||
data), a reviewer on a different model family from the one that did the work
|
||||
(a Capy subagent on another family, or the outside voice) then reads the trail
|
||||
and the transcript and flags what the owner should look at: decisions with
|
||||
weak or missing evidence, verification claimed without proof, choices that
|
||||
look risky in hindsight, gaps a skim would miss. Self-review does not stand in
|
||||
for that read. Every other PR skips it: the run's own audit is the review. The
|
||||
run's final report ends with an `Attention` section that opens with `reviewed
|
||||
by <model>` (risk class) or `self-audited` (every other PR) on its own line
|
||||
and lists each flag against its rows; `No flags` is a valid body, a missing
|
||||
opening line is not. `gstack-ship-queue ready` prints the stub with the right
|
||||
opening line for the receipt it bound. `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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user