Skip to content

Diagnostics capture the comparison ring's packets - #93

Merged
gabrielbr merged 2 commits into
mainfrom
ccr-67ccb970-dqwwqd
Nov 18, 2026
Merged

gabrielbr merged 2 commits into
mainfrom
ccr-67ccb970-dqwwqd

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

In the owner's 2026-11-18 export, the comparison Colmi R06 showed 47 outgoing requests and no replies at all. DiagnosticsSubscriber only read PulseEventBus, and the second ring publishes to ComparisonBus.

From what was logged, the ring answered every history request within about 30 ms, which the sync only does on an empty day:

  • 8 days of steps
  • 8 days of HR log, with correct request dates (Nov 11 to 18)
  • 7 days of stress and of HRV
  • SpO₂, sleep and temperature

Without the reply bytes, an empty ring and dropped replies can't be told apart.

Change

  • What's captured: DiagnosticsSubscriber also collects ComparisonBus, for raw packets plus [comparison ring] sync, battery and connection lines. Its readings still go only to comparison_readings.
  • Marking: the comparison client adds "ring":"comparison" to each packet's transport facts, and the export keeps that key.
  • Masking: packets are masked as before, by their own family's header and decoded kind.
  • Size: both rings share the same 1,000-packet cap. The second ring's startup burst is about 50 packets.

Checks

  • DiagnosticsTransportMetadataTest gains a case for the new key.
  • The diagnostics and comparison tests pass locally.
  • No UI change, so there is no audit or canvas update.

Generated by Claude Code

An export showed the second ring's requests and none of its replies, so
an empty ring and dropped replies looked the same. DiagnosticsSubscriber
now also reads ComparisonBus for packets and a few status lines; the
packets are masked like the main ring's and marked "ring":"comparison".

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
After the listener closes, its ephemeral port can be taken at once by
another test's listener in the same run, so connecting to it to prove
nothing listens there failed by chance on CI (PR #93).

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit 9033f28 into main Nov 18, 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