Skip to content

gstack-post no longer reads /ship's own run ids and commit ids as phone numbers (#4480) - #4488

Merged
capy-ai[bot] merged 2 commits into
mainfrom
post-skips-ship-ids-as-phones
Nov 18, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
post-skips-ship-ids-as-phones

Conversation

@garrytan

@garrytan garrytan commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Posting a /ship PR body no longer stops on a phone-number warning for the run id and commit ids that /ship writes into it.
Why: most /ship runs hit this confirm (#4480, and #4474), which turned a privacy guard into noise people click past.
Nothing to do: the next /ship post goes through without --confirm.

What changed

gstack-post skips only exact values that /ship's own tools write:

  • In a gstack-ship-receipt block that /ship's writer rendered (closed, schema-valid and byte-identical to renderReceiptBlock): the run value when it has the session-id shape <pid>-<epoch>-<8 hex> that gstack-skill-start mints, and the 12-character commit prefixes inside the pregate value (@<tree> (<n> checks, current for <head>)) and the requires_remote values (heads=, tree=).
  • On a line outside any code block that opens with SHIP_RECEIPT:, CI_CARRY:, PREGATE: or READY_RECEIPT:: the commit-prefix lists after heads=, head=, tree=, gated_tree=, predecessor=, carried_from= and base_red=, and the run id in each ci_carried=<lane>:<run>/<attempt> item.

The #4474 hit was the all-digit head prefix 229446506618 after heads= and in the pregate value; its runs=44231639842/1 list was already exempt. Replaying #4474's live body through the new code posts it with no finding.

Why this shape, and not a wider exemption

The secrets and privacy scan is a security guard, so the exemption reads positions and exact shapes, the way the existing GST-2047 run-id exemption does:

  • Not the whole block. Some of its fields hold free text (thread, pregate, job names). Skipping the whole block would hide a real phone number written into one of them, and the GST-2047 test already pins a phone number in thread as a finding.
  • Not the scanner's phone rule. lib/redact-patterns.ts also guards pushes, approval records and the decision log. This change lives in lib/gstack-post.ts only, so no other caller gets looser.
  • A hand-written block skips nothing. Only a block that passes the schema and matches the writer's rendering byte for byte counts, so pasting JSON into a fence opens no hole.

Still a finding, each pinned as a negative control in the new test: a phone number in prose, in a json or plain code block, in thread, in run when it isn't a session id, a session id with no random suffix, heads= on a line without one of the four prefixes, a phone number elsewhere on such a line, a 10-digit ci_carried run, one of those prefixed lines inside a ```text or ~~~ code block, and a hand-written one-line block.

Tests
  • The new test/gstack-post.test.ts case was written first and failed on main 3ecd716 with three pii.phone.e164 findings; it passes now. test/gstack-post.test.ts and test/gstack-post-cli.test.ts: 62 pass, 0 fail.
  • Review fix (20c3b02): lines with those four prefixes inside a fenced code block are no longer skipped; its two new negative controls failed first on 4574561. test/gstack-post.test.ts: 57 pass, 0 fail at 20c3b02.
  • bun run typecheck is clean and bun run typecheck:test reports no new diagnostics.
  • docs/troubleshooting.md#redact-run-id-as-phone lists the new positions.
Agent notes

Refs #4480

  • Lane GSTA-617 for GST-3083. Issue gstack-post flags the ship receipt's own run id as pii.phone.e164 #4480 is from an outside author: its suggested regex was read as text only, and the fix was written fresh on main.
  • Decision trail: GStack Minder drive, reports/GSTA-617-decisions.tsv.
  • Review (light depth, 2 rounds): round 1 at 4574561 ran the batched specialist (no findings), a native adversarial voice and a second-model review (GPT-6.1 Sol). The second-model review found one blocker: receipt-looking lines inside any code block were skipped. Fixed in 20c3b02; round 2 (scoped red team, fix-check, native adversarial) found no blocker.
  • Review notes (below the floor, not fixed here): fences inside blockquotes, list items indented 4+ spaces and indented code blocks are not tracked, so receipt lines there keep the skip; a line opening with inline triple-backtick code opens a phantom fence (fails closed: one extra confirm); the older receiptDigitTokens allowlist still skips 12-digit values after head=/tree=/gated_tree=/predecessor= everywhere; the session-id shape keeps the pid fallback gstack-skill-start uses.
  • Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
  • Exploratory QA: pass, 3 smoke probes at 20c3b02 through gstack-post pr-body with a stub gh.
  • Documentation: current (read-only audit of docs/ and changelog.d/).
  • CI_CARRY: accepted ci-carry tree=f74842bb8f0c tests=37832 runs=44325026986/1 profiles=ci-reuse/free-tests heads=20c3b02f1024
  • PREGATE: warn tree=f74842bb8f0c head=20c3b02f1024 checks=8 of 8 (secrets warn: 29 MEDIUM pii.phone.e164 hits, all synthetic session ids, sha prefixes and 555 numbers in the new test fixtures and docs examples)
{
  "schema_version": 1,
  "pr": 4488,
  "head": "20c3b02f1024b4982427b8cf05c3602fc86d504c",
  "version": "1.100.0.0",
  "base": "main",
  "gate": {
    "dispositions": []
  },
  "ci_carried": [
    {
      "lane": "tests",
      "run": 44325026986,
      "attempt": 1,
      "tree": "f74842bb8f0c7d62c1cfe2696a2368b6cca449f5"
    }
  ],
  "calls": 22,
  "session_kind": "unattended",
  "run": "ship-4488-4574561",
  "head_tree": "f74842bb8f0c7d62c1cfe2696a2368b6cca449f5",
  "product_patch_id": "df278f0e5eb55e5169280780c29b0996ad0b1e44",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 66,
    "rules": "1afa38a4be3b5eef",
    "base": "3ecd7168b2323fc60899a351a18595d7dd108c21",
    "registry": "3ecd7168b2323fc60899a351a18595d7dd108c21",
    "gate_scan": {
      "tagged": 0,
      "head": "20c3b02f1024b4982427b8cf05c3602fc86d504c"
    },
    "reasons": [
      "runtime=66"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "warn @f74842bb8f0c (8 checks, current for 20c3b02f1024)",
  "issues": {
    "fixes": [],
    "refs": [
      4480
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and changelog.d/ (read-only audit, docs-4488-1)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 10,
    "fixed": 2,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "ledgers_read": 6,
    "dispatches": {
      "specialist": 1,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

Approvals

No approvals recorded for branch post-skips-ship-ids-as-phones.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix

Open in Capy

…ne numbers (#4480)

The session run id and all-digit commit prefixes that /ship writes into a PR body are exempt from pii.phone.e164, by exact shape and position.

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

trunk-io Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

A line that opens with SHIP_RECEIPT:, CI_CARRY:, PREGATE: or READY_RECEIPT: inside a fenced code block no longer skips the phone-number check, so a phone number pasted into one still asks for a confirm. The writer-rendered receipt block keeps its own field-level skips.

Review-Finding: v1/outside-voice#1 reader=outside-voice
Review-Finding: v1/adversarial-native#1 reader=adversarial-native
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit bf2c126 into main Nov 18, 2026
58 checks passed
@garrytan garrytan mentioned this pull request Nov 18, 2026
@garrytan garrytan mentioned this pull request Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

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