• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-py / 41641937400 / 11
98%
main: 98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 01:13PM UTC
Files 61
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Nov 2026 01:10PM UTC coverage: 96.375%. Remained the same
41641937400.11

push

github

web-flow
fix(realtime): keep postgres bindings and report mismatches on join replies (#1929)

Fixes SDK-2672.

## Problem

`on_join_push_ok` in `AsyncRealtimeChannel` rebuilt
`postgres_changes_callbacks` from the server's join reply. When the
reply had no `postgres_changes`, or an empty list, the matching loop was
skipped, every client postgres callback was thrown away, and the channel
still reported `SUBSCRIBED`. Database changes were then silently never
delivered.

## Fix

The join reply handling now matches realtime-js (`RealtimeChannel.ts`,
`subscribe` and `_updatePostgresBindings`):

| Join reply | Before | After (and realtime-js) |
| ------------------------------------------------ |
----------------------------------- |
-------------------------------------------------------- |
| no `postgres_changes` key | `SUBSCRIBED`, all callbacks dropped |
`SUBSCRIBED`, client bindings kept unchanged |
| `postgres_changes: []` with client bindings | `SUBSCRIBED`, all
callbacks dropped | unsubscribe, state errored, `CHANNEL_ERROR`
"mismatch" |
| mismatched server entry | unsubscribe, `CHANNEL_ERROR` | unsubscribe,
state errored, `CHANNEL_ERROR` "mismatch" |
| matching server entries | ids assigned, `SUBSCRIBED` | ids assigned,
`SUBSCRIBED` |

realtime-js compares schema, table and filter with `isFilterValueEqual`,
which treats `null` and `undefined` as equal. Python has no `undefined`:
pydantic parses both a missing and a `null` filter to `None`, so plain
equality already gives the same result. A test pins this down.

## Tests

`src/realtime/tests/test_join_reply_postgres_bindings.py` covers the
cases above without a live server, using a fake connection patched into
`realtime._async.client.connect` and replies delivered through
`channel._handle_message`. Three of them fail on `main`.

Ran `make ruff`, mypy, and the full realtime test suite (including the
integration tests against the local Supabase stack): 124 passed.

## Self-review changes

A review of this PR led... (continued)

5104 of 5296 relevant lines covered (96.37%)

0.96 hits per line

Source Files on job run-ubuntu-latest-3.12-auth - 41641937400.11
  • Tree
  • List 61
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 41641937400
  • cfb21597 on github
  • Prev Job for on main (#41641867822.29)
  • Next Job for on main (#41641996150.19)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc