ReviewOS

home-lang/home

Bun parity: suppress response bodies for null-body HTTP statuses

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

Scope

Implement Bun-compatible server response framing for HTTP statuses that cannot carry a body. The unchanged Bun corpus currently fails does not write body bytes for null body statuses in test/js/bun/http/serve.test.ts.

Evidence

Validated against Bun checkout 4982b91e3702094330f3be3883354c52b8c01323 with:

HOME_NATIVE_VM=1 HOME_CORPUS_FULL_VM=1 ./zig-out/bin/home test packages/runtime/test/test/js/bun/http/serve.test.ts

The complete file reports 188 pass, 1 upstream skip, 1 upstream todo, and 11 failures. This issue owns the null-body-status failure only.

Acceptance criteria

  • Match Bun for informational, 204, 205, and 304 response-body handling exercised by the unchanged matrix.
  • Emit no forbidden body bytes or conflicting framing.
  • Restore this exact upstream test without rewriting, skipping, relaxing, or reducing its assertions.
  • Keep the full serve.test.ts suppression until every focused blocker linked from #66 is resolved.
9 days ago

Implemented and pushed in b4effd236ab23cd3572d28ccc56665b9785e2972.

Ported Bun's null-body response path for statuses 101, 103, 204, 205, and 304 without changing the upstream test. The exact does not write body bytes for null body statuses case now passes for all three exercised statuses.

The complete unchanged serve.test.ts matrix improved from 188 pass / 11 fail to 192 pass / 7 fail with no regressions.

Sign in to comment on this issue.