ReviewOS

home-lang/home

Fix routed Deno URL hostname and URLSearchParams iteration parity

#610
Closed chris opened this 9 days ago ·
9 days ago

The unchanged pinned Bun Deno URL corpus exposes two remaining routed-realm compatibility defects:

  • the native WHATWG bridge can return an empty hostname for bracketed IPv6 literals even though the canonical host-with-port component is available;
  • the URLSearchParams compatibility wrapper implements forEach() through the overridable public entries() method instead of the internal parameter list.

Fix both shared semantics without modifying upstream fixtures, then verify the focused URL files and the full Deno corpus in strict and routed modes.

9 days ago

Fixed and pushed to main in 77fa3b9 (fix(runtime): preserve URL authority semantics).

What landed:

  • derives URL host/hostname from WebKit’s canonical authority when the component binding is empty for bracketed IPv6, while preserving parsed port separation;
  • validates bracketed hostname assignments through the native WHATWG parser instead of UTS #46 domain conversion;
  • preserves an empty-query marker in href while keeping .search === "", and clears it on URLSearchParams mutation;
  • makes URLSearchParams.prototype.forEach() use the captured internal-list implementation rather than an overridable public entries() method;
  • strengthens the native bridge unit with [::1]:8080.

Verification against unchanged pinned Bun fixtures:

  • focused URL + URLSearchParams, pinned Bun / Home Debug strict / Home Debug routed: 64 pass, 1 TODO, 0 fail;
  • full 16-file Deno directory, Debug and ReleaseSafe strict: 226 pass, 17 skip, 1 TODO, 0 fail;
  • full directory, Debug and ReleaseSafe routed: 226 pass, 18 deferred, 0 fail, 0 unsupported;
  • runtime units: 1,821 passed, 19 skipped, 0 failed;
  • git diff --check clean; no heap snapshots.

Sign in to comment on this issue.