fix(crestodian): use truncateUtf16Safe for config get output truncation#102723
fix(crestodian): use truncateUtf16Safe for config get output truncation#102723zhangqueping wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 7:37 AM ET / 11:37 UTC. Summary PR surface: Source +1. Total +1 across 1 file. Reproducibility: yes. source-level. Current main slices rendered config-get output at a fixed UTF-16 code-unit boundary, so a JSON-rendered value with an emoji high surrogate at the cutoff can produce a dangling surrogate; I did not execute a live run in this read-only review. 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: Use the shared UTF-16-safe truncator for this config-get diagnostic path and add redacted real terminal/log proof showing a long emoji-containing value truncates without a dangling surrogate. Do we have a high-confidence way to reproduce the issue? Yes, source-level. Current main slices rendered config-get output at a fixed UTF-16 code-unit boundary, so a JSON-rendered value with an emoji high surrogate at the cutoff can produce a dangling surrogate; I did not execute a live run in this read-only review. Is this the best way to solve the issue? Yes for the production code. Reusing the existing shared UTF-16 truncator is the narrow maintainable fix for this output path; the remaining gap is proof, not a different implementation layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3ccf2a07393e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1. Total +1 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
|
|
Thanks @zhangqueping. #102823 landed the same UTF-16-safe Crestodian config-output cap in |
What Problem This Solves
The Crestodian operations module uses a raw UTF-16 code-unit slice to truncate config-get output values. An emoji crossing the boundary could produce an unpaired surrogate in diagnostic messages.
Files Changed
src/crestodian/operations.ts.slice(0,N)withtruncateUtf16Safein config-get output truncation.