Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 2:15 PM ET / 18:15 UTC. Summary PR surface: Source +3, Tests +34. Total +37 across 2 files. Reproducibility: yes. from source with high confidence: 255 ASCII code units followed by an emoji are cut at 256 units on current main, leaving the emoji’s high surrogate unpaired. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the narrow helper reuse after ordinary OpenRouter owner review, preserving the existing 256-code-unit display limit and the unchanged raw Fusion request payload. Do we have a high-confidence way to reproduce the issue? Yes, from source with high confidence: 255 ASCII code units followed by an emoji are cut at 256 units on current main, leaving the emoji’s high surrogate unpaired. Is this the best way to solve the issue? Yes. Reusing the repository’s tested UTF-16-safe helper at the existing display-only OpenRouter sanitizer is the narrowest maintainable fix; changing global prompt assembly or transport normalization would be broader and at the wrong owner boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ea2b558e5eea. Label changesLabel justifications:
Evidence reviewedPR surface: Source +3, Tests +34. Total +37 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles) |
|
Merged via squash.
|
…104433) Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 03558dc) (cherry picked from commit 6092dd41693e03168d21c4279775e07cec805099)
…penclaw#104433) Co-authored-by: Vincent Koc <[email protected]>
…penclaw#104433) Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 03558dc) (cherry picked from commit 6092dd41693e03168d21c4279775e07cec805099)
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where users configuring a long OpenRouter Fusion analysis or final model ID could get a broken replacement glyph in the generated agent system prompt when an emoji crossed the existing 256-unit display limit.
Why This Change Was Made
The existing control-character filtering and trimming remain unchanged, but the final display cap now uses OpenClaw's canonical UTF-16-safe truncation helper. The same sanitizer owns both
analysis_modelsand finalmodelprompt lines, so the fix covers the complete Fusion prompt boundary without changing the raw plugin configuration sent to OpenRouter.This is a root-cause fix with no config, schema, routing, auth, request-format, or public API change. A fresh open-PR scan found no PR covering the Fusion configuration-to-system-prompt behavior.
User Impact
OpenRouter Fusion configuration shown to the agent remains valid Unicode at the existing length limit. If the cap lands inside an emoji, OpenClaw drops the incomplete pair instead of placing corrupted text in the system prompt; ordinary model IDs and the provider request payload are unchanged.
Evidence
Before the fix, the registered OpenRouter provider regression failed because both bounded Fusion model lines ended with a lone
U+D83Dreplacement glyph:After the fix, a real isolated OpenClaw Gateway ran an agent turn with
openrouter/fusionagainst a deterministic local OpenAI-compatible endpoint. The endpoint captured the production/v1/chat/completionsrequest:This proves the real Gateway → agent runtime → bundled provider prompt hook → provider HTTP request path. Only the paid external service was replaced; the raw Fusion plugins payload still contained the complete configured ID.
Full affected provider test file:
Targeted formatting passed for both changed files.
Changed-surface checks passed, including extension and extension-test type checks, lint, dependency guards, database-first guard, runtime sidecar checks, and zero runtime import cycles.