Skip to content

Add artifact limits and shared rate-limit transport - #102

Merged
andrew merged 2 commits into
mainfrom
shared-fetch-policies
Oct 18, 2026
Merged

andrew merged 2 commits into
mainfrom
shared-fetch-policies

Conversation

@andrew

@andrew andrew commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Add fetch.WithMaxArtifactSize for declared and streamed response bodies, including observed downloads. Reject oversized declarations before reading, accept exact-limit bodies, and keep observations incomplete on overflow. Local size rejections do not trip circuit breakers.

Add an optional client.RateLimitGate that can be shared by metadata and artifact HTTP clients. Expose typed held errors, hold snapshots, prechecks, and callbacks for logging and metrics. Share overflow-safe Retry-After parsing with the metadata client, support HTTP dates, and cap repeated fallback holds without overflowing. Metadata retries stop on held errors and on 429 responses with a usable Retry-After. No new dependencies.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@andrew
andrew merged commit 5885b7d into main Oct 18, 2026
6 checks passed
@andrew
andrew deleted the shared-fetch-policies branch October 18, 2026 16:24
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