ReviewOS

home-lang/home

Port gRPC retry service-config validation

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

Bun corpus source

  • js/third_party/grpc-js/test-retry-config.test.ts
  • sequential corpus position: 3989

Scope

  • expose executable validateServiceConfig behavior through the gRPC bootstrap
  • validate retry, hedging, and retry-throttling policy fields and status codes
  • preserve upstream-compatible validation messages
  • attach stable error codes, policy paths, causes, and operation/source frames to rejected configurations
  • add focused and permanent regression coverage

Tracking: #66

10 days ago

Implemented and published in 99efb34e7 (feat(third-party): port gRPC retry validation).

What landed:

  • executable validateServiceConfig support for retry, hedging, and retry-throttling policies
  • validation for attempts, backoff durations, multipliers, token limits/ratios, and numeric/named status codes
  • upstream-compatible rejection messages across all copied Bun cases
  • structured ERR_GRPC_SERVICE_CONFIG failures with policy, path, preserved cause, and ServiceConfig.validateServiceConfig operation/source stack frames
  • separate validation and legacy parse-error constructors, preventing helper shadowing and retaining existing ERR_INVALID_ARG_VALUE behavior
  • TypeScript lowering for the copied retry-config test and permanent third-party coverage

Verification:

  • exact Bun file: 28 passed, 0 failed, 0 todo, 0 unsupported
  • affected gRPC positions 3985–3989: 98 passed, 4 upstream todos, 0 failed, 0 unsupported
  • permanent gRPC diagnostics: 16 passed
  • permanent SQL adapter and third-party mini-suite gates: passed
  • zig fmt --check packages/home_test/src/corpus_runner.zig: passed
  • git diff --check: passed

Sequential corpus ledger through position 3989: 331 executable files, 2,791 passed, 213 upstream todos, 0 failed, 0 unsupported, 171 intentionally allowed-empty files.

Tracking: #66

Sign in to comment on this issue.