Honor per-operation retry policies in the generated client

Merged
CO
2mo ago
+251-50

What changed

The generated Go client now reads each operation's x-hey-retry contract:

  • maxAttempts sets the operation default attempt budget
  • retryOn sets the operation-specific HTTP status list
  • explicit WithRetryConfig still overrides the attempt count, while retryable statuses remain contract-defined
  • the credential-refresh resend and Hooks.OnRetry behavior added by #137 and #139 remain intact

The patch is limited to the Go client template, its regenerated output, and one Go-only conformance case plus the runner support needed to discover it. The case uses DeleteBoxDesignation: one call stops immediately on undeclared 500, then a second call retries declared 503 once and stops at the operation's two-attempt limit before a 200 sentinel.

Rust retry behavior and the higher-level hey.Client default retry override are intentionally unchanged.

Validation

  • GOWORK=off mise exec -- make check
  • Go conformance: 188/188
  • Rust conformance: 187/187
  • generated output reproduces byte-for-byte