Title: lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged · Issue #659 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged · Issue #659 · developing-today/code
X Title: lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged · Issue #659 · developing-today/code
Description: Problem The container validator (pkgs/lab-ops-hub/container/app.py, validate_crawl_url) judges a non-ASCII host in its IDNA-encoded form — it even builds the A-labels at app.py:286-292 ("xn--" + label.encode("punycode")) for the RFC 1035...
Open Graph Description: Problem The container validator (pkgs/lab-ops-hub/container/app.py, validate_crawl_url) judges a non-ASCII host in its IDNA-encoded form — it even builds the A-labels at app.py:286-292 ("xn--" + la...
X Description: Problem The container validator (pkgs/lab-ops-hub/container/app.py, validate_crawl_url) judges a non-ASCII host in its IDNA-encoded form — it even builds the A-labels at app.py:286-292 ("xn--&...
Opengraph URL: https://github.com/developing-today/code/issues/659
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged","articleBody":"## Problem\n\nThe container validator (`pkgs/lab-ops-hub/container/app.py`, `validate_crawl_url`) judges a non-ASCII host in its IDNA-encoded form — it even builds the A-labels at app.py:286-292 (`\"xn--\" + label.encode(\"punycode\")`) for the RFC 1035 length check — but it never substitutes those A-labels into the URL it returns. The returned URL keeps the raw U-label host. The Worker validator (`pkgs/lab-ops-hub/src/lib.ts`) returns the WHATWG-canonical punycode host (`u.hostname`), so for **every** internationalized host the two validators certify different URLs for the same input.\n\n## Evidence (verified 2026-10-23, both validators run on current main f1a8abf0)\n\n| Input | Container returns | Worker returns |\n|---|---|---|\n| `http://café.com/` | `http://café.com/` | `http://xn--caf-dma.com/` |\n| `http://münchen.de/path` | `http://münchen.de/path` | `http://xn--mnchen-3ya.de/path` |\n| `http://bücher.example/` | `http://bücher.example/` | `http://xn--bcher-kva.example/` |\n| `http://😀.com/` | `http://😀.com/` | `http://xn--e28h.com/` |\n\nRepro: call `validate_crawl_url(\"http://café.com/\")` in `container/app.py` and `validateCrawlUrl(\"http://café.com/\")` in `src/lib.ts` and compare the returned URLs.\n\n## Why it matters\n\nThe returned URL is the artifact the rest of the system stores, logs, dedupes on, and fetches. Two validators that are supposed to be interchangeable implementations of one policy disagree on the canonical form of every IDN target: the same crawl submitted through the container and through the Worker produces different stored URLs (breaking dedupe/comparison), and the container's form depends on the fetcher re-encoding the host at fetch time instead of the validator returning the wire form it actually judged. This is the same class of returned-URL divergence as #652 (UTS-46 ignored codepoints in the returned host), but it covers all non-ASCII labels, not just the ignored-codepoint subset — #652's fix alone would not close it.\n\n## Acceptance criteria\n\n- For any accepted non-ASCII host, the container validator returns the URL with the host in A-label (punycode) form, matching the Worker byte-for-byte (including the DNS root dot handling from #647 and UTS-46 mapping/ignored-codepoint deletion from #526/#652).\n- ASCII hosts, IPv4/IPv6 literals, ports, userinfo, and path/query/fragment handling are unchanged.\n- New tests in `pkgs/lab-ops-hub/test/test_container_validate.py` pin the returned A-label form for at least: a Latin-1 IDN (`café.com`), a multi-label IDN (`bücher.example`), and an astral-plane label (`😀.com` → `xn--e28h.com`); a Python↔TS differential over IDN spellings shows no remaining returned-host differences.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T08:56:38Z","url":"https://github.com/developing-today/code/issues/659"}
| 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:346e5371-d259-81c2-d0bf-e0f7400db61b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4F0:1293AE:A8B79C:DAE2FF:6B0638B7 |
| html-safe-nonce | 75a0ee25759b1cdb1e60893cdad5d3408fcf8878eced26cfbba6ec7d1091388a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEYwOjEyOTNBRTpBOEI3OUM6REFFMkZGOjZCMDYzOEI3IiwidmlzaXRvcl9pZCI6IjEyNjQ2Nzk2NDc4MjA3ODk5NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7d833992929cba878945253b15752508f261e0959621010dd326f9be1c15fb5d |
| hovercard-subject-tag | issue:5994896022 |
| 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/659/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2196a70806be55011b841332badeb020a09ee71c37ddf7ee516f6ca02ae68cdd/developing-today/code/issues/659 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2196a70806be55011b841332badeb020a09ee71c37ddf7ee516f6ca02ae68cdd/developing-today/code/issues/659 |
| og:image:alt | Problem The container validator (pkgs/lab-ops-hub/container/app.py, validate_crawl_url) judges a non-ASCII host in its IDNA-encoded form — it even builds the A-labels at app.py:286-292 ("xn--" + la... |
| 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 | 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