Repository navigation
fix(sms): normalize Twilio RCS addresses - #102373
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 8:35 PM ET / July 11, 2026, 00:35 UTC. Summary PR surface: Source +22, Tests +65. Total +87 across 4 files. Reproducibility: yes. Current main deterministically mangles the observed Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the current narrow Twilio ingress fix with its focused tests, keeping generic SMS normalization, configuration, plugin APIs, and global channel-prefix ownership unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Current main deterministically mangles the observed Is this the best way to solve the issue? Yes. Twilio-specific parsing after raw signature verification is the narrowest maintainable fix and avoids creating a global RCS channel or broadening generic SMS target semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b7d6291bfd6e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +22, Tests +65. Total +87 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
07bcb06 to
f22eb05
Compare
Live proof: signed RCS webhook replay through the real handler + real Twilio reply delivery (2026-07-10)Contributor proof for the What the harness doesA local vitest spec boots the PR branch's real
Redacted transcriptAssertions verified: signature accepted; allowlist authorization allowed (pairing path unreached); direct-session peer, context Live outbound legWith the live-send flag enabled, the same replay drove the PR's reply path end-to-end through the real Twilio API: message Scope noteThe one thing this does not cover is a fully live inbound webhook hitting a deployed PR build (our production gateway runs the released OpenClaw, whose pre-PR normalizer produced the original documented rejection — which is the bug this PR fixes). Repointing the production Twilio webhook at a branch deployment is deliberately out of scope for proof; happy to add that after merge/release, or earlier if a maintainer wants it. Redactions: phone numbers masked, RCS sender agent address, account SIDs, and tokens withheld. |
7ce594f to
492cbce
Compare
|
Land-ready proof for What changed:
Validation:
Known gap: no deployed exact-head webhook was used. The exact-head signed-handler integration test exercises the security and routing boundary changed here. |
492cbce to
c77430a
Compare
c77430a to
9fb08df
Compare
|
Merged via squash.
|
* origin/main: fix(tui): preserve UTF-16 pairs in long tokens (#104024) fix(release): raise Telegram attestor buffer (#104025) fix(slack): apply sender policy to group DMs (#104007) feat(ui): add a background tasks pane to chat panes (#104010) docs(changelog): credit landed fixes fix(installer): clean temporary files on failure (#103725) fix(clickclack): sanitize outbound assistant text (#103142) fix(sms): normalize Twilio RCS webhook senders (#102373)
Co-authored-by: clawSean <[email protected]>
* origin/main: fix(tui): preserve UTF-16 pairs in long tokens (openclaw#104024) fix(release): raise Telegram attestor buffer (openclaw#104025) fix(slack): apply sender policy to group DMs (openclaw#104007) feat(ui): add a background tasks pane to chat panes (openclaw#104010) docs(changelog): credit landed fixes fix(installer): clean temporary files on failure (openclaw#103725) fix(clickclack): sanitize outbound assistant text (openclaw#103142) fix(sms): normalize Twilio RCS webhook senders (openclaw#102373)
What Problem This Solves
Twilio RCS inbound messages can identify the consumer with an
rcs:+E164channel address. The SMS plugin treated that prefix as part of the phone number, which broke allowlist matching, canonical direct-session routing, and reply targeting.Why This Change Was Made
Normalization now happens once at the Twilio webhook ingress boundary, after signature validation. The parser accepts bare E.164 SMS addresses and case-insensitive
rcs:consumer addresses, rejects unrelated channel prefixes, and leaves the raw form values unchanged for Twilio's signature check.The shared outbound/config phone normalizer is intentionally unchanged. Twilio uses
rcs:to select channel semantics on outbound requests, so stripping it globally would alter fallback and sender behavior outside this inbound bug.User Impact
Signed Twilio RCS webhooks now route the consumer to the same canonical SMS-owned direct session and sender match as the equivalent E.164 address, while SMS/MMS and outbound RCS behavior remain unchanged.
Evidence
rcs:, WhatsApp/unknown-prefix rejection.29133142322: success.29133142302: success.No deployed exact-head Twilio webhook was used; the exact-head signed-handler integration test covers the security and routing boundary changed here.
AI-assisted.