Skip to content

v1.94.41.0 fix(ship): receipt counts bind by finding id, scoped re-check, lighter READY, head= on the result line (GSTA-258 L4) - #3926

Merged
capy-ai[bot] merged 11 commits into
mainfrom
gsta258-l4-ready-receipts
Nov 3, 2026
Merged

capy-ai[bot] merged 11 commits into
mainfrom
gsta258-l4-ready-receipts

Conversation

@garrytan

@garrytan garrytan commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3926,
  "head": "1b31842a2d825be75b7b01063e263a1c27b68030",
  "version": "1.94.34.0",
  "base": "main",
  "session_kind": "unattended",
  "head_tree": "5688c849265de606a5d13429902e4c06c0284586",
  "product_patch_id": "a3837eb57971c8ebdb6ae02eb7bf97afce47f4ec",
  "gstack_version": "1.94.24.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 374,
    "rules": "be3026b5ff4acb84",
    "base": "bf2cab34c5d45a67f50e9c128ad7281f10df9681",
    "registry": "bf2cab34c5d45a67f50e9c128ad7281f10df9681",
    "gate_scan": {
      "tagged": 0,
      "head": "1b31842a2d825be75b7b01063e263a1c27b68030"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "runtime=374"
    ],
    "risk": [
      "money"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @5688c849265d (7 checks, current for 1b31842a2d82)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41702306819/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41702306615/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=5688c849265d tests=35110 skipped=112 runs=41702306819/1 profiles=ci-reuse/free-tests heads=1b31842a2d82 verified=2026-11-03T19:35:28.619Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md (read-only, 4ec1722e..68f34a6d)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 6,
    "deferred": 0,
    "noted": 4,
    "fixed": 5,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "unrecorded": 3,
    "ledgers_read": 5,
    "dispatches": {
      "specialist": 2,
      "red-team": 2
    }
  },
  "review_loop_exception": {
    "accepted_by": "GStack Minder",
    "date": "2026-11-03",
    "via": "GSTA-36's call relayed by GSTA-258, 2026-11-03 (approval a-8f37391dbc8c)",
    "reason": "third, last exception on #3926: the 11-byte ship-skeleton wording trim next to J1's line, with the -11 size-ledger entry and the regenerated ship goldens; one clean Opus scoped reader on that trim (each rewording keeps its meaning), no further rounds",
    "fix_check": {
      "head": "e15ba87d0914b8bc46e1f2a84d6e4928451c4e29",
      "findings": 0,
      "files": [
        "ship/SKILL.md.tmpl",
        "ship/SKILL.md",
        "test/fixtures/golden/agy-ship-SKILL.md",
        "test/fixtures/golden/claude-ship-SKILL.md",
        "test/fixtures/golden/codex-ship-SKILL.md",
        "test/fixtures/golden/factory-ship-SKILL.md",
        "test/size-ledger/ship/gsta258-l4-ready-receipts.json"
      ]
    }
  },
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "a35223f97ffd4e35d8d7be0439812f7e6d14aa63",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  },
  "carry": {
    "from": "e15ba87d0914b8bc46e1f2a84d6e4928451c4e29",
    "reason": "base merge + base context moved (scoped review by anthropic/claude-opus-5-5: bin/gstack-ship-receipt) + test-only change + release metadata + regenerated outputs",
    "product_patch_id": "a3837eb57971c8ebdb6ae02eb7bf97afce47f4ec",
    "changed_paths": [
      "product:.gstack/pregate.json",
      "product:BROWSER.md",
      "metadata:CHANGELOG.md",
      "product:CONTRIBUTING.md",
      "product:ETHOS.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:autoplan/sections/ceo-phase.md",
      "product:autoplan/sections/ceo-phase.md.tmpl",
      "product:bin/gstack-config",
      "product:bin/gstack-evidence",
      "product:bin/gstack-inventory",
      "product:bin/gstack-pregate",
      "product:bin/gstack-review-dispatch",
      "product:bin/gstack-review-plan",
      "product:bin/gstack-ship-receipt",
      "product:bin/gstack-skill-bill",
      "product:bin/gstack-skill-route",
      "product:browse/src/browser-manager.ts",
      "test:browse/test/browser-manager-custom-chromium.test.ts",
      "product:browse/test/cookie-import-native-qualification.ts",
      "test:browse/test/cookie-import-native.test.ts",
      "test:browse/test/playwright-core-patch.test.ts",
      "test:browse/test/security-audit-r2.test.ts",
      "product:bun.lock",
      "product:capy/skill/gstack/factory.md",
      "product:docs/TESTING_INTERNALS.md",
      "product:docs/inventory.md",
      "product:docs/inventory/evidence.json",
      "product:docs/pregate.md",
      "product:docs/review-policy.md",
      "product:docs/skill-routing-and-contracts.md",
      "product:docs/skills.md",
      "product:docs/standalone-binaries.md",
      "product:docs/troubleshooting.md",
      "product:eval-plan/SKILL.md",
      "product:eval-plan/SKILL.md.tmpl",
      "product:hosts/claude/hooks/skill-contract-stop-hook.ts",
      "product:hosts/claude/hooks/skill-route-hook.ts",
      "product:lib/capy-review-pass.js",
      "product:lib/ci-carry.ts",
      "product:lib/eval-plan.ts",
      "product:lib/headless-artifacts.ts",
      "product:lib/inventory.ts",
      "product:lib/pregate/index.ts",
      "product:lib/result-codes-eval.ts",
      "product:lib/review-brief.ts",
      "product:lib/review-depth.ts",
      "product:lib/review-ledger.ts",
      "product:lib/review-pass.ts"
    ],
    "merge_commits": 1,
    "range_diff": "1:  0a1e4f092 = 1:  0a1e4f092 fix(ship): receipt counts bind by finding id, every run kept, scoped re-check after a refused carry, READY tail, head= on the result line (GSTA-258 L4; GST-1136, GST-1168, GST-1179)\n2:  819fc25ad = 2:  819fc25ad fix(ship): goldens, head= in the base-red line test, Severity field after a closing quote (ggstack#71); repin ship/sections/review-army.md under GST-508+GST-464+GST-967+GSTA-258-L4 (brief-identity no-loss check: every cut brief unchanged)\n3:  8788d2402 = 3:  8788d2402 fix: pre-landing review fixes (J1 never re-checks a legacy receipt, a cut path walk or moved base context; legacy READY asks for the cross-family read)\n4:  64cab9f71 = 4:  64cab9f71 fix: pre-landing review fixes (Step 11: re-check refuses binary paths and packets over 64 KB; fingerprint trailers bind findings with a ledger_id; the runs fence closes only on its own line)\n5:  955eb9ce9 = 5:  955eb9ce9 docs: J1 re-check eligibility names every refusal (review fixes)\n6:  68f34a6de = 6:  68f34a6de test: explicit timeouts on the re-check and result-head CLI tests (each spawns several git and bun runs; the carry tests ran past bun's 5 s default locally)\n7:  e15ba87d0 = 7:  e15ba87d0 ship: trim 11 skeleton bytes so the merged tree fits the 61,420 cap (GSTA-258 L4)",
    "covers": [
      "pre-landing review",
      "adversarial review",
      "gate integrity",
      "documentation audit"
    ],
    "reruns": [
      "CI at head (gstack-ship-queue ready requires it); test and helper code changed since the reviewed head runs there unreviewed"
    ],
    "ancestry": "linear",
    "trees": [
      "75e3e501caa3f6b304dd2309d17c1a22649a7bbc"
    ]
  }
}

What changed

  • Review counts bind by finding id (GST-1168). gstack-review-scope summary pairs a row finding with its ledger entry by ledger_id (<pass dir>/<merged.jsonl id>), counts a fix from each fix commit's Review-Finding: <id> reader=<role> trailer, counts a late defer once, and dedupes rows that record their head by kind, pass, head and finding ids. What can't bind prints REVIEW_SCOPE_UNBOUND: <what>: <why> and unbound=N instead of a silent zero (a tokenless row, a pN ledger with no review row, a stray ledger_id or trailer).
  • Collector severity inflation. The native reader's own verdict line ("all FIXABLE, and none blocks", v1.94.0.0 ship: CI is the one full test run (CI carry, tree cache, /ship beside CI) #3901 captured output) collects at FIXABLE, not CRITICAL, and a Severity: field after a closing quote (ggstack#71, 1 of 4 identical findings raised to CRITICAL) parses as the reader wrote it. Both reproduce on main with failing-first tests. Per-finding Blocks: no was already fixed on main by GST-1031 (v1.93.38.0 fix(review): one record per native finding at its stated severity; blocker count keys on Blocks; fix-check is never a pass (GST-1031) #3894); the verdict line was the only inflation left when the v1.94.0.0 ship: CI is the one full test run (CI carry, tree cache, /ship beside CI) #3901, v1.94.10.0 ci: run Windows checks by path (ship-90-90 plan D, GST-1135) #3904 and v1.94.4.0 captain docs: plan-first rule matches R65 (no plan review for bug fixes) #3908 outputs were reparsed on main.
  • J1 scoped re-check. gstack-ship-receipt carry keeps refusing RECEIPT_CARRY_PRODUCT_CHANGED, and when the change is small it also prints RECHECK: eligible … packet=<file>. One reader plus carry --recheck <record.json> (bound to from, head and the packet's sha256) rebinds the receipt. A deeper review depth or another risk class still refuses. gstack-ship-preflight routes it. Not eligible (each tested): a rebase or retargeted stack, a receipt with no review_depth, more than 20 changed product paths, a binary path, moved base context, or a packet over 400 lines or 64 KB.
  • Receipt attribution. A replaced receipt moves to an append-only gstack-receipt-runs block (newest 30); review fixes carry ledger_id and the Review-Finding trailer (ship review-army template).
  • E1 lighter READY. gstack-ship-queue ready adds REVIEW_LOOP:, a TRIAL_MERGES: line and the Attention: stub (reviewed by <model> on risk-class receipts, self-audited otherwise); docs/unattended.md asks for the cross-family trail read only on risk-class PRs. The receipt already carried across a base move by product patch-id, and the Step 7, 8 and 14.5 audits already run on a small model and can't block (ship/DRIVER.md), so neither needed code.
  • GST-1179. The terminal line is GSTACK_RESULT: skill=ship status=complete head=<full sha> run=<dir>; parseResult reads the optional token.
  • K1 field. The receipt schema has no_stop: [{class, reason, evidence}] and write --no-stop.

Why

Captains read the receipt's counts at merge time, and they were wrong in a repeatable way. On main, the GBEV-3 shape reproduces its wrong receipt exactly (three blockers counted and two counted as fixes, where the truth was two blockers and one fix), and the GEVA-223 shape counts eighteen blockers, half of them unrecorded, where the truth was nine blockers, all of them fixed. The verdict-line inflation cost three extra fix-check grants on #3901, #3904 and #3908. J1 replaces a full second /ship (about 100k credits on gbrain-evals #246/#247) with one reader for small post-review changes.

Not in this PR

PR-event CI reuse in scripts/ci-tree-reuse.ts (plan E). It would reverse a pinned safety property of the required free-tests check ("only a push to main consumes", test/ci-reuse-workflow-wiring.test.ts) and edit .github/workflows/free-tests.yml, for a saving that applies only when a dispatch run already tested the same tree. Left for a separate, reviewed change.

Prompt and packet text (no-loss rule)

The collector severity fix changes parsing only (lib/review-ledger.ts: the native verdict line and a Severity: field after a closing quote). No reviewer prompt or packet changed. ship/sections/review-army.md changed only in lead instructions outside the reviewer-brief cut spans (a finding's ledger_id, the Review-Finding trailer, logging a late defer when it's decided); every brief lib/review-brief.ts cuts from it still hashes to its pin (test/review-packets-removed.test.ts).

Pre-Landing Review

REVIEW_LOOP: passes=2 blocking_found=6 deferred=0 noted=4 fixed=5 scope=frozen unrecorded=3 ledgers_read=5 fix_checks=1 dispatches=4

That line comes from installed gstack 1.94.0.0, which still has the GST-1168 bug: the three it calls unrecorded are the Step 11 fixes in 64cab9f. This PR's own summarizer binds them by their Review-Finding trailers and leaves one trailer unbound: v/targeted#1, an informational fix whose Step 11 row recorded no findings list.

Pass 1's blockers were fixed in 8788d24. Pass 2 found notes only. Step 11's voices found 3 CRITICALs, fixed in 64cab9f. One scoped fix-check (granted, below) found 2 informational notes and nothing blocking; the targeted money reader found nothing.

The first exception, from the standing grant (approval a-818f1333f880), covered one scoped fix-check at 68f34a6, which found 2 informational notes and nothing blocking.

Review-loop exception: accepted by GStack Minder 2026-11-03 via GSTA-36's call relayed by GSTA-258, 2026-11-03 (approval a-25399d1ed86f): L4's clean Opus reader over the 120-line git show --cc at 7e2f0e2 counts as #3926's second exception, scoped to those resolution hunks, no further rounds (fix-check at 7e2f0e2, 0 findings)

Review-loop exception: accepted by GStack Minder 2026-11-03 via GSTA-36's call relayed by GSTA-258, 2026-11-03 (approval a-8f37391dbc8c): third, last exception on #3926: the 11-byte ship-skeleton wording trim next to J1's line, with the -11 size-ledger entry and the regenerated ship goldens; one clean Opus scoped reader on that trim (each rewording keeps its meaning), no further rounds (fix-check at e15ba87, 0 findings)

Base merge (rule 19)

GStack Minder granted one merge of main bf2bcf1 (train 101: #3916, #3866, #3906, #3902, #3928) into this branch. The merge commit is 7e2f0e2. The conflicts were all on lines this PR had changed itself, so each resolution keeps both sides:

J1 also works on #3928's path. In a scratch fixture where a stacked child changed a product line after its parent squash-landed, carry printed RECHECK: eligible. Its packet held the child's edit plus one header line for the landed parent commit, and --recheck carried. One Opus reader read the 120-line git show --cc of the merge and found it clean.

A second granted merge, of main 1ccab0d (train 103), is 04a02bc. Its only conflict was test/review-packets-removed.test.ts: #3903 moved the review pins into one file per pin under test/fixtures/review-pins/, so the merge takes main's test and adds this PR's two pin files there (a new replay for GST-508, GST-464, GST-967 and GSTA-258-L4, and the repinned ship/sections/review-army.md).

That merge summed two in-budget skeleton edits, #3929's push-guards wording and this PR's head=<sha> in the GSTACK_RESULT line, to 61,429 bytes against the fixed 61,420 cap, and Free Tests went red on the parity suite. e15ba87 trims 11 bytes of wording next to J1's line ("record, prints", "QUEUE_RECEIPT_STALE: HEAD moved past", "STOPs early"), drops the branch size-ledger entry from 412 to 401 bytes and regenerates the four ship goldens. The skeleton is back to 61,418. One Opus reader checked that each rewording keeps its meaning and found nothing, and the targeted money reader reran on e15ba87 and found nothing.

A third granted merge, of main bf2cab3 (train 105), is 1b31842. #3920 (GSTA-258 build C) conflicted in two places, both resolved mechanically. bin/gstack-ship-receipt keeps this PR's ship-recheck import beside main's depth and review-risk imports, and its help keeps --no-stop beside main's --declare-risk and --platform-review. Both sides had repinned ship/sections/review-army.md, which itself merged cleanly, so the pin moves to the merged bytes under a combined GSTA-258-C+GSTA-258-L4 replay (GSTA-202's pin-file recipe). Outside the review pins, the merged tree's +/- lines against main are this PR's own lines. The receipt carried with one scoped Opus reader on the base context next to the bin/gstack-ship-receipt hunks, which found it clean.

Open review notes (below the blocking floor, not fixed)

  • Fix-check: a fingerprint trailer binds to the first finding with that fingerprint and ignores reader=, so when two readers raise the same path:line:category it can mark the wrong one fixed. It fails closed (unrecorded is overcounted).
  • Fix-check: a ledger_id first logged by a row with no path or category keeps the placeholder alias ?::, so a later fingerprint trailer for it stays unrecorded. It also fails closed.
  • A --recheck record is self-attested, the same trust model as --scoped-review.
  • A full re-ship builds a fresh PR body, so gstack-post drops the gstack-receipt-runs block. It survives carry.
  • The native verdict-line match is lexical, so a finding line with no file:line and no Severity or Blocks field that says "nothing blocks" would collect at FIXABLE.
  • The READY tail prints literal <…> placeholder lines for trial merges and Attention flags; the lane replaces them before sending.
  • The re-check hash covers range-diff's abbreviated SHAs, so a repack that lengthens core.abbrev between the two carry calls refuses the record (it fails closed).
  • A ledger id like p1/red-team#1 reads as a GitHub cross-repo reference (owner/repo#N). gstack-issue-links prints Refs p1/red-team#1 lines for the trailers (its --out record stays empty, so the receipt is unaffected), and GitHub would link those repos if they existed (none do today). Follow-up: a ledger id separator GitHub doesn't parse.
  • Review-Finding trailers bind within the run's committer-date window, so a rebased earlier run's trailer can match a restarted id. The dispatch totals still count a duplicated row; the receipt counts dedupe it.

Sibling merges (rule 25)

Documentation

Scope: read-only audit of the 4ec1722..68f34a6 diff (37 files) against the candidate docs list, with a doc-tree grep for stale strings. Result: current. The docs already cover the head= GSTACK_RESULT line, RECHECK eligible/not eligible, REVIEW_SCOPE_UNBOUND/review_loop.unbound, and the changelog fragment; no stale references found. Debt: the gstack-receipt-runs receipt block and the gstack-ship-receipt write --no-stop flag / no_stop field are undocumented (candidates docs/ship-policy.md, docs/unattended.md); not filled because the mode forbids edits.

Security call-out (R45)

No workflow, setup, install or upgrade script changes, no new dependency, no secrets read. New subprocesses are local git log (trailers) and git diff (re-check packet) only; the packet is written under .git/gstack/.

Blast radius

/ship's review summary and receipt, gstack-ship-receipt carry/result, gstack-ship-queue ready output, the ship review-army template. Rows and findings without ids keep the old path:line pairing.

Refs GST-1136, GST-1168, GST-1179 (Capy issues; close on merge).

Approvals

Approved: yes (record r-d559527f57c4). The full approval record stays private: this repository is public or its visibility is unknown.

Open in Capy

…re-check after a refused carry, READY tail, head= on the result line (GSTA-258 L4; GST-1136, GST-1168, GST-1179)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 5 commits November 3, 2026 06:12
…fter a closing quote (ggstack#71); repin ship/sections/review-army.md under GST-508+GST-464+GST-967+GSTA-258-L4 (brief-identity no-loss check: every cut brief unchanged)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… cut path walk or moved base context; legacy READY asks for the cross-family read)

Review-Finding: p1/specialist-batched#1 reader=security
Review-Finding: p1/specialist-batched#2 reader=testing
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… and packets over 64 KB; fingerprint trailers bind findings with a ledger_id; the runs fence closes only on its own line)

Review-Finding: v/outside-voice#1 reader=outside-voice
Review-Finding: v/outside-voice#2 reader=outside-voice
Review-Finding: v/adversarial-native#1 reader=adversarial-native
Review-Finding: v/targeted#1 reader=targeted
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ch spawns several git and bun runs; the carry tests ran past bun's 5 s default locally)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
lib/ship-receipt.ts KEY_ORDER keeps flaky_exception (#3911) and no_stop.
bin/gstack-ship-receipt: main's review_exclude help and digest refusal text plus
--no-stop help; the J1 re-check block before one planCarry call carrying both
stackParent (#3928) and recheck; the recheck risk-class check after the digest check.
test/review-packets-removed.test.ts keeps both NO_LOSS_REPLAYS keys (GST-940 and
GST-508+GST-464+GST-967+GSTA-258-L4).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 3 commits November 3, 2026 15:45
test/review-packets-removed.test.ts takes main's version (#3903 moved the
review pins to test/fixtures/review-pins/). This branch's two pin entries
become pin files with GSTA-202's recipe: a new
replays/GST-508+GST-464+GST-967+GSTA-258-L4.json and the
files/ship/sections/review-army.md.json repin to 22c37a64.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…GSTA-258 L4)

The rule 19 merge of main 1ccab0d put #3929's push-guards wording (61,418 on
main) together with J1's head=<sha> in the GSTACK_RESULT line, measuring 61,429.
Three rewordings beside that line bring the skeleton back to 61,418; the branch
ledger entry drops by 11 and the ship goldens are regenerated.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
#3920 (GSTA-258 build C) conflicts, resolved mechanically:
- bin/gstack-ship-receipt: keep this branch's ship-recheck import beside main's
  depth import (now with platformReceiptDepth) and review-risk import; the help
  keeps --no-stop beside main's --declare-risk and --platform-review.
- review-army pin: both sides repinned ship/sections/review-army.md, which merged
  cleanly; repin it to the merged bytes under a combined GSTA-258-C+GSTA-258-L4
  replay (pin-file recipe, GSTA-202).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title fix(ship): receipt counts bind by finding id, scoped re-check, lighter READY, head= on the result line (GSTA-258 L4) v1.94.41.0 fix(ship): receipt counts bind by finding id, scoped re-check, lighter READY, head= on the result line (GSTA-258 L4) Nov 3, 2026
@capy-ai
capy-ai Bot merged commit 2a36813 into main Nov 3, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant