Skip to content

Colmi sync fixes from OpenStrap Edge, automatic backups, corrected "What affects you" - #27

Merged
gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd
Oct 21, 2026
Merged

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

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

Colmi sync. These ideas come from OpenStrap Edge's adapter and are reimplemented here, not copied (Edge is AGPL).

  • Future-dated readings: heart-rate, stress and HRV history slots stamped after "now" are dropped, and heart-rate history keeps only 25–230 bpm.
  • Refusals: a refused history request (opcode | 0x80) ends its stage immediately instead of waiting for the watchdog.
  • Quiet window: a history day counts as complete after 2 s of silence (5 s for activity).
  • Legacy temperature: waits for a quiet period before finishing, capped at 8 replies.
  • Night anchoring: a night whose header and stage blocks disagree by more than 15 minutes is anchored at its end.
  • Activity calories: raw per-slot calories go into diagnostics only.
  • Clean disconnect: after a sync, once the link is quiet and nothing live is running, the app disconnects and the drop counts as idle.

Automatic backups. Daily or weekly into a folder you choose (Settings → Privacy & Data), keeping the latest 5. If folder access is lost, the backup fails visibly instead of writing somewhere else.

"What affects you". Welch t-tests with a Benjamini-Hochberg correction across every tag and outcome.

Tests: ColmiEdgeLessonsTest, StatsTest, AutoBackupTest, plus a new JournalInsightsTest case.


Generated by Claude Code

…hat affects you"

Colmi (ideas from OpenStrap Edge's adapter, reimplemented):
- Drop heart-rate, stress and HRV history slots stamped after now: the ring
  reuses yesterday's byte for slots it hasn't measured yet today. HR history
  also keeps only 25–230 bpm.
- A history request the ring refuses (opcode | 0x80) ends that stage at once
  instead of waiting out the 10–20 s watchdog.
- A paged day that goes quiet for 2 s (5 s for activity) counts as complete.
- Legacy temperature waits for quiet before finishing; some firmware answers
  one reply per day. Capped at 8 replies.
- A night whose header disagrees with its stage blocks by more than 15 minutes
  is laid back from its end.
- Activity slot calories (bytes 7–8) are carried in diagnostics, unused until
  a capture confirms the scale.
- After a sync, once the link is quiet for 4 s and no live session runs, the
  app hangs up itself and the drop counts as idle (rest, no error).

Automatic backups: daily or weekly, into a folder the user picks, keeping the
latest 5; a lost folder grant fails loudly instead of writing elsewhere.

"What affects you": Welch t-tests with a Benjamini-Hochberg correction across
every tag and outcome, so chance differences aren't shown as findings.

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit e9157a1 into main Oct 21, 2026
2 checks 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