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

supabase / supabase-swift / 39379320242
93%

Build:
DEFAULT BRANCH: main
Ran 20 Oct 2026 06:24AM UTC
Jobs 1
Files 174
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

20 Oct 2026 06:15AM UTC coverage: 92.565% (-0.01%) from 92.578%
39379320242

push

github

web-flow
refactor(realtime): drive the client connection through a pure transition table (#1593)

* refactor(realtime): drive the client connection through a pure transition table

Move every connection state change into
`RealtimeClient.transition(_:_:)`, a pure function from (state, event) to
effects, and apply events in two phases: the table updates `connection`
first, then the effects run in order. An event raised while effects are
running is queued and reported with `reportIssue`, so the table always
sees one event at a time.

`connect()`, `disconnect()`, the socket reader, the heartbeat and the
reconnect loop now only raise events. The `connect()` attempt lives in
`connectAttempt`, outside the state, so `ConnectionState` is `Equatable`
and the table can be tested row by row without an actor, a clock or a
socket.

* fix(realtime): drop the outcome of a cancelled connect attempt

disconnect() cancels the connect attempt, but the transport call already in
flight keeps running and reported its outcome to the transition table once it
returned. The table has no attempt identity, so a stale failure moved a newer
attempt from .connecting to .disconnected, and a stale socket was installed in
place of the newer one. openSocket() now checks Task.isCancelled before it
applies either event and closes a socket that arrived too late.

* test(realtime): signal the second connect attempt instead of yield-looping

Tests/RealtimeTests forbids Task.yield loops; the gate registration now
yields on a stream the test awaits.

* test(realtime): wait for both connect attempts before releasing the stale one

The test waited only for attempt 1 to reach .connecting, which happens before its
transport call runs, so attempt 2 could arrive first and leave gate 1 unset. The
optional resume then did nothing and the test hung on the stale attempt. Wait for
both arrivals and require both gates.

* test(realtime): pin the stale connect attempt to transport call 1

Attempts are numbered by t... (continued)

198 of 212 new or added lines in 2 files covered. (93.4%)

12 existing lines in 2 files now uncovered.

13073 of 14123 relevant lines covered (92.57%)

26682.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
91.95
2.1% Sources/Realtime/RealtimeClient+Connection.swift
2
89.03
0.33% Sources/Realtime/RealtimeClient.swift

Coverage Regressions

Lines Coverage ∆ File
9
68.97
-10.34% Sources/Helpers/EventEmitter.swift
3
91.95
2.1% Sources/Realtime/RealtimeClient+Connection.swift
Jobs
ID Job ID Ran Files Coverage
1 39379320242.1 20 Oct 2026 06:24AM UTC 174
92.57
GitHub Action Run
Source Files on build 39379320242
  • Tree
  • List 174
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39379320242
  • 0bb823b8 on github
  • Prev Build on main (#39343591327)
  • Next Build on main (#39382003330)
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