Repository navigation
fix(exec): preserve Unicode in retained process output tails - #104754
Merged
Merged
Conversation
Contributor
Author
|
Land-ready maintainer proof:
This is the takeover for unpushable contributor PR #104531. The final one-commit patch uses the canonical UTF-16-safe slicing helper for both retained stdout and stderr tails and proves the exact boundary result. Final state: #104531 landed concurrently as |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 12, 2026
) Co-authored-by: zhang-guiping <[email protected]>
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.
What Problem This Solves
Long retained process output could be truncated through the middle of a UTF-16 surrogate pair. The streamed output remained correct, but the bounded stdout or stderr tail could end with a corrupted replacement character.
Supersedes #104531 because its fork does not allow maintainer writes.
Why This Change Was Made
The process supervisor now uses the normalization package's canonical UTF-16-safe slicing helper when retaining the bounded tail. The consolidated regression drives both stdout and stderr through the real supervisor path and proves the exact retained result at the boundary.
The final patch is one focused commit on current
main; the original contributor remains the commit author.User Impact
Before: a long child-process output tail could corrupt a boundary emoji in the retained result.
After: the incomplete surrogate pair is dropped while the truncation marker, size bound, and full streamed chunks remain unchanged.
Evidence
src/process/supervisor/supervisor.tssrc/process/supervisor/supervisor.test.tsrun_56c83697a6cbgit diff --check: passedReal behavior proof
Behavior addressed: retained stdout and stderr tails no longer split UTF-16 surrogate pairs.
Reachability: child adapter output -> supervisor capture bound ->
RunExit.stdout/RunExit.stderr.Sibling coverage: the same helper path handles both streams; the regression proves both.
Fix classification: root-cause fix.
AI-assisted (Codex)
I understand what the code does
Change is focused and does not mix unrelated concerns