Repository navigation
Description
#1008/#1118 sized the R-R over-count entirely from WHOOP 4.0 nights (raw coverage ~1.74x). We do
not know what 5.0 / MG do, and the answer decides which fix is correct. Build 10.1.1 (343 / iOS 225) makes
this a one-capture question.
Why this is not obviously 4.0-only
The diagnostic and one plausible cause are shared across families:
-
Backfilleris a single path parameterised byfamily, and the census sits at the shared insert site,
so therr emitline appears for 4.0, 5.0 and MG alike. No family gate, no toggle. -
Both R-R extraction sites in
HistoricalStreamsdo the same thing regardless of family:if let rrs = p["rr_intervals"]?.intArrayValue { for rr in rrs { out.rr.append(RRInterval(ts: ts, rrMs: rr)) } }
Every interval in a record is stamped with the record's own timestamp, discarding sub-second
timing. That is whybeatAccuratecaps around 0.6 and why cross-second de-dup is structurally blunt —
and it is not a 4.0 quirk.
But the decode genuinely differs, in ways that matter here
PostHooks builds rr_intervals differently per layout, and both differences bear on this comparison:
| 4.0 layout | 5.0 / MG variant layout | |
|---|---|---|
| count | no cap | for i in 0..<min(rrn, 4) — capped at 4 |
| 0 ms values | dropped ("a placeholder, not a beat-to-beat interval") | kept |
Two things to check against a capture rather than assume:
- If
rrncan exceed 4, the cap silently discards beats — an under-count, the opposite failure to
4.0's.offeredvs the record's ownrr_countwould show it. - Kept 0 ms entries inflate
offeredand theperSechistogram without movingsumRr, so
ratio/ratioRepwill NOT flag them. A 5.0 capture whoseperSectail is fat whileratioRepsits
near 1.0 is the signature.
What to capture
A history offload from a 5.0 or MG strap, plus a 4.0 offload for comparison if the same person has both.
The line is always-on, beside the persisted-rows summary — no Test Centre mode, no toggle.
Which build matters, because the line changed after the last one shipped. #1452 added modalGap and
fill, and it merged AFTER the 10.1.1 (343 / iOS 225) testing build was cut, so that build does NOT
carry them:
| Build | Line carries | Answers |
|---|---|---|
| 10.1.1 (343 / iOS 225) | ratio ratioRep perSec |
the comparison only |
| next build (post-#1452) | + modalGap fill |
the comparison and whether the candidate fix is viable |
On 343/225:
rr emit path=historical offered=… inserted=… secs=… sumRr=…s span=…s ratio=… ratioRep=… perSec[1/2/3/4+]=…
Post-#1452 it gains modalGap=…s fill[<=1/<=1.5/<=2/>2]=…/…/…/….
A 343/225 capture is still worth having — ratio alone settles whether 5.0/MG over-counts at all, which
is this issue's question. But it cannot settle the FIX, so if a 5.0/MG owner is available it is worth
waiting for a build cut after #1452 rather than asking twice.
Read ratio first, not ratioRep — correcting the guidance this issue originally carried.
ratio = sum(rr) / wall span is independent of how the strap chunks records: in a gapless stream the
beat-time fills the wall time whatever the record cadence, so healthy is ~1.0 on any family.
ratioRep = sum(rr) / reporting-seconds is gap-immune but spacing-dependent: its healthy value is the
mean spacing of the records that carried R-R, not 1.0. On a 1 Hz-record strap (4.0) the two coincide,
which is why this did not bite before. On a strap whose records cover several seconds — and 5.0/MG
variant records carry multi-sample IMU blocks, so this is live — a perfectly healthy strap would read
ratioRep ~5 and look catastrophically over-counted.
On 343/225 that baseline is derivable as span / secs. Post-#1452 modalGap states it outright, which is
why it was added. Either way: ratio for the cross-family comparison, ratioRep only as the gap-robust
cross-check against its correct baseline.
What each outcome means
5.0/MG ratio |
Reading | Consequence |
|---|---|---|
| ~1.0 while 4.0 reads ~1.7 | over-count is specific to the 4.0 decode | fix belongs in the 4.0 path; the shared stamping is not the culprit |
| ~1.7 like 4.0 | shared record-timestamp stamping is implicated | fix must be timeline-based, not a 4.0 workaround, and touches every strap's stored R-R |
~1.0 but fat perSec tail |
0 ms placeholders being stored | narrow decode fix: drop them as the 4.0 path already does |
Deliberately no fix proposed yet. The three outcomes above call for mutually exclusive repairs, and
the whole point of building the census (#1443) was to stop guessing between them — the same trap that
withdrew #194.
Blocked on hardware: needs a 5.0 or MG owner running the testing build.
Activity
diag(rr): log the record cadence and per-record fill the census could…
pilleuspulcher-blip commentedon Aug 19, 2026
@ryanbr
I'm on the latest test build (2026-08-19) and Android 17. I can connect a Whoop 5 for the coming night.
Is it enough to send a straplog tomorrow in the morning to help you? Or what else can I do?
chore(staging): testing build 10.1.1 (344 / iOS 226)
ryanbr commentedon Aug 19, 2026
Adding a second thing worth capturing in the same session, since it needs the same hardware and the same
person.
Also capture: an nRF Connect dump of the primary AD vs scan response
Alongside the
rr emitline, a raw advertisement dump from a 5.0/MG would settle a discovery questionthat is currently open in two projects.
Why it is open. A 128-bit UUID often does not fit the 31-byte advertising payload, so a peripheral
may advertise the 16-bit SIG member form instead. Both CoreBluetooth and Android surface that as its
Bluetooth-base expansion
0000FD4B-0000-1000-8000-00805F9B34FB, which does NOT equal our vendor UUIDfd4b0001-cce1-4033-93ce-002d5875f58a. If a band advertises only the 16-bit form, NOOP would never seeit, and the owner would experience that as "NOOP cannot find my 5.0" rather than as a bug worth filing —
so absence of reports is not evidence it does not happen.
What I checked, and why no code shipped. I tried the obvious widening (#1457) and closed it: NOOP
rejects such a band at TWO independent layers, not one. The scan filter matches the vendor UUID, and so
does the acceptance decision in
didDiscover:Widening only the filter surfaces the peripheral and then rejects it one line later. Widening acceptance
too would make the main scan auto-connect to anything advertising
0xFD4B, which is not confirmed to beWHOOP-exclusive — a real BLE risk to take on a guess.
Prior art: OpenStrap/edge#255 ships the same widening at the AccessorySetupKit layer (which NOOP does
not use) and its own test plan still asks for this exact capture. So neither project has the answer.
The ask: with nRF Connect (or any BLE scanner that separates them), record what a 5.0/MG puts in the
primary advertisement versus the scan response — specifically whether
fd4b0001-cce1-4033-93ce-002d5875f58aappears in the primary AD, or only0xFD4B, or only the name.One session then answers three things: whether 5.0/MG over-counts R-R, whether the timeline fix is
viable, and whether our discovery path has a silent hole.
chore(staging): testing build 10.1.1 (345 / iOS 227)
docs(whoop5): record what the 5.0 cannot read, and what would resolve…
fix(rr): the strap's own record wins for every second it covers (ryan…
pilleuspulcher-blip commentedon Aug 20, 2026
@ryanbr
I couldn't read out of the very technical description if you need the results for IOS or Android.
I attach all logs for Android 17 and a Whoop 5 connected to the test build from 2026-08-19 (fresh installation).
The last night gave me a RHR of 41 (Whoop app 48) and a HRV of 28 (Whoop app 31).
noop-master-Android-v10.1.1-staging-260820-0851.zip
noop-capture-260820-0851.txt
noop-strap-log-260820-0852.txt
ryanbr commentedon Aug 20, 2026
@pilleuspulcher-blip This is exactly what was needed — thank you. Android was the right choice, and the strap log alone answered it.
Answer: the 5.0 shows the overcount too, worse than the 4.0.
Emission is clean — all 14 offloads
ratio0.92–1.08,modalGap=1s, one interval per second. But the stored night reads:At your resting rate that should be ~0.8 beats/sec. The 4.0 measures 1.68–1.85, so the 5.0 is further off, and the fault is downstream of the decoder, not in it.
The per-second dump names the mechanism:
ordrestarts at 0 on every delivery, so two rows at ord 0 on one second came from two separate deliveries writing the same second with different values. Because the values differ they aren't exact duplicates — de-dup strips only 170 of 69,440 rows and coverage doesn't move. That's why every value-based fix has missed it.Your log also ruled out two suspects: no live-stream merge (every batch is
path=historical), and no legacy data (fresh install).On your numbers: the RHR gap is mostly definitional — NOOP shows the lowest-sustained floor (41), while its own night mean is 49, which is essentially the WHOOP app's 48. The overcount then drags that floor lower still.
Separately: the log header says
Model: WHOOP 4.0for your 5. That's a NOOP bug — layout v18 and puffin framing confirm the 5. I'll fix it; it misreads two reports today.Nothing further needed from you for now. The nRF Connect advertisement dump is still useful whenever convenient, but it's a separate question from this one.
Report the strap model that actually advertised, or say unknown
Staging build: versionCode 347, build 229 (base 10.1.1)
Count deliveries per stored second across a whole night (#1331/#1008)
Measure how a duplicated second's two copies compare (#1510)
gdorgian commentedon Aug 27, 2026
Both "check against a capture rather than assume" items, measured — and both come back negative
You listed two things to check on the 5.0/MG decode. A public PacketLogger capture answers both directly, so they can be crossed off rather than carried.
Capture: https://github.com/digitalerdude/noop/releases/tag/whoop5-hci-capture-2026-07-10
Asset SHA-256:
92e8fbb3e3091f6769968f1117b9626470fba80bdb348d3a37140347336fd558(downloaded and verified before parsing)Reading the
rr_countbyte at @23 and the four interval slots from @24 across 18,602 layout-v18 records:1. The
min(rrn, 4)cap discards nothingrrnnever exceeds 4 in this capture. It reaches 4 on three records out of 18,602, and there is no non-zero interval sitting past the cap. So the cap is not currently losing beats on a 5.0/MG. Worth keeping the guard, but it is not a live defect.2. There are no 0 ms entries to keep
Zero of 14,911 decoded intervals are 0. The concern is well-founded in principle — but for v18 there is nothing to inflate.
For completeness on where the asymmetry actually lives in the Swift: the three paths that reach durable R-R all drop zeros —
Interpreter.swift:294(REALTIME_DATA,v > 0),Interpreter.swift:410(v18 historical,ticks > 0), andPostHooks.swift:378(v != 0). The one path that keeps them isPostHooks.swift:249-252, theraw_dataIMU variant — andextractStreamstakes HR and R-R only from REALTIME_DATA (type 40), so that path never reaches the store. It is a frame-inspector display inconsistency, not a scoring one.3. The distribution itself is the more useful number
14,171 of 18,602 records carry exactly one interval, 4,066 carry none, and only 365 carry two or more. So v18 is effectively one beat per record, at roughly one record per second.
That matters for sizing the over-count: a transport emitting ~1 interval per second cannot reach
coverage1.8 on its own arithmetic. It has to be counted twice. On a 5.0/MG field log the historical emission path agrees —perSec[1/2/3/4+]=853/153/4/0,pack=1.00,dens=1.00— while the stored stream for the same nights shows 95% of seconds holding two rows. The doubling is between transports, not inside the historical decode. (Detail and the before/after in my comment on #1331.)It also reframes the dense-second dumps. Since a record almost never carries more than one interval, a stored second holding 26, 61 or 109 beats is many records mapped onto one timestamp, not one record decoding into many intervals — so that facet is a timestamp-assignment question rather than a decode-count one.
Happy to run anything else against this capture; it is public and the parser is ~40 lines.
hrv: multiMs overflows a 32-bit Int, so the R-R delivery census repor…
hrv: state the real pct overflow bound, and pin that the wrap could l…
docs(pending-validation): settle rr-historical-authority