fix(config): use truncateUtf16Safe for allowed-values hint text#102512
Conversation
Replace naive .slice(0, N) with truncateUtf16Safe() to prevent surrogate pair splitting in config validation hint messages shown to users. Co-Authored-By: Claude <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 4:21 AM ET / 08:21 UTC. Summary PR surface: Source +2, Tests +11. Total +13 across 2 files. Reproducibility: yes. source-reproducible: current main truncates allowed-value hint text with raw 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: Merge the narrow helper replacement after the PR body includes redacted real config-validation output, or after a maintainer explicitly overrides the proof gate. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main truncates allowed-value hint text with raw Is this the best way to solve the issue? Yes. Reusing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 769878303744. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2, Tests +11. Total +13 across 2 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 (1 earlier review cycle)
|
|
Land-ready maintainer verification at exact head
The regression exercises a surrogate crossing the 160-code-unit cap and locks the exact rendered hint plus omitted count. No config schema/default surface changed. |
|
Merged via squash.
|
…claw#102512) * fix(config): use truncateUtf16Safe for allowed-values hint text Replace naive .slice(0, N) with truncateUtf16Safe() to prevent surrogate pair splitting in config validation hint messages shown to users. Co-Authored-By: Claude <[email protected]> * test(config): prove UTF-16 allowed-value hint boundary --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
truncateHintText() uses naive .slice(0, limit) which can split surrogate pairs in config validation hint messages shown to users.
Why This Change Was Made
Replace with truncateUtf16Safe(). Same pattern as #102464, #102467, #102500 (all merged).
Files Changed
🤖 Generated with Claude Code