Skip to content

A clean follow-up review of a fix now clears the findings it was approved for, plus three other /ship approval fixes (GST-3246) - #4546

Closed
garrytan wants to merge 5 commits into
mainfrom
ship-approval-fixes
Closed

garrytan wants to merge 5 commits into
mainfrom
ship-approval-fixes

Conversation

@garrytan

@garrytan garrytan commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

/ship stops needing a manual owner ruling in four cases: an approved follow-up review that finds the fix clean now clears the findings it was approved for, a stopped /ship run can record that approval itself, a leftover marker from a finished run no longer blocks approvals, and run ids like 507-7192673 are no longer mistaken for phone numbers.
Why: each case forced a manual ruling or a workaround on 2026-11-19 (gstack #4537, harness-evals #507 and #508).
Nothing to do: when a /ship run takes that approval, it now prints the two extra fields its follow-up review records.

Agent notes

What changed

  • Granted fix-check closes its findings (lib/review-scope.ts, bin/gstack-review-scope): the loop summary reads the branch's fix-check round grants. A review-fix-check row that is complete, has range_base at the grant's stop head, lists every grant finding in covers, holds no unfixed blocker of its own, and was logged after the row that left the finding open marks exactly those findings fixed. A row covering fewer findings, finding a blocker, reading another range or predating the stop closes nothing, so RECEIPT_BLOCKER_OPEN still fires. gstack-ship-receipt claim prints a FIX_CHECK_ROW: line with both fields when a run claims a fix-check grant. The reviewer-pinned ship/sections/review-army.md is unchanged (a first version edited it and CI's no-loss pin test refused it).
  • Stale marker and stopped runs (lib/ruled-notes.ts, bin/gstack-approvals): openShipRun counts a .git/gstack-ship-run marker only while gstack-lease open says its run is open, as gate dispositions already did; a lease check that cannot run keeps the marker open. Inside an open run, round-grant still refuses everything except --kind fix-check --stop-run <that open run>, which is what gstack-ship-receipt stop's NEXT line tells the lane to record.
  • Run ids are not phone numbers (lib/redact-patterns.ts): a position exemption for a span inside a fix-check grant scope's stop= token. The same digits in the reason, the words or anywhere else still report.
  • --by "GStack Minder (GSTA-36)" (lib/ruled-notes.ts and its readers): the /^gstack\b/i catch stays, with an exemption on top for GStack <Capitalised word>. It was a pattern mistake, not a deliberate guard: the code's own comment already called GStack Minder "a person's crew, not gstack", and round-grant was fixed that way in READY prints real trial merges and the second-model trail read, plus six small ship-tool fixes (GST-3200) #4529 while rule, gate and lane-exception (and the readers of their rows) kept the prefix match. gstack writes its own names in lower case only, so the exemption admits none of them.

Tests. Failing first on main: 7 new cases failed before the fix. The refusal controls (fix-check with a blocker, covers fewer, other range, no covers, before the stop, extra-round inside the open run, phone in free text, gstack's own names) pass before and after. Four existing fixtures that simulated an open run with a marker alone now also open the run's lease, as test/ship-gate-dispositions.test.ts already did; their assertions are unchanged.

Lane GSTA-665 for GStack Minder (GSTA-36), issue GST-3246. gstack: ok 1.102.0.0 for=ship.

Trail-read fix round (Captain GStack Minder (GSTA-36), 2026-11-19: one fix round for trail-read rows 1, 2, 3, 6, 8; R51 past two rounds). A cross-family read of the decision trail (openai/gpt-6.2-sol, reports/GSTA-665-decisions.tsv) found gaps, fixed in one commit, each with a test that failed at 81eb28a:

  • Row 1: a fix-check clears findings only when its derived status is not issues_found or issues_open and no unresolved or critical finding exists in any findings source it logged (inline findings or a findings file).
  • Row 2: the stop head comes from the logger's own record (a fix-range row's fix_base, else the commit of the bound Step 9 row the fix-check follows), and the copied range_base must agree; the copy alone never counts.
  • Row 3: a blocker that carries a ledger id closes only by that id, never by a fingerprint another blocker shares.
  • Row 6 (and 7): gstack-lease open --any-age keeps a run open past 120 minutes while its holder lives and exits 2 when a lease file cannot be read; openShipRun drops a marker only on exit 1 (released, or holder gone). Gate dispositions and preflight keep their current lease reads.
  • Row 8: the phone-number exemption moved out of the shared scanner into buildRow, for a fix-check grant row's scope field only; a grant-shaped excerpt in --reason or --words is scanned as before.

Open notes (trail-read rows 4 and 5, below the blocking floor, not fixed by the Captain's ruling):

  • Row 4: the loop summary does not check a fix-check grant's PR, its stop record or whether another run claimed it; the approval record is per branch, and the fix-check route only runs after history (grantedStop) and claim check the stop.
  • Row 5: inside an open run, a fix-check grant whose --stop-run matches the open run records even for an unrelated head; history rejects it later, but claim and the review plan do not check the recorded stop.
  • Residual: gstack-lease touch still prunes lease files older than 120 minutes, so another session's touch on the same checkout can delete a live long run's lease, which then reads as released.

Pre-Landing Review (/ship run ship-4546; full panel, 2 rounds)

Pre-Landing Review: 9 issues — 2 auto-fixed, 3 asked (0 fixed, 3 skipped), 0 deferred, 4 noted
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=4 fixed=2 scope=frozen dispatches=8
Gate edits: none detected (7 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

  • Pass 1 at 5085521: batched specialist (testing, security, state-machines), red team, native adversarial and second-model review (openai/gpt-6.1-sol). The second-model review found 2 blockers, both fixed in c43f7e3: a fix-check row whose tree changed while it ran, or that was not converged, closed a grant's findings; and GStack No-stop default (K1) slipped through the crew exemption. 3 informational findings skipped as below the floor (self-granted fix-check is the intended design; lease expiry after 120 minutes; grant not tied to its claiming run); 3 native adversarial notes on the same points.
  • Pass 2 on 5085521..c43f7e3: specialist 1 informational note (the fixed/auto-fixed allowance in grantedFixes is now unreachable; fails closed); red team no findings.
  • Exploratory QA: smoke probes of the redaction exemption (stop= position exempt; same digits in a reason, another kind or without findings= still reported) and isGstackActor names, all as expected.
  • Tests: lane bun run test carried from CI run 44646663781 (1717 files). macOS and Windows lanes cleared from runs 44646663781 and 44645227922.

Documentation

Status: updated. One factual correction, no blockers.

Scope: 3 commits (7f9c1bc..c43f7e3), 17 committed files; no staged, unstaged or new files. The change covers /ship approval fixes: a granted fix-check closes the findings its grant names, a round grant works inside its own stopped run, a closed-lease run marker blocks nothing, the stop= run id is exempt from pii.phone.e164, and crews named "GStack ..." can record rulings.

Documentation health:

  • docs/troubleshooting.md: Updated (RECEIPT_BLOCKER_OPEN now lists the converged and bound-review_binding conditions for a granted fix-check)
  • docs/review-policy.md: Current
  • docs/ship-policy.md: Current
  • changelog.d/ship-approval-receipt-fixes.md: Current

Coverage debt: the FIX_CHECK_ROW: output of gstack-ship-receipt claim and the round-grant --stop-run exception inside an open run have reference coverage only, with no how-to. No diagram drift.

Approvals

No approvals recorded for branch ship-approval-fixes.
Plan: exempt: bug fix, no plan review (--kind fix, R65)
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4546,
  "head": "81eb28aa1a09a5fedf0b9b2793d92567bdef5842",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1717,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44646663781,
      "attempt": 1,
      "tree": "ed70ecd128048f50a15f71992f906d8360d7b6cb"
    }
  ],
  "calls": 36,
  "session_kind": "unattended",
  "run": "ship-4546",
  "head_tree": "ed70ecd128048f50a15f71992f906d8360d7b6cb",
  "product_patch_id": "9d51b845b3732209a3a35d08afb541468f784d8e",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 110,
    "rules": "1afa38a4be3b5eef",
    "base": "db2a56e67910bbdf59c1d212e91e3335020dcb93",
    "registry": "db2a56e67910bbdf59c1d212e91e3335020dcb93",
    "gate_scan": {
      "tagged": 0,
      "head": "81eb28aa1a09a5fedf0b9b2793d92567bdef5842"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=110"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @ed70ecd12804 (8 checks, current for 81eb28aa1a09)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44646663781/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44646663781/attempts/1",
    "free-tests.yml/cso-windows-launcher: https://github.com/garrytan/gstack/actions/runs/44646663781/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44645227922/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=ed70ecd12804 tests=38458 skipped=92 runs=44646663781/1 profiles=ci-reuse/free-tests heads=81eb28aa1a09 verified=2026-11-20T00:40:57.825Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md and changelog.d/ against 7f9c1bc5..c43f7e32"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 4,
    "fixed": 2,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": []
}
{"head":"4d90dd7d3e7ea851de26b7096055c1b2455c12cd","run":"ship-4d90dd7","status":"started","review_loop":{"passes":1,"blocking_found":2,"deferred":0,"noted":9,"fixed":0,"scope":"frozen","rounds":1,"est_input_tokens":31818,"ledgers_read":1,"dispatches":{"specialist-batched":1,"red-team":1}}}
{"head":"4d90dd7d3e7ea851de26b7096055c1b2455c12cd","run":"ship-4d90dd7","mark":"stop","tree":"bebe3d1faecde8441309c1f3e25028e0acf22646"}

Open in Capy

…oved for, plus three other /ship approval fixes (GST-3246)

/ship stops needing a manual owner ruling in four cases: an approved
follow-up review that finds the fix clean clears the findings it was
approved for, a stopped /ship run can record that approval itself, a
leftover marker from a finished run no longer blocks approvals, and run
ids like 507-7192673 are no longer mistaken for phone numbers.

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

trunk-io Bot commented Nov 19, 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 4 commits November 19, 2026 22:54
… review records (GST-3246)

Moves the instruction out of the reviewer-pinned review steps, which CI's no-loss pin test refused, into the claim command's output.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…converged, and gstack's own names stay refused in any capitalisation (GST-3246)

A fix-check row whose tree changed while it ran, or that was not converged, no longer marks a grant's findings fixed. GStack No-stop default (K1) and other capitalisations of gstack's own names are refused as --by again; only crews such as GStack Minder are admitted.

Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…eds before it clears findings (GST-3246)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… and a long-running /ship run keeps its guard (GST-3246)

Closes gaps a second-model read of the design decisions found: a
follow-up review with an open finding in a findings file, a stop head
only the row copied, or a fingerprint another finding shares no longer
clears a finding; a /ship run past two hours whose process still runs,
or whose lease file cannot be read, still counts as open; and a run id
is exempt from the phone check only in a grant's own scope field.

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

capy-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closing this unmerged and splitting it up.

The final review of this PR found real gaps in two of its four fixes: letting a clean follow-up review close its own findings, and treating a stale run marker as closed. In both, the fix-check matching and the run-liveness check rely on state that can be pruned or reused, so they need a design change rather than another patch round. Those two move to a separate design issue.

The other two fixes go into a new, smaller PR from current main:

  • a run id like 507-7192673 in a fix-check grant is no longer read as a phone number, both when the grant is recorded and when the Approvals table is posted to a private PR
  • a crew named "GStack …" can record rulings, gate answers and test-lane exceptions, and gstack's own names are still refused

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