Title: lab-ops-hub: container validator returns the raw Kelvin-sign (U+212A) host spelling — extraction folds it to 'k' before the #666 mapped-host check can see it · Issue #667 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator returns the raw Kelvin-sign (U+212A) host spelling — extraction folds it to 'k' before the #666 mapped-host check can see it · Issue #667 · developing-today/code
X Title: lab-ops-hub: container validator returns the raw Kelvin-sign (U+212A) host spelling — extraction folds it to 'k' before the #666 mapped-host check can see it · Issue #667 · developing-today/code
Description: Summary PR #666 fixed the container validator returning the raw compatibility-mapped host spelling (#665) by measuring the host before its NFKC step and rebuilding the returned URL when that step changed the spelling. One spelling escape...
Open Graph Description: Summary PR #666 fixed the container validator returning the raw compatibility-mapped host spelling (#665) by measuring the host before its NFKC step and rebuilding the returned URL when that step c...
X Description: Summary PR #666 fixed the container validator returning the raw compatibility-mapped host spelling (#665) by measuring the host before its NFKC step and rebuilding the returned URL when that step c...
Opengraph URL: https://github.com/developing-today/code/issues/667
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator returns the raw Kelvin-sign (U+212A) host spelling — extraction folds it to 'k' before the #666 mapped-host check can see it","articleBody":"## Summary\n\nPR #666 fixed the container validator returning the raw compatibility-mapped host spelling (#665) by measuring the host before its NFKC step and rebuilding the returned URL when that step changed the spelling. One spelling escapes that measurement entirely: **U+212A KELVIN SIGN**. The container judges `http://K.example.com/` as host `k.example.com` but returns `http://K.example.com/` verbatim, while the Worker validator returns `http://k.example.com/`. The two validators again hand back different URLs for the same input — the exact #665 divergence, for the one character whose fold happens before the new measurement point.\n\n## Evidence (verified on current main `c1524b63`, driving both real validators)\n\n`pkgs/lab-ops-hub/container/app.py`:\n\n- Host extraction folds the character before the #666 measurement exists: `host = (u.hostname or \"\").lower()` — `urllib`'s `hostname` property already lowercases, and Python's Unicode lowercase mapping for U+212A is ASCII `k`. So the extracted host is `k.example.com` from the start.\n- PR #666's `host_before_mapping = host` is captured from that already-folded host, so `host_was_mapped = host != host_before_mapping and host.isascii()` is `False` for a Kelvin-sign host: nothing downstream of extraction changes the spelling, and the public-DNS return path returns `raw` unchanged.\n- Judging is unaffected (it sees the folded form): `http://K.localhost/` is refused as local host `k.localhost`. This is purely a return-form divergence.\n\nProbe results:\n\n```\ncontainer (Python) validate_crawl_url(\"http://K.example.com/\") -> \"http://K.example.com/\" (raw returned)\ncontainer (Python) validate_crawl_url(\"http://K.com/\") -> \"http://K.com/\"\ncontainer (Python) validate_crawl_url(\"http://Kexample.com:8080/p\") -> \"http://Kexample.com:8080/p\"\ncontainer (Python) validate_crawl_url(\"http://%e2%84%aa.example.com/\") -> \"http://k.example.com/\" (percent spelling correct)\nWorker (TS) validateCrawlUrl(\"http://K.example.com/\") -> \"http://k.example.com/\"\nWorker (TS) validateCrawlUrl(\"http://K.com/\") -> \"http://k.com/\"\n```\n\nNote the internal inconsistency: the percent-encoded spelling of the same host returns the judged form, the literal spelling does not. A mixed host also works (`http://Ke.com/` -> `http://ke.com/` in both), because the fullwidth character triggers the #666 rebuild — only a host whose *sole* fold is the Kelvin sign escapes.\n\nCompleteness: a brute-force scan of every Unicode codepoint through the extraction-fold → NFKC pipeline shows U+212A is the **only** character whose lowercase mapping lands on an NFKC-stable ASCII form, i.e. the only spelling this blind spot can ever hide. Every other cased compatibility character either keeps a non-ASCII judged form (the open #659 U-label question) or is changed again by NFKC, which #666's check does see.\n\n## Why it matters\n\nSame principle as #665/#652/#660: the validated URL is the artifact both crawlers fetch, log, and compare, and the pair is maintained to return one canonical spelling for one input. Here the container records and fetches a spelling it never judged — the judged host `k.example.com` exists only inside the validator — and the container/Worker pair disagrees on the return for the same input, so behavior depends on which validator handled the crawl.\n\n## Acceptance criteria\n\n- [ ] `validate_crawl_url(\"http://K.example.com/\")` returns `http://k.example.com/`; in general, a host whose spelling was folded at extraction time (before the NFKC step) also rebuilds the returned URL from the judged host.\n- [ ] The percent-encoded and mixed-spelling controls keep their current returns (`%e2%84%aa` -> `k.example.com`, `Ke.com` -> `ke.com`), and spellings the pipeline does not change return exactly what they return today.\n- [ ] New cases pinned in `pkgs/lab-ops-hub/container` Python tests (Kelvin sign as a full label and inside a label, with a port/path), and the TS suite still passes unchanged.\n\n## Dedup / scope\n\nNot #665 (compatibility mappings visible to the NFKC step — fixed by #666; this fold happens *before* that step, at `urlparse` extraction/lower-casing). Not #652 (UTS-46 *ignored* codepoints deleted by the translate step), not #659 (raw U-label returned for non-ASCII IDN targets — the Kelvin judged form is pure ASCII), not #660 (literal separator spellings). Found by PR-diff review of #666. Single-repo: the validator pair lives only in this repo's `pkgs/lab-ops-hub` (container + Worker); no copy exists in opencode/openchamber/nix.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T14:04:43Z","url":"https://github.com/developing-today/code/issues/667"}
| 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:6f11764e-035f-9243-97a2-d9a741ec4d26 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A00:2C6577:9D3578:D1B757:6B063CE0 |
| html-safe-nonce | 445588645dd021f3c8e757023d9de27a587e61631bb740283b9b6d23a76e1eaf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTAwOjJDNjU3Nzo5RDM1Nzg6RDFCNzU3OjZCMDYzQ0UwIiwidmlzaXRvcl9pZCI6IjU3MDU0MjI3ODk1OTE1Nzk4NzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 740e45534ab81529cb0e6a74412ef1cb9918f6a2b98567d40160d4339ef9bdda |
| hovercard-subject-tag | issue:5999239777 |
| 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/667/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ad08ca0d8d696c0ba54d8d3d8e1c073cae5f3948efbd20588a7e08a7da6f98a/developing-today/code/issues/667 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ad08ca0d8d696c0ba54d8d3d8e1c073cae5f3948efbd20588a7e08a7da6f98a/developing-today/code/issues/667 |
| og:image:alt | Summary PR #666 fixed the container validator returning the raw compatibility-mapped host spelling (#665) by measuring the host before its NFKC step and rebuilding the returned URL when that step c... |
| 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