Skip to content

feat: wire up SDK compliance checking#1518

Open
grdsdev wants to merge 8 commits into
mainfrom
feat/sdk-compliance
Open

feat: wire up SDK compliance checking#1518
grdsdev wants to merge 8 commits into
mainfrom
feat/sdk-compliance

Conversation

@grdsdev

@grdsdev grdsdev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Integrates supabase-py with the cross-SDK capability matrix at supabase/sdk. On every push to main and every PR, CI will now:

  1. Validate sdk-compliance.yaml against the canonical feature registry
  2. Parse the Python public API surface and check that any new symbols added in a PR are declared in the compliance file

Changes

  • sdk-compliance.yaml — declares implementation status for all 195 features in the registry, with Python class/method symbols for cross-referencing (e.g. AsyncGoTrueClient.sign_up, AsyncBucketActionsMixin.upload)
  • .sdk-parse-ignore — tells the Python parser to skip test directories and conftest files
  • .github/workflows/validate-capabilities.yml — calls the reusable validate-sdk-compliance.yml@main workflow from supabase/sdk with language: python

Implementation status highlights

Area Status Notes
Auth (sign-in, session, identities, MFA) ✅ Implemented
Auth admin (create/delete/update/get/list user, generate link, invite) ✅ Implemented
Auth admin MFA (list/delete factor) ✅ Implemented Exposed via admin.mfa.*; wired at construction time
OAuth admin (create/delete/get/list/update client, regenerate secret) ✅ Implemented Exposed via admin.oauth.*; wired at construction time
Database (CRUD, filters, modifiers, explain, or_, select-after-mutation) ✅ Implemented select() chaining after insert/update/upsert/delete
Storage (file buckets, signed URLs) ✅ Implemented
Storage vector buckets (create/list/delete bucket, indexes, put/get/list/query/delete vectors, parallel scan) ✅ Implemented Via storage.vectors()AsyncStorageVectorsClient
Storage analytics buckets (create/list/delete, Iceberg namespace/table) ✅ Implemented Via storage.analytics()AsyncStorageAnalyticsClient + pyiceberg RestCatalog
Realtime (channel, presence, postgres changes) ✅ Implemented
Realtime broadcast_self, private channel, presence key ✅ Implemented Flags passed in channel config payload
Realtime broadcast ack ⚠️ Partially implemented Ack config is sent; send_broadcast() returns immediately without awaiting the ack (supabase-js awaits it)
Realtime reconnect backoff ⚠️ Partially implemented Fixed initial_backoff/max_retries params; supabase-js accepts a custom function
Functions (invoke, region selection) ✅ Implemented Region via FunctionRegion enum → x-region header
Cross-client token sync ✅ Implemented Auth events propagate to postgrest/storage/functions via lazy recreation + realtime.set_auth()
Passkeys (register, sign-in) ❌ Not implemented
Passkey admin (list, delete) ❌ Not implemented
OAuth Server (approve/deny authorization, get details, list/revoke grants) ❌ Not implemented
Auth provider admin (create/delete/update/get/list) ❌ Not implemented
Broadcast via HTTP ❌ Not implemented

Depends on

  • supabase/sdk#36 — adds the Python parser to the SDK registry (must merge first)

Part of SDK-991.

Adds the three files needed to integrate with the cross-SDK capability
matrix (https://github.com/supabase/sdk):

- sdk-compliance.yaml — declares implementation status for every feature
  in the canonical registry, with symbol names mapped to Python class
  methods so the parser can cross-reference them
- sdk-parse-ignore — tells the Python API-surface parser to skip test
  directories and conftest files
- .github/workflows/validate-capabilities.yml — calls the reusable
  validate-sdk-compliance workflow from supabase/sdk on every push to
  main and every PR

The compliance file covers auth, database (postgrest), storage, realtime,
functions, and client configuration. Notable gaps flagged as
not_implemented: passkeys, OAuth server/admin APIs, several newer
realtime features, and storage vector/analytics buckets.

Part of SDK-991.
@grdsdev grdsdev requested review from a team and o-santi as code owners June 19, 2026 10:12
@grdsdev grdsdev marked this pull request as draft June 19, 2026 10:14
grdsdev added 3 commits June 19, 2026 11:08
Use sdk-ref + the branch ref in `uses:` so the validate workflow picks
up Python/griffe support from the in-flight supabase/sdk PR. Revert both
to @main once SDK PR #36 is merged.

Also rename sdk-parse-ignore → .sdk-parse-ignore to match the rename
that landed in supabase/sdk#37.
Audit every implemented feature against the supabase-js reference to
check behavioral parity, not just method existence.

Corrections (wrong not_implemented status):
- functions.invocation.region_selection: implemented via region key in
  invoke_options (FunctionRegion enum → x-region header)
- client.authentication_integration.cross_client_token_sync: sub-clients
  lazily recreated with updated Authorization header on auth events;
  realtime.set_auth() called directly
- realtime.subscriptions.private_channel: private config passed to server
- realtime.subscriptions.broadcast_self: broadcast.self config passed to server
- realtime.presence.presence_key: presence.key config passed to server

Corrections (partial — config passes but behavior diverges from JS):
- realtime.subscriptions.broadcast_ack: ack config sent to server but
  send_broadcast() does not await acknowledgment (JS does)
- realtime.configuration.reconnect_backoff: fixed params only; JS accepts
  a custom reconnect function

Symbol fix:
- realtime.channel.send: renamed to send_broadcast in Python SDK

Note improvements:
- auth.session.auto_refresh: mention missing startAutoRefresh/stopAutoRefresh
- database.mutate.select_after_mutation: clarify .select() chaining works
  for column selection after mutations, not just returning='representation'
Comment thread .github/workflows/validate-capabilities.yml Outdated
grdsdev added 2 commits June 25, 2026 09:03
Supabase no longer auto-grants public schema access to the anon and
authenticated roles. Explicit GRANT statements are now required for
tables and sequences to be reachable via the REST Data API.

Mirrors the fix applied to supabase-swift in
supabase/supabase-swift@8372c18.

Ref: https://github.com/orgs/supabase/discussions/45329
@grdsdev grdsdev marked this pull request as ready for review June 25, 2026 14:04
grdsdev added 2 commits June 25, 2026 11:08
All storage3 vector bucket and analytics features are fully implemented:
- AsyncStorageVectorsClient/SyncStorageVectorsClient: create/list/delete bucket, from_()
- AsyncVectorBucketScope/SyncVectorBucketScope: create/get/list/delete index, index()
- AsyncVectorIndexScope/SyncVectorIndexScope: put/get/list/query/delete vectors; list()
  supports segment_count/segment_index for parallel scan
- AsyncStorageAnalyticsClient/SyncStorageAnalyticsClient: create/list/delete bucket;
  catalog() returns pyiceberg RestCatalog covering iceberg_namespace and iceberg_table
- auth.admin.list_mfa_factors / delete_mfa_factor: real HTTP implementations
  are wired to admin.mfa.list_factors / delete_factor at construction time
- auth.oauth_admin.*: all six operations (create/delete/get/list/regenerate_secret/update)
  are wired to admin.oauth.* at construction time and make real HTTP calls
  to admin/oauth/clients endpoints

Passkeys, oauth_server, and provider admin features remain not_implemented
(no code found in the codebase).
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