Title: lab-ops-hub: PR #590's bidi check has no AN rule — Hanifi Rohingya and Rumi digits (41 astral AN codepoints) are certified in Latin labels the Worker refuses · Issue #595 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: PR #590's bidi check has no AN rule — Hanifi Rohingya and Rumi digits (41 astral AN codepoints) are certified in Latin labels the Worker refuses · Issue #595 · developing-today/code
X Title: lab-ops-hub: PR #590's bidi check has no AN rule — Hanifi Rohingya and Rumi digits (41 astral AN codepoints) are certified in Latin labels the Worker refuses · Issue #595 · developing-today/code
Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) added _judge_idna_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py, current main ead788e1) to judge every non-ASCII label for IDNA/UTS-46 validity...
Open Graph Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) added _judge_idna_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py, current main ead788e1) to judge every ...
X Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) added _judge_idna_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py, current main ead788e1) to judge every ...
Opengraph URL: https://github.com/developing-today/code/issues/595
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: PR #590's bidi check has no AN rule — Hanifi Rohingya and Rumi digits (41 astral AN codepoints) are certified in Latin labels the Worker refuses","articleBody":"## Summary\n\nPR #590 (fixes #583, commit `6bad7e15`, merged as `ead788e1`) added `_judge_idna_label` to the container crawl validator (`pkgs/lab-ops-hub/container/app.py`, current main `ead788e1`) to judge every non-ASCII label for IDNA/UTS-46 validity, including an explicit RFC 5893 bidi check. That check treats only bidi classes `R`/`AL` as right-to-left and has **no rule for bidi class `AN` (Arabic Number) at all** — beyond the pre-existing special case for the two BMP separators U+066B/U+066C in LTR labels (app.py, `_judge_idna_label`). Every BMP `AN` codepoint happens to be caught by another arm (the Cf check for U+0600–U+0605/U+06DD/U+0890/U+0891/U+08E2, the U+0660–U+0669 forbidden range from #574, the U+066B/U+066C case), so the gap is invisible in the BMP — but **all 41 astral `AN` codepoints pass**: the Hanifi Rohingya digits U+10D30–U+10D39 and the Rumi digits/numbers/fractions U+10E60–U+10E7E. In an LTR or neutral label the Worker's WHATWG domain-to-ASCII refuses them (an `AN` character is only valid inside an RTL label); the container certifies them as public DNS names.\n\nNeither #583's battery nor PR #590's could see this: both inserted only codepoints U+0080–U+32FF, and every astral codepoint sits above that range.\n\n## Evidence (verified 2026-10-22 on current main `ead788e1`, the merge commit of PR #590 itself)\n\nPython `validate_crawl_url` imported from `container/app.py` at main vs the Worker's `validateCrawlUrl` from `src/lib.ts` under Bun; the raw-form rows were additionally cross-checked with Node's `new URL`, which agrees with Bun on every raw case:\n\n| URL | Container | Worker |\n|---|---|---|\n| `http://ex\\U00010D30ample.com/` (Hanifi Rohingya digit in a Latin label) | **accepts** | refuses — `url is not a valid URL` |\n| `http://ex\\U00010E60ample.com/` (Rumi digit in a Latin label) | **accepts** | refuses |\n| `http://\\U00010D30abc.com/`, `http://abc\\U00010D30.com/`, `http://münchen\\U00010D30.de/` | **accepts** | refuses |\n| `http://\\U00010D30.com/` (digit alone), `http://1\\U00010D30.com/`, `http://-\\U00010D30.com/` | **accepts** | refuses |\n| `http://xn--example-eh36b.com/` (A-label spelling of the first row) | **accepts** | refuses under Bun (Node's URL parser accepts this A-label spelling — engine-dependent, secondary) |\n| Controls: `http://א\\U00010D30א.com/`, `http://ا\\U00010D30ا.com/`, `http://\\U00010D00\\U00010D30.com/` (digit in Hebrew / Arabic / its own Rohingya RTL label) | accepts | accepts |\n\nDifferential battery: every codepoint U+10000–U+10FFFF inserted into `ex\u003ccp>ample.com` (1,048,576 hosts) through both real validators — the container-accept / Worker-refuse pocket in the astral range is exactly these 41 `AN` codepoints (plus the U+FE12 separator case filed as #593). An exhaustive `unicodedata` scan confirms there are 63 `AN` codepoints in total; the other 22 are all BMP and all refused by the container today. Why the codec backstop does not catch them: `\"ex\\U00010D30ample\".encode(\"idna\")` succeeds — or, where the IDNA-2003 codec raises a bidi error, PR #590's re-judge treats `AN` as neither RTL nor a violation (its trailing rule only checks the last non-NSM class against R/AL/AN/EN for RTL labels and L/EN for LTR labels, and `AN` mid-label is never examined).\n\n## Why it matters\n\nSame shape as #583/#574: the two validators that are supposed to hold the same crawl-target policy (#441 defence in depth — the container is the component that actually fetches) disagree, here on a whole bidi class that PR #590's explicit directionality check was written to cover. The Rohingya/Rumi digits are live scripts' digits, not unassigned codepoints, so this is not Unicode-version skew — both validators' tables contain them.\n\n## Acceptance criteria\n\n- `_judge_idna_label` refuses a label containing an `AN` character unless the label is a valid RTL label under the same rules the Worker applies — at minimum: AN in any label with a strong LTR character is refused, and AN in a label with no R/AL character is refused; the probed RTL controls above (Hebrew/Arabic/Rohingya contexts) stay accepted, matching the Worker.\n- All 41 codepoints U+10D30–U+10D39 and U+10E60–U+10E7E are refused in a Latin label, in raw and (under the repo's Bun differential) A-label form; the existing U+066B/U+066C-in-LTR behaviour is subsumed or preserved.\n- New tests in `pkgs/lab-ops-hub/test/test_container_validate.py` (and the TS pin in `test/lib.test.ts`) cover a Rohingya digit and a Rumi digit in a Latin label (refused) and in an RTL label (accepted).\n- No regression in the existing Python or TS suites.\n\nSingle-repo: `validate_crawl_url` / `_judge_idna_label` exist only in `developing-today/code` (git-grep verified in the opencode / openchamber / nix clones). Not an mcpx set. Deduped: searches for Rohingya / Rumi / 10D30 / 10E60 / \"Arabic number\" return nothing; #574 is closed and scoped to U+0660–U+0669, which stay refused via their own arm; coordinate with #588 for the A-label spelling, whose scope is decoded-label validity classes in general.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T15:19:07Z","url":"https://github.com/developing-today/code/issues/595"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e798f73e-eb89-a4f1-6893-0fc8eecfa4a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A144:1CA0E6:8C8BB1:BC9F03:6B06374B |
| html-safe-nonce | f4d9d92dfa4e8bf64e45d640320c6b74992f3a95dd4abe74d82693d979222ba4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTQ0OjFDQTBFNjo4QzhCQjE6QkM5RjAzOjZCMDYzNzRCIiwidmlzaXRvcl9pZCI6IjMxMDgwMDExODUxNjExNjQ2MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 42abe00965f847a36a8d49159f01915dbe66980be9560ea9885470017fc95910 |
| hovercard-subject-tag | issue:5982174501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/595/issue_layout |
| twitter:image | https://opengraph.githubassets.com/578b439d236acb446aeacc3e19c940a6ad12bf662245ed51d851aedd856987a6/developing-today/code/issues/595 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/578b439d236acb446aeacc3e19c940a6ad12bf662245ed51d851aedd856987a6/developing-today/code/issues/595 |
| og:image:alt | Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) added _judge_idna_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py, current main ead788e1) to judge every ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width