Repository navigation
Fewer false privacy holds when posting PRs and running pre-merge checks (GST-2047) - #4198
Merged
capy-ai[bot] merged 6 commits intoNov 9, 2026
Merged
Conversation
…ST-2047) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ard numbers (GST-2047) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ic IPs (GST-2047) 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>
… on run id names (GST-2047) Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=security Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…he phone-number check (GST-2047) Review-Finding: v1/adversarial-native#2 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Posting a PR description and running the pre-merge checks now stop far less often on machine-written numbers that only look like personal data. Fewer false holds keep the privacy check meaningful, so a real phone number, IP address or key still gets a careful read.
What changed
Run numbers /ship writes and autoplan run ids no longer trip the phone-number hold; a 10-digit number still does.
Before/after as text: Run numbers /ship writes and autoplan run ids no longer trip the phone-number hold; a 10-digit number still does
gstack-postno longer reads GitHub Actions run numbers in the run fields of agstack-ship-receiptblock (ci_carried[].run,flaky_exception[].runs,issues.flakes[].run) as phone numbers. Only a block exactly as the writer renders it qualifies (closed fence, schema-valid, byte-identical torenderReceiptBlock), only those values, and only when the value is 11 to 20 digits with an optional/attempt.gstack-approvals importskipspii.phone.e164andpii.ccfindings that start inside a minted autoplan run id's time stamp, or the thread number right before it, at the two places import writes the id. A phone number in the rest of the name, the row's words or plan title, or the same id typed intoadd, still refuses.pii.ip_publicskips a four-part quad a short punctuation gap (or the wordto) away from aVERSIONfile name or path, or from a three-part version, on the same line, and aVERSIONfile holding only the quad. This is the shared scanner, so it applies togstack-post, the pregate secrets check and the push hook alike.gstack-postand only warns in pregate; new tests pin that.Why
Garry asked to "reduce the extreme privacy holds and false positives". CI run numbers in /ship's summary block cost extra confirmation stops on every ship with carried CI, a
VERSIONwrite warned as a public IP, and an approval import refused an autoplan run id. Those stops now go away, and the real cases still hold.Blast radius
The change narrows three detectors shared by
gstack-post,gstack-approvals, the pregate secrets check and the push hook. Every exemption is bound to an exact position and shape, and each still-held case has a test. Those cases are a key anywhere (refused, inside the summary block too), a phone number in prose, beside the block, under another key, in a forged or broken block, as a 10-digit or text run value, in an approval's words, title or the name half of a run id, and a public IP with no version beside it (tests ran: the four focused files, 376 pass, and CI's free suite carried at this tree).Summary
The privacy scan held PRs and approvals on numbers gstack itself wrote. This PR teaches the three detectors those exact shapes, at their exact positions, and nothing else. Review found and closed two holes in the first version (a phone-shaped string in a run field, and a phone number in a run id's name half), then a 10-digit run value, each now pinned by a test.
Test Coverage
All new code paths have test coverage (7 of 7 paths, 100% value-weighted, from the Step 7 audit; 0 tests generated). The review fixes extended
test/gstack-post.test.tsandtest/approval-record.test.ts; the new cases fail on the earlier head and pass here.Tests ran: free 1652 (files, carried from CI run 42586662534)
Pre-Landing Review
Pass 1: 2 issues, 2 fixed (asked; the recommended fix was taken unattended), 0 deferred, 0 noted. Pass 2: 1 issue, noted. Step 11: the outside voice (openai/gpt-6.1-sol) was clean; the native adversarial reader raised 2 findings: one fixed in the owner-granted fix-check, one noted. The fix-check reader found nothing.
Gate edits: none detected (5 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: openai/gpt-6.1-sol, VERDICT: CLEAN.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/approval-record.ts:157The narrowed run-id window refuses (fails closed) minted ids whose name ends in two digit groups (GSTA-36-2-) about 10% of the time, when pii.cc reads both groups plus the stamp as a Luhn-valid card; none of 115 real autoplan run ids is affected. Nothing leaks.lib/approval-record.ts:155INVESTIGATE: the 14-digit stamp of a minted run id is not checked to be a real YYYYMMDDhhmmss time, so a phone or card number placed in those digits of an agent-written run.json id is exempt. Narrower than before this PR. Reader: Low, Blocks: no.Exploratory QA
Functional, library-level probes through
runPostandimportAutoplanwith a fakegh/gitenvironment (no real post). Before the fixes, 4 of 7 contracts failed (a phone-shaped run field posted; a phone number in a run id's name half imported), confirmed by replay; after the fixes all 7 pass, and after the fix-check the 4gstack-postprobes pass again, including a 10-digit run value that now holds. Verdict: pass. Limits: no real PR post.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped. The selector picked no quality judges; behavioral probes selected only through library references were not run under this PR's eval rule.
Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix (exempt from plan review).
Verification Results
No Step 8.1 obligations (no plan). Focused tests, typecheck and the QA probes above passed on the final tree.
TODOS
No TODO items completed in this PR.
Documentation
Scope: 9 committed files between base 68b1d05 and head aa4f9a4. The code changes are in lib/approval-record.ts, lib/gstack-post.ts and lib/redact-patterns.ts, with 4 test files. Nothing is staged, unstaged or untracked.
Result: Current, with no edits. docs/troubleshooting.md already covers each new exemption next to its detector entry: the minted run-id stamp skip in
gstack-approvals import --autoplan, the pii.ip exemption for a four-part version beside VERSION or a three-part version, and the run-id fields in a renderedgstack-ship-receiptblock. The changelog fragment describes the user-facing effect. Other docs that mention approvals import or plan records (docs/ship-policy.md, docs/unattended.md) don't restate the changed behavior.Debt: None found.
Test plan
bun run test(free suite): carried from CI run 42586662534 at this tree, tests_ran 1652 files, exit 0bun --no-env-file test test/gstack-post.test.ts test/approval-record.test.ts test/redact-context-exemptions.test.ts test/pregate-secrets-source-context.test.ts: 376 pass, 0 failbun run typecheck: exit 0🤖 Generated with Claude Code
Agent notes
Approvals
Approved: yes (record r-06551dabc29e). The full approval record stays private: this repository is public or its visibility is unknown.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix
REVIEW_LOOP: passes=2 blocking_found=3 deferred=0 noted=2 fixed=3 scope=frozen ledgers_read=5 fix_checks=1 dispatches=6 est_input_tokens=47679
Gate edits: none detected (5 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-09 via approval a-beaa5e25530e (review_loop_grant 62e2fc5): One scoped fix-check after the 2-round cap on #4198: tighten the receipt run-id shape to 11-20 digits and add a test (fix-check at aa4f9a4, 0 findings)
Failing-first on main 68b1d05: the receipt test held with
pii.phone.e164findings; import refused a minted run id ending in a thread number (phone) and one trippingpii.cc; the pregate fixture with the pv-sdk.ts line wentwarn. Replaces #4197, closed for a branch name that failed the plain-words check.Refs GST-2047