Skip to content

fix: keep bounded Unicode text valid across UTF-16 boundaries#102823

Merged
steipete merged 3 commits into
mainfrom
codex/utf16-boundary-sweep
Jul 9, 2026
Merged

fix: keep bounded Unicode text valid across UTF-16 boundaries#102823
steipete merged 3 commits into
mainfrom
codex/utf16-boundary-sweep

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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 undefined versus 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

@steipete
steipete requested a review from a team as a code owner July 9, 2026 13:02
@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui gateway Gateway runtime extensions: memory-lancedb Extension: memory-lancedb extensions: qa-lab size: M maintainer Maintainer-authored PR labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • packages/tool-call-repair/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: e206900c5ab277857af14ff88f511a9b29473e3f
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 5463b996daa36a52c4fd90afc962f0d465c705d2, but the PR head is now e206900c5ab277857af14ff88f511a9b29473e3f. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (1 earlier review cycle)
  • reviewed 2026-07-09T13:30:03.614Z sha 2765f61 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: msteams Channel integration: msteams app: android App: android commands Command implementations agents Agent runtime and tooling channel: qqbot extensions: codex size: XL and removed size: M labels Jul 9, 2026
@steipete
steipete force-pushed the codex/utf16-boundary-sweep branch from 42d6193 to c0557ca Compare July 9, 2026 13:52
@openclaw-barnacle openclaw-barnacle Bot removed channel: msteams Channel integration: msteams app: android App: android labels Jul 9, 2026
@clawsweeper clawsweeper Bot removed the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Jul 9, 2026
steipete and others added 3 commits July 9, 2026 15:10
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]>
@steipete
steipete force-pushed the codex/utf16-boundary-sweep branch from 5463b99 to e206900 Compare July 9, 2026 14:11
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready verification completed for exact head e206900c5ab277857af14ff88f511a9b29473e3f.

Known proof gaps: none.

@steipete
steipete merged commit 5ef269c into main Jul 9, 2026
104 checks passed
@steipete
steipete deleted the codex/utf16-boundary-sweep branch July 9, 2026 14:21
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 10, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: whatsapp-web Channel integration: whatsapp-web dependencies-changed PR changes dependency-related files extensions: memory-lancedb Extension: memory-lancedb extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant