fix(codex,tui,cli): keep retained text UTF-16 safe#102599
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 5:36 AM ET / 09:36 UTC. Summary PR surface: Source +10, Tests +31. Total +41 across 6 files. Reproducibility: yes. source-reproducible: current main uses raw Review metrics: 1 noteworthy metric.
Stored data model 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 findings
Review detailsBest possible solution: Keep the helper substitution, but route plugin code through Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main uses raw Is this the best way to solve the issue? No as submitted: using the UTF-16-safe helper is the right implementation shape, but plugin production code should use the existing plugin SDK facade instead of importing the private normalization package directly. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6433b8272350. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +10, Tests +31. Total +41 across 6 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
|
Co-authored-by: 陈志强0668000989 <[email protected]>
d7104bd to
13c4e1a
Compare
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Three retained-text boundaries could split a UTF-16 surrogate pair: Codex context text-part truncation, CLI session-history head/tail retention, and TUI local-shell output tails. A split emoji could therefore leave malformed text in a Codex prompt, reseed prompt, or operator-visible shell result.
Why This Change Was Made
Rebuilt the PR on current
main, removed the Telegram hunk already superseded by the centralized raw-update formatter, and used the shared normalization primitives for the three remaining owners. The Codex projection also deletes its private tail-boundary implementation in favor of the same shared helper.User Impact
Long Codex context, CLI reseed history, and TUI shell output remain valid Unicode at their existing limits. Retention direction, size budgets, marker text, and ASCII behavior are unchanged.
Evidence
oxfmt,oxlint, andgit diff --checkpassed.turn/startsums Unicode scalar counts againstMAX_USER_INPUT_TEXT_CHARS; this patch preserves OpenClaw's conservative existing budget and only prevents invalid UTF-16 projection output.Co-authored-by: 陈志强0668000989 [email protected]