Skip to content

/ship keeps a PR's review after a main merge that only updates a shared harness pin, and warns when reviewers ran unlogged (GST-3463) - #4669

Merged
capy-ai[bot] merged 4 commits into
mainfrom
keep-ship-review-after-harness-pin-merge
Nov 22, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
keep-ship-review-after-harness-pin-merge

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

A pull request no longer needs a fresh /ship when merging main only updates a harness pin file it shares with another PR, and /ship's review summary now warns when reviewers produced output that the run never logged.
Why: #4652 paid for a full new review after such a merge, and a harness-evals run lost its granted follow-up review because nothing was logged.
Nothing to do.

What changed

A sibling PR that touched the same pinned harness file used to lose its saved review after a main merge and pay for a whole new review, even though the only change was a pin file recording the new contents of a file that was already compared. Now a harness pin file counts as generated output when, before and after the merge, it records exactly the pinned file's contents with the same reason, and the harness version and patterns did not change. The pinned file itself is still compared, so any real change still needs a new review.

The review summary also prints a warning line when a run's reviewers wrote output that no review-log row of the run records, so a run that skipped logging hears about it before the follow-up review it was granted fails to bind. Each review pass and each follow-up review is checked against its own kind of row, so a logged row of another kind no longer hides a missing one. The warning never changes the exit code. The Capy skill now says never to run a reviewer by hand, and the review policy lists the new warning.

Why

#4652 paid for a fresh review after a main merge that only re-recorded a shared harness pin, and harness-evals#507 lost its granted follow-up review because the run's reviewers were never logged.

Blast radius

The pin rule runs only when /ship decides whether a saved review still covers the new head (lib/ship-receipt-patch.ts productSpec) and fails closed: a missing or malformed harness manifest, a pin that is not an object, a changed reason or a moved harness version all count as a real change, as the four new tests show (one keeps the review, three refuse). The warning is stderr only in bin/gstack-review-scope summary; exit codes and the summary JSON are unchanged, which a negative-control test and the existing review-scope suites (129 tests) confirm.

Test Coverage

Coverage: 9 of 13 new code paths tested (69%). Gaps, all in fail-closed or diagnostic paths: manifest patterns changed at the same version, a missing or malformed pin or manifest, a rewritten-history re-pin, and a review row of another pass number beside first-pass reviewer output.
Tests ran: test 1745 (files, CI run 44997575097)

Pre-Landing Review

A final full review of this head ran read-only (no fix round): a batched testing, security and state-machines read, a red-team read, a money-focused read, an adversarial read and a second-model review. The second-model review repeated one finding: a harness pin turned into a symlink whose link text is the pin's JSON could pass the re-pin check, because the pin is read with git show and its file mode is not compared. It was ruled below the blocking floor (see Agent notes); a file-mode check follows in a second PR. Everything else is below the floor and listed under Review notes.

Review notes

Below the blocking floor; recorded here and not fixed in this PR.

  • The new warning also counts review passes that a later pass replaced, so it can contradict the existing "abandoned pass" line.
  • The warning only fires when the summary reads the run's reviewer records, which happens at the final summary, not when a review stops or before finish.
  • The warning does not check unlogged second-model or adversarial reviewers once a review pass is logged.
  • The harness-version test also changes the pin's since field, so it cannot prove the manifest version check on its own.
  • The re-pin check compares a pin's other fields between the reviewed head and the new head, not against main's side of the merge.
  • A pin with no blob field for a file absent at both heads passes the blob comparison (other fields must still match).
Exploratory QA

Two smoke checks on this head: the two new test files pass, and gstack-review-scope summary on this run's own records prints the new warning naming the unlogged pass before its row was logged. Verdict: pass. Evidence: ~/.capy/work/gstack/ship-4669-r4/qa/functional (checkpoint 002).

Scope Drift

Scope Check: CLEAN. Intent: keep a review record across a base merge that only re-pins a shared harness file, and warn about unlogged reviewers. Delivered: exactly that, plus the policy rows for both.

Documentation

Status: current. The branch's own doc edits match the code, and nothing needed correcting. The full audit is in Agent notes.

Tests
  • bun run test (CI run 44997575097, Free Tests): green, reused at this tree
  • macOS named regressions (same run): green
  • targeted: the two new test files pass
Agent notes

Open notes:

  1. REVIEW_ROWS_MISSING also counts voided pN ledgers, so it contradicts REVIEW_SCOPE_VOIDED (bin/gstack-review-scope:224-226; three readers).
  2. A ledger with an unparseable start time (started: NaN) counts as this run and can raise a false warning.
  3. The warning fires only at Step 19's summary, not on the Step 11.5 or finish path (bin/gstack-review-scope:228).
  4. No tests for malformed or missing pin and manifest JSON (fails closed) or ledgers older than --since.

Ruled note: lib/ship-receipt-patch.ts:98:adversarial at 3c47078 ruled by GSTA-36 at 2026-11-22T07:16:29.551Z: Needs a committed symlink whose target name is the pin's JSON: a missing target turns CI red through readPins, and an existing one is a new product path the carry refuses. Mode check follows in PR 2. (approval a-1e8089baf227)
Ruled note: lib/ship-receipt-patch.ts:95:adversarial at 3c47078 ruled by GSTA-36 (relayed from GSTA-795:01M811N9FYXZ1WM5995GQ9MKR8) at 2026-11-22T07:40:31.039Z: Needs a committed symlink whose target name is the pin's JSON: a missing target turns CI red through readPins, and an existing one is a new product path the carry refuses. Mode check follows in PR 2. (approval a-aeeeea7dccf3)

  • Final review at 3c47078 was the read-only full review R51 plans past two rounds (run ship-4669-r4): specialist-batched, red-team, targeted (money: NO FINDINGS), adversarial-native, second-model review openai/gpt-6.2-sol (completed). Step 7 coverage audit and Step 14.5 docs audit (read-only, current) ran as readers.
    Documentation audit (docs-r4a, read-only):

Status: current. The branch's own doc edits agree with the code, and no correction is needed.

Scope: 9 committed files from base c2b4f0d2 to head 3c47078, with no staged, unstaged or new files. Changed docs: docs/ship-policy.md (carry-table row for harness-pin-only base merges), docs/review-policy.md (REVIEW_ROWS_MISSING: row), capy/skill/gstack/SKILL.md (never hand-run a reader; log every pass), plus the changelog.d fragment. Related docs cross-checked: TESTING_INTERNALS harness version, troubleshooting, unattended, pregate, test-audit.

Documentation health

File Status
docs/ship-policy.md Current: the carry row matches rederivedHarnessPin (pin blob matches the file blob at both heads, other fields unchanged, manifest version and patterns unchanged, pinned file must be product)
docs/review-policy.md Current: the REVIEW_ROWS_MISSING: row matches the stderr warning in gstack-review-scope summary
capy/skill/gstack/SKILL.md Current: matches the warning's advice to log passes with gstack-review-log --start/--finish
docs/TESTING_INTERNALS.md Current; carry behavior not mentioned (debt)
docs/troubleshooting.md Current; no REVIEW_ROWS_MISSING entry (debt)

Coverage debt: the REVIEW_ROWS_MISSING: warning has reference coverage only (review-policy table) and no how-to or troubleshooting entry. The harness-pin carry rule has reference coverage only (ship-policy table). No diagram drift: no diagrams name the changed modules.

  • CI carry: free-tests run 44997575097 at tree 6462cdf4 (re-dispatched after the earlier run's tree_mismatch).

REVIEW_LOOP: passes=1 blocking_found=1 deferred=0 noted=7 fixed=0 scope=frozen open=1
Gate edits: none detected (2 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Approvals

Approved: yes (record r-78b755e1f6c1). The full approval record stays private.
Plan: exempt: bug fix with failing-first tests (GST-3463)
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4669,
  "head": "3c4707875691e6564861537832741e0b036b7b13",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1745,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "tests",
      "run": 44997575097,
      "attempt": 1,
      "tree": "6462cdf4b4fa9d92b001784258bf3f24ddb5ac4b"
    }
  ],
  "calls": 29,
  "session_kind": "unattended",
  "run": "ship-4669-r4",
  "thread": "GSTA-795",
  "head_tree": "6462cdf4b4fa9d92b001784258bf3f24ddb5ac4b",
  "product_patch_id": "95bb73412f5f074864f65c9e420d3863ed6c1a67",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 52,
    "rules": "630fd3101899e28e",
    "base": "0b4f0ceeec19fef62480db6c8eb00c4015380a39",
    "registry": "0b4f0ceeec19fef62480db6c8eb00c4015380a39",
    "gate_scan": {
      "tagged": 0,
      "head": "3c4707875691e6564861537832741e0b036b7b13"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "runtime=52"
    ],
    "risk": [
      "money"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @6462cdf4b4fa (8 checks, current for 3c4707875691)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44997575097/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=6462cdf4b4fa tests=38824 skipped=88 runs=44997575097/1 profiles=ci-reuse/free-tests heads=3c4707875691 verified=2026-11-22T07:52:42.289Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, capy/skill/gstack/SKILL.md (9 committed files c2b4f0d2..3c470787)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 7,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "ruled_notes": [
    {
      "finding": "lib/ship-receipt-patch.ts:98:adversarial",
      "head": "3c4707875691e6564861537832741e0b036b7b13",
      "by": "GSTA-36",
      "reason": "Needs a committed symlink whose target name is the pin's JSON: a missing target turns CI red through readPins, and an existing one is a new product path the carry refuses. Mode check follows in PR 2.",
      "at": "2026-11-22T07:16:29.551Z",
      "approval": "a-1e8089baf227"
    },
    {
      "finding": "lib/ship-receipt-patch.ts:95:adversarial",
      "head": "3c4707875691e6564861537832741e0b036b7b13",
      "by": "GSTA-36",
      "reason": "Needs a committed symlink whose target name is the pin's JSON: a missing target turns CI red through readPins, and an existing one is a new product path the carry refuses. Mode check follows in PR 2.",
      "at": "2026-11-22T07:40:31.039Z",
      "approval": "a-aeeeea7dccf3",
      "relayed": "GSTA-795:01M811N9FYXZ1WM5995GQ9MKR8"
    }
  ],
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "95bb73412f5f074864f65c9e420d3863ed6c1a67",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}
{"head":"3c4707875691e6564861537832741e0b036b7b13","run":"ship-4669-r3","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":1,"fixed":0,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}

…ed harness pin, and warns when reviewers ran unlogged (GST-3463)

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

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 22, 2026 05:23
REVIEW_ROWS_MISSING now checks pass ledgers against review rows and fix-check ledgers against review-fix-check rows, so a logged Step 11 voice row no longer hides an unlogged pass.

Review-Finding: p1/red-team#1 reader=red-team
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>
… test helper change still needs a fresh review

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