ReviewOS

home-lang/home

Port gRPC server error and transport boundaries

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

Bun corpus source

  • js/third_party/grpc-js/test-server-errors.test.ts
  • sequential corpus position: 3993

Scope

  • model unary, client-streaming, server-streaming, and bidi client/server call boundaries
  • enforce request/response serialization, deserialization, cardinality, and message-size failures
  • propagate server errors and trailing metadata exactly once
  • preserve handler/serializer causes with client/server operation stacks
  • make pending async failures report bounded gRPC lifecycle breadcrumbs
  • add focused and permanent regression coverage

Tracking: #66

10 days ago

Implemented and pushed in 93e0f27b1 (feat(third-party): port gRPC server errors).

This ports all 34 assertions in Bun corpus position 3993 (js/third_party/grpc-js/test-server-errors.test.ts), including:

  • malformed request/response serialization and deserialization across unary, client-streaming, server-streaming, and bidi RPCs
  • client/server cardinality mismatches with UNIMPLEMENTED
  • trailing metadata and status propagation for every RPC shape
  • UTF-8/comma status details and data-before-error ordering
  • uncompressed/compressed request and response maximum-message-size failures
  • generic client constructors and compression algorithm compatibility used by the upstream suite

Error handling is intentionally diagnostic rather than opaque: server failures retain the original cause, code, details, trailers, RPC operation, and target, and synthesize a ServerHandler.<operation> stack frame plus Caused by: chain. Pending async failures now include a bounded gRPC lifecycle breadcrumb trail. A permanent regression suite locks these contracts at 20/20 assertions.

Validation:

  • position 3993: 34 passed, 0 failed, 0 todo, 0 unsupported
  • positions 3990–3993: 63 passed, 0 failed, 0 todo, 0 unsupported
  • positions 3970–3978: 55 passed, 0 failed, 1 existing todo, 0 unsupported
  • permanent corpus accounting, gRPC diagnostics, SQL adapter contracts, and third-party mini-suite: all green
  • zig fmt --check and git diff --check: clean

Cumulative ledger through position 3993: 335 executable files, 2,854 passed, 213 todo, 0 failed, 0 unsupported, 171 allowed-empty.

Tracked from umbrella #66.

Sign in to comment on this issue.