Skip to content

docs(capability-matrix): add specs for database and storage auto_retry - #190

Open
grdsdev wants to merge 2 commits into
mainfrom
guilherme/sdk-1791-auto-retry-specs
Open

grdsdev wants to merge 2 commits into
mainfrom
guilherme/sdk-1791-auto-retry-specs

Conversation

@grdsdev

@grdsdev grdsdev commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds spec files for two existing feature IDs that had none. Each spec has a decision flowchart.

  • database.configuration.auto_retry: a fixed rule. GET/HEAD only, 503/520 or a network failure, 4 attempts in total, a per-client switch and a per-request override in either direction. Full-jitter backoff (1 s base, 30 s cap). Retry-After is honoured up to 30 s; a longer value ends the retries. X-Retry-Count: n on the n-th retry. Cancellation, errors from caller-supplied hooks, and decoding errors are never retried.
  • storage.configuration.auto_retry: reads only (GET, HEAD, and the two list POSTs). Statuses 408, 429 (only with Retry-After), 500, 502–504, 520–524, 530. A per-client attempt count (default 3, 1 turns retries off). Full-jitter backoff (500 ms base, 20 s cap). Retries end when a streamed download returns.

How the SDKs compare today

JS Swift Flutter Python Kotlin Go C#
Database on by default yes yes yes yes yes yes no
methods GET/HEAD/OPTIONS GET/HEAD GET/HEAD GET/HEAD GET/HEAD GET/HEAD all
statuses 503, 520 503, 520 503, 520 wide set 503, 520 503, 520 408, 429, 5xx
attempts 4 4 4 4 4 4 1
jitter none full ±25 % partial none none full
Retry-After over cap waits in full clamps no retry no retry ignored waits in full ignored
Storage retry none reads, on uploads only, off GET/HEAD, on none no module metadata, off

The divergences from these specs become issues in each SDK repository after merge.

bun run validate passes. Written alongside supabase/supabase-swift#1341. Linear: SDK-1791.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 48 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e6ee90b6-2412-401c-97a7-64e47c6425ed
Commits

Reviewing files that changed from the base of the PR and between cac8325 and c00ebb5.

Files selected for processing: 2

  • packages/capability-matrix/specs/database/configuration/auto_retry.md
  • packages/capability-matrix/specs/storage/configuration/auto_retry.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

grdsdev and others added 2 commits November 26, 2026 06:31
PostgREST's rule is fixed (GET/HEAD, 503/520, 4 attempts, on/off switch
only); Storage's is configurable. Both share full-jitter capped backoff,
Retry-After honoured up to the cap, stop on cancellation, and no replay
of one-shot bodies or of errors thrown by caller-supplied code.

Refs SDK-1791, supabase/supabase-swift#1341.

Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite both specs as normative contracts per the current TEMPLATE, after
comparing the retry code in all seven SDKs. Add a decision flowchart to each.

Database: state the per-request override works both ways, define what
counts as a transport failure, and stop retrying when Retry-After exceeds
the 30 s cap instead of clamping it.

Storage: restrict replays to reads (GET, HEAD and the two list POSTs),
drop the Idempotency-Key rule that the Storage API does not honour, retry
429 only with Retry-After, make the attempt count the only knob, and stop
retries once a streamed download returns.

This branch has not been deployed

No deployments
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