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

supabase / supabase-swift / 30290972778
84%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 06:01PM UTC
Jobs 1
Files 97
Run time 1min
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

27 Jul 2026 05:49PM UTC coverage: 83.865% (+0.2%) from 83.659%
30290972778

push

github

web-flow
fix(realtime): make subscribe converge after a failed auto-reconnect (#1146)

* fix(realtime): make subscribe converge after a failed auto-reconnect

Fixes four interacting defects from #1145 that could leave a long-lived
RealtimeClientV2 unable to ever subscribe again after a network outage in
which the single-shot auto-reconnect failed:

- Clear the `sawReconnecting` latch when the connection manager reports
  `.disconnected`. Previously the latch survived a *failed* reconnect, so
  the next successful `connect()` (e.g. from `connectOnSubscribe`) was
  misclassified as a reconnect completion and `rejoinChannels()` cancelled
  the very join that connect was performing, surfacing as
  `CancellationError`.

- Stop manufacturing `Swift.CancellationError` for non-cancellation
  failures in `ChannelStateManager`. Socket connect failures and
  channel-closed-while-joining now throw a typed `SubscribeFailure` that
  participates in the retry ladder alongside timeouts, and a server close
  that aborts an in-flight subscribe surfaces as
  `RealtimeError.channelClosedByServer` instead of `CancellationError`.

- Discriminate `join_ref` when handling `phx_close`: a close belonging to
  a previous incarnation's join on the same topic no longer tears down the
  current subscription (mirrors phoenix.js behavior).

- Skip `phx_leave` and the bounded wait for `phx_close` when unsubscribing
  on a dead socket: the server-side channel died with the connection, the
  leave frame could only be buffered into the *next* connection as a stale
  frame (which the server answers with a close, feeding the stale-close
  problem above), and the wait would stall for the full timeout.

Fixes #1145

* fix(realtime): address review findings on subscribe-convergence fix

- Translate any error from a subscribe aborted by `didReceiveClose()` to
  `RealtimeError.channelClosedByServer`. Depending on how the task
  cancellation is observed, the aborted subscribe could exit with
  `Cancella... (continued)

83 of 86 new or added lines in 4 files covered. (96.51%)

8337 of 9941 relevant lines covered (83.86%)

40.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
89.54
2.09% Sources/RealtimeV2/ChannelStateManager.swift
Jobs
ID Job ID Ran Files Coverage
1 30290972778.1 27 Jul 2026 06:01PM UTC 97
83.86
GitHub Action Run
Source Files on build 30290972778
  • Tree
  • List 97
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30290972778
  • 1e0fe6f3 on github
  • Prev Build on main (#30264932624)
  • Next Build on main (#30293949516)
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