Repository navigation
lab-ops-hub: judge Arabic-Indic digits by bidi context, not a blanket range (#605) - #606
Merged
Merged
Conversation
Codex Review SummaryThis 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. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes #605
What
validate_crawl_urland_judge_a_labeleach carried a blanket forbidden-character arm —0x0660 <= ord(c) <= 0x0669— added by #574, which refused every host containing an Arabic-Indic digit in any context. The Worker's WHATWG validator accepts those digits (bidi class AN) inside a genuine right-to-left label, and_judge_idna_label's AN rule (#595, app.py:506/511) already makes exactly that contextual judgement. The blanket range only ever fired on the RTL-context rows the judge had already accepted.This PR deletes the range from both checks and updates the comments that claimed WHATWG rejects any host containing one (including the #595 comment that described the range as an arm catching BMP AN, and the #580 A-label comment). U+0660–U+0669 are now judged like every other AN character: refused in an LTR label, in a label with no R/AL character, and mixed with EN; accepted inside a genuine RTL label.
Verification
1695ee52(in the issue): rawا١.com/مرحبا١.com/א١.com/ا١ا.comand A-labelsxn--mgb0j/xn--mgbbop3hzh/xn--4db40a— container REFUSE / Worker ALLOW under both Bun and Node; all neighbouring cases (pure AN label,١٢٧.٠.٠.١, LTR mix, AN+EN mix, RTL-not-starting-R/AL) refused by both, in the container's case via the judge's AN arms.test_accepts_arabic_indic_digits_inside_rtl_labels(8 accepted raw + A-label spellings, 2 guard refusals) and a TS pinvalidateCrawlUrl judges Arabic-Indic digits by their bidi context (#605)(Worker verdicts, incl. A-label forms).npm testin pkgs/lab-ops-hub — TS 30/30, Python 37/37.container/app.pyreverted, exactly the new Python test fails (1 error); restored, all green.ruff format --checkclean on both Python files.Need help on this PR? Tag
@codesmith-botwith what you need.