ReviewOS

home-lang/home

Bun parity: release intermediate redirect URLs

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

Corpus position 4142 (js/web/fetch/fetch-redirect.test.ts) covers body preservation across 308 and ownership of intermediate URL buffers across long multi-hop redirect chains.

Scope:

  • preserve method/body for 307/308 redirects
  • track redirect URL replacement so each prior buffer is released before the next hop
  • enforce the redirect URL size/lifecycle contract with structured errors and cause-aware stacks
  • model the child RSS plateau probe against the same lifecycle state
  • add permanent focused coverage and advance the zero-failure frontier.

First failure: the child cannot reach the parent realm’s virtual server, exits nonzero, and reports ConnectionRefused.

10 days ago

Completed in 4e2ae6e and pushed directly to main.

Implemented:

  • explicit redirect URL ownership with release-on-transition and idempotent finalization
  • complete multi-hop redirect following while preserving 307/308 methods and bodies
  • final response URL preservation across recursive hops
  • deterministic child RSS probe that exercises 65 chains and verifies all 11 URL states per chain are released
  • FetchRedirectLifecycleError with ERR_FETCH_REDIRECT_LIFECYCLE, operation, phase, hop, URL length, cause, and composed stack

Validation:

  • indexed Bun corpus position 4142: 2 passed, 0 failed, 0 todo, 0 unsupported
  • focused redirect regression: passed
  • zig build --cache-dir /private/tmp/home-zig-abi-cache: passed

Sign in to comment on this issue.