Skip to content

Stop false card-number holds on /ship run ids in PR bodies - #4751

Merged
capy-ai[bot] merged 10 commits into
mainfrom
run-ids-not-card-numbers
Nov 24, 2026
Merged

capy-ai[bot] merged 10 commits into
mainfrom
run-ids-not-card-numbers

Conversation

@garrytan

@garrytan garrytan commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Posting a PR body that lists earlier /ship runs, or the /ship result record, no longer stops for a "card number" that is really a /ship run id.
About 1 in 10 run ids passes the card-number checksum, so those bodies still waited for a confirmation after #4747's phone-number fix (#4725).
Nothing to do after merge.

Issues

Fixes #4725

What changed
  • gstack-post skips the card-number check on /ship's own session ids. The two places that already skip the phone check for a session id, the run of a well-formed line in the earlier-runs block and the run of the /ship result record, now also skip pii.cc, but only when the whole card-shaped digit run starts and ends inside that run value. Every other skipped span (run ids, shas, Approvals table) still clears the phone check only.
  • Measured before the fix: 10 of 100 consecutive session ids (<pid>-1795338725-c32255b8, pid 4242400 to 4242499) raised pii.cc; 99999-1795338725-12345678 is one.
Security read

This adds an exemption to a privacy check, on top of the existing catch: no finding main reports outside those two exact run values is dropped.

  • The skip needs the run value to match the session-id shape (<pid>-<10-digit epoch>-<8 hex or digits>), so a card number written as the run (4111111111111111 or 4111 1111 1111 1111) never qualifies.
  • Negative controls in the new test, each still held for pii.cc: a card number in reason on a line with a valid run; a card number as a runs line's run, plain and spaced; a card number as the result record's run; the same session id in prose after the block and in a json block.
Tests
  • test/gstack-post.test.ts: the new card-number test fails on main's lib/gstack-post.ts and passes here; the existing earlier-runs and result-record tests pass unchanged.
  • Targeted: gstack-post, spawnsync tripwire, module-size ratchet; bun run typecheck clean. CI is the full run.
  • No paid eval ran: no prompt, template, judge or eval code changed.
Documentation

Status: current. No documentation edits were needed.

Scope: the run-ids-not-card-numbers branch against main: the committed docs/troubleshooting.md bullet for the earlier-runs block exemption, the two changelog fragments for the run-id privacy fixes, and the lib/gstack-post.ts change they describe. Docs changed by the merge from main (#4741) were already reviewed upstream.

Documentation health:

  • docs/troubleshooting.md: current. It says session-id run values skip pii.cc only when the whole card-shaped digit run lies inside them, which matches lib/gstack-post.ts.
  • docs/review-policy.md: current (changed only by the merge from main).
  • docs/ship-policy.md: current (changed only by the merge from main).

Coverage debt: none. Diagram drift: none.

Agent notes

Lane GSTA-802 (GST-3484), the follow-up the second-model review on #4747 found (p3 outside-voice#4, ruled as a partial-fix gap, approval a-27581ab5d275). Ordered as its own PR with its own two-round count.

Review: one full pass at 7745c46 (tree 573c3c78), batched specialist (testing, security, state machines, red team) clean; the native adversarial reviewer found nothing blocking and raised two Low notes on the release note's wording (a card-shaped example run id, and "written as the run id" overstating the guarantee). Both were fixed in 0cf8642, a release-note-only commit. The pregate secrets warnings are the test's synthetic session ids and the standard test card number 4111111111111111.

Plan: exempt: bug fix

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen ledgers_read=2 dispatches=4

{
  "schema_version": 1,
  "pr": 4751,
  "head": "0cf864230aa0c3fe44ad5057160ddd0250dc51b6",
  "version": "1.103.0.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 60,
      "fail": 0,
      "skip": 0
    }
  },
  "calls": 31,
  "session_kind": "unattended",
  "run": "ship4751",
  "head_tree": "bbca6752254b1f9c59d7f3ee5c88a988d5f38a3a",
  "product_patch_id": "a3baddfab239615ea86e7bbb456a618701fa8135",
  "gstack_version": "1.103.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 17,
    "rules": "33831f8248a814fd",
    "base": "0d6cc1be56136706854e40dccf417e008e5c69ab",
    "registry": "0d6cc1be56136706854e40dccf417e008e5c69ab",
    "gate_scan": {
      "tagged": 0,
      "head": "0cf864230aa0c3fe44ad5057160ddd0250dc51b6"
    },
    "reasons": [
      "runtime=17"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "warn @bbca6752254b (8 checks, current for 0cf864230aa0)",
  "issues": {
    "fixes": [
      4725
    ],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README.md and docs/ against main"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

garrytan and others added 8 commits November 23, 2026 16:21
…autoplan runs

gstack-post read the run id on each line of a PR body's gstack-receipt-runs block as a phone number, so every /ship that rewrote a body holding earlier runs stopped for a confirmation (#4725). The run value of a well-formed runs line (canonical JSON, 40-hex head, a /ship session id) is now skipped, and a phone number anywhere else is still caught.

gstack-approvals import --autoplan now records an interactive /autoplan run under the run id its gate rows carry instead of the folder name "autoplan" (#4402). Interactive run ids put "autoplan" between the branch name and the time stamp, so a branch name ending in digits no longer reads as a phone or card number.

Co-authored-by: thomsjack <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The run history exemption now applies only to a block that opens outside any other code fence, and a line that cannot be re-serialized is skipped instead of stopping the post. A Plan line naming a shared interactive /autoplan folder that holds several runs no longer resolves to the newest one. Run ids that interactive /autoplan minted before this change still import on branch names ending in digits.

Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Review-Finding: p1/outside-voice#3 reader=outside-voice
Review-Finding: p1/outside-voice#4 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A Plan line naming a shared interactive /autoplan folder that holds several runs now resolves to no run at all, so approvals imported before this change under the shared id autoplan cannot stand in for it.

Review-Finding: p2/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
An interactive run id minted before #4402 is exempt only when its stamp is a real calendar time, and a Plan line naming an interactive /autoplan folder whose decision log cannot be read resolves to no run.

Review-Finding: p2/outside-voice#1 reader=outside-voice
Review-Finding: p2/outside-voice#2 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The privacy check's troubleshooting entries now say which run ids it skips in the run history block and which older interactive /autoplan run ids import, and that a run id that also reads as a card number still asks. The changelog entry says the same.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
About 1 in 10 /ship session ids passes the card-number checksum, so a PR
body listing earlier runs, or carrying the /ship result record, still
asked for a confirmation after the phone-number fix (#4725). The run value
of a well-formed earlier-runs line and of the writer-rendered record now
skips pii.cc too, only when the whole digit run lies inside it. A card
number in any other field, or written as the run, is still caught.

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

# Conflicts:
#	docs/troubleshooting.md
#	lib/gstack-post.ts
#	test/gstack-post.test.ts
@capy-ai
capy-ai Bot changed the base branch from privacy-check-skips-run-ids to main November 23, 2026 19:05
@trunk-io

trunk-io Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

… the release note

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 23, 2026 20:13
@capy-ai
capy-ai Bot merged commit 78ee296 into main Nov 24, 2026
61 of 62 checks passed
@garrytan garrytan mentioned this pull request Nov 24, 2026
capy-ai Bot added a commit that referenced this pull request Nov 24, 2026
- `/ship` now tells you what to change when GitHub refuses a push for email privacy. (#4748)
- The release gate's /cso check accepts the low-confidence hypotheses /cso now reports. (#4753)
- /cso reports every security finding the code supports instead of dropping most of them. (#4739)
- /cso can search the whole repository in one call, and a daily report now lists its low-confidence hypotheses. (#4742)
- A first version's plan and try-it message now open with the owner's own words, and the build is tried the same way he will try it before he is asked. (#4759)
- A first version's public export now keeps out the owner's short quotes and his reasons to leave something out, and a phone first-use check installs a build the cloud phone can actually run. (#4772)
- Three intermittent test failures are fixed. (#4745)
- Free Tests runs its shards on 8-core runners again. (#4749)
- A land that waits on an earlier CI run now decides on what that run actually did. (#4763)
- Landing a PR no longer starts a new CI run when one for the same merged code is already running or has passed. (#4760)
- /ship no longer misses a file-mode change from main on files whose names start with `:`. (#4774)
- make-pdf keeps quotes in alt text, link titles and raw HTML attributes inside the attribute, so a Markdown file can no longer add an `onerror`, `onload` or `javascript:` link that runs in the print browser. (#4761)
- Posting a PR body that lists earlier /ship runs no longer stops for a phone number that isn't there. (#4747)
- A first version's public export now catches a short owner quote whose padding or quote marks are encoded. (#4778)
- A first version's public export now also keeps out a short owner quote written with spaces just inside its quote marks. (#4776)
- Posting a PR body that lists earlier /ship runs no longer stops for a card number that isn't there. (#4751)
- /ship no longer asks for an extra reader when you merge the base branch next to code that was already reviewed. (#4754)
- /ship no longer plans narrow re-checks after a fix. (#4741)
- /ship can't quietly gain new refusals. (#4740)
- `gstack-upgrade` no longer refuses to run after you disable skills. (#4743)
- The free test suite splits its shards from this week's recorded test times. (#4744)
- gstack now writes up a failed or shelved attempt before closing it. (#4735)

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.

gstack-post holds the PR body on the receipt's own run id in the gstack-receipt-runs fence (pii.phone.e164)

1 participant