Repository navigation
Debug export: Alarm block + honest "armed" log (#34) - #37
Merged
Merged
Conversation
From #34 (alarm not buzzing): the strap consistently reported a STALE armed time regardless of what NOOP sent (its clock was reset) — the #401 readback caught it, but nothing surfaced it and the log even claimed 'armed' while disconnected. #3 — Alarm block in the debug export (both platforms): the configured wake + the last arm's sent-vs-strap-reports epochs with a MISMATCH flag, so a 'didn't buzz' report is decidable at a glance. armStrapAlarm persists the sent epoch (+ when + connected); the GET_ALARM_TIME readback persists what the strap reports; the export composes them (best-effort, guarded). #4 — don't log 'Alarm: armed' when the strap isn't connected (the SET was dropped). Log 'queued — will send on next connect' instead, so the log stops claiming an arm that never transmitted. Both platforms (iOS BLEManager/FrameRouter/DebugDataDiagnostics; Android WhoopBleClient/ AndroidDiagnostics). Android compiles clean; iOS gated by CI.
…ck skew Rounds out the Alarm block to cover the full alarm-failure matrix, not just 'didn't stick': - #1 last fired: persist STRAP_DRIVEN_ALARM_EXECUTED → 'Last fired: Nh ago / never observed' (the 'did the strap actually buzz?' leg of the armed→reports→fired sequence). - #3 model + 5/MG experimental gate → 'Model: 5.0/MG · experimental: off → NOT armed', the #1 '5/MG alarm never fires' cause (silently gated off). - #4 strap clock skew: persist the newest banked record → 'Strap clock: 446d behind (reset)', the actual #34 root cause, surfaced instead of buried in the CLOCK-WARNING log line. Now the block triages: didn't arm (model/experimental/connected), didn't stick (sent-vs- reports + clock), didn't fire (last-fired). Both platforms; persists at low-frequency points (fired event, GET_DATA_RANGE). Android compiles clean; iOS gated by CI.
The iOS #3 model line compared selectedWhoopModel against "whoop5", but the stored WhoopModel rawValue is "WHOOP 5.0 / MG" — so every iOS user (incl. 5/MG) showed "Model: WHOOP 4.0" and the experimental-gate hint never rendered. Compare against WhoopModel.whoop5mg.rawValue and print the real model name. Clock-skew (#4) only flagged a clock BEHIND wall; a future-dated strap clock (the #928 case, equally breaks the alarm) showed "OK". Flag AHEAD too.
DX23876
referenced
this pull request
in DX23876/noop
Jul 22, 2026
Debug export: Alarm block + honest "armed" log (#34)
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.
From #34 (alarm not buzzing) — the strap consistently reported a stale armed time no matter what NOOP sent (its clock was reset). The
#401readback caught it, but nothing surfaced it, and the log even claimed "armed" while disconnected.#3 — Alarm block in the debug export (both platforms)
The configured wake + the last arm's sent-vs-strap-reports epochs with a MISMATCH flag, so a "didn't buzz" report is decidable at a glance:
armStrapAlarmpersists the sent epoch (+ when + connected); theGET_ALARM_TIMEreadback persists what the strap reports; the export composes them (best-effort, guarded).#4 — don't log "armed" when disconnected
The old log said
send(Set Alarm Time) ignored — not connectedthen immediatelyAlarm: armed. Now it logs "queued — will send on next connect" whenconnectedPeripheralUUID/_state.connectedis nil, so the log stops claiming an arm that never transmitted.Scope
BLEManager(arm persist + gate),FrameRouter(readback persist),DebugDataDiagnostics(block).WhoopBleClient(arm persist + gate + readback persist),AndroidDiagnostics(block).