Repository navigation
Description
Summary
The container copy of the lab-ops-hub crawl validator (pkgs/lab-ops-hub/container/app.py) and its own test suite disagree about symbol hosts, and the suite fails on clean main:
test/test_container_validate.py::test_returns_idn_hosts_in_alabel_form(added by lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged #659, commit 120dd96) expectshttp://😀.com/→http://xn--e28h.com/.container/app.py::_judge_idna_label(category check added by lab-ops-hub: PR #584's A-label check still accepts decoded labels that are not valid UTS-46 labels — mapped/compatibility characters, IDNA-disallowed symbols, leading combining marks #588, commit d7d0692) refuses every label containing a punctuation/symbol/separator-category character (categories P/S/Z, plus Co/Cs), so😀(So) raisesValueError: ... IDNA-disallowed punctuation, symbol or separator character.
The Worker copy (src/lib.ts::validateCrawlUrl) judges the WHATWG-parsed host (new URL punycodes it) and carries no category check — it accepts the host. Verified with Node's WHATWG domainToASCII this run: 😀.com → xn--e28h.com, ¤.com → xn--bba.com, ×.com → xn--rca.com, €.com → xn--lzg.com, while ¨.com, ´.com, ‾.com → rejected (empty). So WHATWG accepts So/Sc/Sm symbols broadly and refuses only some — the container check is both stricter than the Worker (So/Sc/Sm) and matched to it elsewhere; #588's comment ("a currency/math symbol passed while the Worker refuses it") does not hold for the URL-parser path the Worker actually uses.
Evidence (2026-11-11, lane code-v, task 14507)
- On pristine current main, in a venv with the pinned
container/requirements.txt(idna 3.18):npm test— TypeScript suite passes; Python suite 73/74, sole failure the case above. - This is one of the divergences that merged unverified while the lab-ops-hub workflow was dispatch-only + disabled_manually (ci(lab-ops-hub): test workflow is dispatch-only AND disabled_manually — SSRF validator suites have not run since 2026-11-01 (last run: failure) while three validator fixes merged #7715).
Decision needed / acceptance
- Decide the intended policy for symbol labels in the container validator: match WHATWG/Worker (accept what
domainToASCIIaccepts, refuse what it refuses) or keep the stricter IDNA2008 stance and change the lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged #659 test expectation — with the security rationale recorded either way (this is the SSRF guard for a publicly reachable crawler, so the choice is a policy call, not a mechanical fix). - Whichever way it lands: container suite + TS suite both green, and the two copies' behavior on a shared symbol-host corpus (😀, ¤, ×, €, ¨, ´, ‾) is identical or the divergence is documented in both codebases.
Found by: queue lane code-v while restoring the #7715 workflow (task 14507, PR #8426).
Activity
developing-today commentedon Nov 11, 2026
CODE-2509
fix(lab-ops-hub): WHATWG parity for symbol hosts in container validat…
dezren39 commentedon Nov 14, 2026
state: done — decision landed
task: 14507 · lane: code-a
Decision: match WHATWG/Worker (recorded here per this issue's acceptance ask). The #588 category check's premise — that the Worker refuses currency/math symbols — is false for the WHATWG URL path: Node domainToASCII accepts So/Sc/Sm (😀->xn--e28h, ¤->xn--bba, ×->xn--rca, €->xn--lzg, ¢ mid-label -> xn--example-3ha; re-verified this session) and refuses Sk (¨, ´) and Po (‾). Security rationale: accepting So/Sc/Sm is not an SSRF weakening — these labels resolve through ordinary public DNS to the same A-label form the Worker certifies; the private/loopback/link-local protection lives in the address checks, not the category rule. The stricter IDNA2008 stance bought only a permanent two-copy divergence and a red suite.
Landed: PR #9735 (squash a1ef9a7) narrows the refusal to P/Z + Sk, keeps Co/Cs and the CONTEXTO exceptions, moves the two Sc test cases to accepted controls, and adds test_symbol_hosts_match_whatwg_parity pinning the Node-verified battery in raw and A-label forms. Verification: before the fix, clean-main suite failed 1/78 (the 😀 case); after, Python suite 82 tests OK (pinned venv) and TypeScript suite 116 pass / 0 fail. The workflow half of the parent issue #7715 landed separately (PR #8426, policy-conformed); its main run is being tracked there. Closing this issue as complete.