ReviewOS

home-lang/home

Remove stale Request subclass and fetch preconnect corpus rewrites

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

Two routed Bun fixtures still receive source mutations even though their behavior should be covered by the shared module/TypeScript pipeline:

  • js/web/request/request-subclass.test.ts has its type-only import and constructor annotations removed by a fixture-specific rewrite;
  • js/web/fetch/fetch-preconnect.test.ts has its side-effect harness import replaced manually.

Delete both rewrite functions, run the byte-identical pinned Bun fixtures unchanged, and fix shared machinery only if the raw sources expose a real gap. Pinned Bun baseline: 2 pass for Request subclass and 12 pass for fetch.preconnect.

9 days ago

Fixed and pushed to main in a0e4e7b (test(runtime): remove stale web corpus rewrites).

Landed:

  • deleted rewriteRequestSubclassCorpus and rewriteFetchPreconnectCorpus;
  • taught the shared module lowerer that undici-types is declaration-only, so its imports are erased across import forms;
  • accepted compact side-effect import syntax (import"harness") produced by the production parser;
  • added a focused compact-import unit; the existing Request subclass preparation/runtime unit continues to assert that annotations and the type-only package are absent.

The two copied fixtures remain byte-identical to pinned Bun 4982b91e3. Pinned Bun baselines are Request subclass 2 pass / 0 fail and fetch.preconnect 12 pass / 0 fail. Home Debug and ReleaseSafe routed execution now matches the combined baseline at 14 pass / 0 fail / 0 TODO / 0 unsupported. Strict Request is 2 pass / 0 fail.

Strict fetch.preconnect still has an independent pre-existing production CLI gap in its --fetch-preconnect subprocess case (11 pass / 1 unchanged 5s timeout); that is isolated in #612 rather than hidden by this source-rewrite removal.

Sign in to comment on this issue.