ReviewOS

home-lang/home

Bun parity: validate Bun.serve TLS and low-memory options

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

Scope

Implement Bun-compatible validation for Bun.serve options currently accepted incorrectly by Home. The unchanged Bun corpus failures are:

  • should error with invalid options > requestCert
  • should error with invalid options > rejectUnauthorized
  • should error with invalid options > lowMemoryMode

Evidence

Validated against Bun checkout 4982b91e3702094330f3be3883354c52b8c01323 in test/js/bun/http/serve.test.ts. The complete Home run reports 188 pass, 1 upstream skip, 1 upstream todo, and 11 failures.

Acceptance criteria

  • Match Bun option type/range validation and error behavior for all three options.
  • Preserve valid TLS and low-memory configurations.
  • Pass the unchanged upstream cases without rewrites, skips, or weakened assertions.
9 days ago

Implemented and pushed in b4effd236ab23cd3572d28ccc56665b9785e2972.

Home's generated-binding mirror now requires actual booleans for TLSOptions.requestCert, TLSOptions.rejectUnauthorized, and TLSOptions.lowMemoryMode instead of applying truthy coercion. All three exact unchanged Bun cases pass with their expected error messages, and the surrounding multi-TLS validation case remains green.

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.