Skip to content

Phase 7a: client retries with backoff + gzip @requestCompression + consumer OS matrix - #15

Merged
aaylward merged 2 commits into
mainfrom
claude/smithy-cpp-generator-plan-fpeqzt
Jul 7, 2026
Merged

aaylward merged 2 commits into
mainfrom
claude/smithy-cpp-generator-plan-fpeqzt

Conversation

@aaylward

@aaylward aaylward commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

First Phase 7 hardening slice: client-side retries, @requestCompression (gzip) on both sides of the wire, and the consumer acceptance job on the full OS matrix.

Retries (//runtime:client)

  • smithy::RetryPolicy — full-jitter exponential backoff (uniform(0, min(max_backoff, initial_backoff × 2^(n-1)))), defaults 3 attempts / 100ms / 20s cap, with injectable sleep/jitter so tests run instantly and deterministically.
  • smithy::SendWithRetries retries transport failures flagged retryable and the transient statuses every Smithy SDK retries (429/500/502/503/504); everything else returns immediately. Generated clients now send through it.
  • Generated protocol/smoke/integration suites pin retry.max_attempts = 1 to stay wire-exact; a new weather e2e test drives the generated client through transient transport failures and verifies recovery.

@requestCompression gzip (//runtime:compression, zlib via BCR)

  • GzipCompress/GzipDecompress with a decompression-bomb output cap (64 MB default) and trailing-garbage rejection.
  • Client: bodies of @requestCompression(encodings: ["gzip"]) operations at least ClientConfig.request_min_compression_size_bytes (Smithy default 10240) are gzipped, appending gzip to any member-bound Content-Encoding header.
  • Server: generated routes for such operations transparently gunzip requests arriving with Content-Encoding: gzip (or ..., gzip) and reject malformed gzip with a 400 serialization error.
  • The suite's two client compression cases (SDKAppliedContentEncoding_restJson1, SDKAppendedGzipAfterProvidedEncoding_restJson1) are un-excluded and green; the exclusion list only shrank. ~1,175 conformance cases still pass.

Consumer CI OS matrix

The quick-start out-of-tree module job now runs on linux/macos/windows (the consumer .bazelrc already carried per-OS C++20 flags), closing the Phase 6 follow-up.

Docs

New docs/production-guide.md (timeouts, retry tuning, compression semantics), plus runtime overview, server guide, and README status updates.

Validation

  • bazel test //... — 43/43 green (gcc and clang, plus ASan+UBSan)
  • restJson1 + rpcv2Cbor conformance suites green, exclusions only removed
  • out-of-tree consumer module green against the updated bazel/defs.bzl
  • regeneration is byte-stable; clang-format/clang-tidy/buildifier clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01WjaNFwBZxoHdqagvq8ycQf


Generated by Claude Code

claude added 2 commits July 7, 2026 07:11
Client robustness and the first Phase 7 hardening slice:

- runtime //runtime:client gains RetryPolicy (full-jitter exponential
  backoff, injectable sleep/jitter) and SendWithRetries: transport
  failures flagged retryable and transient statuses (429/500/502/503/504)
  are retried up to max_attempts (default 3). Generated clients send
  through it; generated test suites pin max_attempts = 1 to stay
  wire-exact, and a weather e2e test drives the generated client through
  transient transport failures.

- runtime //runtime:compression (zlib via BCR): GzipCompress /
  GzipDecompress with a decompression-bomb output cap and
  trailing-garbage rejection. Generated clients gzip request bodies of
  @requestCompression operations at the Smithy-default 10 KiB threshold
  (ClientConfig.request_min_compression_size_bytes), appending to any
  member-bound Content-Encoding header; generated server routes
  transparently gunzip such requests and reject malformed gzip with a
  400 serialization error. The suite's two client compression cases are
  un-excluded and green; ~1,175 conformance cases still pass.

- consumer CI job now runs the quick-start module on the full OS matrix
  (linux/macos/windows); bazel/defs.bzl adds //runtime:compression to
  the generated-library deps.

- docs: new production guide (timeouts, retries, compression), runtime
  overview + server guide + README status updates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WjaNFwBZxoHdqagvq8ycQf
@aaylward
aaylward merged commit e3dbb08 into main Jul 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants