ReviewOS

home-lang/home

Port Bun gRPC channel and server idle timers

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

Scope

Port Bun corpus position 3981, js/third_party/grpc-js/test-idle-timer.test.ts, into Home's shared Node/gRPC compatibility bootstrap.

Required contracts

  • client channels become READY after requests and waitForReady
  • client idle timeouts transition channels to IDLE, with the gRPC minimum of one second
  • requests reconnect successfully after an idle transition
  • Unix-domain-socket targets follow the same lifecycle
  • server grpc.max_connection_idle_ms disconnects idle clients
  • watchConnectivityState supports deadline-bounded state observation
  • lifecycle failures retain causes and add actionable operation/target stack frames

Verification

  • focused Bun corpus file passes with no unsupported cases
  • shared gRPC diagnostics remain green
  • SQL adapter and permanent third-party regression gates remain green
10 days ago

Implemented and pushed in a46582776.

Completed contracts:

  • client request and waitForReady activity transitions channels to READY
  • grpc.client_idle_timeout_ms transitions inactive clients to IDLE and enforces the one-second minimum
  • requests reconnect after an idle transition
  • Unix-domain-socket targets use the same lifecycle through target-aware server lookup
  • grpc.max_connection_idle_ms transitions inactive clients to IDLE
  • watchConnectivityState supports deadline-bounded transition observation
  • watcher deadline errors preserve cause and add operation, target, and source-module stack context

Verification:

  • focused Bun corpus: 8 passed, 0 failed, 0 todo, 0 unsupported
  • permanent gRPC diagnostics: 8 passed
  • SQL adapter contracts: passed
  • permanent third-party JWT/utility mini-suite: passed
  • zig fmt --check and git diff --check: passed

The cumulative checkpoint is now 323 files, 2,661 passed, 209 todo, 0 failed, 0 unsupported, and 171 allowed-empty through position 3981.

Sign in to comment on this issue.