Title: lab-ops-hub: container validator blanket-refuses Arabic-Indic digits (U+0660–U+0669) inside RTL labels the Worker accepts — #574's range overrides #595's contextual AN rule · Issue #605 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator blanket-refuses Arabic-Indic digits (U+0660–U+0669) inside RTL labels the Worker accepts — #574's range overrides #595's contextual AN rule · Issue #605 · developing-today/code
X Title: lab-ops-hub: container validator blanket-refuses Arabic-Indic digits (U+0660–U+0669) inside RTL labels the Worker accepts — #574's range overrides #595's contextual AN rule · Issue #605 · developing-today/code
Description: Summary The container crawl validator (pkgs/lab-ops-hub/container/app.py) refuses every host containing an Arabic-Indic digit (U+0660–U+0669), in any label context. The Worker's validator (pkgs/lab-ops-hub/src/lib.ts, WHATWG domain-to-AS...
Open Graph Description: Summary The container crawl validator (pkgs/lab-ops-hub/container/app.py) refuses every host containing an Arabic-Indic digit (U+0660–U+0669), in any label context. The Worker's validator (pkgs/lab...
X Description: Summary The container crawl validator (pkgs/lab-ops-hub/container/app.py) refuses every host containing an Arabic-Indic digit (U+0660–U+0669), in any label context. The Worker's validator (pkgs...
Opengraph URL: https://github.com/developing-today/code/issues/605
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator blanket-refuses Arabic-Indic digits (U+0660–U+0669) inside RTL labels the Worker accepts — #574's range overrides #595's contextual AN rule","articleBody":"## Summary\n\nThe container crawl validator (`pkgs/lab-ops-hub/container/app.py`) refuses **every** host containing an Arabic-Indic digit (U+0660–U+0669), in any label context. The Worker's validator (`pkgs/lab-ops-hub/src/lib.ts`, WHATWG domain-to-ASCII) does not: it accepts those digits inside a genuine right-to-left label — the context RFC 5893 allows bidi class AN (Arabic number) in — and refuses them outside it.\n\nThis is the pocket the #595 fix (PR #604) measured and deliberately left untouched: its differential found 10 opposite-direction diffs where the container refuses U+0660–U+0669 inside an RTL label while the Worker accepts that context under both Bun and Node. It is also an internal inconsistency: #595 taught `_judge_idna_label` the contextual AN rule for the other AN digits (the astral Hanifi Rohingya / Rumi digits, and the U+066B/U+066C separators), and that helper already judges U+0660–U+0669 correctly — the older blanket range from #574 simply overrides its verdict in the one context where the digit is valid. The neighbouring Extended Arabic-Indic digits (U+06F0–U+06F9, class EN) are already accepted in the same RTL labels, so an Arabic label spelled with `١` is refused while the same label spelled with `۱` is accepted.\n\n## Evidence (verified 2026-10-22 on main `1695ee52`)\n\nTwo blanket sites, both unconditional on label context:\n\n- `container/app.py:293` — `validate_crawl_url`'s forbidden-character check: `or 0x0660 \u003c= ord(c) \u003c= 0x0669`, applied to the whole host.\n- `container/app.py:413` — the same range in `_judge_a_label`, applied to a decoded A-label before `_judge_idna_label` is called.\n\nThe contextual judgement already exists and already agrees with the Worker on every neighbouring case:\n\n- `container/app.py:506` — `if \"AN\" in bidis and (has_ltr or not has_rtl): refuse` (\"contains an Arabic number outside a right-to-left label\").\n- `container/app.py:511` — `if \"AN\" in bidis and \"EN\" in bidis: refuse` (\"mixes Arabic and European numbers\").\n\nDifferential on current main, driving the real container `validate_crawl_url` (Python) and the real Worker `validateCrawlUrl` (Bun; Node agrees on every row):\n\n| URL | Container | Worker |\n|---|---|---|\n| `http://ا١.com/` (Arabic letter + U+0661) | REFUSE \"forbidden character\" | ALLOW → `xn--mgb0j.com` |\n| `http://مرحبا١.com/` | REFUSE \"forbidden character\" | ALLOW → `xn--mgbbop3hzh.com` |\n| `http://א١.com/` (Hebrew letter + U+0661) | REFUSE \"forbidden character\" | ALLOW → `xn--4db40a.com` |\n| `http://ا١ا.com/` (AN mid-label, RTL) | REFUSE \"forbidden character\" | ALLOW → `xn--mgba7o.com` |\n| `http://xn--mgb0j.com/` (A-label of row 1) | REFUSE \"decodes to a label with a forbidden character\" | ALLOW |\n| `http://xn--mgbbop3hzh.com/` (A-label of row 2) | REFUSE (same) | ALLOW |\n| `http://١.com/` (AN alone, no RTL char) | REFUSE (via :506, correct) | REFUSE |\n| `http://١٢٧.٠.٠.١/` (127.0.0.1 spelling, #574) | REFUSE (via :506, correct) | REFUSE |\n| `http://ex١ample.com/` (LTR label) | REFUSE (via :506, correct) | REFUSE |\n| `http://א١1.com/` (RTL + AN + EN mix) | REFUSE (via :511, correct) | REFUSE |\n| `http://١ا.com/` (RTL label not starting R/AL) | REFUSE (correct) | REFUSE |\n| `http://ا۱.com/` (Extended Arabic-Indic U+06F1 control) | ALLOW | ALLOW |\n\nNote the refused-for-the-right-reason rows: they are refused by `_judge_idna_label` (which runs before the host-level check for raw non-ASCII labels) — the blanket range is not what keeps #574's spellings out; in raw form it only ever fires on the RTL-context rows the judge has already accepted.\n\n## Why it matters\n\nSame Worker/container parity class as #516/#526/#529/#531, in the fail-closed direction: the Worker accepts these public IDN hosts and dispatches the crawl, the container then refuses them, so legitimate crawls of Arabic/Hebrew-script domains whose names contain an ordinary Arabic-Indic digit fail at crawl time. The container is also the sole judge for redirect targets (its validating redirect handler validates raw `Location` values with no Worker normalisation in between), so a redirect to such a host 502s via the container while the Worker fallback resolves it. Arabic-Indic digits are the everyday digits of Arabic orthography — this is not an exotic spelling class.\n\n## Suggested fix\n\nDelete the `0x0660 \u003c= ord(c) \u003c= 0x0669` arm from both forbidden-character checks (`app.py:293` and `app.py:413`) and update the two comments that claim WHATWG rejects any host containing one. U+0660–U+0669 are bidi class AN, so after the deletion they are judged exactly like the other AN characters: `_judge_idna_label` refuses them in an LTR label, in a label with no R/AL character, and mixed with EN, and accepts them inside a genuine RTL label. For the A-label path the same applies — `_judge_a_label` already ends by calling `_judge_idna_label(decoded, host)`.\n\n## Acceptance criteria\n\n- Raw RTL spellings are accepted, matching the Worker: `http://ا١.com/`, `http://مرحبا١.com/`, `http://א١.com/`, `http://ا١ا.com/`.\n- Their A-label spellings are accepted: `http://xn--mgb0j.com/`, `http://xn--mgbbop3hzh.com/`, `http://xn--4db40a.com/`.\n- Every #574/#580 refusal still refuses: `١٢٧.٠.٠.١`, `١٢٣.com`, `a١.com`, `example١٢٣.com`, `münchen١.com`, the percent-encoded spelling, and the A-label spellings `xn--9hbcp.…`, `xn--a-bqc`, `xn--example-h3jjk`, `xn--mnchen-3ya761i` — now via the AN context rule rather than the blanket range.\n- AN+EN mixing in an RTL label still refuses (`א١1.com`).\n- New tests in `pkgs/lab-ops-hub/test/test_container_validate.py` pin the accepted raw + A-label RTL spellings (the TS suite needs no change — the Worker already accepts them; a parity pin there is welcome).\n- No regression in the existing Python or TS suites.\n\nSingle-repo: the validator pair exists only in this repo (`validate_crawl_url` / `validateCrawlUrl` grep-clean in the opencode / openchamber / nix clones). Dedup: #574/#580 (closed) are the source of the blanket range and scoped their refusals to the non-RTL spellings above; #595 (closed) covers the astral AN digits and explicitly left this pocket; open #531 is the ZWNJ/ZWJ CONTEXTJ blanket (different characters, different check), #588 is A-label decoded-label validity classes the container *accepts*, #596 is the U+0345 mapping — none covers a *refused* RTL-context AN digit.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T18:20:40Z","url":"https://github.com/developing-today/code/issues/605"}
| 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:b772cbc5-3b34-0472-c9c1-a00002f3c6a2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5F4:D0B9B:9F9CC4:D5F2AE:6B063F48 |
| html-safe-nonce | 7b1c6685db4b54456b64af143de641209bcfee1d577693d0cba2ddeef5e49f5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUY0OkQwQjlCOjlGOUNDNDpENUYyQUU6NkIwNjNGNDgiLCJ2aXNpdG9yX2lkIjoiMjAxODYxNjk4NzE4OTkxOTU2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a47ec0b05c6230e8743945b7d51211304d98a296d2cee2d825d521cf24bbb45e |
| hovercard-subject-tag | issue:5985060179 |
| 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/605/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7385e886c7bedded92aa2d43e9739979a1d4f4c83ba4dfce7773de3d1752fe66/developing-today/code/issues/605 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7385e886c7bedded92aa2d43e9739979a1d4f4c83ba4dfce7773de3d1752fe66/developing-today/code/issues/605 |
| og:image:alt | Summary The container crawl validator (pkgs/lab-ops-hub/container/app.py) refuses every host containing an Arabic-Indic digit (U+0660–U+0669), in any label context. The Worker's validator (pkgs/lab... |
| 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 | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| 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 | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| 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