Skip to content

Preserve HTTP status across response read failures - #4

Merged
JAORMX merged 1 commit into
mainfrom
fix/http-status-retries
Sep 21, 2026
Merged

JAORMX merged 1 commit into
mainfrom
fix/http-status-retries

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve known API status and safe metadata when gzip initialization or body reading fails.
  • Keep retry decisions status-driven; non-retryable 4xx responses no longer become connection retries.
  • Preserve caller cancellation, response-size bounds, and exactly-once body closure.
  • Clarify transport-only timeout scope and caller-owned shared transport cleanup.

Verification

Offline tests, race tests, vet, and independent review passed. Public-path tests cover 401/422 failures, 429/529 retries with I/O retry flags disabled, retry delays, size limits, cancellation, and attempt timeouts. No live inference.

Stacked on #3. Merge #3 first, then retarget this PR to main. No new SDK policy or orchestration API.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX
JAORMX changed the base branch from fix/usage-accounting to main September 21, 2026 11:13
@JAORMX
JAORMX merged commit 143bdef into main Sep 21, 2026
2 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.

1 participant