ReviewOS

home-lang/home

Bun parity: port Request subclass and constructor semantics

#379
Closed chris opened this 10 days ago ·
10 days ago

Parent: #66 Predecessor: #378

Frontier: js/web/request/request-subclass.test.ts at corpus position 4176, copied unchanged from ~/Code/bun.

Current blocker: Home classifies the module as unsupported syntax before execution.

Scope:

  • Lower the Request subclass syntax without editing the copied corpus.
  • Preserve subclass construction, inherited Request fields/body behavior, method overrides, and instanceof/prototype identity.
  • Match Bun constructor and clone behavior for subclass instances.
  • Add permanent native regressions for subclass semantics and actionable constructor/clone failures.
  • Advance the contiguous zero-failure/zero-unsupported ledger and update #66.
10 days ago

Completed and pushed in 9c3a360 (feat(fetch): port Request subclass semantics).

Verified unchanged Bun corpus:

  • Position 4176, js/web/request/request-subclass.test.ts: 2 pass, 0 fail/todo/unsupported.
  • Position 4177, js/web/request/request.test.ts: 4 pass, 0 fail/todo/unsupported.

Implementation:

  • Erases the type-only RequestInit import and three TypeScript constructor annotations without editing the copied corpus.
  • Preserves actual class inheritance, overridden method, url, and headers getters, Bun.serve propagation, resource cleanup, invalid-header synchronous throws, and the upstream 10,000-iteration GC/crash loop.
  • Adds a permanent native regression that checks the semantic anchors survive lowering and executes both subclass tests.

Verification:

  • Focused corpus: 2 files, 6 pass, 0 fail, 0 todo, 0 unsupported.
  • Expanded focused native suite passes.
  • Full zig build --cache-dir /private/tmp/home-zig-abi-cache passes.

Cumulative contiguous ledger through position 4177: 518 files, 7,807 pass, 311 todo, 172 allowed-empty, 0 fail, 0 unsupported.

Next frontier: position 4178, js/web/streams/compression.test.ts, failing Brotli decompression with The compressed data was invalid.

Sign in to comment on this issue.