Skip to content

fix(core): speak and police "(555) 0142" phone shapes - #857

Merged
genwave-radio merged 1 commit into
mainfrom
fix/phone-shape-paren-856
Sep 25, 2026
Merged

genwave-radio merged 1 commit into
mainfrom
fix/phone-shape-paren-856

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

Closes #856

🐛 What

(555) 0142, (555)-0142, (555).0142 and (555)0142 now match PhoneShape:

  • 🗣️ spoken digit by digit ("five five five, zero one four two")
  • 🚫 caught by the 555 rule in the validator
  • 🔁 rewritten or dropped by ad script phone hygiene (AdScriptWriter), so a sponsor with a phone on file gets the rewrite, not a refusal

✅ Proof

  • Full solution green (dotnet test GenWave.sln --filter "Category!=Integration"); Ads 238, Tts 937, Core 194, Host 3177.
  • Dev station smoke: re-rendered the Halvorsen script through POST /api/ads/{id}/preview; Kokoro got call five five five, zero one four two today!.
  • Years, times, prices, ZIP+4 and (2026) 1234 stay untouched.

⚠️ Note

(100) 2026 now reads as a phone, same as 100 2026 already did.

PhoneShape missed a parenthesised exchange followed by four digits, so
"(555) 0142" aired as two cardinals and skipped the 555 rule. Adds a
\(\d{3}\)[-.\s]?\d{4}\b alternative to PhoneShape and the same shape to
AdScriptWriter's hygiene pattern, so a sponsor with a phone on file gets
the rewrite instead of a validator refusal.
@genwave-radio
genwave-radio merged commit d9b0c17 into main Sep 25, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the fix/phone-shape-paren-856 branch September 25, 2026 18:42
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tts/ads: '(555) 0142' is read as cardinals and slips past the 555 rule (PhoneShape misses paren + 4)

1 participant