Repository navigation
fix(#1962): use [0-9] in scribe phone-number scrubbers - #1963
fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
GNU sed's ERE has no \d digit class; on GNU sed 4.9 \d is the literal letter d. The two phone redaction expressions in pre-scribe.src.sh therefore matched strings like ddd-ddd-dddd and left real phone numbers unredacted in the notes handed to the sandbox. Replace \d with [0-9] in both expressions, matching the neighbouring IPv4/SSN/PAN redactors; the rest of each pattern is unchanged. scripts/pre-scribe.sh is regenerated from source. pre-scribe-test.sh now reads both phone expressions verbatim from the script under test (source or --bundled) and checks synthetic US, parenthesized, +1 and international numbers are redacted while times, room numbers and ddd-ddd-dddd are left intact. The new tests fail against the old expressions. Note: make could not spawn a shell in the sandbox, so script-build and check-bundle were run as bundle-sh.sh plus cmp. pre-commit could not fetch hook repos (TLS failure); shellcheck 0.10.0, whitespace, EOF and lint-release-cases checks were run directly and passed, and gitleaks was covered by scan-secrets. make lint (skillsaw) could not run (uvx unavailable); no skills or agent docs were changed. Closes #1962 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 1:27 PM UTC · Completed 1:35 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.45 |
|
Risk Assessment: moderate (2/5) DetailsSmall 3-file bug fix with tightly aligned issue scope, elevated to moderate risk by edits to protected script paths and moderate recent churn. Previous runRisk Assessment: moderate (2/5) DetailsSmall 3-file bug fix with tightly aligned issue scope, elevated to moderate risk by edits to protected script paths and moderate recent churn. |
ReviewFindingsMedium
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOltdfQ== --> ReviewFindingsMedium
Labels: PR fixes a defect in the Scribe phone-number scrubber. |
|
🤖 Finished Review · ✅ Success · Started 12:04 PM UTC · Completed 12:11 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.93 |
Summary
Changes
scripts/pre-scribe.src.sh(and the regeneratedscripts/pre-scribe.sh) so the two phone-number redaction expressions use[0-9]instead of\d.GNU sed's ERE has no
\ddigit class. On GNU sed 4.9,\dis just the letterd, so\d{3}matchedddd, not digits. As a result, phone numbers in meeting notes got past the pre-script scrubber and reached the sandbox. The neighbouring IPv4/SSN/PAN redactors already use[0-9]. Nothing else in either pattern changed.Left unchanged, as scoped in the issue:
public_safe,contains_sensitive, the other redactors, and all workflow files.Tests
scripts/pre-scribe-test.shgets four newphone-scrub/*tests. They read both phone expressions verbatim from the script under test (source, or the bundle with--bundled), so they test the production patterns rather than a copy. All numbers are synthetic.Call 212-555-0199 please→Call [REDACTED] pleaseCall (212) 555-0199 now→Call ([REDACTED] now(the leading(survives; the digits are redacted)+1 212.555.0199→+[REDACTED]intl +44 7700900123 end→intl [REDACTED] end(intl expression)meeting at 10:30, room 42andddd-ddd-ddddstay unchanged\dThe new tests fail against the old expressions (4 failures) and pass with this change. The whole
pre-scribe-test.shsuite passes in both source and--bundledmodes.Caveats
+44, so the result isintl +44 [REDACTED] end. Either way the digits are scrubbed. The patterns themselves were left as they are, per the issue.makecould not spawn a shell, soscript-build/check-bundlewere done asbundle-sh.shpluscmp(the bundle matches).pre-commitcould not fetch its hook repos (TLS failure). shellcheck 0.10.0, whitespace/EOF checks andlint-release-caseswere run directly and passed; gitleaks was covered byscan-secrets.make lint(skillsaw) did not run becauseuvxis unavailable, and no skills or agent docs changed.🤖 Generated with Claude Code
Closes #1962
Post-script verification
agent/1962-fix-phone-scrubbers)3b40ac718d29c3190b71e68447b9f4e938f19974..HEAD)