Skip to content

v1.94.20.0 test(review): one file per review and harness pin, so independent repins merge cleanly (GST-1084) - #3903

Merged
capy-ai[bot] merged 12 commits into
mainfrom
capy/one-file-per-review
Nov 3, 2026
Merged

capy-ai[bot] merged 12 commits into
mainfrom
capy/one-file-per-review

Conversation

@garrytan

@garrytan garrytan commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3903,
  "head": "7cf28b147b91d6f96144a7259f86ba8a77a41451",
  "version": "1.94.10.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 227,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "009eac3b7d1467de85c28cce9bdca48fb7b1eabc",
  "product_patch_id": "2cb3bf6aa0219cd56a3e6c6c0f24b60a6d8bb1d9",
  "gstack_version": "1.94.4.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 138,
    "rules": "18dcd562316f56ed",
    "base": "bf2bcf14b08d774291613c8073674a0e90eb4f9f",
    "registry": "bf2bcf14b08d774291613c8073674a0e90eb4f9f",
    "gate_scan": {
      "tagged": 1,
      "head": "7cf28b147b91d6f96144a7259f86ba8a77a41451"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "risk:security",
      "runtime=138"
    ],
    "risk": [
      "money",
      "security"
    ]
  },
  "pregate": "requires-remote cleared @009eac3b7d14 (7 checks, current for 7cf28b147b91)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41626026315/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=009eac3b7d14 tests=34765 skipped=70 runs=41626026315/1 profiles=ci-reuse/free-tests heads=7cf28b147b91 verified=2026-11-03T11:21:20.052Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README.md, docs/ (135 docs files), changelog.d/capy-one-file-per-review.md"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 2,
    "deferred": 1,
    "noted": 2,
    "fixed": 1,
    "scope": "frozen",
    "fix_checks": 2
  },
  "review_loop_exception": {
    "accepted_by": "GStack Minder (GSTA-36)",
    "date": "2026-11-03",
    "via": "GSTA-36 review_loop_exception grant for #3903",
    "reason": "deferred outside-voice CRITICAL in gate code (partial --bump leaves pins ahead of the manifest) fixed with a failing-first test and one scoped fix-check, no further rounds",
    "fix_check": {
      "head": "ecd3caa2d62fe395d9897de1e69bdb781e16e60b",
      "findings": 0,
      "files": [
        "scripts/bump-harness-version.ts",
        "test/harness-version.test.ts"
      ]
    }
  },
  "review_targeted": {
    "classes": [
      "money",
      "gate"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "a8e8e47a632ad262f57349e2cbff349aa7d1f622",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  },
  "carry": {
    "from": "ecd3caa2d62fe395d9897de1e69bdb781e16e60b",
    "reason": "base merge + base context moved (scoped review by anthropic/claude-opus-5-5: lib/ship-release.ts) + test-only change + release metadata",
    "product_patch_id": "2cb3bf6aa0219cd56a3e6c6c0f24b60a6d8bb1d9",
    "changed_paths": [
      "metadata:CHANGELOG.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:bin/gstack-banned-terms",
      "product:bin/gstack-design-detect.ts",
      "product:bin/gstack-diff-scope",
      "product:bin/gstack-docs-candidate",
      "product:bin/gstack-gate-diff",
      "product:bin/gstack-prose-lint",
      "product:bin/gstack-review-plan",
      "product:bin/gstack-ship-receipt",
      "product:docs/review-policy.md",
      "product:docs/ship-policy.md",
      "product:docs/troubleshooting.md",
      "product:lib/gate-diff/git.ts",
      "product:lib/pr-shots.ts",
      "product:lib/review-collect.ts",
      "product:lib/review-depth.ts",
      "product:lib/review-evidence.ts",
      "product:lib/review-exclude.ts",
      "product:lib/ship-receipt-depth.ts",
      "product:lib/ship-receipt.ts",
      "product:lib/ship-release.ts",
      "metadata:package.json",
      "test:test/diff-scope.test.ts",
      "test:test/fixtures/review-pins/files/lib/review-depth.ts.json",
      "test:test/fixtures/review-pins/replays/GST-940.json",
      "test:test/gstack-design-detect.test.ts",
      "test:test/review-exclude.test.ts",
      "test:test/review-log-findings.test.ts",
      "test:test/review-planner-misreads.test.ts",
      "test:test/ship-receipt-carry-squash.test.ts",
      "test:test/ship-rereview-triggers.test.ts",
      "test:test/stale-local-base.test.ts"
    ],
    "merge_commits": 1,
    "range_diff": "1:  12f820954 = 1:  12f820954 test(review): one file per review and harness pin, so independent repins merge cleanly (GST-1084)\n2:  8fecd7b60 = 2:  8fecd7b60 fix: pre-landing review fixes (GST-1084)\n3:  445a03f73 = 3:  445a03f73 docs: name the changelog fragment for the branch (GST-1084)\n4:  f1b2396c5 = 4:  f1b2396c5 docs: the harness guard pins one file per harness file (GST-1084)\n5:  876b064a8 = 5:  876b064a8 fix(ship-release): GST-1031 re-pin route reads per-file harness pins (GST-1084)\n6:  527c7f685 = 6:  527c7f685 changelog: GST-1031 route reads per-file harness pins\n7:  37b736ec6 = 7:  37b736ec6 docs(test-audit): harness guard pins 42 files\n8:  ecd3caa2d = 8:  ecd3caa2d fix(harness-version): a pin ahead of the manifest version counts as drift (GST-1084)",
    "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": [
      "52f9848d8ea785deb7e3ace2325bc8682457e83b"
    ]
  }
}

What changed

The review pins and the harness pins are now one file per pin, so two PRs that repin different files never touch the same lines and merge without a conflict.

  • The NO_LOSS_REPLAYS, REVIEWER_BRIEFS and BRIEF_BODIES tables in test/review-packets-removed.test.ts moved to test/fixtures/review-pins/. Each pinned file has files/<pinned path>.json with its sha and replay. Each replay has replays/<slug>.json with its id and written no-loss justification. Each brief body has brief-bodies/<name>.json with its sha.
  • scripts/harness-version.json now holds only version and patterns. Each harness pin moved to scripts/harness-pins/<path>.json, and scripts/bump-harness-version.ts reads and writes those files.
  • lib/ship-release.ts: /ship's post-review route (GST-1031) reads the per-file harness pins, so a non-behavioral re-pin after review still counts as release metadata. A manifest that regains a files table counts as behavior.
  • test/helpers/pin-merge-fixture.ts runs a real git merge-tree --write-tree on two branches in a fresh repository.

Why

The single pin table caused at least five main-merge conflicts on 2026-11-02, two of them on #3852 (GST-1084). Git treats changes on adjacent lines as a conflict, so sorted one-line entries would still conflict for neighboring pins. Separate files never share lines.

The repro ran two branches that repin the adjacent review-army.md and adversarial.md pins and the adjacent floor.ts and observation.ts pins. On main 14d7414 both files conflict (merge-tree exit 1). On this branch the same edits merge cleanly (exit 0).

Blast radius

This changes test and merge-check infrastructure only, plus the post-review route in lib/ship-release.ts. No reviewer text, sha, replay or harness blob changed. All 21 replays, 20 file pins, 6 brief bodies and 42 harness entries are ported unchanged, including the combined GST-508 entries from #3852. HARNESS_VERSION and its readers (eval-trial-series.ts, ship-measure.ts) are unchanged.

The checks are stricter than on main. Every pin still needs its sha and a replay with a written no-loss justification, and the brief-body check still guards the bodies. These now fail too. They are a missing pin for any reviewer source (MUST_PIN plus every specialist checklist), a replay name that only exists on the object prototype (toString), a malformed or misnamed pin file, a stray file in a pin directory, and a files block back in the manifest.

Approvals

No approval class applies (APPROVAL_CLASSES: none). GStack Minder granted two main merges (5f705f3 and f6d6215) and a fresh /ship at f0613db with one fix round.

Pre-Landing Review

REVIEW_LOOP: passes=1 blocking_found=2 deferred=1 noted=2 fixed=1 scope=frozen ledgers_read=4 fix_checks=2 dispatches=4
Review-loop exception: accepted by GStack Minder (GSTA-36) 2026-11-03 via GSTA-36 review_loop_exception grant for #3903: deferred outside-voice CRITICAL in gate code (partial --bump leaves pins ahead of the manifest) fixed with a failing-first test and one scoped fix-check, no further rounds (fix-check at ecd3caa, 0 findings)
Gate edits: the GST-1031 test fixture in test/ship-release.test.ts moved to the per-file pin layout with the same four cases, plus one new negative case. It fails on the old harnessRepin and passes on the fix.

  • Testing specialist (CRITICAL): harnessRepin only read the old files table, so every post-review re-pin stopped finish. Fixed in 876b064.
  • Red Team and the targeted money/gate reader: no findings.

Review notes

  • INFORMATIONAL (targeted reader at ecd3caa) scripts/bump-harness-version.ts:28: pin files under scripts/harness-pins/test/helpers/ classify as tests in lib/review-depth.ts, while the old manifest classified as code, so a PR that only re-pins a harness helper plans at a lower review depth. Changing the classifier touches a pinned file and needs its own no-loss replay.
  • INFORMATIONAL (fix-check) lib/ship-release.ts:186: deleting a pin after review routes as metadata, as the old table rule did; CI's harness-version test still catches it.
  • INFORMATIONAL (fix-check) lib/ship-release.ts:181: two different unparsable pin states compare equal; readManifest throws on them in CI.
  • Low (adversarial): readPins throws on untracked files such as .DS_Store or .orig in scripts/harness-pins/; pin contents are only checked to parse; a stale comment in test/harness-version.test.ts.
  • Local full suite (required because lib/ship-* changed) failed in 13 files outside this diff (browse daemon, design-lint browser tier, CSO ordinary repos, autoplan gate judgment); Free Tests run 41610864341 passed at the same tree.

Documentation

Status: updated. One factual fix and no blockers.

Scope: base f6d6215, head 527c7f6, branch capy/one-file-per-review (GST-1084). 101 changed files: review pins and harness pins split into one file per pin, plus lib/ship-release.ts, scripts/bump-harness-version.ts and their tests. Nothing was staged, unstaged or untracked. The three docs the diff touches were read in full. A repo-wide git grep of docs for the changed paths found no other stale references.

Documentation health

  • docs/TESTING_INTERNALS.md: current (already describes the per-file pins and the conflict rule)
  • docs/test-audit-2026-10.md: updated (harness-pin count 36 -> 42)
  • changelog.d/capy-one-file-per-review.md: reviewed, matches the diff, unedited

Coverage debt: no how-to or tutorial for repinning a review file (edit its files/ pin and add the replay file it names); the changelog fragment is the only place it appears. bump-harness-version.ts has no standalone reference page. Diagram drift: none.

Test plan

  • Targeted lane: review-packets-removed, harness-version, free-fixtures, test-pr-profile, review-depth and ship-release tests, 227 pass (finish evidence FRESH)
  • Typecheck clean; the test-typecheck ratchet reports none new; module-size and spawnsync tripwires pass
  • CI green at ecd3caa; Free Tests run 41615640789 clears the remote gate and the macOS lane by CI carry
  • Partial-bump test fails at 37b736e and passes at ecd3caa; harness-version, ship-release, review-packets-removed and module-size tests 44 pass
  • Port proof (main 14d7414 vs branch): PORT OK
  • Merge repro: main exit 1 (CONFLICT in both files), branch exit 0
  • QA probe: bump-harness-version --check fails on drift, --non-behavioral rewrites only the touched pin, and a removed file drops its pin

Deferred findings

None open. The outside voice's CRITICAL (scripts/bump-harness-version.ts:109: a --bump that fails partway left pins ahead of the manifest version while the drift check passed) was deferred after the fix round, then fixed in ecd3caa under GStack Minder's review-loop exception: harnessDrift counts a pin whose since is above the manifest version as changed. A new test makes the real writeManifest fail on its second pin; it fails at 37b736e and passes on the fix. The scoped fix-check found nothing. The receipt's deferred=1 counts that earlier deferral.

…ins merge cleanly (GST-1084)

The reviewer-brief pins move from the table in test/review-packets-removed.test.ts to
test/fixtures/review-pins/{files,replays,brief-bodies}/*.json, and the harness pins from
scripts/harness-version.json to scripts/harness-pins/<path>.json. Every entry is ported
unchanged. New tests prove a stale pin still fails and that two repins of different pins
merge cleanly with a real git merge-tree.

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 8 commits November 3, 2026 02:12
- unadmitted() and the specialist coverage use Object.hasOwn, so an inherited name such as toString is not an admitted replay
- MUST_PIN names every non-specialist reviewer source; deleting one of those pins now fails
- writeManifest writes the pins before the manifest head; pin parse errors name the file
- mergePinEdits removes its repository when setup throws, and the merge tests clean up every merge they made

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

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

# Conflicts:
#	test/review-packets-removed.test.ts
…-file-per-review

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

# Conflicts:
#	scripts/harness-version.json
…(GST-1084)

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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 2 commits November 3, 2026 09:59
…rift (GST-1084)

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

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

# Conflicts:
#	test/review-packets-removed.test.ts
@github-actions github-actions Bot changed the title test(review): one file per review and harness pin, so independent repins merge cleanly (GST-1084) v1.94.20.0 test(review): one file per review and harness pin, so independent repins merge cleanly (GST-1084) Nov 3, 2026
@capy-ai
capy-ai Bot merged commit a1da77e into main Nov 3, 2026
49 checks passed
garrytan added a commit that referenced this pull request Nov 3, 2026
Resolve scripts/harness-version.json against #3903: take main's manifest
and carry this branch's test-pr-profile.ts pin into
scripts/harness-pins/scripts/test-pr-profile.ts.json.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan added a commit that referenced this pull request Nov 3, 2026
Conflict: test/fixtures/skill-md-size-allowlist.json took main's file (with #3909's review pins and #3903); the 12 autoplan host pins are lowered to the guard's measured sizes (main minus 17 each, none raised).
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan added a commit that referenced this pull request Nov 3, 2026
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>
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