fix(parallel): keep normalized search fields UTF-16 safe#101679
fix(parallel): keep normalized search fields UTF-16 safe#101679ly85206559 wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 9:35 AM ET / 13:35 UTC. Summary PR surface: Source +1, Tests +16. Total +17 across 2 files. Reproducibility: yes. A current-main Node check reproduces the raw-slice surrogate split, and current source uses that same raw slice in the Parallel normalizer. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the focused shared-normalizer fix and merge it after redacted real behavior proof plus refreshed exact-head checks confirm the Parallel provider path works. Do we have a high-confidence way to reproduce the issue? Yes. A current-main Node check reproduces the raw-slice surrogate split, and current source uses that same raw slice in the Parallel normalizer. Is this the best way to solve the issue? Yes. Using the existing shared UTF-16-safe helper at the shared Parallel normalizer is the narrowest maintainable fix; schema-only or transport-specific changes would leave runtime duplication or one provider path unfixed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e591dcfa8213. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +16. Total +17 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 (1 earlier review cycle)
|
|
Superseded by #101711, now landed as The landed implementation keeps both Parallel request runtimes on the shared Plugin SDK UTF-16-safe boundary, preserves the existing field limits, and includes the focused tests plus a live keyless Parallel Search MCP request. Exact-head CI, full Thanks @ly85206559 for identifying and fixing this boundary. |
What Problem This Solves
Fixes Parallel search normalization paths that could cut UTF-16 surrogate pairs in half when applying API field limits. The
objective,search_queries[], andclient_modelfields all have hard character caps and previously used raw.slice(...)truncation.Why This Change Was Made
Recent bounded text fixes use the shared
truncateUtf16Safehelper for model-facing and user-provided text. This applies that existing helper to Parallel's request normalization while preserving the same field limits and request shape.User Impact
Parallel search requests remain well-formed when objectives, search queries, or client model identifiers contain emoji or non-BMP characters near truncation boundaries.
Evidence
node scripts/run-vitest.mjs extensions/parallel/src/parallel-web-search-provider.test.tsextensions/parallel/src/parallel-web-search-provider.test.tspassed: 29 tests passed.git diff --checkpython .agents\skills\autoreview\scripts\autoreview --mode local --no-web-searchautoreview clean: no accepted/actionable findings reportedorigin/mainat4e29b2f5ab