Title: lab-ops-hub: U+0345 inside an RTL label is certified — UTS-46 maps it to a Greek letter (bidi L), the container's NFKC mapping leaves it a combining mark · Issue #596 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: U+0345 inside an RTL label is certified — UTS-46 maps it to a Greek letter (bidi L), the container's NFKC mapping leaves it a combining mark · Issue #596 · developing-today/code
X Title: lab-ops-hub: U+0345 inside an RTL label is certified — UTS-46 maps it to a Greek letter (bidi L), the container's NFKC mapping leaves it a combining mark · Issue #596 · developing-today/code
Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) judges raw hosts in their mapped form in validate_crawl_url (pkgs/lab-ops-hub/container/app.py, current main ead788e1): the host is NFKC-normalized and lowercased before _...
Open Graph Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) judges raw hosts in their mapped form in validate_crawl_url (pkgs/lab-ops-hub/container/app.py, current main ead788e1): the host is...
X Description: Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) judges raw hosts in their mapped form in validate_crawl_url (pkgs/lab-ops-hub/container/app.py, current main ead788e1): the host is...
Opengraph URL: https://github.com/developing-today/code/issues/596
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: U+0345 inside an RTL label is certified — UTS-46 maps it to a Greek letter (bidi L), the container's NFKC mapping leaves it a combining mark","articleBody":"## Summary\n\nPR #590 (fixes #583, commit `6bad7e15`, merged as `ead788e1`) judges raw hosts in their mapped form in `validate_crawl_url` (`pkgs/lab-ops-hub/container/app.py`, current main `ead788e1`): the host is NFKC-normalized and lowercased before `_judge_idna_label` applies its bidi check. But the container's \"mapped form\" is **NFKC, and UTS-46 mapping is not NFKC**: U+0345 (COMBINING GREEK YPOGEGRAMMENI) is mapped by UTS-46 to U+03B9 (ι, bidi class L), while `unicodedata.normalize(\"NFKC\", \"\\u0345\")` returns it unchanged (its UnicodeData decomposition field is empty; the mapping lives in the special-casing data — Python's own `\"\\u0345\".casefold()` does produce `ι`). The container therefore judges U+0345 as what it is *before* UTS-46 mapping — a combining mark, bidi NSM, legal mid-label in any context — while the Worker maps it to a Greek letter first and then applies bidi validity to the result. Inside an RTL label that flips the verdict: the mapped label is R + L + R, a bidi-rule violation.\n\nPR #590's own comment in `_judge_idna_label` names U+0345 as a known residual, but only in the opposite direction (\"U+0345, which UTS-46 maps to a letter, reads as a leading mark here\" — the container *over*-refusing it at label start). The under-refusal inside RTL labels is not documented anywhere.\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; raw-form rows cross-checked with Node's `new URL`, which agrees with Bun on every raw case:\n\n| URL | Container | Worker |\n|---|---|---|\n| `http://א\\u0345א.com/` (U+0345 between two Hebrew letters) | **accepts** | refuses — `url is not a valid URL` |\n| `http://א\\u0345.com/` (Hebrew letter + U+0345) | **accepts** | refuses |\n| `http://xn--jua51kba.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://ex\\u0345ample.com/`, `http://α\\u0345.com/` (LTR/Greek contexts) | accepts | accepts |\n| Documented reverse residual: `http://\\u0345abc.com/` | refuses (leading mark) | accepts (maps to `ιabc`) — unchanged, already disclosed in PR #590's comment |\n\nScope: this comes from a differential battery inserting every BMP codepoint U+0080–U+FFFF between two Hebrew letters (`א\u003ccp>א.com`) through both real validators — U+0345 and U+FE12 (#593, a different root cause) are the only container-accept / Worker-refuse divergences in that position, and U+0345 produces none in Latin-mid, leading or trailing positions (leading is the documented reverse case above). A targeted scan confirms the mechanism is the mapping gap: `\"א\\u0345א\"` after the container's NFKC+lowercase steps is still `['0x5d0', '0x345', '0x5d0']`, so `_judge_idna_label` sees bidis `[R, NSM, R]` — no L, no mixing, trailing rule skips the NSM — while the Worker's mapped form is `[R, L, R]`.\n\n## Why it matters\n\nSame shape as #583: 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 because the container's approximation of UTS-46 mapping (NFKC + `lower()`) silently diverges from UTS-46 mapping for a codepoint PR #590 itself flagged — and only the harmless direction of that divergence was documented. Any future codepoint whose UTS-46 mapping changes its bidi class or category relative to NFKC lands in the same hole; U+0345 is the one the current batteries can see.\n\n## Acceptance criteria\n\n- `validate_crawl_url` refuses a host whose UTS-46-mapped label violates the bidi rule because of the U+0345 → U+03B9 mapping — at minimum `http://א\\u0345א.com/` and `http://א\\u0345.com/` are refused with the same verdict as the Worker's `validateCrawlUrl`, in raw form and (under the repo's Bun differential) in the A-label spelling `xn--jua51kba`.\n- The LTR/Greek controls (`ex\\u0345ample.com`, `α\\u0345.com`) stay accepted; the documented leading-position over-refusal may stay as-is (Worker-accepts residual) or be closed by the same mapping fix, but must not silently change without a test pinning whichever behaviour is chosen.\n- New tests in `pkgs/lab-ops-hub/test/test_container_validate.py` (and the TS pin in `test/lib.test.ts`) cover U+0345 in an RTL label (refused) and in a Greek 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 0345 / ypogegrammeni return nothing; #593 (U+FE12 separator mapping) and #595 (missing AN rule) are different root causes in the same helper from the same PR; coordinate with #588 for the A-label spelling.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T15:24:03Z","url":"https://github.com/developing-today/code/issues/596"}
| 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:2a442f31-0937-b3c0-e802-2c40428e598d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9686:2E4E6F:7622AB:9DCD63:6B062F0C |
| html-safe-nonce | ebcd4689f4df54a94bdcaed984735fb841ec11e5ffb03ba7c4970e0bdf9d8c9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Njg2OjJFNEU2Rjo3NjIyQUI6OURDRDYzOjZCMDYyRjBDIiwidmlzaXRvcl9pZCI6IjQ3MTAwODAyNTQ5MzU3MDc0MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a5bb2ee09b0cb99404b996140e216fed23938ec5900832815d057a9cb5846498 |
| hovercard-subject-tag | issue:5982265697 |
| 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/596/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f484f15428e957f17f4dd86946a40ff301911774b063440ac3fc55673cd045ec/developing-today/code/issues/596 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f484f15428e957f17f4dd86946a40ff301911774b063440ac3fc55673cd045ec/developing-today/code/issues/596 |
| og:image:alt | Summary PR #590 (fixes #583, commit 6bad7e15, merged as ead788e1) judges raw hosts in their mapped form in validate_crawl_url (pkgs/lab-ops-hub/container/app.py, current main ead788e1): the host is... |
| 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 | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| 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 | 494ea0bb1e0feef734a83e2628697647755e8864 |
| 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