Skip to content

Background sync waits for the ring's history pass to finish - #75

Merged
gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd
Nov 12, 2026
Merged

gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

Why

The owner's 2.16.3 diagnostics export (2026-11-12) confirms the new jring offline logs on hardware:

  • 0x39, 0x40 and 0x55 all answered with data (127, 54 and 85 frames), none of it unknown.
  • Each day ran in the vendor's order.

The same export also shows that every background sync was cut at about 15 s:

Background pass Disconnected Left unrequested
23:57 23:58:06 temperature, SpO₂, the sensor log, workouts
00:28 3 s into temperature SpO₂, the sensor log, workouts

RingSyncWorker waits a fixed 15 s after connecting and then closes the link. So the new logs only ever arrived when the app was opened. In the foreground the full three-day chain took about 50 s.

What

  • RingSyncEngine.historyPassRunning (default false). For jring it is JringHistorySync.isRunning.
  • After its fixed window, RingSyncWorker holds the link while that is true, for up to 90 s more. Its overall timeout rises from 45 s to 150 s. It still yields at once if the app opens.
  • Other ring families keep the fixed 15 s window.
  • The hardware confirmation is recorded in docs/jring-56ff-plan.md.

No UI change.


Generated by Claude Code

The owner's 2.16.3 export (2026-11-12) confirms the new jring offline
logs on hardware. Temperature, SpO₂ and the sensor log all answered
with data, in the vendor's order. The same export shows every
background sync cut at ~15 s, because RingSyncWorker closed the link on
a fixed timer, before those logs were asked for. They only arrived
when the app was opened.

RingSyncEngine.historyPassRunning (jring: JringHistorySync.isRunning)
lets the worker hold the link while the paged pass runs, for up to 90 s
more. The overall timeout rises to 150 s. Other families keep the fixed
window. The confirmation is recorded in the plan doc.

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit be426d5 into main Nov 12, 2026
1 check passed
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.

2 participants