Skip to content

Run ids in /ship's follow-up review approvals are no longer flagged as phone numbers, and teams named GStack can record rulings (GST-3246) - #4549

Merged
capy-ai[bot] merged 2 commits into
mainfrom
approval-run-ids-and-gstack-named-teams
Nov 20, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
approval-run-ids-and-gstack-named-teams

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

When /ship stops for an approval, two records no longer need a workaround. A run id like 507-7192673 in an approval for a follow-up review passes the phone-number check, both when it is recorded and when the Approvals table is posted to a private PR. And a team named "GStack …" can record rulings, gate answers and test exceptions.
Both caused avoidable stops in unattended /ship runs. The same digits anywhere else are still caught, and gstack's own names are still refused.
Nothing to do: no settings change.

What changed

Unattended /ship runs stopped twice for no good reason. Recording an owner's approval for a follow-up review failed because its run id, 507-7192673, looks like a phone number, and posting the Approvals table to a private PR asked for a confirmation for the same reason. And an owner team named "GStack Minder" could not record a ruling, because any name starting with "gstack" was treated as gstack itself. Now the run id is allowed in exactly one place (the run id slot of that approval, and the matching cell of the rendered table), and a "GStack " team can record rulings, gate answers and test exceptions. Everything else is checked as before.

Why

/ship runs without a person watching, so a false alarm in a privacy check or a name check stops the run until someone works around it by hand.

Blast radius

The change touches the approval recorder, the PR-body poster and the three owner-only record commands with their readers. Each relaxation is an exemption added on top of the existing check, which is unchanged, and tests show the same digits elsewhere and gstack's own names in any capitalisation are still refused.

Agent notes

Agent notes

Fixes in this PR

  • lib/approval-record.ts: buildRow skips a pii.phone.e164 finding only when it starts inside the stop= token of a fix-check grant row's scope field (GRANT_STOP_SCOPE). The reason, the words and every other field are scanned as before. approvalsGrantStopSpans finds the same token in a rendered Approvals table: only in the Covers cell, and only in a table that opens with the renderer's header and closes with its Source footer.
  • lib/gstack-post.ts: those spans join the receipt's run-id spans.
  • lib/ruled-notes.ts isGstackActor: the existing ^gstack\b catch stays; an exemption on top of it admits GStack <Capitalised word>, never one of gstack's own names in any capitalisation. Used by rule, gate and lane-exception and their readers.
  • Split from 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; nothing from its other two changes is here.

Documentation
Scope: Reviewed tree 3ec35a01cc47ee3f576438aa8f62826992163f53, base range 8586794..9cf343c. The audit covered 9 committed files with nothing staged, unstaged or untracked. Banned terms: none.

Result: Updated.

  • docs/ship-policy.md: the rule, gate and lane-exception refusal lists now say that a GStack <Name> crew can record.
  • docs/troubleshooting.md: the APPROVAL_RECORD_INVALID entry has the same crew clarification, APPROVAL_RECORD_SECRET now covers the fix-check grant stop= exemption, and the gstack-post phone allowlist gains the rendered Approvals-table entry.
  • docs/review-policy.md: already current; it already said "GStack Minder" can grant.
  • The changelog.d fragment already describes both changes and was left untouched. No generated output, VERSION, package or manifest changed, so no regeneration was needed.

Debt: None. The doc edits are uncommitted and are the only working-tree changes.

Tests (failing first: the 3 new cases fail on main)

  • test/pr-round-cli.test.ts: a run id in a grant records, the same digits in --reason are refused; rule --by "GStack Minder (GSTA-36)" records and rulings lists it, while 7 gstack-shaped names are refused.
  • test/gstack-post.test.ts: a rendered grant table posts clean; the digits in prose, in the Asked cell, or in a table without the Source footer still need confirmation.
  • Local targeted lane at 94e8748: 6 files, 164 tests pass; typecheck clean. Full free suite: CI run 44658208793, carried at tree 3c2356e255bf.

Pre-Landing Review
Pre-Landing Review: 3 issues — 0 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 3 noted
Gate edits: none detected (0 listed, 0 read; GATE_SCAN tagged=0)
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=3 fixed=0 scope=frozen ledgers_read=2 dispatches=4
Readers: specialists (testing, security, state-machines) clean; red team clean; adversarial (Opus 5.5) 3 Low, not blocking; second-model review (GPT-6.1 Sol) clean. Post-review docs edit to docs/ship-policy.md: one scoped reader, clean.

Review notes (below the blocking floor, not fixed here)

  • lib/approval-record.ts:200: the stop= exemption accepts any token STOP_RUN accepts, so a phone number typed by hand as --stop-run would be recorded; a later change could narrow it to the minted <pr>-<shortsha> shape.
  • lib/approval-record.ts:374: the gstack-post exemption matches the rendered table's shape, not the stored approval record.
  • lib/ruled-notes.ts:25: isGstackActor admits any GStack <Capital> name, not only known team names; --by was always free text.
  • Coverage: 12 of 12 changed paths have a test, 9 at two stars or more; gate --by and lane-exception --by with a GStack-named team are covered only through the shared helper.

Exploratory QA
2 smoke probes, pass: a GStack-named team is admitted and a grant row with stop=507-7192673 builds; gstack's own names stay refused in any case, and the same digits in the ask field or a non-fix-check scope still fail with APPROVAL_RECORD_SECRET.

Approvals

No approvals recorded for branch approval-run-ids-and-gstack-named-teams.
Plan: exempt: bug fix (--kind fix), each fix with a failing-first test

{
  "schema_version": 1,
  "pr": 4549,
  "head": "94e87485d514dd977ad3f105ebb147e9e3febf58",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "unit": {
      "pass": 164,
      "fail": 0,
      "skip": 0
    },
    "free": {
      "pass": 1718,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44658208793,
      "attempt": 1,
      "tree": "3c2356e255bf0d4271ca1d6e8d84e92a681b2090"
    }
  ],
  "calls": 23,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4549/run",
  "head_tree": "3c2356e255bf0d4271ca1d6e8d84e92a681b2090",
  "product_patch_id": "56b4945e5ec183cdcac1e316c72d7a23dad53224",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 79,
    "rules": "3e7e9d5d0a0d8879",
    "base": "858679423cc4778f9961d4aaf3c061a9368985ec",
    "registry": "858679423cc4778f9961d4aaf3c061a9368985ec",
    "gate_scan": {
      "tagged": 0,
      "head": "94e87485d514dd977ad3f105ebb147e9e3febf58"
    },
    "reasons": [
      "gate-class",
      "runtime=79"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @3c2356e255bf (8 checks, current for 94e87485d514)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44658208793/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44658208729/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=3c2356e255bf tests=38496 skipped=76 runs=44658208793/1 profiles=ci-reuse/free-tests heads=94e87485d514 verified=2026-11-20T02:17:22.202Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 3,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}
{"head":"9cf343cc85fd50bebbedaad2c709ff124ca0d897","run":"ship-4549","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":0,"fixed":0,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}

Open in Capy

…numbers, and teams named GStack can record rulings (GST-3246)

A fix-check grant's stop= run id (507-7192673) passes the phone check in its scope field and in a rendered Approvals table's Covers cell; the same digits anywhere else still report. A --by of "GStack <Word>" passes rule, gate and lane-exception and their readers; gstack's own names stay refused.

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.

…are not phone numbers (GST-3246)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 1bd86d9 into main Nov 20, 2026
57 checks passed
@garrytan garrytan mentioned this pull request Nov 20, 2026
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