Skip to content

ci: check ruff and that _sync is generated from _async - #1866

Merged
spydon merged 4 commits into
mainfrom
ci/ruff-lint-job
Oct 28, 2026
Merged

spydon merged 4 commits into
mainfrom
ci/ruff-lint-job

Conversation

@spydon

@spydon spydon commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1865, which formats the files these checks would otherwise fail on and restores the _async docstring that #1569 only added to _sync. Merge that one first.

Summary

CI only runs make <pkg>.tests (mypy and pytest), so nothing checks lint, formatting, or whether the generated _sync code matches its _async source. #1569 is an example: it edited _sync/gotrue_client.py directly, and the next make auth.build-sync would have silently deleted that change.

This adds a lint job with three steps, using the ruff version locked in uv.lock:

  • ruff check --output-format=github, so violations show as inline annotations on the PR
  • ruff format --check
  • regenerate _sync with the new root make build-sync target, run ruff, and fail if anything under src/ changed or was added, printing the diff

The root build-sync target runs build-sync for every package that has one (functions, storage, auth, postgrest, supabase; realtime is async only), so contributors can run the same thing locally.

The job runs in parallel with the test matrix and does not gate release-please.

Verification

Locally, the sync check passes on this branch and fails when the _async docstring from #1865 is reverted, reporting src/auth/src/supabase_auth/_sync/gotrue_client.py.

@spydon
spydon requested a review from o-santi as a code owner October 28, 2026 14:51
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Capability matrix drift detected

The following capabilities are marked implemented in the matrix but could not be found in python:

  • database.configuration.auto_retry → expected symbol: AsyncSelectRequestBuilder.retry
  • database.configuration.auto_retry → expected symbol: SyncSelectRequestBuilder.retry
  • realtime.client.connect → expected symbol: SyncRealtimeClient.connect
  • realtime.client.disconnect → expected symbol: AsyncRealtimeClient.disconnect
  • realtime.client.disconnect → expected symbol: SyncRealtimeClient.disconnect
  • realtime.channel.subscribe → expected symbol: SyncRealtimeChannel.subscribe
  • realtime.channel.unsubscribe → expected symbol: SyncRealtimeChannel.unsubscribe
  • realtime.channel.broadcast → expected symbol: SyncRealtimeChannel.send_broadcast
  • realtime.subscriptions.broadcast → expected symbol: SyncRealtimeChannel.on_broadcast
  • realtime.subscriptions.postgres_changes → expected symbol: SyncRealtimeChannel.on_postgres_changes
  • realtime.subscriptions.subscribe_presence → expected symbol: AsyncRealtimeChannel.on_presence_change
  • realtime.subscriptions.subscribe_presence → expected symbol: SyncRealtimeChannel.on_presence_change
  • realtime.presence.track → expected symbol: SyncRealtimeChannel.track
  • realtime.presence.untrack → expected symbol: SyncRealtimeChannel.untrack
  • realtime.presence.presence_state → expected symbol: AsyncRealtimeChannel.presences
  • realtime.presence.presence_state → expected symbol: SyncRealtimeChannel.presences

The following capabilities are marked implemented in python but have no registered symbols to verify:

  • auth.session.auto_refresh (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.cross_client_token_sync (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.oauth_flow_type (no symbols list — cannot confirm implementation exists)
  • client.session_management.custom_storage (no symbols list — cannot confirm implementation exists)
  • client.session_management.persist_session (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.custom_http_client (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.global_headers (no symbols list — cannot confirm implementation exists)
  • database.mutate.select_after_mutation (no symbols list — cannot confirm implementation exists)
  • database.mutate.bulk_rows_with_differing_fields (no symbols list — cannot confirm implementation exists)
  • database.mutate.count (no symbols list — cannot confirm implementation exists)
  • database.mutate.missing_defaults (no symbols list — cannot confirm implementation exists)
  • database.using_filters.eq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.neq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is (no symbols list — cannot confirm implementation exists)
  • database.using_filters.in (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contains (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contained_by (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_adjacent (no symbols list — cannot confirm implementation exists)
  • database.using_filters.overlaps (no symbols list — cannot confirm implementation exists)
  • database.using_filters.text_search (no symbols list — cannot confirm implementation exists)
  • database.using_filters.match (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not (no symbols list — cannot confirm implementation exists)
  • database.using_filters.or (no symbols list — cannot confirm implementation exists)
  • database.using_filters.raw (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex_icase (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not_in (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.order (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.limit (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.range (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.request_cancellation (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.relationship_embed (no symbols list — cannot confirm implementation exists)
  • database.configuration.request_timeout (no symbols list — cannot confirm implementation exists)
  • functions.invocation.method_override (no symbols list — cannot confirm implementation exists)
  • functions.invocation.region_selection (no symbols list — cannot confirm implementation exists)
  • functions.invocation.request_cancellation (no symbols list — cannot confirm implementation exists)
  • functions.invocation.timeout (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_filter (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.private_channel (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_self (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_replay (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_multiple_filters (no symbols list — cannot confirm implementation exists)
  • realtime.presence.presence_key (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.heartbeat_interval (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.access_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.request_cancellation (no symbols list — cannot confirm implementation exists)

These may have been renamed, removed, or never registered. Please update the capability matrix.
See: https://github.com/supabase/sdk/blob/main/packages/capability-matrix/docs/capability-matrix.md

@spydon spydon changed the title ci: check ruff lint and formatting ci: check ruff and that _sync is generated from _async Oct 28, 2026
Base automatically changed from chore/format-unformatted-files to main October 28, 2026 14:57
@spydon
spydon merged commit 5eba7c0 into main Oct 28, 2026
46 checks passed
@spydon
spydon deleted the ci/ruff-lint-job branch October 28, 2026 15:02
spydon added a commit that referenced this pull request Oct 28, 2026
## What

Make every `implemented` capability in `sdk-compliance.yaml` verifiable
by the SDK compliance drift check (see the drift report on #1866).

### Symbols that did not exist

- `database.configuration.auto_retry`: `retry` is defined on
`AsyncQueryRequestBuilder` / `SyncQueryRequestBuilder` and only
inherited by the select builder. The checker matches members where they
are defined, not inherited ones.
- `realtime.client.disconnect`: the method is `close`, not `disconnect`.
- `realtime.subscriptions.subscribe_presence`: there is no
`on_presence_change`; the API is `on_presence_sync`, `on_presence_join`
and `on_presence_leave`.
- `realtime.presence.presence_state`: the method is `presence_state`,
not `presences`.
- Realtime is async only. `SyncRealtimeClient` and `SyncRealtimeChannel`
are stubs without `connect`, `is_connected`, `subscribe`, `unsubscribe`,
`send_broadcast`, `on_broadcast`, `on_postgres_changes`, `track` or
`untrack`, so those `Sync*` symbols are removed.

### Capabilities without symbols

- Filters and modifiers now point at the methods on
`BaseFilterRequestBuilder` / `BaseSelectRequestBuilder`, where they are
defined. The checker has no `Async`/`Sync` prefix requirement, and the
file already used this form for `like_all_of`, `strip_nulls` and
`max_affected`.
- `regex` and `regex_icase` only work through `filter(column, "match" |
"imatch", pattern)`, so they register `filter` and say so in a note.
- Features exposed through a parameter of an existing method register
that method, for example `insert`/`upsert` for `missing_defaults`,
`invoke` for `region_selection`, and `AsyncRealtimeClient.channel` for
the channel config options.
- `custom_storage` registers `AsyncSupportedStorage` /
`SyncSupportedStorage`, and `access_bucket` registers
`StorageClient.from_`.
- Features that are only constructor options or plain asyncio behaviour
(auto refresh, flow type, persist session, custom HTTP client, global
headers, heartbeat interval, timeouts and cancellation, cross-client
token sync) are marked `no_public_symbols: true`, keeping their existing
notes.

## Verification

Ran the upstream tooling from `supabase/sdk` at the pinned commit
locally: `validate-compliance` passes, and `griffe dump` +
`normalize-griffe` + `check-drift` report "No capability matrix drift
detected". On `main` the same pipeline reproduces the full drift report
from #1866.
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