Repository navigation
Conversation
|
Thanks for the report. I gave this a fresh shell check against current Current main and v2026.6.11 sanitize unknown compaction details into an ASCII-only token before truncation, so the reported surrogate-pair corruption is unreachable and this PR has no observable effect. Review detailsBest possible solution: Keep the current ASCII-only diagnostic formatter unchanged; if Unicode retention is desired later, change sanitization and truncation together with boundary regression coverage and real runtime proof. Do we have a high-confidence way to reproduce the issue? No. Current main and v2026.6.11 replace all non-ASCII input before truncation, and the prior direct boundary probes found no dangling surrogate. Is this the best way to solve the issue? No. UTF-16-safe truncation is useful for Unicode-preserving strings, but this formatter deliberately emits an ASCII-only metric token, making the proposed substitution redundant. Security review: Security review cleared: The diff only imports and calls an existing pure internal helper and introduces no concrete security or supply-chain concern. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 6f9a607b9039. |
3884526 to
1cf2767
Compare
1cf2767 to
0b415a3
Compare
f0dc847 to
7e7e597
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing per ClawSweeper review verdict |
What Problem This Solves
formatUnknownCompactionReasonDetailinsrc/agents/embedded-agent-runner/compact-reasons.tstruncates sanitized compaction reasons withString.prototype.slice(0, MAX_COMPACTION_REASON_DETAIL_CHARS), which can split surrogate pairs in reason strings containing emoji or other multi-byte characters.Why This Change Was Made
Replaces
sanitized.slice(0, MAX_COMPACTION_REASON_DETAIL_CHARS)withtruncateUtf16Safe()from@openclaw/normalization-core/utf16-slice, matching the pattern established by 10+ merged UTF-16 safety PRs across the codebase.User Impact
MAX_COMPACTION_REASON_DETAIL_CHARS = 100limit preservedEvidence