fix: keep bounded Unicode text valid across UTF-16 boundaries#102823
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
42d6193 to
c0557ca
Compare
Co-authored-by: 黄剑雄0668001315 <[email protected]> Co-authored-by: 0668000539 <[email protected]> Co-authored-by: 张鹊平0668001085 <[email protected]> Co-authored-by: 赵旺0668001248 <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: lizeyu-xydt <[email protected]>
5463b99 to
e206900
Compare
|
Land-ready verification completed for exact head
Known proof gaps: none. |
|
Merged via squash.
|
…aw#102823) * fix(text): keep bounded output UTF-16 safe Co-authored-by: 黄剑雄0668001315 <[email protected]> Co-authored-by: 0668000539 <[email protected]> Co-authored-by: 张鹊平0668001085 <[email protected]> Co-authored-by: 赵旺0668001248 <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: lizeyu-xydt <[email protected]> * chore(changelog): defer release note to automation * refactor(qa-lab): keep text helper behind SDK --------- Co-authored-by: 黄剑雄0668001315 <[email protected]> Co-authored-by: 0668000539 <[email protected]> Co-authored-by: 张鹊平0668001085 <[email protected]> Co-authored-by: 赵旺0668001248 <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: lizeyu-xydt <[email protected]>
Supersedes #102669, #102671, #102672, #102674, #102685, #102695, #102696, #102697, #102715, #102719, #102720, #102721, #102722, #102723, #102734, #102737, and #102741.
Also preserves the useful unique changes from closed #102667, #102767, #102774, and #102775.
What Problem This Solves
Fixes an issue where bounded text could end or begin with half of a UTF-16 surrogate pair when an emoji or supplementary-plane character crossed a size limit. Depending on the consumer, that could surface as a replacement character in user-visible errors, labels, diagnostics, stored artifacts, model prompts, QA evidence, or Control UI previews.
Why This Change Was Made
This consolidates the remaining real call sites onto the existing UTF-16-safe slicing primitives while preserving each surface's established UTF-16-unit budget and
undefinedversus empty-string semantics. It also makes head-plus-tail previews safe at both boundaries, keeps the QA Lab browser build source-resolvable, and carries the exact compacted-prefix boundary through tool-call stream suppression so safe slicing cannot weaken terminal snapshot scrubbing.User Impact
Emoji and supplementary-plane text now remains valid when these bounded previews, labels, filenames, errors, and prompts are truncated. No configuration or migration is required.
Evidence
e206900c5ab277857af14ff88f511a9b29473e3f: https://github.com/openclaw/openclaw/actions/runs/29024343939.