Skip to content

chore: register the remaining public API in the capability matrix - #1673

Merged
spydon merged 10 commits into
mainfrom
chore/register-remaining-symbols
Aug 10, 2026
Merged

spydon merged 10 commits into
mainfrom
chore/register-remaining-symbols

Conversation

@spydon

@spydon spydon commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1671. Closes the backfill that #1670 and #1671 flagged: capability-matrix coverage of the Dart public API goes from 49% to 100%.

before after
Symbols reported as public API 1831 1774
Registered 899 1766
Unregistered 930 0

How the 881 unregistered symbols were placed

26 are entry points the matrix was missing outright. These go in symbols, so the drift check now verifies them:

Feature Entry point
auth.session.update_user GoTrueClient.updateUser
auth.session.get_session / get_user GoTrueClient.currentSession / currentUser
auth.sign_in.sign_in_with_oauth GoTrueClient.getOAuthSignInUrl, GoTrueClientSignInProvider.signInWithOAuth
auth.sign_in.sign_in_with_sso GoTrueClientSignInProvider.signInWithSSO
auth.identities.link_identity GoTrueClientSignInProvider.linkIdentity
auth.passkey.* GoTruePasskeyApi.start/verifyRegistration, start/verifyAuthentication
database.query.from_table / rpc / schema_selection SupabaseClient.from / rpc / schema
database.using_modifiers.explain PostgrestTransformBuilder.explain
realtime.subscriptions.postgres_changes RealtimeChannel.onPostgresChanges, onSystemEvents
realtime.client.* SupabaseClient.channel, getChannels, removeChannel, removeAllChannels, RealtimeClient.disconnect
storage.file_buckets.create_signed_url StorageFileApi.createSignedUrl
client.* GoTrueClient.getSessionFromUrl, recoverSession, setInitialSession

Several of these features previously listed only an option or enum as their evidence. storage.file_buckets.create_signed_url claimed DownloadBehavior; database.using_modifiers.explain claimed ExplainFormat; auth.session.update_user claimed UserAttributes.currentPassword. The method that actually implements the capability was unregistered in each case.

500 go in a feature's supporting_symbols, where the type maps onto one capability: the MFA response types to their operations, Jwt*/JWK*/DecodedJwt to get_claims, FileObjectV2 to file_info, SignedUrl* to create_signed_urls, the presence payloads to subscribe_presence, and so on.

355 go in the top-level supporting_symbols list. Four kinds:

  • Shared domain models — Session, User, AuthResponse, Bucket, OAuthClient, Factor. Accepted or returned by many features at once, so no single feature id is a truthful home.
  • Exception hierarchies — AuthException, PostgrestException, FunctionException, RealtimeSubscribeException and subclasses. Thrown rather than passed, so reachable from no signature.
  • Client and sub-API handles — SupabaseClient, GoTrueClient, RealtimeClient, GoTrueAdminApi and the accessors returning them gate whole areas; their operations are attributed individually.
  • Surface with no canonical id — see the last section.

26 symbols left the scan instead of entering the matrix

#1671's script only matched class-like declarations, so top-level functions and variables slipped through. Now @internal:

  • realtime_client/src/transformers.dart: convertCell, convertColumn, convertChangeData, toArray, toBoolean, toDouble, toInt, toJson, toTimestampString, noop, httpEndpointURL, getEnrichedPayload, getPayloadRecords
  • conditional-import platform shims: accessToken, hasAccessToken, persistSession, removePersistedSession, disposePreviousClient, markClientToDispose, supabaseFlutterClientToDispose, getBroadcastChannel, createWebSocketClient
  • passkeyRegisterRequestFromOptions, passkeyAuthenticateRequestFromOptions, maxShift, defaultHeaders

ChannelFilter joins them, and this one is worth a second look: it is hidden from realtime_client's public library, so ChannelFilter.select could never have been drift-verified evidence for realtime.subscriptions.postgres_changes. RealtimeChannel.onPostgresChanges replaces it.

Two paths cannot carry the annotation, so .sdk-parse-ignore excludes them:

  • packages/*/example/ — each package ships its own example app, and the extractor treats it as a package of its own because it has a pubspec.yaml. MyApp, MyWidget and main were counted as SDK public API. examples/ was already excluded for exactly this reason.
  • packages/*/lib/src/version.dart — the release tooling rewrites it wholesale (echo "const version = '$version';" > ...), so an annotation would not survive a release.

One behaviour-visible change

realtime_client.dart changes from export 'src/transformers.dart' hide getEnrichedPayload, getPayloadRecords to show PostgresColumn, PostgresType. The 13 payload-conversion helpers above were public only by accident of that hide list, and the analyzer requires it: @internal on an exported member is invalid_export_of_internal_element. The show form also stops the next helper added to that file from leaking.

This removes public API. It is not API anyone should be calling (toInt, noop, convertCell), and v3 is already removing dead public surface, but it is the one item here that is not purely additive.

Also declared: storage.errors.error_codes

The validator reported it undeclared, and StorageException.error already carries the machine-readable service code the capability describes. Declared as implemented, which also gives StorageException a real home instead of the shared bucket.

Gaps this surfaced

Public API with no canonical capability id, currently parked in the top-level list. Each is a candidate for a new id in supabase/sdk:

  1. Client construction and disposal — Supabase.initialize, Supabase.instance, Supabase.client, isInitialized, and dispose on every client. client.* has no lifecycle group at all.
  2. User-facing passkey management — GoTruePasskeyApi.list, delete, update. The matrix has auth.passkey_admin.list_passkeys and delete_passkey for the admin API, but nothing for a user managing their own.
  3. Realtime streams as a database capability — SupabaseQueryBuilder.stream and SupabaseStreamBuilder. The stream filters and modifiers are registered under database.using_filters.* and using_modifiers.*, but stream() itself is not a capability.
  4. Storage retry configuration — StorageClientOptions.retryAttempts and StorageRetryController. database.configuration.auto_retry exists; there is no storage equivalent.
  5. realtime.subscriptions.postgres_changes_multiple_filters is the one remaining undeclared feature, and Dart implements it (onPostgresChanges(filters: [...])). Declaring it needs RealtimeChannel.onPostgresChanges registered against two features, so it is left out here rather than adding a duplicate registration.

Two more judgement calls worth flagging:

  • RealtimeClient exposes transport internals — sendBuffer, stateChangeCallbacks, pendingHeartbeatRef, makeRef, ref, push, heartbeatTimer, reconnectTimer, and RealtimeChannel.canPush/trigger. Registered here because they are genuinely exported, but they read like @internal candidates for a future breaking change.
  • yet_another_json_isolate contributes 13 symbols with no Supabase capability behind them. Registered in the top-level list; it could instead be excluded from the scan the way supabase_common is.

Test plan

  • dart analyze packages/: No issues found. This is the real gate for invalid_internal_annotation, invalid_use_of_internal_member and invalid_export_of_internal_element.
  • Compliance validator: OK — compliance file is valid.
  • check-drift: ✅ No capability matrix drift detected.
  • check-api-symbols against chore: mark non-public declarations @internal #1671 as base: ✅ All new public API symbols are covered in the capability matrix. Nothing registered was removed, and nothing new is uncovered.
  • Uncovered symbol count recomputed from a fresh extraction: 0.
  • Checked for symbols registered in more than one place: 9, all pre-existing and deliberate (one method serving two capabilities, e.g. StorageFileApi.move for move and move_cross_bucket). This change adds none.
  • dart format packages/: 0 changed.
  • Tests, all passing: gotrue 471, realtime_client 205, postgrest 196, supabase 134, storage_client 210, supabase_flutter 65, functions_client 48. postgrest needs -j 1; run in parallel its test files race on the shared database reset helper, which varies the failure count run to run on unmodified code.

Summary by CodeRabbit

  • API Improvements

    • Clarified which lower-level SDK helpers are intended for internal use, improving API guidance and tooling.
    • Explicitly exposed realtime PostgreSQL column and type definitions for supported integrations.
  • Compatibility

    • Expanded SDK capability validation across authentication, database, storage, realtime, functions, persistence, passkeys, and client features.
    • Added broader coverage for public models, builders, responses, errors, enums, and utility types.
  • Bug Fixes

    • Improved type safety for persisted session data handling.

spydon added 2 commits August 7, 2026 16:22
The capability matrix extractor treats every non-underscore name in lib/ as
public API, without following exports. Plenty of implementation plumbing in
lib/src/ therefore counted as public surface that had to be either registered
in sdk-compliance.yaml or left as an unexplained gap. @internal is the marker
the extractor already honours for exactly this case, and the repo already uses
it on members; this extends it to the declarations themselves.

Annotates 24 declarations that are public by Dart's underscore rule but are
not reachable from their package's public library: HTTP plumbing (GotrueFetch,
Fetch, AuthHttpClient, GotrueRequestOptions, RequestMethodType, ApiVersion),
realtime transport internals (Push, Hook, Message, Serializer, RetryTimer and
their typedefs), per-package Constants, and a few helpers (Counter,
ToQueryParams, SupabaseAuth, the admin OAuth client response wrappers).

Deliberately excluded: anything with symbols registered in sdk-compliance.yaml
as capability evidence, since annotating those would hide them from the
extractor and break the drift check. That ruled out StorageBucketApi,
GoTrueAdminOAuthApi, GoTrueAdminCustomProvidersApi, GoTrueAdminMFAApi,
realtime's Constants and ChannelFilter. Also excluded File and YAJsonIsolate,
which are reachable publicly via conditional imports and exports.

functions_client gains a meta dependency, which it did not previously have.

Reported public surface drops from 1952 symbols to 1831.
Brings capability-matrix coverage of the Dart public API from 49% to 100%.

The 881 unregistered symbols split three ways:

- 500 are attributed to the capability they support, and 26 are entry points
  the matrix was missing outright (GoTrueClient.updateUser, SupabaseClient.from,
  RealtimeChannel.onPostgresChanges, StorageFileApi.createSignedUrl, ...).
- 355 go in the top-level supporting_symbols list: shared domain models, the
  exception hierarchies, the client handles that gate whole areas, and surface
  the canonical registry has no id for.
- 26 are not public API at all and leave the scan instead of entering the
  matrix. #1671's script only matched class-like declarations, so top-level
  functions and variables were missed: the realtime transformers, the
  conditional-import platform shims, and the passkey option mappers are now
  @internal. ChannelFilter joins them; it is hidden from realtime_client's
  public library, so it could not serve as evidence for postgres changes, and
  RealtimeChannel.onPostgresChanges replaces it there.

Two paths cannot carry the annotation and are excluded by .sdk-parse-ignore
instead: each package's own example app, which the extractor treats as a
package because it has a pubspec.yaml, and version.dart, which the release
tooling rewrites wholesale.

Also declares storage.errors.error_codes, which StorageException.error already
implements.
@spydon
spydon requested a review from a team as a code owner August 7, 2026 15:07
@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a466181a-362f-4a06-9207-75091d59965f

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea233d and 1957930.

📒 Files selected for processing (1)
  • sdk-compliance.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • sdk-compliance.yaml

📝 Walkthrough

Walkthrough

The PR marks implementation APIs as internal, narrows a realtime transformer export, adds an explicit String parameter type, excludes generated and example files from scanning, and expands capability-matrix coverage across SDK domains.

Changes

SDK surface and compliance coverage

Layer / File(s) Summary
Internal API annotations and realtime exports
packages/gotrue/lib/src/*, packages/postgrest/lib/src/*, packages/realtime_client/lib/*, packages/supabase_flutter/lib/src/*
Internal declarations receive @internal annotations. The realtime transformer export exposes PostgresColumn and PostgresType. The web storage function now types its session parameter as String.
Auth, database, and storage capability mappings
sdk-compliance.yaml
Capability mappings add authentication, OAuth, MFA, passkey, database, file-operation, image-transform, signed-URL, and storage symbols.
Realtime, session, and shared capability mappings
sdk-compliance.yaml, .sdk-parse-ignore
Capability mappings add realtime, functions, session persistence, headers, and shared public symbols. The scan excludes example applications and generated version.dart files.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: tr00d

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: registering remaining public API symbols in the capability matrix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/register-remaining-symbols

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.

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.

Pull request overview

This PR completes the backfill of the capability matrix (sdk-compliance.yaml) so that the Dart SDK’s extracted public API symbols are fully accounted for, and it tightens a small amount of accidentally-exported surface by marking helper declarations @internal and narrowing exports.

Changes:

  • Expanded sdk-compliance.yaml to register the remaining public API symbols (including missing entry points and supporting types) and added a new storage.errors.error_codes feature.
  • Marked various top-level helpers / shims as @internal so they no longer count as SDK public API symbols.
  • Narrowed realtime_client exports of transformers.dart from hide ... to show PostgresColumn, PostgresType to prevent future accidental leakage.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk-compliance.yaml Registers remaining public API symbols into capability matrix features/supporting symbols.
packages/supabase_flutter/lib/src/passkey/passkey_options_mapper.dart Marks passkey options mapping helpers @internal.
packages/supabase_flutter/lib/src/local_storage_web.dart Marks web local storage helpers @internal.
packages/supabase_flutter/lib/src/local_storage_stub.dart Marks stub local storage helpers @internal.
packages/supabase_flutter/lib/src/hot_restart_cleanup_web.dart Marks hot-restart cleanup hooks @internal for web.
packages/supabase_flutter/lib/src/hot_restart_cleanup_stub.dart Marks hot-restart cleanup hooks @internal for stub.
packages/realtime_client/lib/src/websocket/websocket_web.dart Marks createWebSocketClient @internal for web implementation.
packages/realtime_client/lib/src/websocket/websocket_stub.dart Marks createWebSocketClient @internal for stub implementation.
packages/realtime_client/lib/src/websocket/websocket_io.dart Marks createWebSocketClient @internal for IO implementation.
packages/realtime_client/lib/src/types.dart Marks ChannelFilter @internal (no longer treated as SDK public API evidence).
packages/realtime_client/lib/src/transformers.dart Marks transformer helpers @internal (keeps only intended public types).
packages/realtime_client/lib/src/retry_timer.dart Marks maxShift @internal.
packages/realtime_client/lib/realtime_client.dart Narrows exports of transformers to only PostgresColumn and PostgresType.
packages/postgrest/lib/src/constants.dart Marks defaultHeaders @internal.
packages/gotrue/lib/src/broadcast_web.dart Marks getBroadcastChannel @internal for web implementation.
packages/gotrue/lib/src/broadcast_stub.dart Marks getBroadcastChannel @internal for stub implementation.
.sdk-parse-ignore Excludes per-package examples and rewritten version.dart from API extraction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Stacked on #1673. Follow-up to the audit in that PR: of the 536 entries
in the top-level `supporting_symbols` list, ten were realtime transport
internals that had no business being public in the first place. They
were registered there for want of a better home, which was the wrong
answer.

## What becomes `@internal`

| Symbol | What it is |
|---|---|
| `RealtimeClient.sendBuffer` | Queue of callbacks awaiting a connection
|
| `RealtimeClient.stateChangeCallbacks` | The
`open`/`close`/`error`/`message` listener registry behind `onOpen` and
friends |
| `RealtimeClient.ref` | Message ref counter |
| `RealtimeClient.makeRef` | Increments the counter, handling overflow |
| `RealtimeClient.push` | Raw frame send |
| `RealtimeClient.heartbeatTimer` | The `Timer` driving heartbeats |
| `RealtimeClient.pendingHeartbeatRef` | Ref of the last unacknowledged
heartbeat |
| `RealtimeClient.reconnectTimer` | The `RetryTimer` behind reconnect
backoff |
| `RealtimeChannel.canPush` | Whether the socket is connected and the
channel joined |
| `RealtimeChannel.trigger` | Dispatches a raw event to the channel's
bindings |

`push` is the clearest case: it already took `Message`, which #1671
marked `@internal`, so it could not be called from outside the package
regardless. Its signature said internal while its name said public.

The rest are fields on a class that happens to be public, so Dart's
underscore rule made them public by default. None appears in any
documented flow. Every one of them has a public counterpart that is the
supported way in: `onOpen`/`onClose`/`onError`/`onMessage` instead of
`stateChangeCallbacks`, `heartbeatIntervalMs` instead of
`heartbeatTimer`, `reconnectAfterMs` instead of `reconnectTimer`,
`sendBroadcastMessage` instead of `push`.

## Matrix changes

Ten symbols leave the scan, so they leave `sdk-compliance.yaml` too:

- Eight drop out of the top-level `supporting_symbols` list.
- `RealtimeClient.reconnectTimer` drops from
`realtime.configuration.reconnect_backoff`, and
`heartbeatTimer`/`pendingHeartbeatRef` from
`realtime.configuration.heartbeat_interval`. Both features keep their
real evidence (`reconnectAfterMs`, `heartbeatIntervalMs`), and
`reconnect_backoff` no longer needs a `supporting_symbols` list at all.

Public surface 1774 → 1764. Coverage stays at 100%.

## Breaking

Marked `chore(realtime)!` with a `BREAKING CHANGE` footer. It is a
genuine public API removal, though the practical risk is low: none of
these is documented, `push` was already uncallable, and v3 is the right
window. Anyone reaching for them was working around a missing public
API, which is worth an issue rather than a lint suppression.

## Test plan

- [x] `dart analyze packages/`: **No issues found.** This is the gate
that matters here: `invalid_use_of_internal_member` fires for any
cross-package use, and the `supabase` and `supabase_flutter` packages
both consume `RealtimeClient` and `RealtimeChannel`. Neither touches any
of the ten.
- [x] `realtime_client` tests: 205 passed. `@internal` permits
same-package use, so the existing tests that drive `makeRef`, `push` and
`trigger` still compile and run.
- [x] `supabase` tests: 134 passed, including the realtime stream
integration tests.
- [x] `supabase_flutter` tests: 65 passed.
- [x] `check-drift`: `✅ No capability matrix drift detected.`
- [x] `check-api-symbols` against #1673 as base: `✅ All new public API
symbols are covered in the capability matrix.` This is the check that
would have caught a stale registration, since the ten removed symbols
were all registered on the base.
- [x] Uncovered symbol count from a fresh extraction: **0**.
- [x] `dart format packages/`: 0 changed.
Base automatically changed from chore/mark-internal-api to main August 10, 2026 07:28

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sdk-compliance.yaml`:
- Around line 1654-1659: Qualify every affected Constants reference in
sdk-compliance.yaml, including the entries around the listed sections, with its
owning package context so registry matching cannot resolve the wrong Constants
class. Preserve the referenced members such as defaultConnectionCloseTimeout and
wsCloseNormal while applying the correct package qualification for
functions_client, gotrue, realtime_client, storage_client, supabase, and
supabase_flutter.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b6855024-e122-4ddb-a4fd-7fab08b4f8f2

📥 Commits

Reviewing files that changed from the base of the PR and between 5ad3f60 and 1f29193.

📒 Files selected for processing (19)
  • .sdk-parse-ignore
  • packages/gotrue/lib/src/broadcast_stub.dart
  • packages/gotrue/lib/src/broadcast_web.dart
  • packages/postgrest/lib/src/constants.dart
  • packages/realtime_client/lib/realtime_client.dart
  • packages/realtime_client/lib/src/realtime_channel.dart
  • packages/realtime_client/lib/src/realtime_client.dart
  • packages/realtime_client/lib/src/retry_timer.dart
  • packages/realtime_client/lib/src/transformers.dart
  • packages/realtime_client/lib/src/types.dart
  • packages/realtime_client/lib/src/websocket/websocket_io.dart
  • packages/realtime_client/lib/src/websocket/websocket_stub.dart
  • packages/realtime_client/lib/src/websocket/websocket_web.dart
  • packages/supabase_flutter/lib/src/hot_restart_cleanup_stub.dart
  • packages/supabase_flutter/lib/src/hot_restart_cleanup_web.dart
  • packages/supabase_flutter/lib/src/local_storage_stub.dart
  • packages/supabase_flutter/lib/src/local_storage_web.dart
  • packages/supabase_flutter/lib/src/passkey/passkey_options_mapper.dart
  • sdk-compliance.yaml

Comment thread sdk-compliance.yaml Resolved
The annotation was dropped while resolving the merge conflict in
1f29193.
spydon added 2 commits August 10, 2026 10:55
The shared HttpMethod enum moves into supabase_common (#1678), which the
public API scan excludes, so registering it here would leave a dangling
entry once that lands. FunctionsClient.invoke is the entry point a caller
actually reaches for anyway.
spydon added a commit that referenced this pull request Aug 10, 2026
## Why

Four different representations of an HTTP method coexisted across the
packages:

| Package | Representation | Values | Wire string |
|---|---|---|---|
| `functions_client` | public `enum HttpMethod` | get, post, put,
delete, patch | `method.name.toUpperCase()`, open-coded at two call
sites |
| `postgrest` | public `enum HttpMethod` | get, **head**, post, put,
patch, delete | `String get value => name.toUpperCase()` |
| `gotrue` | `@internal enum RequestMethodType` | get, post, put, patch,
delete | none, switches to `http.Client`'s `get` / `post` / … |
| `storage_client` | bare `String` | `'GET'`, `'POST'`, `'PUT'`,
`'DELETE'`, `'HEAD'` | the literal itself |

The two public enums shared a name while disagreeing on contents, which
forced `supabase.dart` to export postgrest with `hide HttpMethod`,
making postgrest's enum unreachable through the umbrella library. It
also confused the capability matrix, which keys symbols by bare name: it
registered `HttpMethod` for functions and `HttpMethod.value` for
postgrest as if they were one type.

The stringly-typed side had its own cost. `storage_client` compared
`method != 'GET'` to decide whether to set a JSON content type, in both
its `Fetch` helper and its Iceberg REST catalog.

## What changed

One `HttpMethod` in `supabase_common`, taking postgrest's shape: the six
methods plus the `value` getter that `functions_client` used to
open-code.

Public surface:

- `functions_client` and `postgrest` re-export the shared enum, so
callers of either library see no change.
- `supabase.dart` exports postgrest whole again.
- `functions.invocation.method_override` registers
`FunctionsClient.invoke`, since the shared enum lives in
`supabase_common`, which `.sdk-parse-ignore` excludes from the scanned
public API surface. A note records that the Dart enum also offers
`head`, which supabase-js does not expose for function invocation.
- The `edge_functions` example's "every HTTP method" test skips `head`,
whose response carries no body for the echo function to reflect, and
asserts against `method.value`.

Internal adoption, no public API change since both declarations were
`@internal`:

- `gotrue`: `RequestMethodType` is gone and its roughly 65 call sites
use the shared enum. `GotrueFetch`'s dispatch switch gains a `head`
branch to stay exhaustive over six values, wired to `http.Client.head`,
and now skips the JSON content type for `head` as well as for `get`. No
gotrue call site issues a HEAD today, so that branch is currently
unexercised.
- `storage_client`: `Fetch`'s private request helpers and the Iceberg
catalog's `_request` take an `HttpMethod` instead of a `String`, the
wire strings come from `.value`, and the content-type branch compares
enum values. The public wrapper method names (`get`, `post`, `head`, and
so on) are unchanged.

Every log line that interpolates a method uses `.value`, so they keep
printing `GET` rather than the enum's default `toString`.

The `supabase_common` pins stay at `0.1.2`; `melos version` rewrites
dependents' pins at release time.

## Merge order

This targets `main` directly and does not depend on #1673 or #1677,
though it came out of the same review thread. #1673 previously
registered `HttpMethod` and `HttpMethod.value`, which this PR makes
dangling; those registrations have been pruned on that branch, so the
two can merge in either order.

## Verification

- `dart analyze` clean across all packages and examples.
- `dcm analyze` reports no issues in any file this PR touches.
- Suites pass against a local Supabase stack, at the `--concurrency=1`
the workflow uses: `gotrue` (479), `storage_client` (210), `postgrest`
(196), `functions_client` (48).
- The compliance symbol, drift and schema checks pass locally with
`main` as the base.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a shared `HttpMethod` API covering GET, HEAD, POST, PUT, PATCH,
and DELETE.
  - Made `HttpMethod` available through the relevant client libraries.
  - Added explicit HEAD request support where applicable.

- **Bug Fixes**
  - Improved HTTP method serialization for requests.
  - Corrected request content handling for GET and HEAD calls.
- Updated integration coverage to accurately validate supported methods.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@spydon
spydon merged commit 32d5ece into main Aug 10, 2026
36 checks passed
@spydon
spydon deleted the chore/register-remaining-symbols branch August 10, 2026 09:57
spydon added a commit to supabase/sdk that referenced this pull request Aug 14, 2026
Adds six capability ids across two areas, plus one new group.

These came out of backfilling supabase-flutter's `sdk-compliance.yaml`
against its full public API
([supabase-flutter#1673](supabase/supabase-flutter#1673)).
Reaching 100% coverage meant every public symbol needed a home, which
made it obvious which operations the registry has no id for. Each one
below is a gap in the registry's own symmetry rather than a Dart-shaped
request: in every case a sibling area already has the equivalent
capability.

## `storage.analytics.access_catalog`

`storage.file_buckets.access_bucket` ("Scope subsequent file operations
to a specific bucket") and `storage.vector_buckets.access_vector_index`
("Scope subsequent vector operations to a specific index within a
bucket") both exist.

Analytics has seventeen operations across namespaces and tables, and no
id for the handle you need before you can call any of them. Worth noting
the asymmetry is recent: #74 and #76 filled in the analytics operations
without adding the accessor the other two groups have.

## `auth.passkey.list_passkeys`, `update_passkey`, `delete_passkey`

`auth.passkey_admin.list_passkeys` and
`auth.passkey_admin.delete_passkey` already cover an admin enumerating
and revoking a user's passkeys. There was nothing for a user managing
their own credentials, which is the more common flow of the two, and no
id at all for renaming one.

`update_passkey` is described narrowly (mutable metadata, such as the
friendly name) since the credential itself is immutable.

## `storage.file_buckets.request_cancellation` and
`storage.configuration.auto_retry`

`database.using_modifiers.request_cancellation` and
`functions.invocation.request_cancellation` both exist, as does
`database.configuration.auto_retry`.

Storage was the one area with retry and abort behaviour and no id for
either, which is arguably backwards: aborting a multi-megabyte upload is
more user-visible than aborting a query. `auto_retry` needs a new
`configuration` group in the storage area, matching the group of the
same name in database.

## What I deliberately left out

Four gaps surfaced in the same audit that I do **not** think belong
here:

- **Client disposal** (`Supabase.instance.dispose`). This started out in
the PR as `client.lifecycle.dispose` and has been dropped following
[review](#78 (comment)).
Two reasons. First, the id was not adjudicable: it needed an escape
hatch so garbage-collected runtimes could declare `not_applicable`, but
process termination releases resources on every runtime, so there was no
observable test separating "reclaims automatically" from "implemented".
Second, the teardown surface a caller can actually see is already
registered, via `realtime.client.disconnect`,
`realtime.client.remove_all_channels` and
`realtime.channel.unsubscribe`. A whole-client `dispose` is largely the
aggregate of those plus internal timers and connection pooling, so its
presence or absence says little about parity that the existing ids do
not already say. Releasing resources idiomatically is a baseline every
SDK owes its framework rather than a feature it can lack.
- **Client construction** (`Supabase.initialize`, `instance`,
`isInitialized`). Every SDK has it, but it is the precondition for the
whole matrix rather than a feature within it.
- **Table streams as a database capability**
(`SupabaseQueryBuilder.stream`). This one is a genuine inconsistency,
but possibly on the Dart side. The registry already carries the
*modifiers* of this capability, since supabase-flutter registers
`SupabaseStreamFilterBuilder.eq` under `database.using_filters.eq` and
`SupabaseStreamBuilder.order` under `database.using_modifiers.order`,
yet there is no id for the operation those modify. supabase-js has no
direct equivalent (you compose a channel with postgres changes by hand),
so this may be Dart sugar that should be attributed differently rather
than a missing id. Raising it as a question rather than proposing an id.
- **Typed row mapping** (`withConverter`). The Dart idiom for what
TypeScript does with generics, so not a cross-SDK capability.

## Compliance impact

None of these is breaking. No id is renamed and no existing entry
changes, so every SDK's `sdk-compliance.yaml` keeps validating; the six
new ids simply default to `not_implemented` until an SDK declares them.

supabase-flutter implements all six and will declare them in a
follow-up, which moves the corresponding symbols out of its generic
top-level `supporting_symbols` list into the features they actually
belong to. Its disposal symbols stay in `supporting_symbols`, which is
where they already are today.

## Test plan

- [x] `npm run validate`: `OK — capability matrix is valid.`
- [x] `npm test`: 195 passed across 14 files.
- [x] `npm run typecheck`: clean.
- [x] Confirmed against `capabilities/*.yaml` that none of the six ids
already exists under another name, and that the new
`storage.configuration` group is new.
- [x] Confirmed `capabilities/client.yaml` is byte-identical to `main`
after dropping the disposal id.
spydon added a commit that referenced this pull request Aug 17, 2026
…1677)

Stacked on #1673, addressing
#1673 (comment).

## Why

Six packages declared a class named `Constants`: `functions_client`,
`gotrue`, `realtime_client`, `storage_client`, `supabase` and
`supabase_flutter`. The capability matrix keys symbols by bare name, so
an entry like `Constants.defaultHeaders` could not say which package it
meant. The same ambiguity applies to anyone reading the code across
packages.

## What changed

Each class is named after its package, and the file declaring it is
named to match:

| Package | Class | File |
|---|---|---|
| `functions_client` | `FunctionsConstants` |
`src/functions_constants.dart` |
| `gotrue` | `GoTrueConstants` | `src/gotrue_constants.dart` |
| `realtime_client` | `RealtimeConstants` |
`src/realtime_constants.dart` |
| `storage_client` | `StorageConstants` | `src/storage_constants.dart` |
| `supabase` | `SupabaseConstants` | `src/supabase_constants.dart` |
| `supabase_flutter` | `SupabaseFlutterConstants` |
`src/supabase_flutter_constants.dart` |

`gotrue` and `realtime_client` keep a `constants.dart`, since both also
declare enums there. Only the class moved out into its own file, so
`constants.dart` now holds exactly the enums and, for `gotrue`,
`ApiVersions`. `gotrue.dart` no longer needs `hide Constants` on its
export as a result.

`realtime_client` holds the only public class of the six, so it changed
the most:

- The `typedef RealtimeConstants = Constants` is gone and the class
carries that name directly. `realtime_client.dart` only ever exported
the alias, so the name consumers write is unchanged.
- `defaultHeaders`, `defaultHeartbeatIntervalMs` and `wsCloseNormal` are
now `@internal`. Nothing outside the package reads them, and the other
five packages' default header maps were already internal. This is the
breaking part: code outside the package that reached for them will now
get `invalid_use_of_internal_member`.
- `defaultTimeout` and `defaultConnectionCloseTimeout` stay public,
because `supabase` reads both when filling in unset
`RealtimeClientOptions`.

In `sdk-compliance.yaml`, the three now-internal symbols are dropped,
`realtime.configuration.heartbeat_interval` loses its
`supporting_symbols` list along with them, the duplicated `Constants`
and `Constants.defaultTimeout` pair is removed from the top-level list,
and `RealtimeConstants.defaultConnectionCloseTimeout` and
`RealtimeConstants.defaultTimeout` are registered under the new name.

## Verification

- `dart analyze` clean across all packages and examples.
- Full suites pass against a local Supabase stack, at the
`--concurrency=1` the workflow uses: `gotrue` (479), `realtime_client`
(205, integration included), `storage_client` (210), `supabase` (134),
`supabase_flutter` (65), `functions_client` (48).
- The compliance symbol, drift and schema checks pass locally against
this branch's base.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Realtime configuration constants are now available through the public
library interface.

* **Refactor**
* Standardized configuration naming across authentication, database,
functions, realtime, storage, and Flutter integrations.
* Centralized default headers, timeouts, session settings, and client
metadata under clearer service-specific constants.
  * Preserved existing defaults and runtime behavior.

* **Tests**
* Updated automated coverage to validate the renamed configuration
references and existing expected values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

3 participants