fix(memory-lancedb): use truncateUtf16Safe for sanitize text truncation#102767
fix(memory-lancedb): use truncateUtf16Safe for sanitize text truncation#102767coder-master-0915 wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 8:09 AM ET / 12:09 UTC. Summary PR surface: Source 0. Total 0 across 1 file. Reproducibility: yes. from source: on current main, 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: Land the one-line sanitizer truncation fix after contributor proof or maintainer override, ideally with a focused surrogate-boundary sanitizer regression test. Do we have a high-confidence way to reproduce the issue? Yes from source: on current main, Is this the best way to solve the issue? Yes: using the already imported AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f786efddcd88. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0. Total 0 across 1 file. 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
|
|
Closing this standalone fragment in favor of the wider UTF-16 cleanup. The sanitizer boundary is a valid cleanup site, but this is a one-line substitution with no regression test or user-visible reproduction. It should land with a focused capture-sanitizer boundary test as part of the consolidated work, not consume a separate review and CI cycle. |
What Problem This Solves
One missed
.slice(0, N)truncation site in the memory-lancedb extension may cut UTF-16 surrogate pairs in half when the text content contains multi-byte characters such as emoji. The same file already usestruncateUtf16Safein other places.Why This Change Was Made
extensions/memory-lancedb/index.tswas partially converted buttext.slice(0, MAX_SANITIZE_CHARS)on the sanitize path was missed.User Impact
Truncated text in memory-lancedb sanitization remains valid Unicode at existing size limits.
Evidence
Generated with Claude Code