Skip to content

fix(ship): receipt carries the targeted record; fresh origin base for gate-diff, diff-scope and preflight (GST-464, GST-462) - #3705

Closed
garrytan wants to merge 50 commits into
mainfrom
gst-464-receipt-targeted-base
Closed

garrytan wants to merge 50 commits into
mainfrom
gst-464-receipt-targeted-base

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3705,
  "head": "9ab559120b371f6b2db1190f1b44073ced272eb2",
  "version": "1.92.42.0",
  "base": "main",
  "session_kind": "unattended",
  "thread": "jam_01M68A3Q3474STK2VM8MSCTFGE",
  "head_tree": "544e45fbe8b2dad40fa5850c165946bd2f8b357b",
  "product_patch_id": "d029c01e67a447a511134207803962846cc057c5",
  "gstack_version": "1.92.42.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 98,
    "rules": "150435b0a543019a",
    "base": "dd9834d44d2650818cb6d8e17c57f795cb56bf98",
    "registry": "dd9834d44d2650818cb6d8e17c57f795cb56bf98",
    "gate_scan": {
      "tagged": 2,
      "head": "9ab559120b371f6b2db1190f1b44073ced272eb2"
    },
    "reasons": [
      "gate-class",
      "runtime=98>50"
    ]
  },
  "pregate": "requires-remote cleared @544e45fbe8b2 (1 checks, current for 9ab559120b37)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41396792542/job/125119738824",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41396792650/job/125119738116",
    "pregate.json/remote_gate: remote-gate tree=544e45fbe8b2 tests=19184"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, ship/ skill templates and sections, README.md, CHANGELOG.md, changelog.d/ (re-audit docs-e-2 at 76126ce)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 4,
    "deferred": 0,
    "noted": 1,
    "fixed": 14,
    "scope": "frozen",
    "fix_checks": 6,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2,
      "adversarial-native": 1,
      "outside-voice": 1
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "baeb8f7ef7da92d0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "d029c01e67a447a511134207803962846cc057c5",
    "status": "done",
    "findings": 2,
    "raised_by": "targeted"
  },
  "carry": {
    "from": "66c4f68ef5f150def999578dac785f3aeaac5180",
    "reason": "base merge + test-only change + release metadata + release metadata + base merge + test-only change + release metadata",
    "product_patch_id": "d029c01e67a447a511134207803962846cc057c5",
    "changed_paths": [
      "product:AGENTS.md",
      "metadata:CHANGELOG.md",
      "product:README.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:bin/gstack-review-plan",
      "product:docs/pregate.md",
      "product:docs/review-policy.md",
      "product:docs/ship-policy.md",
      "product:docs/support-tiers.md",
      "product:lib/headless-artifacts.ts",
      "product:lib/pregate/checks/literals.ts",
      "product:lib/review-depth.ts",
      "product:lib/review-risk.ts",
      "product:lib/review-scope.ts",
      "product:lib/review-targeted.ts",
      "product:lib/ship-budget.ts",
      "product:lib/ship-receipt-depth.ts",
      "product:lib/ship-receipt.ts",
      "metadata:package.json",
      "product:ship/SKILL.md",
      "product:ship/SKILL.md.tmpl",
      "test:test/fixtures/golden/agy-ship-SKILL.md",
      "test:test/fixtures/golden/claude-ship-SKILL.md",
      "test:test/fixtures/golden/codex-ship-SKILL.md",
      "test:test/fixtures/golden/factory-ship-SKILL.md",
      "test:test/pregate-selection.test.ts",
      "test:test/review-depth.test.ts",
      "test:test/review-packets-removed.test.ts",
      "test:test/review-pass.test.ts",
      "test:test/review-plan-cli.test.ts",
      "test:test/review-risk-routing.test.ts",
      "test:test/review-scope-followups.test.ts",
      "test:test/review-scope.test.ts",
      "test:test/review-targeted.test.ts",
      "test:test/ship-frozen-scope-actor.test.ts",
      "test:test/ship-receipt-depth.test.ts",
      "metadata:changelog.d/gst-407-ship-rereview-triggers.md",
      "metadata:changelog.d/gst-430-notes-only-pass.md",
      "product:.github/workflows/free-durations-record.yml",
      "product:.github/workflows/windows-free-tests.yml",
      "product:.github/workflows/windows-setup-e2e.yml",
      "product:.github/workflows/windows-smoke.yml",
      "product:.gstack/pregate.json",
      "product:.gstack/ship-policy.json",
      "product:CONTRIBUTING.md",
      "product:TODOS.md",
      "product:autoplan/DRIVER.md",
      "product:autoplan/SKILL.md",
      "product:autoplan/bin/guard-journal.ts"
    ],
    "merge_commits": 2,
    "range_diff": "1:  1e4a85e4 =  1:  1e4a85e4 fix(ship): base merges, adjacent base edits, test-only and audit-requested fixes no longer force a second review loop (GST-407, GST-384, GST-391)\n 2:  b0db2833 =  2:  b0db2833 ship driver: trim two phrases for headroom with #3662\n 3:  28353fa9 =  3:  28353fa9 ship driver: keep the Next steps heading phrase the handoff check reads; trim elsewhere\n 4:  fa48f02e =  4:  fa48f02e test: regenerate ship goldens\n 5:  ccdc462d =  5:  ccdc462d fix: pre-landing review fixes\n 6:  37cfb481 =  6:  37cfb481 fix: pass-2 review fixes\n 7:  f6d6e23e =  7:  f6d6e23e fix: Step 11 review fixes; a version-only stamp_files edit after review is release metadata (GBRA-251)\n 8:  e70da9bf =  8:  e70da9bf fix: no test edit skips review; guard packet writes; exclusive attempt state\n 9:  41f6df0d =  9:  41f6df0d fix: attempt prints gstack's install command; carry checks the product diff outside context paths\n10:  b6a2d22c = 10:  b6a2d22c fix: oversized packets take the full loop; exact --docs-requested match; name-only test globs only in test dirs\n11:  6e928ef3 = 11:  6e928ef3 docs(unattended): carry's scoped-review refusal and what it keeps\n12:  a7ac53cf = 12:  a7ac53cf docs: carry's scoped-review route in ship-policy, review-policy and troubleshooting (docs-a-1)\n13:  a1ea723a = 13:  a1ea723a test(windows): curate ship-rereview-triggers out of the Windows lane like ship-release (run 41193336209)\n14:  e682fa6e = 14:  e682fa6e fix(review-log): record a notes-only /ship pass clean; name the cause and repair when a pass's tree moved (GST-430)\n15:  10221c72 = 15:  10221c72 fix(receipt): carry and write handle PRs with thousands of files; tree receipt fails closed on a failed diff (GST-448)\n16:  a057def9 = 16:  a057def9 fix(ship): preflight routes RECEIPT_CARRY_SCOPED_REVIEW to the scoped review; carry --dry-run writes no packet (GST-442)\n17:  ae38884d = 17:  ae38884d docs(ship): Step 1.4 and Step 16 route the scoped-review refusal and the --docs-requested fix; trims keep the cap (GST-442, GST-444)\n18:  c56c0068 = 18:  c56c0068 fix: /ship review pass 1: notes-only floor, scoped carry order, named temp and diff refusals\n19:  b9ab3289 = 19:  b9ab3289 test: pin the Step 16 --docs-requested route with its --docs-result\n20:  0a0ccdce = 20:  0a0ccdce fix: a claimed clean review row with a logger-stamped open gate finding reads UNVERIFIED (red-team, pass 1)",
    "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": [
      "1e06e8f938d74180569b5b3845530573bfb694d6",
      "287406c6382af58deef0860632577f30c8f25a44",
      "8381236213e144f52ae5243d20bf539f0d6941f3"
    ]
  }
}
{
  "schema_version": 1,
  "pr": 3705,
  "head": "66c4f68ef5f150def999578dac785f3aeaac5180",
  "version": "1.92.42.0",
  "base": "main",
  "session_kind": "unattended",
  "thread": "jam_01M68A3Q3474STK2VM8MSCTFGE",
  "head_tree": "1e06e8f938d74180569b5b3845530573bfb694d6",
  "product_patch_id": "d029c01e67a447a511134207803962846cc057c5",
  "gstack_version": "1.92.42.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 98,
    "rules": "150435b0a543019a",
    "base": "5225e35cc60312ae1b675704e7f2ffdac1ccf40e",
    "registry": "5225e35cc60312ae1b675704e7f2ffdac1ccf40e",
    "gate_scan": {
      "tagged": 2,
      "head": "66c4f68ef5f150def999578dac785f3aeaac5180"
    },
    "reasons": [
      "gate-class",
      "runtime=98>50"
    ]
  },
  "pregate": "requires-remote cleared @1e06e8f938d7 (1 checks, current for 66c4f68ef5f1)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41353608596/job/124988861054",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41353608678",
    "pregate.json/remote_gate: remote-gate tree=1e06e8f938d7 tests=18921"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, ship/ skill templates and sections, README.md, CHANGELOG.md, changelog.d/ (re-audit docs-e-2 at 76126ce)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 4,
    "deferred": 0,
    "noted": 1,
    "fixed": 14,
    "scope": "frozen",
    "fix_checks": 6,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2,
      "adversarial-native": 1,
      "outside-voice": 1
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "baeb8f7ef7da92d0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "d029c01e67a447a511134207803962846cc057c5",
    "status": "done",
    "findings": 2,
    "raised_by": "targeted"
  }
}

What changed

  • The receipt carries the targeted reader's record (GST-464). Step 11 saves the record to .gstack/tmp/targeted.json (gstack-review-dispatch verify --targeted-out), and the Step 19 and handoff gstack-ship-receipt write commands pass it as --review-targeted when the file exists. Every Step 9 entry creates .gstack/tmp, adds it to .git/info/exclude and deletes the old record, so a pass without the reader leaves the receipt legacy and the record never reads as an uncommitted edit. Enforcement stays report-only: ready and train build only print REVIEW_TARGETED:.
  • One fresh base for gate-diff, diff-scope and the review plan (GST-462). gstack-gate-diff and gstack-diff-scope use origin's tracking branch whenever it shares history with HEAD, the same base gstack-review-plan's path list reads. A local main that is behind, ahead or diverged no longer changes what the gate scan sees, and gate-diff names the case on stderr. Tracking branches are read by full name (refs/remotes/origin/main), so a tag or a fetched branch named origin/main can't stand in while that branch exists.
  • Preflight refuses a mis-sized review (HARN-15). gstack-ship-preflight fetches +refs/heads/<base>:refs/remotes/origin/<base>. At the PR's pushed head, it stops before any reader runs when the diff lists more than 2×+50 of the PR's changed files, or fewer than the PR's count (a fork whose origin is ahead of the PR's base).
  • Pins. ship/sections/review-army.md and adversarial.md are repinned under the new no-loss replay GST-464, a brief-identity test. It requires all six reviewer briefs that lib/review-brief.ts cuts from those sections to stay byte-identical to the bodies the L and GST-257 replays admitted.

Why

ready printed REVIEW_TARGETED: … receipt=legacy verdict=missing even when the targeted reader ran (gstack-evals#95, #3682, #3612). A stale local main made #3597 read as gate code at full depth, made gbrain's planner misread its base (GBRA-218), and on harness-evals#152 made /ship review a 17,000-file diff of main's history (HARN-15, HARN-14).

Blast radius

lib/gate-diff/git.ts (resolveBase), bin/gstack-gate-diff, bin/gstack-diff-scope, lib/ship-preflight.ts (prSized), the ship Step 9, 11, 19 and handoff prose, and the pin test. The base change scans the same or more commits, never fewer, except in a fork whose origin is ahead of the PR's base, and the preflight's lower bound stops that case. A fork clone whose origin lags upstream now scans extra upstream commits. That fails closed: more tags and more depth, never less.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-31 Ship GST-464 and GST-462 as one follow-up PR after #3684 “GST-464. The ship receipt doesn't carry the targeted reader's record… Make the receipt carry it; keep enforcement report-only. Also GST-462: gstack-review-plan --base main reads a stale local main instead of origin/main. Both are bounded fixes to the audited problem list, so the…” (GStack Minder (Captain)) approved GST-464 receipt record (report-only); GST-462 stale base; fix-lane exemption none
2026-10-31 Scope of GST-462 (GBRA-218) “the fix should cover the diff base generally, not just review-plan.” (GStack Minder (Captain)) approved gate-diff, diff-scope and review-plan base resolution none
2026-10-31 Fold HARN-15 into GST-462 “Please fold their suggestion into your GST-462 fix: diff against a fresh `origin/<base>`, and refuse when the reviewed diff's file count is far beyond the PR's changed-file count. Same PR as already queued; nothing new to report back.” (GStack Minder (Captain)) approved preflight explicit-refspec fetch and PR-size stop none
2026-10-31 One more fix cycle past the review cap (fix-check#2 CRITICAL, fail-open gate scan) “do it: one more fix cycle for items 1–4, then one fix-check plus the targeted reader. The CRITICAL is fail-open, so it's at the floor and has to be fixed. Keep HARN-1's upper bound as well (refuse when the reviewed diff lists far more files than the PR changes) beside your new l…” (GStack Minder (Captain)) approved fix cycle cd3d033 and fix-check p4 none
2026-10-31 Fix the #3705 pin CI failure (repin under a new no-loss replay) “A, with one condition: commit the brief-identity check as a real test... assert byte equality with the pinned bodies for all six. Then the GST-464 NO_LOSS_REPLAYS entry points at a test CI runs. Since what reviewers read is byte-identical, no new no-loss or no-gstack arm is need…” (GStack Minder (Captain)) approved GST-464 repin and the brief-identity test (ebabb59, edd4bdd) none
2026-10-31 One fix-check past the review cap for the post-review fixes and the base merge “Approved: one fix-check past the cap, scoped exactly as you proposed. It covers the cd3d033..76126ce fix hunks with the fix list plus finish's scoped packet for ship/sections/pr-body.md(.tmpl), logged at 76126ce. If it's clean, finish with `--reviewed-base f30a520 --context-revi…” (GStack Minder (Captain)) approved fix-check cd3d033..76126ce plus the pr-body.md scoped packet; finish from the branch bin none

Source: gstack-approvals record for gst-464-receipt-targeted-base (display only; not an approval citation).

Summary

GST-464 and GST-462 (with the HARN-15 fold-in) as one fix-lane PR stacked on #3694. Plan note (fix-lane exemption, audited problem list under GST-407): carry the targeted record into the receipt and keep enforcement report-only; make the diff base fresh and shared across gate-diff, diff-scope and review-plan; refuse a reviewed diff far off the PR's size. All three are done.

Test Coverage

Every behavior change has a case that failed first (~/.capy/work/gsta194/gst462-red.log, gst464-red.log, gst462b-red.log, p2fix-red.log, p2fix5-red.log, p3fix-red.log): test/review-targeted.test.ts, test/gate-diff-cli.test.ts, test/diff-scope.test.ts, test/ship-preflight.test.ts and test/review-plan-cli.test.ts. The brief-body test in test/review-packets-removed.test.ts has a negative control that edits a brief and expects a mismatch.
Tests ran: focused lane 578 pass, 0 fail at 76126ce; remote pregate 24546 pass, 0 fail (tree 3841ff9c)

Pre-Landing Review

There were two full passes. Pass 1 ran specialist-batched and red-team. Pass 2 ran specialist-batched, red-team, adversarial-native and outside voice (Codex). Then two fix-checks ran, each with the targeted reader. The logged rows tally 4 findings at the blocking floor, all from pass 2: outside-voice#1 (a tag named origin/main emptied the gate scan), outside-voice#2 (an explicit origin/main was redirected), adversarial-native#1 (verify --targeted-out crashed without .gstack/tmp) and adversarial-native#5 (the untracked record read as uncommitted). The first fix-check found one more CRITICAL in a pass-2 fix: a local base ahead of origin left unpushed commits out of the gate scan. Its row was logged as a count without a findings list, so the counter below misses it. The Captain granted a third fix cycle for it; the second fix-check found nothing blocking. After the loop closed, the Captain directed the pin fix (ebabb59, edd4bdd), and the base merge 76126ce put the base's new --base-red paragraph beside this PR's receipt write line in ship/sections/pr-body.md. Under the Captain's grant for one fix-check past the cap, a third fix-check read the cd3d033..76126ce fix hunks with the fix list plus finish's scoped packet for pr-body.md: NO FINDINGS (VERIFY: clean briefs=1 outputs=1 voided=0).
REVIEW_LOOP: passes=2 blocking_found=4 deferred=0 noted=1 fixed=14 scope=frozen fix_checks=6
Gate edits: gstack-gate-diff, gstack-diff-scope and the preflight are gate code, and every reviewer read them as such. One test pin moved: the two ship-section pins in test/review-packets-removed.test.ts (replay GST-464, approved by GStack Minder). No test was weakened or skipped.

Review notes

These fail closed or are report-only. They are listed here and not fixed in this PR.

Exploratory QA

CLI probes in the tests above. The fix-check reproduced the ahead case end to end with gstack-review-plan --base main (scratch repo ~/.capy/work/fixcheck-194).

Eval Results

No separate PR eval. Every reviewer brief is byte-identical (the GST-464 test), and the ship sections are full-gate inputs, so the train's gstack/full-gate provides the paid evidence.

Plan Completion

All three items are done (see Summary).

Issues

No GitHub issue. Linear: GST-464, GST-462 (parent GST-407). HARN-15 and HARN-14 are folded into GST-462.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No authored doc states anything d7eea9e..HEAD (76126ce) made false, so no edits were made.

Scope: the base-twin rule for gstack-gate-diff and gstack-diff-scope, the gstack-ship-preflight explicit-refspec fetch and PR-size stop, and the Step 11 to Step 19 .gstack/tmp/targeted.json receipt record, including the merged --base-red paragraph in ship/sections/pr-body.md.tmpl. No staged, unstaged or untracked content.

Documentation health:

  • docs/review-policy.md: Current. The targeted-pass record and REVIEW_TARGETED text still match.
  • docs/ship-policy.md: Current. review_depth reads origin/<base> and diff-scope now resolves the same base.
  • docs/pregate.md: Current.
  • docs/troubleshooting.md: Current. GATE_ERROR=no_base cause and fix are unchanged.
  • docs/designs/gate-diff-calibration.md: Current. It covers --commit mode only.
  • docs/designs/HONEST_WORK_GATE_INTEGRITY.md: Current. A dated design record whose base rule is still true but incomplete.
  • ship/SKILL.md.tmpl, ship/DRIVER.md.tmpl, ship/sections/{pr-body,handoff,adversarial,review-army}.md.tmpl: Current and consistent with each other.
  • CHANGELOG.md / changelog.d: Not touched (ship-owned).

Documentation debt:

  • Common gap: the preflight PR-size stop (the diff against origin/<base> lists N files but PR #n changes M) has only reference coverage (changelog fragment, source comment), with no troubleshooting how-to. Other preflight stops also have no entry.
  • Common gap: gate-diff's local <base> is behind/ahead of/has diverged from origin/<base>; base is origin/<base> stderr lines have only changelog coverage.
  • Diagram drift: none.

Scope: docs/, README.md, CHANGELOG.md, changelog.d/, ship/ (re-audit docs-e-2 at 76126ce, base d7eea9e; the first audit docs-e-1 went stale after the base merge). DOCS_CAP: none declared.

Base merge

This branch merges #3694 at d7eea9e, which carries #3684 b6a5bd1 and main 1b46f37, as 76126ce with no force-push. The merge was clean. Step 16 ran from this stack's own bin/gstack-ship-release with --reviewed-base f30a520, because the installed release (1.91.366.0) has no --reviewed-base yet and routes every file the base merge brought in as a behavior change.

Test plan

  • Focused lane 578 pass, 0 fail at 76126ce; bun run typecheck exit 0
  • Remote pregate (Ubicloud, selected files, tree 3841ff9c): 24546 tests, 0 failed, $0.07
  • Free Tests run 41224679210 and Windows Free Tests run 41224682140 at 76126ce, both success (dispatched; this stacked PR's base is not main)

Main merge after #3694 landed (rule 19)

#3694 squash-landed as 5225e35 (v1.92.42.0), and this PR is now retargeted to main. GStack Minder granted one main merge: "#3705: retarget to main, one main merge with no force-push, resolve as you planned (main's #3694 text plus #3705's own edits, regenerate don't hand-merge, size-ledger as main has it)". The merge is 0c58cc3. Twelve files conflicted, all from #3694's later rounds. Each one took main's text, and #3705's own edits were laid back on top. Those edits are the Step 19 [--review-targeted @.gstack/tmp/targeted.json] flag and two trims in ship/DRIVER.md.tmpl. SKILL.md, DRIVER.md and the goldens were regenerated, and ship/SKILL.md is byte-identical to main's at 61412 bytes.

CI on the merge then found two follow-ups, each fixed with its own fix-check:

All three fix-checks (merge hunks, trim, test) found nothing. The remote pregate ran 18921 tests with 0 failures on tree 1e06e8f9 ($0.07).

Second main merge (rule 19)

After #3820 (v1.92.45.0) landed, GStack Minder granted one more main merge: "#3705: one more rule 19 main merge, no force-push, keeping both NO_LOSS_REPLAYS entries ('GST-464' and 'R51')". aa217ca keeps both entries in test/review-packets-removed.test.ts (6 pass, 0 fail). Its fix-check found nothing, and the receipt was carried from 66c4f68 (base merge plus a test-only change). The remote pregate ran 18948 tests with 0 failures on tree 287406c6.

garrytan and others added 30 commits October 31, 2026 07:21
…ested fixes no longer force a second review loop (GST-407, GST-384, GST-391)

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>
…-triggers

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

# Conflicts:
#	ship/DRIVER.md
#	ship/DRIVER.md.tmpl
…ds; trim elsewhere

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>
comparePath returns same only when every hunk sits where the base change puts it (patch-ids ignore positions) and treats a file-mode change as changed; the scoped-review packet says when a fence is truncated; --docs-result must be the posted audit's result; the --context-reviewed record goes beside the packet, outside the worktree. Negative controls for each.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A test edit routes as tests= only when it adds lines with no gate tag; a removed or changed line or an unreadable test diff goes through the full loop. Diffs skip textconv. A hunkless patch (binary, empty, mode-only) is same when its patch-id matches. Without --reviewed-base test files route as before. finish's packet path and attempt's state directory have fallbacks.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ew is release metadata (GBRA-251)

gateEditedPaths reads removed lines only inside hunks; carry refuses when a path listing fails; docs freshness stops on a failed listing; attempt counts an unreadable state file. releasePaths includes stamp_files paths whose edit is a version swap under stamp_patterns.

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

A test-only edit with no gate tag gets the scoped fix-check of its test hunks instead of a lanes-only rerun. Packet write failures print a STOP or RECEIPT_CARRY_REFUSED. attempt's allowance uses an exclusive create.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t diff outside context paths

The attempt STOP no longer echoes the audit child's fix text. A scoped-review carry now requires the product patch-id without the context paths to match at both heads.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ch; name-only test globs only in test dirs

A scoped-review packet section over 200 lines sends that path to the full loop instead of a truncated packet. The docs-result path match is exact. test_*.py, *Test.java and similar count as test code only under a test directory.

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>
…roubleshooting (docs-a-1)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…like ship-release (run 41193336209)

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

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

# Conflicts:
#	bin/gstack-ship-receipt
… and repair when a pass's tree moved (GST-430)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e receipt fails closed on a failed diff (GST-448)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… review; carry --dry-run writes no packet (GST-442)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…the --docs-requested fix; trims keep the cap (GST-442, GST-444)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… temp and diff refusals

- A notes-only pass is recorded clean only when every finding is fixed, or noted or deferred below the
  blocking floor (never CRITICAL or blocking), by its logger-stamped action, and the findings account
  for the claimed issue and critical counts (GST-430).
- The preflight scoped carry route commits and pushes the base-merge fix before writing the packet (GST-442).
- patchId refuses by name on an unwritable TMPDIR; the tree receipt names why its diff failed (GST-448).
- Step 16 stage 3 spells out --docs-requested with its --docs-result (GST-444).

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>
…ng reads UNVERIFIED (red-team, pass 1)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n rule, stale patch-id dirs swept

- deriveFromFindings stamps gate rows with the session kind before deriving status, so a findings file cannot
  dispose of a gate finding the unattended logger forces open (outside-voice#1).
- reviewFreshness reads a claimed row's findings with isOpenByAction, the rule the notes-only rewrite uses;
  noted and deferred clear a finding only when it is marked blocking: false and is not CRITICAL.
- patchId sweeps gstack-patch-id-* directories over an hour old that a killed carry left in TMPDIR.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ion; resolved gate, skipped and below-floor actions stay CURRENT

- isOpenFinding treats action 'open' (the logger's forced-open stamp) as open before a row's status or disposition.
- reviewFreshness flags a claimed clean row only for an 'open' action or a CRITICAL or blocking deferral or note, so
  interactive kept and restored gates, skipped advisories and INFORMATIONAL deferrals read CURRENT as before.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…the git dir; changelog matches the review-log floor

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… finding reads UNVERIFIED (pass 2 red-team)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…fusal (docs-d-1 audit)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hip-workflow-clarity pin)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…timeout (60 s); pregate literals check

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 13 commits October 31, 2026 15:16
…ate-diff and diff-scope (GST-462)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…arry it; Step 9 clears it (GST-464)

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>
…ed history; preflight refreshes origin/<base> and stops on a diff far beyond the PR (GST-462, HARN-15)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Resolve the tracking twin by refs/remotes/<remote>/<ref> and only for a bare
branch name, keep a local base that is ahead or diverged, quote the prSized
stop's base and name the fork case, and have every Step 9 entry create,
exclude and clear .gstack/tmp/targeted.json.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The fix-check found that keeping a local base ahead of origin left unpushed
base commits out of the gate scan while review-plan listed them. The tracking
branch now wins whenever it shares history with HEAD, an explicit origin/main
reads refs/remotes/origin/main, the preflight also stops when the diff lists
fewer files than the PR, and the Step 9 exclude line survives a missing
.git/info and an exclude file without a final newline.

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>
GST-464 brief-identity check: every reviewer brief lib/review-brief.ts cuts
from ship/sections/review-army.md and adversarial.md stays byte-identical to
the bodies the L and GST-257 replays admitted; only lead instructions outside
the cut spans changed. The check is a test CI runs.

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

The targeted-record line follows the PASS_HEAD/RANGE_BASE sentence instead of
splitting it (test/review-fix-range.test.ts pins that sentence). The brief-body
check still holds: every reviewer brief is byte-identical.

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

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

# Conflicts:
#	bin/gstack-ship-receipt
The merge commit b10e2db wrote a truncated copy of the file. This is the
three-way merge of both sides with the refused() union: main's codes plus
RECEIPT_CARRY_SCOPED_REVIEW.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review October 31, 2026 17:54
@capy-ai
capy-ai Bot changed the base branch from gst-430-notes-only-pass to main November 1, 2026 21:30
@trunk-io

trunk-io Bot commented Nov 1, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

garrytan and others added 6 commits November 1, 2026 21:31
…ted-base

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

# Conflicts:
#	bin/gstack-docs-candidate
#	bin/gstack-ship-receipt
#	lib/ship-release.ts
#	ship/DRIVER.md
#	ship/DRIVER.md.tmpl
#	ship/SKILL.md
#	ship/SKILL.md.tmpl
#	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/gst-430-notes-only-pass.json
…e main merge

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…fter the Step 9 targeted-record sentence

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

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

# Conflicts:
#	test/review-packets-removed.test.ts
…n main (stacked history)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…receipt-targeted-base

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

# Conflicts:
#	test/review-packets-removed.test.ts
@capy-ai

capy-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Frozen in wave review-53cfb5bfe011 (branch wave/review-53cfb5bfe011) at 9ab5591. Push nothing here: a moved head drops this PR from the wave. Fixes go on the wave branch through its integrator.

capy-ai Bot added a commit that referenced this pull request Nov 3, 2026
* fix(ship): base merges, adjacent base edits, test-only and audit-requested fixes no longer force a second review loop (GST-407, GST-384, GST-391)

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

* ship driver: trim two phrases for headroom with #3662

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

* ship driver: keep the Next steps heading phrase the handoff check reads; trim elsewhere

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

* test: regenerate ship goldens

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

* fix: pre-landing review fixes

comparePath returns same only when every hunk sits where the base change puts it (patch-ids ignore positions) and treats a file-mode change as changed; the scoped-review packet says when a fence is truncated; --docs-result must be the posted audit's result; the --context-reviewed record goes beside the packet, outside the worktree. Negative controls for each.

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

* fix: pass-2 review fixes

A test edit routes as tests= only when it adds lines with no gate tag; a removed or changed line or an unreadable test diff goes through the full loop. Diffs skip textconv. A hunkless patch (binary, empty, mode-only) is same when its patch-id matches. Without --reviewed-base test files route as before. finish's packet path and attempt's state directory have fallbacks.

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

* fix: Step 11 review fixes; a version-only stamp_files edit after review is release metadata (GBRA-251)

gateEditedPaths reads removed lines only inside hunks; carry refuses when a path listing fails; docs freshness stops on a failed listing; attempt counts an unreadable state file. releasePaths includes stamp_files paths whose edit is a version swap under stamp_patterns.

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

* fix: no test edit skips review; guard packet writes; exclusive attempt state

A test-only edit with no gate tag gets the scoped fix-check of its test hunks instead of a lanes-only rerun. Packet write failures print a STOP or RECEIPT_CARRY_REFUSED. attempt's allowance uses an exclusive create.

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

* fix: attempt prints gstack's install command; carry checks the product diff outside context paths

The attempt STOP no longer echoes the audit child's fix text. A scoped-review carry now requires the product patch-id without the context paths to match at both heads.

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

* fix: oversized packets take the full loop; exact --docs-requested match; name-only test globs only in test dirs

A scoped-review packet section over 200 lines sends that path to the full loop instead of a truncated packet. The docs-result path match is exact. test_*.py, *Test.java and similar count as test code only under a test directory.

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

* docs(unattended): carry's scoped-review refusal and what it keeps

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

* docs: carry's scoped-review route in ship-policy, review-policy and troubleshooting (docs-a-1)

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

* test(windows): curate ship-rereview-triggers out of the Windows lane like ship-release (run 41193336209)

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

* fix(review-log): record a notes-only /ship pass clean; name the cause and repair when a pass's tree moved (GST-430)

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

* fix(receipt): carry and write handle PRs with thousands of files; tree receipt fails closed on a failed diff (GST-448)

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

* fix(ship): preflight routes RECEIPT_CARRY_SCOPED_REVIEW to the scoped review; carry --dry-run writes no packet (GST-442)

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

* docs(ship): Step 1.4 and Step 16 route the scoped-review refusal and the --docs-requested fix; trims keep the cap (GST-442, GST-444)

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

* fix: /ship review pass 1: notes-only floor, scoped carry order, named temp and diff refusals

- A notes-only pass is recorded clean only when every finding is fixed, or noted or deferred below the
  blocking floor (never CRITICAL or blocking), by its logger-stamped action, and the findings account
  for the claimed issue and critical counts (GST-430).
- The preflight scoped carry route commits and pushes the base-merge fix before writing the packet (GST-442).
- patchId refuses by name on an unwritable TMPDIR; the tree receipt names why its diff failed (GST-448).
- Step 16 stage 3 spells out --docs-requested with its --docs-result (GST-444).

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

* test: pin the Step 16 --docs-requested route with its --docs-result

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

* fix: a claimed clean review row with a logger-stamped open gate finding reads UNVERIFIED (red-team, pass 1)

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

* fix: Step 11 findings: gate rows from --findings are stamped, one open rule, stale patch-id dirs swept

- deriveFromFindings stamps gate rows with the session kind before deriving status, so a findings file cannot
  dispose of a gate finding the unattended logger forces open (outside-voice#1).
- reviewFreshness reads a claimed row's findings with isOpenByAction, the rule the notes-only rewrite uses;
  noted and deferred clear a finding only when it is marked blocking: false and is not CRITICAL.
- patchId sweeps gstack-patch-id-* directories over an hour old that a killed carry left in TMPDIR.

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

* fix: Step 11 round 2: stamped-open gates win over status and disposition; resolved gate, skipped and below-floor actions stay CURRENT

- isOpenFinding treats action 'open' (the logger's forced-open stamp) as open before a row's status or disposition.
- reviewFreshness flags a claimed clean row only for an 'open' action or a CRITICAL or blocking deferral or note, so
  interactive kept and restored gates, skipped advisories and INFORMATIONAL deferrals read CURRENT as before.

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

* fix: carry dry run offers the scoped route last; patch-id diff under the git dir; changelog matches the review-log floor

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

* fix: a claimed clean review row with any unresolved non-gate CRITICAL finding reads UNVERIFIED (pass 2 red-team)

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

* docs: carry dry-run scoped route, patch-id directory, tree-receipt refusal (docs-d-1 audit)

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

* fix(ship): Step 3 names merge conflicts in its STOP sentence again (ship-workflow-clarity pin)

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

* fix(tree-receipt): keep the gated-to-current diff at the file helper timeout (60 s); pregate literals check

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

* test(carry): large-diff fixture sets core.longpaths so Git for Windows can add its long receipt paths (windows-free-shard 1, run 41210080055)

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

* fix(review): a stale local base branch yields to its origin twin in gate-diff and diff-scope (GST-462)

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

* fix(ship): Step 11 saves the targeted record and the receipt writes carry it; Step 9 clears it (GST-464)

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

* changelog: GST-464 and GST-462

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

* fix(review): pass 1: ahead and diverged labels, diff-scope needs shared history; preflight refreshes origin/<base> and stops on a diff far beyond the PR (GST-462, HARN-15)

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

* fix: pass-2 review fixes for base twin, prSized stop and targeted record

Resolve the tracking twin by refs/remotes/<remote>/<ref> and only for a bare
branch name, keep a local base that is ahead or diverged, quote the prSized
stop's base and name the fork case, and have every Step 9 entry create,
exclude and clear .gstack/tmp/targeted.json.

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

* fix: origin's tracking base wins whenever related; prSized lower bound

The fix-check found that keeping a local base ahead of origin left unpushed
base commits out of the gate scan while review-plan listed them. The tracking
branch now wins whenever it shares history with HEAD, an explicit origin/main
reads refs/remotes/origin/main, the preflight also stops when the diff lists
fewer files than the PR, and the Step 9 exclude line survives a missing
.git/info and an exclude file without a final newline.

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

* changelog: the tracking-ref claim holds while the tracking branch exists

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

* test: repin the two ship section briefs under no-loss replay GST-464

GST-464 brief-identity check: every reviewer brief lib/review-brief.ts cuts
from ship/sections/review-army.md and adversarial.md stays byte-identical to
the bodies the L and GST-257 replays admitted; only lead instructions outside
the cut spans changed. The check is a test CI runs.

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

* ship: keep Step 9's PASS_HEAD sentence whole; repin review-army under GST-464

The targeted-record line follows the PASS_HEAD/RANGE_BASE sentence instead of
splitting it (test/review-fix-range.test.ts pins that sentence). The brief-body
check still holds: every reviewer brief is byte-identical.

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

* fix: restore bin/gstack-ship-receipt after the main merge

The merge commit b10e2db wrote a truncated copy of the file. This is the
three-way merge of both sides with the refused() union: main's codes plus
RECEIPT_CARRY_SCOPED_REVIEW.

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

* review-collect: narrow the consumer scan and give it one 300 s deadline (GST-544)

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

* review-collect: keep the consumer scan deadline under the 180 s plan timeout (review fix)

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

* review-collect: plain paths under --literal-pathspecs; whole-millisecond timeout override (review fix)

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

* review-collect: whole-tree grep for non-UTF-8 names, no argument spread, name spawn errors (review fix)

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

* review-collect: cap the consumer grep output at 256 MB across calls; per-scan deadline wording (review fix, cycle 4)

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

* review-collect: read a missing spawn status as null (Bun 1.4.2 returns undefined on ENOENT)

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

* test: review-collect whole-tree helper reads a null status as -1 (typecheck:test ratchet)

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

* review-bots: /review and /ship triage every configured review bot, not only Greptile (#3122)

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

* fix: pre-landing review fixes (gh before 2.48 pages without --slurp; driver routes Step 10; tests for guards, review-bot fence, REMOTE_SLUG owner)

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

* fix: drop the review-bot fence test that could not fail (the tool-fence WARN degrade is unreachable: placeholder spans are skipped first)

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

* fix: Step 11 review fixes (record by comment id so a filename never reaches a shell; lookup failures are errors; tojson pages; longest bot prefix wins)

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

* fix: pass-2 review fixes (record refuses * paths, colliding ids and a missing fetch dir; parent requires id and dir; botOwning doc)

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

* review: classify the PR type and always check repo conventions (#356)

The checklist now opens with a PR-type line (application, CI/infra,
scripts/tooling, docs-only or mixed). Application and mixed diffs run
every category; other types always run five categories, including the
new Repo Conventions & Platform Fit, and report the rest as not
applicable in one line instead of skipping silently.

No-loss replay: GSTA-224 H1 preregistered no-loss run (run id
gsta224-h1-20261031, Opus 5.5, 81 calls, $9.53) against main's checklist
with a no-gstack arm; every preregistered bar passed. The
review/checklist.md pin in test/review-packets-removed.test.ts moves to
a32963ef with replay 'GSTA-224 H1'.

Refs GSTA-224

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

* review-bots: allowlist the record placeholders and match Step 10's id rule in tests

The record fence uses <comment-id>, <fix|fp|already-fixed> and <category>,
each with an enum or numeric grammar; <greptile-dir> becomes <bot-dir>.
review/greptile-triage.md also lists every REVIEW_BOTS skip reason.

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

* docs: review-bot triage covers every configured bot (#3122)

README, CONTRIBUTING, the contributor reference and standalone-binaries
name gstack-review-bots and the review-bot fence; TODOS drops the #3122
item; the changelog fragment covers record-by-id and lookup errors.

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

* test: the PR-type test also pins the compose, Terraform and README/CHANGELOG phrases

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

* test: follow the review-bot rename in the remote free tier's three reds

The cross-skill consistency judge describes review-bot-history.md and its
record helper; the tracker-guard exemption for the removed raw Greptile
fetch in review/greptile-triage.md is dropped (the fetch now lives in
gstack-review-bots, whose bodies still reach context only through
gstack-issue-guard); the Step 10 PR-check test expects 'Review bots: not
run'. HARNESS_VERSION stays 6: skill-fixture.ts and llm-judge.ts are
recorded non-behavioral for every other case.

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

* test: keep the cross-skill judge's rubric to one renamed bullet

Name review-bot-history.md beside the older greptile-history.md so the
calibration corpus still matches, and keep the REMOTE_SLUG bullet. One
live 3-sample panel at this tree: consistent 3/3, scores 4/4/4.

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

* changelog: H1 fragment passes prose lint

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

* changelog: name the H1 fragment after its branch; TODOS drops #356

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

* docs: /review's PR type step in docs/skills.md (#356)

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

* ship-policy: review_exclude_paths key and loadPolicyAt (GST-508)

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

* review: apply the base policy's review_exclude_paths and the reviewer diff ceiling (GST-508)

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

* receipt: bind review_exclude in write, carry and the queue (GST-508)

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

* docs, tests and changelog for review_exclude_paths (GST-508)

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

* fix: pre-landing review fixes (binary by bytes, links kept, untracked files out of the selection)

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

* fix: keep binary files at code paths under review_exclude_paths

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

* docs: name the reasons that keep a binary file under review_exclude_paths

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

* fix: keep every review_exclude_paths candidate when the gate scan is unknown; docs example names its version

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

* test: keep the NUL fixture clear of the sync-spawn tripwire

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

* changelog: split the ceiling sentence

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

* fix: keep a live binary file whose bytes cannot be read; tests render outside voices from a clean checkout and read the ship fixture text

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

* test(review-exclude): explicit +x for the census script; skip the chmod-000 read case on Windows and root

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

* refactor: move loadPolicyAt to lib/ship-policy-at.ts so lib/ship-policy.ts stays under the 800-line module cap

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

* fix: refuse a base that contains HEAD; skip a self-pointing origin/HEAD (GST-774)

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

* chore: regenerate gstack-doctor-components.sh for BASE_CONTAINS_HEAD

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

* fix: land resumes a merged merge-only PR instead of refusing BASE_CONTAINS_HEAD (GST-774 review)

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

* docs: changelog fragment for GST-774

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

* docs: troubleshooting names diff-scope base_contains_head and the self-pointing no_base case (GST-774 docs audit)

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

* test: repin the reviewer briefs to GST-508's no-loss-tested bytes

ship/sections/review-army.md, ship/sections/adversarial.md and lib/review-depth.ts now pin
the bytes the GST-508 preregistered no-loss replay ran at ef2760f (handoffs/GSTA-202/noloss-results.md
in the GStack Minder drive): Arm V 33/41 vs R 33/41, delta 4, exact sign flip, p_NI 0.0279 (pass).
The merge of main 83ae96e leaves these three files byte-identical to ef2760f, and an Arm P unit
(3593) renders byte-identical briefs at ef2760f and at the merge.

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

* fix: GST-774 review round 1 — merged resume depth, aliased and detached PR checkouts, develop/trunk defaults

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

* ship: Step 20 says a metrics row, keeping DRIVER.md at 12 KB after the main merge

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

* test: ship-parts resend case leaves room for the first phase-3 part after the Step 9 targeted-record sentence

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

* fix: /ship delivers review/checklist.md in two parts so checklist v1 fits the 24576-byte part cap (#3670)

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

* changelog: drop the GST-407 and GST-430 fragments, already released on main (stacked history)

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

* wave review-53cfb5bfe011: lib/ship-policy.ts back to 800 lines (module-size ratchet after merging #3744 and #3795)

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

* wave review-53cfb5bfe011: /ship pass 1 fixes

- lib/ship-receipt-depth.ts: a merged resume (land after a true merge) no longer recomputes the review_exclude digest over the emptied range, so it lands instead of RECEIPT_INVALID (failing-first land test with review_exclude_paths active).
- bin/gstack-review-dispatch render: a standalone targeted render under an active review_exclude_paths refuses and points at the pass manifest voices stage, instead of writing a brief with no selection that leaves verify dirty (failing-first test).
- test/default-base.test.ts: #3795 expectations follow main R51 depth (light for an 80-line code diff; runtime_lines=80 still proves the real base).
- test/review-dispatch.test.ts: the GST-897 fingerprint test renders from the clean checkout, like its neighbor, because CI rebuilds the tracked lib/diagram-render/dist/diagram-render.html and the reviewer diff ceiling refused the ROOT render.

* wave review-53cfb5bfe011: /ship pass 2 fixes

- lib/review-exclude.ts: binaryContent reads each blob's first 8,000 bytes (git cat-file blob, 8 KB buffer) instead of one --batch read capped at 256 MB, so head mode (receipt, carry, queue) and the plan agree past 256 MB of blobs; an unreadable blob is kept, as in live mode. Failing-first test with two 270 MB blobs.
- lib/review-bots.ts: a file-level bot review comment (subject_type file, no line position) is triaged instead of read as outdated. Failing-first test.
- test/ship-queue-land.test.ts: the merged-resume exclusion test runs its gate scan under the fixture state root, not the real home (CI free-suite 6 home containment).

* fix: merge follow-ups for main 3d99c22: origin/* stays qualified in diff-scope's twin step, retro skeleton back under its cap, combined no-loss pin GST-508+R51+GST-911

* fix(review): receipt write gate-scans whenever the base declares review_exclude_paths; collectLive never re-qualifies origin/<base> (#3852 /ship red-team#1, outside-voice#1)

* test: the docs-only receipt digest test keeps its gate scan out of the real home (free-suite shard 5 FREE_SUBSHARD_REJECTED)

* fix(merge fc292e2): tentative REVIEW_EXCLUDE_KEY_VERSION, classify targeted.json, render main's new outside-voice test from a clean checkout

- lib/ship-policy.ts: REVIEW_EXCLUDE_KEY_VERSION 1.93.0.0 -> 1.94.0.0, the next-minor tentative form stamp_paths moves (docs/ship-policy.md, #3512); 1.93.0.0 is a released heading that never names the key.
- test/gstack-clean-producers.test.ts (new from main): KEPT gains targeted.json, the wave's --review-targeted input.
- test/review-dispatch.test.ts: main's wrong-tree test rendered the outside voice from ROOT; a CI build that dirties ROOT pushes that diff past the wave's REVIEW_DIFF_MAX_BYTES ceiling, so render refused and verify saw no brief (exit 3). It now runs in cleanCheckout like the wave's other outside-voice tests.

* test(merge 6841082): GST-967's brief-body pin carries the wave's GST-508 placeholders

The merged sectionTexts differ from main's by exactly the wave's GST-508 exclude-pathspec lines (merged minus main equals wave minus fc292e2); the 1,440-case plan grid still hashes to main's MAIN_PLANS. Checks: GStack Minder drive handoffs/GSTA-202/merge-6841-checks.md.

* fix(merge e850054): targeted classes since the read accept an empty range; the wave's receipt tests pass main's targeted record

- lib/ship-receipt-depth.ts targetedClassesSince (main, GST-986) reads the range from the commit the targeted reader read to HEAD through headInputs, which since #3795 runs gstack-diff-scope's BASE_CONTAINS_HEAD check. When the reader read HEAD itself the range is empty, diff-scope reported base_contains_head, and every write with --review-targeted was refused (the product patch matched). It now passes merged=true (--merged), which skips only that check; an ancestor check already guards the range.
- test/review-exclude.test.ts and test/review-targeted.test.ts: since #3887 write refuses a money head with no targeted record and requires the record's head, so the wave's two writes that must succeed pass one, as main's own tests do (targetedAtHead in test/ship-receipt-depth.test.ts).

* test(merge e850054): drop the wave's duplicate targeted.json KEPT entry

Main (#3887) classified .gstack/tmp/targeted.json in KEPT too; the auto-merge kept both keys, which typecheck:test rejects (TS1117). Main's entry stays.

* test(merge e850054): ship size ledger entry for the merged tree (-232 B)

Main's ship size ledger plus the wave's entries summed to 345,334 B; the merged tree measures 345,102 B because DRIVER.md takes main's shorter Step 19 line. Recorded with scripts/size-ledger.ts record ship.

---------

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

capy-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Landed in wave #3852 as v1.93.33.0 (14d7414), merged from this PR's pin 9ab5591. Integrator changes touching this PR's files: a7f5a04 (merge of #3744, resolved by hand: bin/gstack-review-dispatch, lib/review-depth.ts, lib/review-targeted.ts, lib/ship-receipt-depth.ts, test/review-packets-removed.test.ts), 766c0e6 (merge of #3764, resolved by hand: TODOS.md, retro/SKILL.md, retro/SKILL.md.tmpl, scripts/harness-version.json, ship/DRIVER.md, ship/DRIVER.md.tmpl, test/fixtures/skill-md-size-allowlist.json), aa6649e (merge of #3765, resolved by hand: test/review-packets-removed.test.ts), 7450175 (merge of #3795, resolved by hand: bin/gstack-diff-scope, lib/ship-receipt-depth.ts), 557e5c4, d0c6089.

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