Repository navigation
Compare two rings: a second ring, kept apart, side by side - #90
Merged
Merged
Conversation
The owner wears a Colmi and a JRing to see which is more reliable, and chose "compare only": the main ring keeps feeding the app. - RingBLEClient gains a role. The comparison client has its own connection slot and saved ring, and publishes to ComparisonBus instead of PulseEventBus (only its diagnostics cross, marked). - Drivers that publish on their own (YCBT, LuckRing, Colmi, jring) go through RingCommandWriter.publish, which the comparison client overrides, so no family can leak a second ring's data. - comparison_readings (v38) holds its HR, SpO2, HRV, steps and per-minute sleep. Nothing but the comparison screen reads it. - ComparisonRing (AppServices) connects it, runs its startup and history, and streams its heart rate during recorded workouts. - Settings > My ring > Compare rings: find and pair the second ring; per day both heart-rate curves, time-weighted averages, hours with readings and how close the two were; steps and sleep; each workout ring against ring. Docs: docs/ring-comparison.md, AGENTS.md. Audit: audits/2026-11-17-compare-rings.md. Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner wears a Colmi and a JRing to see which is more reliable. Their choice: compare only. The main ring keeps feeding the whole app, and the second ring appears only on a new Compare rings screen.
Keeping the second ring's data apart
RingBLEClient(role = COMPARISON):ring_ble_compare);ComparisonBus, notPulseEventBus. Persistence, the device row, the accuracy watcher, Health Connect, Strava and the sync coordinator never see it. Only its diagnostics cross over, marked[comparison ring].RingCommandWriter.publish: drivers that published toPulseEventBusdirectly now go through it, and the comparison client overrides it. Those are YCBT history and out-of-band events, LuckRing history progress, Colmi's sync "done" and jring's workout log. Without this, a second ring of those families would have leaked into the main history.comparison_readings(DB v38, migration 37→38): heart rate, SpO₂, HRV, steps and per-minute sleep, with ids per ring, kind and time so re-syncs update rows. Only the comparison screen reads it.Behaviour
ComparisonRing(inAppServices) connects the second ring and runs its normal startup and history sync on each connect.Screen
Settings → My ring → Compare rings (
settings/compare):Checks
RingComparisonTestandComparisonReadingsTest. Full suite: 2073 tests, the same 3 environment-only failures asmainhas in this container.docs/ring-comparison.md, a new AGENTS.md section, andaudits/2026-11-17-compare-rings.md.Generated by Claude Code