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

supabase / supabase-swift / 37805970165
93%

Build:
DEFAULT BRANCH: main
Ran 08 Oct 2026 04:13PM UTC
Jobs 1
Files 159
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

08 Oct 2026 04:04PM UTC coverage: 91.382% (+0.8%) from 90.572%
37805970165

push

github

web-flow
feat(realtime): add token state and the presence tracker to the engine (#1460)

* feat(realtime): add token state and the presence tracker to the engine

TokenState keeps (token, generation, exp): stale provider results and nil
are discarded, a refresh is scheduled 60 s before exp, and access_token
pushes are throttled to one per 10 s per channel with the newest pending.
PresenceTracker ports phoenix.js sync: state replaces, diffs merge by key
and phx_ref, early diffs wait for the first state, every meta is kept, and
the tracked payload is re-sent after each rejoin through a coalescing
window that stays under the server's 5 calls per 30 s.

Refs SDK-2100, SDK-2101

Co-Authored-By: Claude <noreply@anthropic.com>

* test(realtime): use a whole-second exp in the token expiry test

Linux's JSONSerialization does not round-trip a fractional Double exactly, which failed the
expiry comparison on CI.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(realtime): make makeJWT output deterministic

JSONSerialization does not fix dictionary key order, so two calls with the
same claims could produce different tokens and fail the equality check.

* fix(realtime): pace token refreshes and retry a failed one

A token already inside the refresh leeway made the scheduler call the
provider again with no delay, in a loop. A refresh that returned nil or
the old token scheduled nothing, so the old token stayed until exp.
Every provider call now schedules the next one, at least
accessTokenRetryInterval later.

Also wraps the makeJWT line that failed the format check.

* fix(realtime): keep raw presence messages for inbound listeners

presence_state and presence_diff now reach listeners as .message, as
before, and the tracker's .presenceChanged follows each one.

---------

Co-authored-by: Claude <noreply@anthropic.com>

218 of 218 new or added lines in 3 files covered. (100.0%)

186 existing lines in 9 files now uncovered.

12354 of 13519 relevant lines covered (91.38%)

71.07 hits per line

Coverage Regressions

Lines Coverage ∆ File
78
81.67
1.42% Sources/Realtime/RealtimeChannelV2.swift
56
89.91
1.01% Sources/Realtime/RealtimeClientV2.swift
37
79.25
-1.06% Sources/Realtime/WebSocket/URLSessionWebSocket.swift
5
97.01
4.28% Sources/Realtime/RealtimeSerializer.swift
4
93.44
1.95% Sources/Realtime/RealtimeJoinConfig.swift
3
19.42
0.0% Sources/Realtime/RealtimeChannel+AsyncAwait.swift
1
81.82
0.0% Sources/Realtime/RealtimeMessageV2.swift
1
98.0
-0.04% Sources/Realtime/Types.swift
1
93.75
-6.25% Sources/TestHelpers/WaitUntil.swift
Jobs
ID Job ID Ran Files Coverage
1 37805970165.1 08 Oct 2026 04:13PM UTC 159
91.38
GitHub Action Run
Source Files on build 37805970165
  • Tree
  • List 159
  • Changed 13
  • Source Changed 12
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37805970165
  • cedf006b on github
  • Prev Build on main (#37788515223)
  • Next Build on main (#37816924367)
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