Skip to content

fix(#1962): use [0-9] in scribe phone-number scrubbers - #1963

Open
fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/1962-fix-phone-scrubbers
Open

fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/1962-fix-phone-scrubbers

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Changes scripts/pre-scribe.src.sh (and the regenerated scripts/pre-scribe.sh) so the two phone-number redaction expressions use [0-9] instead of \d.

GNU sed's ERE has no \d digit class. On GNU sed 4.9, \d is just the letter d, so \d{3} matched ddd, 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.sh gets four new phone-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] please
  • Call (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 42 and ddd-ddd-dddd stay unchanged
  • Fails if either expression can't be found or still contains \d

The new tests fail against the old expressions (4 failures) and pass with this change. The whole pre-scribe-test.sh suite passes in both source and --bundled modes.

Caveats

  • In production order the US expression runs first. For the international example it redacts the 10-digit subscriber number and leaves +44, so the result is intl +44 [REDACTED] end. Either way the digits are scrubbed. The patterns themselves were left as they are, per the issue.
  • Sandbox limits: make could not spawn a shell, so script-build / check-bundle were done as bundle-sh.sh plus cmp (the bundle matches). pre-commit could not fetch its hook repos (TLS failure). shellcheck 0.10.0, whitespace/EOF checks and lint-release-cases were run directly and passed; gitleaks was covered by scan-secrets. make lint (skillsaw) did not run because uvx is unavailable, and no skills or agent docs changed.

🤖 Generated with Claude Code


Closes #1962

Post-script verification

  • Branch is not main/master (agent/1962-fix-phone-scrubbers)
  • Secret scan passed (gitleaks — 3b40ac718d29c3190b71e68447b9f4e938f19974..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

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>
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner November 11, 2026 13:24
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Nov 11, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:27 PM UTC · Completed 1:35 PM UTC

Commit: 0d1a985 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.45

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 11, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Small 3-file bug fix with tightly aligned issue scope, elevated to moderate risk by edits to protected script paths and moderate recent churn.

Previous run

Risk Assessment: moderate (2/5)

Details

Small 3-file bug fix with tightly aligned issue scope, elevated to moderate risk by edits to protected script paths and moderate recent churn.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] scripts/pre-scribe.src.sh — This PR modifies files under the protected scripts/ path (scripts/pre-scribe.src.sh, scripts/pre-scribe.sh, scripts/pre-scribe-test.sh). The PR links issue scribe: phone-number scrubbers use unsupported sed digit syntax #1962 and explains the rationale (GNU sed ERE has no \d, so phone numbers escaped redaction), so context is sufficient, but human approval is always required for protected-path changes regardless of context.
Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOltdfQ== -->

Review

Findings

Medium

  • [protected-path] scripts/pre-scribe.src.sh — This PR modifies files under the protected scripts/ path (scripts/pre-scribe.src.sh, scripts/pre-scribe.sh, scripts/pre-scribe-test.sh). The PR links issue scribe: phone-number scrubbers use unsupported sed digit syntax #1962 and explains the rationale (GNU sed ERE has no \d, so phone numbers were not redacted), but human approval is always required for protected-path changes, regardless of context.
    Remediation: A human maintainer should review and approve the change.

Labels: PR fixes a defect in the Scribe phone-number scrubber.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment bug Something isn't working labels Nov 11, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:04 PM UTC · Completed 12:11 PM UTC

Commit: 0f6ee0c · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.93

This branch had an error being deployed

1 failed deployment
dev — 0f6ee0c7 Deployed Nov 12, 2026 by Benkapner via behaviour #1933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scribe: phone-number scrubbers use unsupported sed digit syntax

1 participant