ReviewOS

home-lang/home

Bun parity: implement development-mode /bun:info server diagnostics

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

Scope

Implement Bun-compatible /bun:info handling for development servers. The unchanged Bun corpus currently fails:

  • only serves /bun:info to loopback clients in development mode
  • serves /bun:info over a unix socket in development mode

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

  • Serve Bun-compatible diagnostic content only in development mode and only to allowed local clients.
  • Support the same behavior on TCP loopback and Unix sockets.
  • Preserve non-development and non-loopback behavior.
  • Pass the unchanged upstream cases without rewrites, skips, or weakened assertions.
9 days ago

Resolved by fe85ff1.

Home now serves the authentic development-mode /bun:info payload instead of the placeholder {}:

  • restored BunInfo version plus OS, architecture, and real OS-version generation
  • updated generic JSON struct reflection for Zig 0.17
  • added the exact IPv4/IPv6 loopback predicate and Unix-socket authorization behavior
  • reused the predicate for the protected Chrome DevTools route
  • replaced the macOS version-capability no-op export with the real implementation

Validation:

  • exact upstream /bun:info filter: 2 pass, 0 fail, 7 assertions
  • unchanged full serve.test.ts: 194 pass, 1 upstream skip, 1 upstream todo, 5 fail; the only residual failures are the response-stream backpressure cases tracked in #685
  • ReleaseFast/JSC install build passed
  • final home_rt: substrate compiles: 4/4 passed.

Sign in to comment on this issue.