Skip to content

docs(capability-matrix): add the request_timeout spec - #191

Draft
grdsdev wants to merge 1 commit into
mainfrom
guilherme/sdk-1789-request-timeout-spec
Draft

grdsdev wants to merge 1 commit into
mainfrom
guilherme/sdk-1789-request-timeout-spec

Conversation

@grdsdev

@grdsdev grdsdev commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Adds specs/database/configuration/request_timeout.md for database.configuration.request_timeout, written alongside the Swift implementation in supabase/supabase-swift#1343.

What the spec says

  • The construction-time value applies to every request, including retried attempts; a per-request override, where offered, wins for that request.
  • The unit is the platform's idiomatic duration type (milliseconds in JavaScript, Duration in Swift). Each SDK documents its unit and any default it applies when nothing is set.
  • Either a total deadline or an idle timeout (no bytes moved for the interval) satisfies the capability; the SDK documents which. On firing, the in-flight request is cancelled and a timeout error distinguishable from a server error is surfaced.
  • Non-positive values are treated as unset, never as "fail immediately".
  • The bound applies per retry attempt and composes with caller-initiated cancellation.

Open question for CODEOWNERS

The capability description in capabilities/database.yaml says "in milliseconds" and "once the deadline is reached". This spec deliberately loosens both so that Swift's URLRequest.timeoutInterval (seconds, idle) and postgrest-js's AbortController (milliseconds, deadline) both qualify. If the team prefers deadline semantics as the contract, the Swift implementation needs a withTimeout(clock:) wrapper instead, and this spec should say so before more SDKs implement it.

npm run validate passes.

Relates to SDK-1789.

Describes the construction-time and per-request timeout contract for
database.configuration.request_timeout: unit and default are documented
per SDK, deadline or idle semantics both satisfy it, the bound applies
per retry attempt, and it composes with caller-initiated cancellation.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

Comment @coderabbitai help to get the list of available commands.

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