Repository navigation
fix(lab-ops-hub): judge ZWNJ/ZWJ by RFC 5892 CONTEXTJ instead of blanket-refusing (#531) - #10015
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Merging under the standing criteria: the full lab-ops-hub Python suite passes locally (83 tests, including the new CONTEXTJ test with 11 verdict assertions and the pre-existing disallowed-set test), the PR is CLEAN/mergeable, and no Codex review has been produced (Codex reviews are failing repo-wide on usage limits today — PRs #9944/#9969/#9981). The change is confined to the container validator plus its tests. |
Summary
Fixes #531: the lab-ops-hub container validator blanket-refused every host containing U+200C ZWNJ / U+200D ZWJ, while the Worker validator (WHATWG domain-to-ASCII) accepts them inside their RFC 5892 CONTEXTJ joining contexts.
Changes (
pkgs/lab-ops-hub/container/app.py)_IDNA_DISALLOWEDno longer contains U+200C/U+200D (the comment records why: CONTEXTJ codepoints are judged per label, not flat)._judge_idna_labelnow judges the pair contextually:idna.core.valid_contextj(label, pos)holds — the pinnedidnalibrary's implementation of RFC 5892 Appendix A (A.1 ZWNJ: preceding Joining_Type {L,D}, following {R,D}, Transparent skipped; A.2 ZWJ: immediately preceding Canonical_Combining_Class 230). The rule detail is the one verified against the RFC text on the issue (task 4812's packet erred in writing the following set as "D or C"; it is {R,D})._judge_idna_label, and A-labels reach it decoded — so no path bypasses the judgement.Tests
test_contextj_joiners_judged_by_rfc5892_appendix_a: accepts the virama+ZWJ label, the Persian ZWNJ word, and a beh–ZWNJ–beh label, in raw and A-label forms; refuses ZWNJ between Latin letters, at label start, and between alefs, and ZWJ after a non-virama letter and after Latin.python3 -m unittest discover -s test -p "test_*.py"in pkgs/lab-ops-hub, with the pinnedidna==3.18): 83 tests, OK — including the pre-existing disallowed-set test, whose bare-joiner-in-Latin cases remain refused.Closes #531.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.