Skip to content

/ship accepts a stopped review once the owner rules its findings open notes (GST-3267) - #4552

Merged
capy-ai[bot] merged 2 commits into
mainfrom
fix/ruled-notes-bind-step-11-5
Nov 20, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
fix/ruled-notes-bind-step-11-5

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

When the final review or the native reader stops on findings and the owner records each one with gstack-approvals rule at that head, /ship now counts those rulings when it binds the two reviews, so /ship can finish.
Before, the review reader ignored rulings there, so a PR with green CI and accepted findings could not finish /ship (harness-evals#498).
Nothing to do: a ruling for another branch, head or finding, or one gstack wrote for itself, still counts for nothing.

What changed

Step 11.5 now accepts a stopped review once the owner has ruled every one of its findings

Step 11.5 now accepts a stopped review once the owner has ruled every one of its findings.

Tests
  • CI free suite at this tree (run 44697085529): 1718 test files passed, plus typecheck, generated-docs freshness and the macOS and Windows checks green.
  • bun test test/ship-finish-ruled-notes.test.ts: all 27 tests passed, none failed (run by the reviewers on this tree).
Before/after as text: Step 11.5 now accepts a stopped review once the owner has ruled every one of its findings
--- Before · ship/SKILL.md.tmpl § Step 11.5: Bind the reviews at 1bd86d9 · source text
+++ After · ship/SKILL.md.tmpl § Step 11.5: Bind the reviews on this branch · source text
@@ ⋯ 4 unchanged ⋯ @@
    none after `ADVERSARIAL: skipped`). Match each to its saved
    handle, original token and source; reject outside-provider or older records.
 2. **Compare their content.** All three snapshots must match: the native record's
+   `wtree` (`review_binding.state` `verified`; `end_wtree` if `ruled_notes` read
+   `CURRENT`), the Step 9 record's `review_binding.start_wtree` and
+   `review_binding.end_wtree`; after a planned skip, the last two with
+   `review_freshness` `CURRENT`. A mismatch or missing record/field blocks release:
+   report **Review records missing or mismatched** and insert `9 → 10 → 11 → 11.5`
+   before Step 12. Bind new records at 11.5. Never attach new tokens to old work.
-   `wtree` (its `review_binding.state` `verified`), the Step 9 record's
-   `review_binding.start_wtree` and `review_binding.end_wtree`; after a planned skip, the
-   last two with `review_freshness` `CURRENT`. A mismatch or a missing required
-   record/field blocks release preparation: report **Review records missing or mismatched**
-   and insert `9 → 10 → 11 → 11.5` before Step 12. Bind the new records at 11.5.
-   Never attach new tokens to old work.
 3. **Preserve any QA exception.** A named probe-risk exception may leave Step 9.4's
    root `wtree` absent; item 2 still compares its start/end snapshots. Matching content
    does not mean failed or unrun probes passed. Keep Step 9.4's incomplete flags
    and the user's exception.
 4. **Save the evidence.** Save both records and matching **reviewed tree** for
+   Step 16, with its merge base.
-   Step 16, with its merge base. Continue to Step 12.

An owner could rule every finding of a stopped review as an open note, and /ship still refused to bind that review, because the review reader never looked at the rulings. gstack-review-read now applies the owner's rulings to each review row. A ruling counts when the row carries that finding and the ruling's head is inside the row's range (its own commit for a first pass), the same test gate dispositions already use. The row lists the rulings it applied in ruled_notes, and Step 11.5 compares a ruled native record at the one tree its stopped pass read. docs/ship-policy.md says Step 11.5 reads rulings too.

Why

"The final review stopped, the owner ruled every finding, CI is green, and /ship still says the reviews are unverified" (harness-evals#498). Now a review whose findings the owner has ruled reads current at the tree it reviewed, so /ship can finish, while every unruled finding still keeps the review unverified.

Blast radius

gstack-review-read feeds Step 11.5, the review dashboard and the review-scope summary; ship-release works out freshness on its own and is unchanged. It is safe because the new path only reads approved rows from the owner's record (gstack's own rows are dropped), skips gate findings, drops any ruled_notes a row carried itself, and falls back to no rulings when the record can't be read (file:line read by four reviewers; test/ship-finish-ruled-notes.test.ts ran with all 27 tests passing).

Test Coverage
CODE PATHS
[+] lib/gate-dispositions.ts
  ├── ruledOn()
  │   ├── [★★★ TESTED] a ruling for a non-gate finding at the row's head applies (ship-finish-ruled-notes.test.ts)
  │   ├── [★★★ TESTED] a ruling for another finding, branch or head closes nothing
  │   ├── [★★★ TESTED] partial rulings: only the fully ruled row reads current
  │   ├── [GAP] a ruling naming a gate finding's fingerprint must not close it
  │   └── [GAP] a later pass (range_base set): ruling head inside or outside the range
  ├── rowRange() (extracted): [★★ TESTED] no-range path; [★★★ TESTED] range path via ship-gate-dispositions.test.ts
  └── dispositionedOn() refactor: [★★★ TESTED] ship-gate-dispositions.test.ts
[+] bin/gstack-review-read
  ├── [★★★ TESTED] ruled_notes lists approval ids per row
  ├── [★★★ TESTED] ruled_notes a row carried itself are dropped
  ├── [★★★ TESTED] rulings gstack recorded for itself are rejected
  └── [GAP] approvals store unreadable: rows still print with no rulings
[+] ship/SKILL.md.tmpl Step 11.5 prose: [★★ TESTED] golden fixtures and generated-docs freshness
USER FLOWS
[+] a stopped round is ruled by the owner, then Step 11.5 binds: [★★★ TESTED]
[+] a ruling with the wrong scope cannot unlock Step 11.5: [★★★ TESTED]
COVERAGE: 8/11 paths (73%) | GAPS: 3 (0 E2E, 0 eval)

Tests: 1837 → 1837 (+0 new)
Coverage: 73% value-weighted (73% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated).

Proposed tests for the three gaps (the audit ran read-only, so none were written):

  1. Extend the wrong-scope case with a ruling on a gate finding's fingerprint at the head; it should close nothing.
  2. A second-pass row with range_base set, with one ruling inside range_base..commit (applies) and one before it (does not).
  3. Corrupt the approvals store and run gstack-review-read; rows should still print with no rulings applied.

Tests ran: free 1718

Pre-Landing Review

No issues found. The batched testing, security and state-machine reviewer and the red-team reviewer found nothing; the native adversarial reviewer raised two low-severity notes below the blocking floor (listed under Review notes); the second-model review (GPT-6.1 Sol) returned CLEAN.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL ship/SKILL.md.tmpl:224 Step 11.5 wording names ruled_notes where the status lives in review_freshness
  • INFORMATIONAL lib/gate-dispositions.ts:215 a ruling at an earlier pass's stop head also covers the same fingerprint on the next pass whose range starts there (the same inclusive range gate dispositions use)
Exploratory QA

Functional smoke on gstack-review-read, 2 probes inside the 5-minute budget, verdict pass:

  • Success path: bin/gstack-review-read on this branch exits 0 and prints its rows and the config, head and tree trailer (checkpoint 001).
  • Riskiest changed edge: a review row that carries its own ruled_notes, with no owner ruling stored, prints with that field removed and reads unverified, so a logged row can't claim a ruling (checkpoint 002).
    Not probed here: the owner-ruling success path, partial rulings and wrong-scope rulings, which the focused test file covers.
Eval Results

No paid evals ran. The PR eval router in CI (evals.yml run 44697085577) selected no PR slices for this diff; bun run eval:select lists the dependent behavior cases as scheduled release coverage, not PR checks.

Scope Drift

Scope Check: CLEAN
Intent: let Step 11.5 bind a stopped final review and native reader whose findings the owner ruled (harness-evals#498).
Delivered: gstack-review-read applies owner rulings to review rows, Step 11.5 prose and docs/ship-policy.md describe it, with focused tests.

Verification Results

No plan verification items (a bug fix with no plan file). Automatic QA above: both probes passed; none failed, was blocked or went unrun.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The change is already documented, so no doc edits were needed.

Scope: the committed diff from 1bd86d9 to 6cf77df on fix/ruled-notes-bind-step-11-5 (12 files; no staged, unstaged or new files). It covers gstack-review-read now applying the owner's gstack-approvals rule rulings to Step 9 and Step 11 review rows, the new ruledOn and rowRange in lib/gate-dispositions.ts, and the updated binding check in /ship Step 11.5. Docs that mention gstack-review-read across docs/ and the skill templates were checked.

Documentation health:
  docs/ship-policy.md            Current (the branch adds the Step 11.5 rulings paragraph, which matches the code)
  changelog.d/ruled-notes-...md  Current (the fragment matches the behavior)
  ship/SKILL.md.tmpl             Current (the Step 11.5 binding text matches the reader output)
  docs/standalone-binaries.md    Current (gives a general summary of gstack-review-read)
  docs/skills.md                 Current (the freshness description is unaffected)
  docs/review-policy.md          Current
  docs/troubleshooting.md        Current
  docs/unattended.md             Current

Coverage debt: the new ruled_notes field on review rows has reference and explanation coverage in docs/ship-policy.md only. There is no troubleshooting entry for a ruled review that still reads unverified at Step 11.5. This is a common gap: reference-level coverage only, nothing filled in. Diagram drift: none; the changed modules appear in no diagram.

Agent notes

Issue GST-3267. Out of scope: fix-checks closing their own findings, and run liveness markers (GST-3260).

Refs GST-3267

Approvals

No approvals recorded for branch fix/ruled-notes-bind-step-11-5.
Plan: exempt: bug fix (GST-3267); bug fixes skip plan review
Plan check: exempt bug fix

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=2 fixed=0 scope=frozen ledgers_read=2 dispatches=2 est_input_tokens=16041
Gate edits: 6 listed, 4 read, 0 findings — 0 kept, 0 restored, 0 open

🤖 Generated with Claude Code

{
  "schema_version": 1,
  "pr": 4552,
  "head": "6cf77df74805bae8461db9aa02b4ae9ba883ff7e",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1718,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44697085529,
      "attempt": 1,
      "tree": "686f7cdf01e92002e3c66d080d73bfabeb77085c"
    }
  ],
  "calls": 18,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4552/run",
  "head_tree": "686f7cdf01e92002e3c66d080d73bfabeb77085c",
  "product_patch_id": "965831323fe5fec7eba1d21a618623ae0a3bb6b4",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 64,
    "rules": "3e7e9d5d0a0d8879",
    "base": "1bd86d9a4547ed8df0c5da37380c838e61a91b9b",
    "registry": "1bd86d9a4547ed8df0c5da37380c838e61a91b9b",
    "gate_scan": {
      "tagged": 0,
      "head": "6cf77df74805bae8461db9aa02b4ae9ba883ff7e"
    },
    "reasons": [
      "gate-class",
      "runtime=64"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @686f7cdf01e9 (8 checks, current for 6cf77df74805)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44697085529/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44697085481/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=686f7cdf01e9 tests=38499 skipped=104 runs=44697085529/1 profiles=ci-reuse/free-tests heads=6cf77df74805 verified=2026-11-20T08:12:34.288Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against the 12-file diff (gstack-review-read rulings, Step 11.5 binding)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "est_input_tokens": 16041,
    "ledgers_read": 2,
    "dispatches": {
      "specialist-batched": 1,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}
{"head":"6cf77df74805bae8461db9aa02b4ae9ba883ff7e","run":"run","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":0,"fixed":0,"scope":"frozen","rounds":1,"est_input_tokens":16041,"dispatches":{"specialist-batched":1,"red-team":1}}}

Open in Capy

… notes (GST-3267)

gstack-review-read now applies the owner's gstack-approvals rule rows to each review row whose range holds the ruling's head, so Step 11.5 binds a final review and native reader that stopped on findings the owner accepted (harness-evals#498).

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

trunk-io Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

… (GST-3267)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit a26529a into main Nov 20, 2026
55 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549)
- For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543)
- The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534)
- A green CI run still counts when the repository's artifact storage is full. (#4536)
- `/cso` now audits repositories that track symlinks. (#4567)
- A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555)
- The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554)
- Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542)
- A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544)
- When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553)
- The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539)
- Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568)
- /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552)
- /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565)
- The prompt-routing hook no longer acts on words inside backticks. (#4566)
- In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509)
- gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537)
- gstack now says what it's adding before it adds a background job or a browser extension. (#4538)
- For contributors: every flaky pass in Free Tests is now recorded. (#4572)
- For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570)
- Secret values written as `name=value` at the end of a path are now hidden. (#4571)

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