fix(text): keep bounded outputs UTF-16 safe#101355
Merged
Merged
Conversation
Co-authored-by: Alix-007 <[email protected]>
Member
Author
|
Land-ready verification completed for exact head Proof:
Known proof gaps: none for the changed bounded-text surfaces. Prompt/session and guarded-fetch/SSRF-adjacent fragments were intentionally excluded from this PR. |
Member
Author
|
Merged via squash.
|
This was referenced Jul 7, 2026
This was referenced Jul 7, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 7, 2026
Co-authored-by: Alix-007 <[email protected]>
sheyanmin
pushed a commit
to sheyanmin/openclaw
that referenced
this pull request
Jul 8, 2026
Co-authored-by: Alix-007 <[email protected]>
giodl73-repo
pushed a commit
to giodl73-repo/openclaw
that referenced
this pull request
Jul 8, 2026
Co-authored-by: Alix-007 <[email protected]>
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #101297, #101299, #101300, #101301, #101302, #101305, #101306, #101308, #101309
What Problem This Solves
Fixes an issue where bounded text outputs could end with an unpaired UTF-16 surrogate when an emoji or other astral character crossed the truncation boundary. Affected outputs included extracted web text, media-understanding output, TTS/status text, transport diagnostics, and voice-call logs.
Why This Change Was Made
This consolidates nine overlapping contributor PRs into one canonical change using the existing
truncateUtf16Safehelper at each non-security boundary. Prompt/session paths and guarded-fetch/SSRF-adjacent changes were deliberately excluded.User Impact
Truncated output remains valid text instead of producing replacement characters, malformed JSON/log content, or broken downstream speech and transport handling.
Evidence
web-fetch-utilsand TTS status truncation.tbx_01kwxc8jfxq8rtj3t320wfsnwp: exact 18-filepnpm check:changedpassed all core/extension typecheck, lint, import-cycle, storage, media, runtime-loader, webhook, and pairing guards.tbx_01kwxc8jfxq8rtj3t320wfsnwp: 142 focused tests passed across 9 files and 6 Vitest shards.