fix(whatsapp): use truncateUtf16Safe for session error stringify truncation#102722
fix(whatsapp): use truncateUtf16Safe for session error stringify truncation#102722lzyyzznl wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 7:33 AM ET / 11:33 UTC. Summary PR surface: Source +2. Total +2 across 1 file. Reproducibility: yes. at source level. Current main uses raw UTF-16 code-unit slicing in Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the local helper substitution after contributor-supplied real-behavior proof is added, ideally with a focused Do we have a high-confidence way to reproduce the issue? Yes at source level. Current main uses raw UTF-16 code-unit slicing in Is this the best way to solve the issue? Yes. Reusing the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 34d257713ea3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2. Total +2 across 1 file. 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
|
What Problem This Solves
One
.slice(0, limit)truncation site in the WhatsApp session errors module may cut UTF-16 surrogate pairs in half when the serialized error value contains multi-byte characters such as emoji.Why This Change Was Made
extensions/whatsapp/src/session-errors.tsuses raw.slice(0, limit)for error string truncation. Replacing withtruncateUtf16Safeensures truncated output is always valid Unicode.User Impact
Truncated error strings in WhatsApp session errors remain valid Unicode at existing size limits. No behavioral changes for ASCII-only content.
Evidence
.slice(0, limit)totruncateUtf16Safe(raw, limit)Generated with Claude Code