Skip to content

ship finish: an owner-ruled note closes its finding, and every ruling is listed (GST-1537) - #4050

Merged
capy-ai[bot] merged 6 commits into
mainfrom
gst-1537-ruled-notes
Nov 6, 2026
Merged

capy-ai[bot] merged 6 commits into
mainfrom
gst-1537-ruled-notes

Conversation

@garrytan

@garrytan garrytan commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 4050,
  "head": "f6bb1c310080dfc426ba35516cda94b4b098d82d",
  "version": "1.96.0.0",
  "base": "main",
  "gate": {
    "ruled": {
      "pass": 196,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "bc483301323e4c1e7830374fac915bf86ace816d",
  "product_patch_id": "05c1ff3f4df94804308ed1a3955726c85cb80838",
  "gstack_version": "1.96.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 190,
    "rules": "70895942bb8a8ee2",
    "base": "eaf1701da2d68b5c03136ff530aa228013eedb7c",
    "registry": "eaf1701da2d68b5c03136ff530aa228013eedb7c",
    "gate_scan": {
      "tagged": 0,
      "head": "f6bb1c310080dfc426ba35516cda94b4b098d82d"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=190"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @bc483301323e (7 checks, current for f6bb1c310080)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42146641532/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/42146626401/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=bc483301323e tests=35821 skipped=111 runs=42146641532/1 profiles=ci-reuse/free-tests heads=f6bb1c310080 verified=2026-11-06T01:58:10.595Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md against a339b93 (ruled notes: docs/ship-policy.md#ruled-notes, docs/review-policy.md, ship/sections/pr-body)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 7,
    "deferred": 0,
    "noted": 4,
    "fixed": 5,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "unrecorded": 3,
    "ledgers_read": 5,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "review_loop_exception": {
    "accepted_by": "GStack Minder (GSTA-36), via GSTA-321",
    "date": "2026-11-06",
    "via": "approval a-608eba2f6cc4 (review_loop_grant b8219ba268f6)",
    "reason": "the full panel applies (at most 2 rounds plus one scoped fix-check, then park or split)",
    "fix_check": {
      "head": "f6bb1c310080dfc426ba35516cda94b4b098d82d",
      "findings": 2
    }
  }
}

What changed

An owner can now rule a review finding a disclosed note, and finish treats that finding as closed on a granted fix-check. The ruling is an approval row bound to the stop head the owner ruled at, never a field on the lane's own review-log row, and every ruling is listed in finish's output, the PR body and the receipt.

  • gstack-approvals rule --finding <fingerprint> --head <stop head> --reason <why> --words <exact words> --by <who ruled> writes an approved row with scope ruled_note <fingerprint> <head40> and ask ruled_note <fingerprint> at <head40>: <reason>. --head must resolve to a commit (git rev-parse --verify <sha>^{commit}), the same commit a review_loop_grant names. rule refuses a reason with a newline or control character, a --by naming gstack, and any ruling inside the checkout's open /ship run. add refuses the ruled_note scope, so rule is the only path. gstack-approvals rulings prints one Ruled note: … line per ruling.
  • finish (lib/ship-release.ts route) prints every ruling as RULED_NOTE: <fingerprint> at <head12> ruled by <who> at <time>: <reason> (approval <id>). A ruling closes a finding on the newest fix-check row only when its head lies inside that row's range_base..commit, the same ancestry test the grant passes. So the forward order (the owner rules at the stop, then the granted fix-check runs) and the qm#3122 order (the fix-check runs, then the owner rules) both bind, and a ruling made at an earlier /ship's head closes nothing and is printed with (outside this fix-check's range; not applied). A skipped CRITICAL with no ruling stays open. A ruled field or action: "ruled" the lane writes on its own row is never read.
  • Receipt: a ruled_notes field ({finding, head, by, reason, at, approval}, head required). gstack-ship-receipt write --body refuses a body missing any Ruled note: line word for word. The READY tail prints each as RULED_NOTE:, and the prose check skips those lines.
  • Docs: docs/ship-policy.md#ruled-notes, a pointer from docs/review-policy.md, and the /ship PR-body section. The pinned Step 9 reviewer brief (ship/sections/review-army.md) is unchanged: the PR body's Pre-Landing Review is where the rulings are listed.
  • Windows: test/ship-finish-ruled-notes.test.ts joins its ship-bin-fixture siblings in scripts/lib/windows-curation.ts (it fails at the first shebang bin spawn on windows-latest, run 42139467391).

Why

On qm#3122 at 532cc5c (CAPY-1, gstack 1.96.0.0), the owner ruled two CRITICALs notes, not fixes. The runner logged them as skipped, and a skipped CRITICAL counts as open. So the granted fix-check row, whose own findings were all below the floor, never read CURRENT, and finish stopped with FIX_CHECK: not counted (review has unresolved findings or did not finish clean). A green, reviewed head couldn't get a receipt.

Proof

test/ship-finish-ruled-notes.test.ts, written failing first at each step:

  • The qm#3122 order and the forward order both bind: finish counts the fix-check and prints both RULED_NOTE: lines.
  • A ruling at the merge base (an earlier head) leaves the CRITICAL open and is listed as not applied.
  • An unruled skipped CRITICAL (one ruling of two) still stops.
  • Forged rulings are refused: the lane's own row with ruled: "note" or action: "ruled", add with the ruling scope, rule inside an open /ship run, and rule --by gstack ….
  • rule refuses a missing --head, an unknown sha, a tree sha and a multi-line reason.
  • Two rulings with the same reason, words and ruler both record.
  • The receipt records both rulings with their head, and write refuses a body that lists only one.

Blast radius

Merge-check code: finish's fix-check credit, reviewFreshness (finish is the only caller that passes rulings; gstack-review-read and Step 11.5 are unchanged), receipt write and its schema, and gstack-approvals. With no ruling rows, every path behaves as before.

Security read

No network calls, no new environment reads, no permission or workflow changes, no new dependencies. The trust anchor is the existing approval record. As with review_loop_grant, anyone who can run gstack-approvals on the machine can write a row, so the lane-side guards are the open-run refusal, the rule that the review log never carries a ruling, and the head binding that limits each ruling to one fix-check range.

Summary

The owner's "this ships as a note" ruling now lets a granted fix-check count, without letting the lane rule on its own findings, and without letting an old ruling close a new finding.

Approvals

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

Pre-Landing Review

Pre-Landing Review: 10 issues — 3 auto-fixed (two CRITICALs in round 1, one in round 2), 0 asked, 0 deferred, 7 noted. Full panel (specialists, red team, native adversarial voice on Opus 5.5, outside voice on openai/gpt-6.1-sol), two rounds plus one scoped fix-check under the Captain's grant a-608eba2f6cc4.

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

Review-loop exception: accepted by GStack Minder (GSTA-36), via GSTA-321 2026-11-06 via approval a-608eba2f6cc4 (review_loop_grant b8219ba): the full panel applies (at most 2 rounds plus one scoped fix-check, then park or split) (fix-check at f6bb1c3, 2 findings)

Gate edits: none detected (GATE_SCAN tagged=0 at f6bb1c3)

Fixed:

  • CRITICAL lib/ruled-notes.ts:20: two rulings with the same reason, words and ruler on one day hashed to one approval id, so the second was skipped (round 1).
  • CRITICAL lib/review-evidence.ts:349: a ruling closed any later finding at the same fingerprint (round 1; replaced by head binding).
  • CRITICAL lib/ship-release.ts:288: the round-1 time filter read a lane-written timestamp, and its round-2 replacement rejected the forward order; both replaced by head binding in the fix-check round.
  • Step 11 outside voice: a same-day repeat of a ruling kept its old time, and a multi-line reason was recorded then dropped. The head is now in the row id inputs, and rule refuses a multi-line reason.

Review notes

  • bin/gstack-approvals:128: the open-run guard checks only this worktree's marker; rule --branch from a sibling worktree, or a direct append to the record, is not blocked. Disclosure in the PR body and receipt is what limits it, as with review_loop_grant.
  • lib/ruled-notes.ts:23: a ruling can't be revoked; a newer rejected row doesn't cancel an approved one.
  • bin/gstack-ship-receipt:264: the Ruled note line check runs only when write gets --body; receipt acceptance in the queue doesn't re-check it (Step 11 outside voice).
  • lib/ruled-notes.ts:15: a SHA-256 repository's 64-hex head is dropped; this fails closed, and gstack uses SHA-1 (fix-check).
  • test/ship-finish-ruled-notes.test.ts:188: no unit row has a matching finding with a different head, so the ask[2] !== scope[2] guard is untested (fix-check).
  • bin/gstack-review-read still calls reviewFreshness without rulings, so the review dashboard shows a ruled fix-check as UNVERIFIED while finish counts it (Step 11 native voice).

Documentation

Scope: the 16 committed paths in a339b93..f6bb1c3 (GST-1537 ruled notes), plus the docs that mention gstack-approvals or the review-loop cap. Result: current. docs/ship-policy.md#ruled-notes documents gstack-approvals rule and rulings, what rule refuses, how a ruling's head must fall inside the fix-check's range, the RULED_NOTE: output and the ruled_notes receipt field. docs/review-policy.md links to that section, and the PR-body template asks for each Ruled note: line. Nothing was edited. Debt: none found.

Test plan

  • bun test test/ship-finish-ruled-notes.test.ts (9 pass) plus approval-record, headless-artifacts, ship-receipt-prose, parity-suite, skill-md-size-guard, module-size-ratchet, test-free-shards, review-packets-removed and ship-release: 196 tests, 0 fail, at f6bb1c3.
  • bun run typecheck clean; push guards passed (typecheck, skill-size, parity-suite, context-budget, module-size, goldens, conflict-markers).
  • CI free suite at the pushed head (see checks).

Open in Capy

… is listed (GST-1537)

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

trunk-io Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 5 commits November 6, 2026 00:53
… like its ship-bin-fixture siblings (GST-1537)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ng Review lists ruled notes (GST-1537)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=state-machines
Review-Finding: p1/red-team#2 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p2/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p2/red-team#1 reader=red-team
Review-Finding: s11/outside-voice#1 reader=outside-voice
Review-Finding: p1/specialist-batched#2 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit cf21a7f into main Nov 6, 2026
64 checks passed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 25/25 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 3m49s · cost $11.98

25 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $11.98 rule/judge cost | reconcile exit: 0

Profile: pr / mode pr; selected behaviors: 25, judges: 0. Deferred to scheduled/release coverage: 34 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $1.04
e2e/skill-e2e-workflow 2/2 0 2 0 ✅ $0.27
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.08
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $0.85
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.18
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.37
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.43
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $0.26
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.1
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $0.42
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.16
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.25
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.17
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $0.82
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $0.83
e2e/skill-e2e-test-value 1/1 0 1 0 ✅ $0.26
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $0.92
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $0.96
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $1.03
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $0.4
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $0.73
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $0.39
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 1/1 0 1 0 ✅ $1.06
Fail-closed reconciliation
[test:paid] report: 5/5 slices, 23 planned shards, tier=gate, attempt 1
[test:paid] coverage: profile=pr mode=pr; selected E2E=25, judges=0
[test:paid] deferred: 34 broad behaviors, 0 changed prompts without quick live coverage; these are not PR passes
  slice 1  passed            188s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-completion
  slice 1  passed            162s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-store
  slice 2  passed            147s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-current
  slice 2  passed             51s  test/skill-e2e-workflow.test.ts
  slice 2  passed             98s  test/skill-e2e-qa-callers.test.ts#ship-exploratory-small-cli
  slice 2  passed             20s  test/skill-e2e-qa-workflow.test.ts#qa-bootstrap
  slice 3  passed            121s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-failure
  slice 3  passed            124s  test/skill-e2e-qa-callers.test.ts#ship-exploratory-late-input
  slice 3  passed             83s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-stale-before
  slice 3  passed             78s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-stale-after
  slice 4  passed             91s  test/skill-e2e-qa-callers.test.ts#review-exploratory-small-cli
  slice 4  passed             46s  test/skill-e2e-test-value.test.ts
  slice 4  passed             90s  test/skill-e2e-qa-callers.test.ts#ship-exploratory-plan-checks
  slice 4  passed            115s  test/skill-e2e-qa-callers.test.ts#ship-exploratory-unavailable
  slice 5  passed             82s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-recovery
  slice 5  passed             68s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-late-result
  slice 5  passed             54s  test/skill-e2e-docsync-spawned.test.ts
  slice 5  passed             49s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-asset
  slice 5  passed             30s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-timeout-unsettled
  slice 5  passed             31s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-marker
  slice 5  passed             23s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 5  passed             34s  test/skill-e2e-ship-hook-consent.test.ts
  slice 5  passed             31s  test/skill-e2e-ship-hook-refresh.test.ts
[test:paid] collector final outcomes: 25 executed, 0 reused; 25 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (25 attempt records from 23 collectors; every record counts)
[test:paid] deselected testcases, zero credit (160):
[test:paid]    155  sibling case of a case shard (its own shard runs it)
[test:paid]      4  outside the run's case selection
[test:paid]      1  periodic-tier case (this lane runs gate)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 25/25 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 3m49s · cost $11.98
[test:paid] exercised-path map (shadow, non-blocking): 4 MAP_GAP line(s) over 25 executed case(s) with recorded commands
  MAP_GAP ship-exploratory-late-input bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-plan-checks bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-small-cli bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-unavailable bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
[test:paid] report: every planned shard accounted and passed

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit f6b8b0e8228e0aeeef150dca370bda22a5c1994b.

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