Repository navigation
feat(bedside): structural Unicode text classes and golden corpus (BA-W01 L6) - #11785
Merged
Merged
Conversation
…W01 L6) worker/text.mjs defines identifier, name and comment classes. Names keep emoji sequences (ZWJ families, tag flags) and a ZWNJ between letters while dropping other invisible characters; comments refuse only unpaired surrogates and control characters other than tab and line breaks; identifiers refuse every control and format character and unpaired surrogates. The API cleans names with it, refuses malformed new or edited comments, and steering text keeps emoji. The browser's blanket ZWJ removal is gone. tests/unicode-corpus.json is the golden corpus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dezren39
marked this pull request as ready for review
November 18, 2026 11:38
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Before: the server stripped every format character from names and steering text, so an emoji ZWJ family or a tag flag in a store name or request came out broken, and the browser removed every zero-width joiner. Comments were stored with no structural check at all, so a lone surrogate or a control character went in as written. Variant IDs refused control and format characters but accepted a lone surrogate.
After:
worker/text.mjshas three classes. Names keep emoji sequences and a ZWNJ between letters and drop other invisible characters. Comments are refused (400) only for an unpaired surrogate or a control character other than tab and line breaks, and keep emoji as written. Identifiers refuse control and format characters and unpaired surrogates. The browser keeps emoji sequences too.tests/unicode-corpus.jsonis the golden corpus (41 cases).How: the API's
cleannow usesname,validateNewRecordschecks new and edited note text withisComment, steering's text clean-up usesvisible, and variant IDs useisIdentifier. The browser builds its regex with thevflag in a try, falling back to the old behaviour where unsupported.tests/unicode.mjsruns the corpus and an API round trip;scripts/check.mjscovers the browser clean-up. All 19 test files pass.Closes #11755.
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.