Repository navigation
fix(codex): preserve Unicode diagnostics boundaries - #103740
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 7:43 PM ET / 23:43 UTC. Summary PR surface: Source +4, Tests +40. Total +44 across 2 files. Reproducibility: yes. Current-main source provides a high-confidence reproduction: place an emoji so its surrogate pair crosses either raw prefix limit, and the result retains a lone high surrogate. 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 focused owner-local safe truncation after the contributor supplies redacted real diagnostics output and corrects the upstream evidence citation, while preserving the existing limits and avoiding new API surface. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source provides a high-confidence reproduction: place an emoji so its surrogate pair crosses either raw prefix limit, and the result retains a lone high surrogate. Is this the best way to solve the issue? Yes. Reusing the established public plugin SDK truncator at the two Codex-owned limits is the narrowest maintainable fix; changing upstream Codex or adding another helper would be broader and unnecessary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f9cb9200669. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +40. Total +44 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 (2 earlier review cycles)
|
51e6db2 to
920ecc3
Compare
Changes from review feedbackP1: Fixed import pathSwitched from undeclared P2: Fixed boundary testReplaced Proof: boundary split verifiedTests: 6 tests pass (4 normalizeDiagnosticsReason + 2 formatCodexErrorForDisplay) ✓ @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: 陈志强0668000989 <[email protected]>
920ecc3 to
bbea243
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(codex): preserve Unicode diagnostics boundaries This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Land-ready at exact head
Dependency contract checked directly in OpenAI Codex at Known proof gap: no real feedback upload was triggered because doing so would send diagnostic logs to OpenAI servers solely for test evidence. |
|
Merged via squash.
|
* fix(codex): preserve Unicode diagnostics boundaries Co-authored-by: 陈志强0668000989 <[email protected]> * test(codex): assert diagnostics preview boundary * test(codex): narrow diagnostics result text --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The Codex diagnostics command used raw UTF-16 prefix slices for both the optional feedback reason (2,048 units) and failed-upload error text shown in chat (500 units). If either boundary lands between an emoji's surrogate halves, OpenClaw can send or display malformed text.
Why This Change Was Made
handleCodexCommandrequest/confirm path.feedback/uploadpayload, and complete failed-upload reply.Upstream Codex commit
c4318c386de365bd0dd9595a08d55a30bb142d11definesfeedback/upload.reasonas an optional string and forwards it unchanged to the feedback uploader, so OpenClaw owns its local 2,048-unit policy.User Impact
Long diagnostics notes and failed-upload messages no longer acquire replacement glyphs or lone surrogates when an emoji crosses an OpenClaw boundary. Existing limits, escaping, confirmation, cooldown, and upload behavior remain unchanged.
Evidence