Repository navigation
Expand file tree
/
Copy pathpubspec.yaml
More file actions
792 lines (761 loc) · 44.3 KB
/
Copy pathpubspec.yaml
File metadata and controls
792 lines (761 loc) · 44.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
name: openstrap_edge
description: "A local-first health app for your wearables. No subscription, no fees, private by default. Not affiliated with any device maker."
publish_to: 'none'
# NOTE: bumping this also requires manually bumping MARKETING_VERSION/
# CURRENT_PROJECT_VERSION for the OpenStrapWidget(Extension) and "OpenStrapWatch
# Watch App" targets in ios/Runner.xcodeproj/project.pbxproj — they aren't wired
# to FLUTTER_BUILD_NAME/FLUTTER_BUILD_NUMBER. See guides/IOS_INSTALLATION.md
# "Version Numbers".
version: 0.12.2+81
environment:
sdk: ^3.11.4
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# Pinned to what flutter_localizations (this SDK) requires — see its own
# pubspec.lock entry, don't drift it independently.
intl: ^0.20.2
cupertino_icons: ^1.0.8
# The single icon family behind lib/ui2. One pack, one stroke weight, one
# optical size — replacing the five-pack mix the old design system blended
# per concept, which is why no two screens' icons quite matched. Lucide is
# what the interface was drawn in; keeping it means a screen can name the
# glyph the design names.
lucide_icons_flutter: ^3.1.15
# Renders the three community brand marks (assets/icons/) as tinted SVG —
# GitHub/Discord/Reddit have their own logos, not a Lucide glyph standing
# in for them. Nowhere else: every other icon in the app is still Lucide.
flutter_svg: ^2.0.10+1
# Local pure-Dart packages — the protocol byte codecs and the metric/analytics
# engine. Replace the old cloud backend: decode happens on-device, and the
# local re-layer computes metrics here (see lib/data/local_repository.dart +
# lib/compute/derivation_engine.dart). The analytics package now points at the
# 1 Hz-native family (import via `package:openstrap_analytics/onehz.dart`).
# SIBLING PACKAGES ARE PINNED TO COMMIT SHAs, NOT FLOATING `main`/BRANCH REFS.
# A floating ref means an upstream commit silently changes the behaviour of an
# already-tagged edge release (this bit us: analytics v42 rode `ref: main` into
# 0.9.13/0.9.14 with no edge change and shipped the main-thread staging ANRs).
# Bump these SHAs deliberately, as part of a reviewed edge change. Local dev
# still builds against ../analytics and ../protocol via pubspec_overrides.yaml.
# NOTE: this is the multiband branch, so protocol is pinned at the gen5 work
# rather than plain `main`. Prefer merge commits on `main` over PR-branch
# heads where possible — a deleted branch can orphan a PR-branch SHA.
openstrap_protocol:
git:
url: https://github.com/OpenStrap/protocol.git
# protocol PR #27 head. main deliberately stays on a pre-gen5 SHA so the
# multiband surface doesn't ride in as a side effect of unrelated work —
# that is the right call THERE. This is the branch that wants it.
#
# Carries the gen5 decoders plus the fixes from #27: command responses
# have two more header bytes than we assumed (body location was reading
# the status byte as the location), GET_CLOCK/GET_DATA_RANGE read their
# fields instead of scanning for them, the R22 config values were
# inverted, and the gen4 optical fields are deprecated with what they
# actually are.
# protocol main @ #27 merge. Carries the gen5 command/decoder fixes plus
# the decode-integrity work: a record only decodes if its packet type says
# it is one, r-r beats are read only where the field map is confirmed, and
# a frame whose payload crc32 fails no longer lets its declared length
# swallow the frames behind it.
#
# protocol `fix/gen5-bounds-and-write-guard` @ e33e53a — the sweep half.
# gen4 record versions we never confirmed a field map for (v7/v9/v18 and
# unknown) stop publishing spo2/skin-temp/ppg/ambient off that guess and
# report absent instead; a gen5 v18 record with an out-of-range HR byte
# now decodes with hr absent instead of being thrown at raw_archive whole;
# gen4 bounds are no longer applied to gen5; HelloInfo.wristOn/.charging
# are always null (wear comes from WRIST_ON/OFF and the realtime wearing
# bit). v24/v12 — what our own straps ship — are byte-for-byte unchanged.
#
# Pushed (2026-08-19) on `fix/gen5-bounds-and-write-guard`, so a fresh
# checkout resolves it. The branch has moved on since (decodeFrame now
# emits R10 beat intervals) — deliberately NOT repinned: edge never reads
# `rr_ms` off decodeFrame, so the hop changes no number here and a repin
# would drag kAlgoVersion with it for nothing.
#
# Repinned to the #27 head after its own review pass. NO kAlgoVersion
# bump: the fixes only reject NaN/±inf, which was never a measurement, so
# for any user whose data is valid the output is byte-identical.
#
# REPIN (this branch): protocol main @ b7990e1, the #31 merge commit.
# #31 carries the gen5 hello map, the real clock opcodes and the v18
# record field map this branch's decoders need. main's pre-gen5 pin is
# deliberate THERE; this is the branch that wants gen5.
#
# REPIN (this branch): protocol #34 head @ 19d7291, on top of 4ce8f02
# (everything above). Carries the oura ring and generic bluetooth HR
# wire format in from edge — pure decode/encode functions with no BLE
# or db dependency, so they belong with the rest of the bytes-in-
# records-out code rather than beside the session that drives them.
# `parseFrame`/`parseEvent` on the whoop side are unchanged; the moved
# functions are `parseOuraFrame`/`parseOuraEvent` to avoid a barrel
# collision. No stored WHOOP number moves.
#
# Repinned again after that branch's own review pass: a truncated HRS
# notification (energy-expended flag set but the field cut off, or an
# odd-length RR remainder) now refuses instead of silently parsing what
# fit; `ouraCmdAuthenticate` rejects a wrong-size cipher instead of
# emitting a malformed frame; `ouraCmdSyncTime` no longer calls
# `ByteData.setUint64`, which throws on dart2js. None of the three touch
# a WHOOP code path.
#
# REPIN (this branch): protocol main @ 6664854, the #35 merge commit —
# a MAIN merge commit, reachable regardless of branch deletion, and the
# first pin here that is not a PR-branch head (#34 has since merged at
# 2c8448b, which 6664854 descends from, so the oura/HRS wire formats
# above are carried unchanged).
#
# The hop from 19d7291 is ahead 3 / behind 0 and its ONLY lib/ diff is
# #35's `lib/src/control.dart` (+4/-5): `Gen5HelloInfo.parse` no longer
# returns null for a hello body whose revision byte is not 1 — the byte
# is recorded in `helloRevision` and the fixed revision-1 offsets are
# read regardless. That matters here because this branch makes HELLO
# MANDATORY: under the old gate a firmware that bumped the revision
# could not connect at all.
#
# NO kAlgoVersion bump: hello feeds connection identity and state, not
# the derivation pipeline — no decoder for a persisted record changes,
# so no stored number can move. Reasoning also sits beside kProtocolPin
# in lib/compute/derivation_engine.dart, which moves together with this
# ref and pubspec.lock (the pin-equality test fails a partial repin).
#
# REPIN (this branch): protocol `lefun-protocol` @ 4284f9a, 2 commits on
# top of 471034c (everything above). Adds the Lefun band's own wire
# module this branch's `lib/ble/adapters/lefun.dart` calls:
# `buildLefunFrame`/`parseLefunFrame`, `decodeLefunBattery`, and
# `kLefunReportBattery` — a bounded envelope codec plus battery decode,
# nothing else. No decoded physiological field (owner ruling: nobody on
# this project owns the hardware).
#
# NO kAlgoVersion bump: every changed decoder here is on the live
# realtime path (decodeFrame's `realtime_hr`/`realtime_small`, R11) —
# live high-rate streams are never persisted (see invariant #1), so no
# stored day_result number moves. R11's meaning is still unconfirmed
# and edge does not read it.
#
# REPIN (this branch): protocol `feat/polar-pmd-protocol` @ 87ee803, on
# top of the #42 merge. Adds the PMD control-point start/stop writes and
# the PPI data-frame decoder polar_pmd.dart needs. NO kAlgoVersion bump:
# this device's entry stays out of `kDerivableSources` (unowned
# hardware), so nothing it decodes feeds a derived metric.
#
# MERGE (main → this branch): main's own repin below (protocol tip
# fe1464d) already contains 87ee803 as an ancestor (verified via
# `git merge-base --is-ancestor 87ee803… fe1464d…` on the protocol
# repo), so the ref moves to that tip; nothing from this branch's own
# repin is lost.
#
# REPIN (this branch): protocol `feat/garmin-gfdi-protocol` @ 96d47d7,
# on top of the #42 merge above. Adds `garmin.dart`: COBS + Multi-Link
# framing, the GFDI frame/CRC16, the device-information parser, and a
# minimal protobuf reader/writer for one battery round trip. Nothing
# existing changed — NO kAlgoVersion bump.
#
# MERGE (main → this branch): main's own repin below (protocol tip
# fe1464d) already contains 96d47d7 as an ancestor (verified via
# `git merge-base --is-ancestor 96d47d7… fe1464d…` on the protocol
# repo), so the ref moves to that tip; nothing from this branch's own
# repin is lost.
#
# REPIN (this branch): protocol PR #51 head @ 1caf448, on top of 471034c.
# This branch needs the Ultrahuman wire format (`UltrahumanRecord`,
# `UltrahumanResponse`, the k-constants and cmd builders) that #51 adds
# and main doesn't have yet — same reasoning as the earlier gen5 PR-head
# pins above. Repin to #51's main merge commit once it lands.
#
# NO kAlgoVersion bump: Ultrahuman's `signals` stays `const {}` (raw
# drain/archive only, nothing decoded into a derivable signal), so no
# existing decoder or stored number changes.
#
# MERGE (main → this branch): main's own repin below (protocol tip
# fe1464d) already contains 1caf448 as an ancestor (verified via
# `git merge-base --is-ancestor 1caf448… fe1464d…` on the protocol
# repo), so the ref moves to that tip; nothing from this branch's own
# repin is lost.
# REPIN (this branch): protocol `feat/dafit-moyoung-protocol` @ 06cb5f2,
# 3 commits on top of 471034c. Adds the dafit/moyoung frame codec
# (`DafitFrame`/`parseDafitFrame`/`buildDafitAck`/`dafitInitSequence`) —
# a new adapter-only wire format, no existing decoder touched.
#
# NO kAlgoVersion bump: dafit has no signals (const {}, excluded from
# kDerivableSources per the hardware-ownership invariant), so no
# decoded value or day_result number is affected.
#
# MERGE (main → this branch): main's own repin below (protocol tip
# fe1464d) already contains 06cb5f2 as an ancestor (verified via
# `git merge-base --is-ancestor 06cb5f2… fe1464d…`), so the ref moves
# to that tip; nothing from this branch's own repin is lost.
#
# REPIN (this branch): protocol PR #49 head @ fbda904 (not yet on main).
# Adds the o2ring frame envelope/INFO-reply parser this branch's
# adapter calls. NO kAlgoVersion bump: o2ring declares no signals, so
# nothing it decodes reaches derivation.
#
# MERGE (main → this branch): main's own repin below (protocol tip
# fe1464d) already contains fbda904 as an ancestor (verified via
# `git merge-base --is-ancestor fbda904… fe1464d…` — PR#49/o2ring is
# folded into the tip via the `d297055` merge commit), so the ref moves
# to that tip; nothing from this branch's own repin is lost.
#
# REPIN (this branch): protocol PR #47 head @ d8a1685 — a PR-branch
# head, not a main merge commit, because this is the branch that needs
# what #47 adds and #47 has not merged yet. Pure addition on top of
# 471034c (only lib/src/zetime.dart, openstrap_protocol.dart's export,
# and a test file changed — no existing file touched), so it carries no
# risk to any other adapter. Adds `parseZeTimeFrame`,
# `zetimeBatteryLevel`, `zetimeRequestFrame`, `kZeTimeCmdBattery`,
# `kZeTimeAckToken` for the ZeTime command envelope + battery decode.
#
# NO kAlgoVersion bump: ZeTime carries no derivable signal
# (`ZeTimeAdapter.signals` is `const {}`), so nothing here feeds the
# derivation pipeline.
#
# REPIN (this branch): protocol `feat/wearfit-howear-protocol` @ 1cf8e61,
# one commit ahead of #42 (471034c). Carries the wearfit/howear frame
# codec (parseWearFitFrame/wearFitCmdGetBattery/parseWearFitBattery)
# this branch's adapter needs; nothing else on the WHOOP/oura/miband
# path changes.
#
# REPIN (main): protocol `feat/ringconn` @ b819ee0, 2 commits on top of
# 471034c. Adds the ring's frame codec this branch's
# `lib/ble/adapters/ringconn.dart` calls: `parseRingConnFrame`,
# `RingConnFrame`, the bulk-page reader, and the channel constants
# (`kRingConnChannelSleep`/`...Awake`). No decoded field — raw frames
# only (owner ruling: nobody on this project owns the hardware).
#
# NO kAlgoVersion bump: nothing here feeds a stored metric.
#
# MERGE (main → this branch): this branch's own repin (wearfit @
# 1cf8e61) and main's (ringconn @ b819ee0) are parallel commits on
# protocol, neither an ancestor of the other — verified via
# `git merge-base --is-ancestor`. protocol's own `origin/main` has
# already merged both (its own independent per-device PR queue, PR#50
# wearfit-howear and PR#48 ringconn both folded in), so the ref moves
# to that tip rather than either single-device SHA — this is both
# repins standing, not a choice between them.
#
# MERGE (main → this branch, 2nd hop): this branch's own PR#47 head
# (d8a1685, ZeTime) is ALSO already an ancestor of this same tip —
# verified via `git merge-base --is-ancestor d8a1685… origin/main` on
# protocol, true — protocol's PR#47 merged as b8430e4 before #48/#50
# landed. So `fe1464d` carries ZeTime, wearfit and ringconn together;
# nothing from this branch's own repin is lost by moving to it.
#
# protocol main @ bc7d8d0 — the whole point of this repin: PR#54 lands
# the Labrador (WHOOP MG ECG) parser this branch's `lib/ecg/` calls
# (`LabradorR17`, `LabradorR16Raw`, `Gen5HelloInfo.isMaverick`,
# `cmdAbortHistorical`). Also carries #70 (garmin/ultrahuman decode
# fixes, unrelated but already an ancestor). Verified present:
# `git show bc7d8d0:lib/src/labrador.dart | grep 'class LabradorR17'`.
#
# REPIN: protocol #71 merge (oura `decodeSleepPhases`) @ f04931b, on top of
# bc7d8d0.
# REPIN: protocol main @ ecb512b (#72-#77).
# REPIN: protocol feat/multidevice-verified-decoders head (multi-device
# decoders; WHOOP decode untouched, pinned by whoop_freeze_golden_test).
# Re-point at the merge commit once it lands on protocol main.
# REPIN: protocol main @ b4fde6a (#81: Mi Body Composition Scale 2 answers
# the history request with a 7-byte count). The range from 89080bc is 41
# commits: #81, the AGPL license/docs (#80), and #82 decoder-hardening
# (R10 gated on packet type, hello/battery parsing, reassembler
# truncation semantics, removal of deprecated gen5 APIs). #81 sits on top
# of #82, so it cannot be pinned alone.
# protocol main @ #85 merge (image update payload builders).
# REPIN: protocol feat/zepp-family @ d74cbc8, one commit on top of
# fbadb5b: the Huami2021 transport the Helio Strap needs (chunked
# transport, auth, fetch, record decoders). Additions only; WHOOP decode
# untouched. Re-point at the merge commit once it lands on protocol main.
# REPIN: protocol feat/zepp-family @ f2398ab, PR #86's head: its review
# fixes to the same transport (chunk counter wrap, stale first chunk,
# short bodies, activity record stride/count, protobuf bounds, nap
# stage edge). Also carries #86's legacy-Huami and scale decoders,
# unread here.
# protocol main @ #86 merge (the huami2021 transport, 8-byte legacy
# records, the amazfit scale decoder, and the review fixes on top:
# chunk counter wrap, stale first chunk, short bodies, activity record
# stride/count, protobuf bounds, nap stage edge, and an activity round
# whose announced count doesn't fit 4- or 8-byte records decoding to
# nothing instead of a byte-length guess).
ref: dc699ce491c5eec4c924fafe8e29c637ea758b5a
openstrap_analytics:
git:
url: https://github.com/OpenStrap/analytics.git
# analytics main @ #34 merge. Two hops in one: #32 (the HR-onset bypass
# for low-limb-swing cardio) had already merged and this pin was still
# sitting on its PR-branch head, and #34 lands the sleep-stager rewrite.
#
# #34 replaces the deep/REM boolean conjunctions with weighted robust-z
# scores. Measured against 99 PSG-labelled wrist nights (DREAMT), the old
# rules scored kappa 0.036 — deep PPV 5.7% against a 4.5% base rate, REM
# 12.1% against 14.0%, i.e. at or below chance — because the deep rule
# AND-ed one good axis, one null axis (rmssd, d -0.13) and one INVERTED
# axis (mean HR, d +0.31), so they could only co-fire by luck. That is
# what produced 30-second deep specks the 3-min bout rule then deleted.
# Now kappa 0.128 (0.132 held out), deep 53.0/12.9 sens/PPV, REM
# 52.6/20.7. Cutoffs are calibrated on OUR captures, not DREAMT — the
# DREAMT-optimal values under-called REM badly on real WHOOP data.
# Verified present: `git show <sha>:lib/src/onehz/sleep/cardio_stager.dart
# | grep -E 'classifyCardioEpochs|_remScoreCut = 0.5'`.
#
# analytics main @ #35 merge (1fb34dc). Neither side of this conflict was
# right: HEAD had #35's PR-BRANCH head (38a8636, never on main) and main
# had the older #38 merge (c3a30be). This SHA is analytics main and carries
# all three hops this release needs -- #38 (nap detector), #39 (the awake-HR
# baseline P0 that shipped inside #38), and #35 (the 1 Hz step estimate
# deleted + movement minutes on measured evidence), the sibling half of
# THIS branch.
#
# Verified against the SHA: `dailyStepEstimate` absent,
# `dailyActiveMinutes` present in lib/src/onehz/motion/steps.dart.
#
# analytics main @ #41 merge (ebe45da). Adds `journalNumericCorrelations`
# — Spearman rho + Theil-Sen slope over journal fields that carry a dose,
# which the typed journal entries shipped in edge #218 had no way to
# correlate. Nothing else changed; #41 only appends to coaching.dart.
#
# Verified against the SHA:
# `git show ebe45da:lib/src/onehz/human/coaching.dart |
# grep -E 'journalNumericCorrelations|class JournalNumericDay'`
#
# analytics main @ #42 merge (e047c59). Names the sample gap cap that
# `estimateBoutCalories` applies when the next HR sample is late, so the
# live workout scorer in app_state can read the same 150 s rather than
# restating it. A default-argument literal is unreachable from another
# package, so the second copy was going to drift the day the cap moved.
#
# Verified against the SHA:
# `git show e047c59:lib/src/onehz/workout/calories.dart |
# grep defaultMergeGapCapS`
#
# analytics `fix/numerical-correctness` @ beaeafa. THE PIN ABOVE WAS
# STALE: it sat on cef6fe4 (#45) while the comment described e047c59 and
# every local run built ../analytics through pubspec_overrides.yaml, so
# kAlgoVersion 67 and 68 both documented analytics behaviour the pinned
# SHA had never contained — the v43 failure, again. The two commits this
# moves to are what those entries were actually written against, plus the
# sweep: Welch-averaged band powers in ms²/Hz, `ulf` absent rather than
# 0.0, nullable `round6`, correctRr advancing its clock by the real
# interval on a corrected beat, baselines withheld until a real night is
# folded, the resting-HR percentile-of-you oriented lower-is-better, the
# circadian non-parametrics omitted when an hour was never observed, and
# `meaningful` off readiness_composite. `sex`/`age` are gone from
# vo2maxEstimate and physiologicalAge, so this pin and
# crossday_pipeline.dart must move together.
#
# The pins are also asserted from lib/compute/derivation_engine.dart
# (kAnalyticsPin/kProtocolPin) — repin without visiting the version gate
# and the suite goes red, because kAlgoVersion alone cannot tell two
# different analytics apart.
#
#
# analytics `fix/numerical-correctness` @ 98d42b6 — the device seam, at
# kAlgoVersion 70. One commit on top of beaeafa, and the one every
# family-dispatched metric in edge needs: `lib/src/onehz/device.dart`
# (DeviceFamily, deviceFamilyOf() -> null on anything unrecognised,
# calibrationFor() -> null rather than gen4's constants). It also lands
# Benjamini-Hochberg over the 9x4 journal-correlation grid (findings
# disappear; empty is a real answer), binary habits routed to
# difference-of-means instead of a rho, hrRecovery's fitted tau,
# Kruskal-Wallis + permutation on the weekday effect, sleep runs
# terminating at unobserved, per-cycle depths/widths out of the apnea
# screen, and the removal of vo2maxEstimate/physiologicalAge — edge
# stopped calling those two before this pin, so nothing loses a value.
#
# Verified against the SHA:
# `git show 98d42b6:lib/src/onehz/device.dart |
# grep -E 'enum DeviceFamily|calibrationFor|unknownFamilyNote'`
#
# analytics `fix/numerical-correctness` @ 391ede4 — analytics HEAD, and
# what kAlgoVersion 71 is pinned against. This is the commit that landed
# the nine symbols edge lib/ was already calling and 98d42b6 did not have
# (alertnessForecast, AlertnessForecast, CvhrNight, CvhrDistribution,
# cvhrPersonalDistribution, cvhrDistributionWindowNights, StageInterval,
# stageIntervals, journalFieldLagDays) plus observed_max_hr, session_cost,
# night_hrv_shape, cycle_lengths and the cvhr apnea screen. The "a clean
# checkout does not compile" warning that used to sit here is RESOLVED —
# checked symbol by symbol against this SHA.
#
# Verified against the SHA:
# `git show 391ede4:lib/src/onehz/human/alertness_forecast.dart | head -1`
# `git show 391ede4:lib/src/onehz/device.dart |
# grep -E 'enum DeviceFamily|calibrationFor|unknownFamilyNote'`
#
# The "pin is behind the working copy" warning that used to sit here is
# RESOLVED. The algorithms-audit wave (readiness refusing on a cold start,
# the RMSSD jitter gate, the active-energy correction, the EWMA baseline
# fix, BH-corrected journal insights) was uncommitted when that was
# written; it is committed now and this SHA is the tip of it, so what
# kAlgoVersion 71's changelog describes is what a clean checkout builds.
# The pin also moved 391ede4 -> 21664f8 without the prose above following
# it — the `git show` lines still read true against either.
#
# `fix/numerical-correctness` merged to main as PR #46 (bfea5e5); the pin
# moved 21664f8 -> bfea5e5 to track it. Diff between the two is two
# test-only deprecation-ignore annotations (analytics `lib/` untouched),
# so kAlgoVersion needs no bump for this move.
#
# Repinned again after that branch's own review pass. Still no bump, same
# reason: the change rejects NaN/±inf inputs and nothing else, and a NaN
# was never a reading. `dailyEnergy` returns a nullable record now — it
# abstains rather than billing every waking minute as active when the
# anchors are unusable — which is source-breaking here, not
# number-changing (see `onehz_pipeline` and `_dailyEnergy`).
#
# REPIN: analytics @ 353c6bc, on top of d6ba41c. FOUR output changes,
# kAlgoVersion bumped for this hop — see its own changelog entry:
# nocturnalRhr(minCoverage: 0) could reach a NaN trough; the cadence
# rescale in the sleep stager was double-applying an already
# cadence-invariant factor; cardio_stager's epoch grid could silently
# drift from its own reported length; readiness's sub-quantum
# dispersion guard only ran when robustZ came back null, missing a
# nonzero-MAD-but-still-quantized baseline. WHOOP-cadence output is
# unaffected by the first three (1 Hz is the case each already handled
# correctly); the quantum-guard fix can change a WHOOP readiness score
# when a baseline happens to sit in that gap.
#
# analytics main @ #51 merge (7105256). Review-fix repin for edge's own
# band-agnostic PR (#280) — no lib/ diff over 353c6bc for this hop (#51
# was the merge of this same feat/band-agnostic work on the analytics
# side; the only lib/ change since 353c6bc is #52's
# lib/src/onehz/workout/calories.dart, picked up incidentally since #52
# merged before #51 on analytics main).
#
# main also repinned to a077a4a (the #52 merge, edge#283's own hop) in
# the meantime — 7105256 already contains it: analytics main order is
# a077a4a (#52) then 7105256 (#51), so this pin supersedes that one and
# no further move is needed.
#
# REPIN: analytics main @ 187e026 (PR #53 merge). One hop on top of
# 7105256: adds the optional `nnTimesMs` param to irregularBeatScreen
# that onehz_pipeline.dart (edge #289 / 3120774) already calls -- the
# pin was never moved when that landed, which broke `flutter analyze`
# (undefined_named_parameter, both call sites). No other symbol changed.
#
# REPIN: analytics main @ 1fa8144, the #59 (audit/consolidated-fixes)
# merge — 3 commits on top of 187e026, two output-affecting:
# `sessionHrCeiling`'s trailing-motion corroboration window could be
# satisfied by a single un-averaged sample at the very first iteration
# (one noisy sample "corroborating" a hold before the trailing window
# had actually accumulated its ~3 s span) — now only updates `bestTrail`
# once the window has matured to a full span; `irregularBeatScreen`'s
# sustained-window check diffed consecutive elements of the
# artifact-compacted beat array even when a removed beat sat between
# them, understating the true gap and risking a false sustained-flag —
# now carries an alignment flag (`nnAdjacent`) so a diff across a
# dropped beat is skipped the same way the aggregate diff already does.
# The third commit is doc-only (README quick-start's `nnTimesMs`
# numbers were off by one cumulative sum; `dailyActiveMinutes`'s
# AN-2554 citation was wrong, relabeled internal ESTIMATE).
#
# kAlgoVersion bumped (84) for this hop: `sessionHrCeiling` feeds the
# stored `hr_ceiling_bpm` (derivation_engine.dart:7662) and
# `irregularBeatScreen` feeds the stored 24 h and sleep irregular-rhythm
# screens (onehz_pipeline.dart) — both are real, if narrow, output
# changes, not NaN/±inf-only rejections.
#
# analytics main @ #61 merge (2a0bea1) + this branch's own #62
# (41ac641): adds `vo2maxSubmaxEstimate`, additive-only, nothing
# existing reads it yet on the analytics side. 41ac641 is #62's second
# commit — CodeRabbit caught `inputs_used` under-claiming grade when
# `gradePercent` was supplied; fixed there, not on f334a06.
#
# Verified against the SHA:
# `git show 41ac641:lib/src/onehz/clinical/vo2max.dart |
# grep -E 'vo2maxSubmaxEstimate|workout_grade'`
#
# analytics PR #70 (merged to main @ 1bf9b62): adds optional
# `nnTimesMs` + `maxGapSec` to `baevskyStressIndex`, so a
# charging/off-wrist hole spliced into one sleep-night NN array
# segments before the 256-beat sliding window instead of a straddling
# window reading the pre/post-gap RR jump as MxDMn (same gap-aware
# pattern `cvhrApneaScreen` already has). No-times callers are
# byte-identical. Verified:
# `git show 1bf9b62:lib/src/onehz/clinical/stress_si.dart |
# grep -n 'nnTimesMs\|maxGapSec'`
#
# analytics PR #72 (merged to main @ 8285710): Welch segmenter in
# hrv_freq.dart only rejected a segment by beat count, never by
# time-completeness, so a mid-window gap (BLE reconnect, off-wrist
# moment) could still publish a bogus LF/HF/VLF/ULF reading at
# Tier.high. Now gated on endpoint-span + largest-single-gap. Verified:
# `git show 8285710:lib/src/onehz/clinical/hrv_freq.dart |
# grep -n 'segSec \* 0.8\|segSec \* 0.2'`
#
# analytics PR #73 (merged to main @ eed6dc9, tip carries both #72 and
# #73): overreachingConjunction() never called dispersionBelowQuantum
# on rhrBaselineWindow, unlike illness_cusum/readiness_composite/
# event_detection on this same rhr channel. An alternating whole-bpm
# baseline (58/59) has a small nonzero MAD that isn't real dispersion,
# so a 1bpm rise could clear the gate and fire the conjunction card on
# rounding noise. Verified:
# `git show eed6dc9:lib/src/onehz/human/overreaching_conjunction.dart |
# grep dispersionBelowQuantum`
#
# analytics PR #75 (MERGED to main @ 01e8b6e): readiness_glassbox's SWC
# gate had the same gap #73 fixed on overreaching_conjunction --
# glassBoxReadiness does the identical 0.5*scale standardization on the
# same rhr/temp channels edge wires in below (`_glassInput('rhr', ...)`
# / `_glassInput('temp', ...)`), never gated by dispersionBelowQuantum.
# Adds `GlassBoxInput.quantum`. Re-pinned from #75's branch head to main
# now that it's merged. Verified:
# `git show 01e8b6e:lib/src/onehz/human/readiness_glassbox.dart |
# grep dispersionBelowQuantum`
# Changes the stored "readiness_glassbox" drivers list for real users
# (see derivation_engine.dart's 94 -> 95 changelog entry), so this got
# a kAlgoVersion bump despite being narrative-only, not a headline-score
# change.
#
# analytics main @ 0441ef9 (MERGED, one hop past #75 above): fixes
# temp_circadian.dart's `_nonparam` dividing by varTot/diffN with no
# zero-variance guard, so a flat/heavily-quantized skin-temp window
# reported interdailyStability=0.0 / intradailyVariability=0.0 as
# measured instead of withheld -- a fabricated-metric bug (matches the
# zero-variance discipline circadian_np.dart already had). Changes
# stored circadian_lifestyle output for any user with a flat temp
# window, so kAlgoVersion bumped (96 -> 97). Verified:
# `git show 0441ef9:lib/src/onehz/wellness/temp_circadian.dart |
# grep -n 'varTot == 0\|diffN == 0'`
# analytics main @ 4fc2b12: adds #80 (band-state night end) plus #81-#85.
# analytics main @ c0effea: adds #79 (catalog) and #86 (rmssd gate).
# analytics main @ b7d5819: adds #88 (rr over-count gate), #89 (20-difference
# window floor), #90 (gap-aware rsa respiration), #91 (personal quiet level),
# #78 (sleep detection no longer bridges unobserved gaps; bridges capped at 90 min).
# feat/multidevice-analytics head: main @ b7d5819 plus the rings'
# provisional skin-temp settle band (no WHOOP family touched). Re-point
# at the merge commit once it lands on analytics main.
# analytics main @ 77fe373, the #95 merge (tree-identical to its head
# 608c46f): readiness autonomic merge + spread calibration + capped
# re-centring + robust lnRMSSD centre, for kAlgoVersion 112.
# analytics main @ 3a7ca34: adds #101 (HRV/readiness/wellness fixes), #100
# (sleep staging and naps), #97 (stride-periodicity step counter) and #98
# (a mid-session rest stays inside one workout).
# analytics main @ a438df4: merged #102-#108 incremental APIs and review
# fixes, retaining #98's workout rest bridge, plus #110 (each recorded night
# observation carries the window it was staged over). Clock refusal, uncertainty
# and cosinor policies require kAlgoVersion 124.
ref: a438df40b38a4586a52a68ab7e1c100fca111ccd
# BLE — flutter_blue_plus is the maintained cross-platform GATT client.
flutter_blue_plus: ^1.36.8
# Local raw-first storage.
sqflite: ^2.4.1
path: ^1.9.0
path_provider: ^2.1.5
# Unwrapping the archives users actually pick on the import screen: a WHOOP
# "My Data" export is a ZIP of CSVs, and a NOOP `.noopbak` is a ZIP holding a
# SQLite database (issues #199, #160). Already present transitively; declared
# directly because `lib/import/import_container.dart` imports it.
archive: ^4.0.9
# Passphrase-encrypted backup (lib/import/backup_crypto.dart). A vetted,
# long-standing pure-Dart implementation of AES-256-GCM and
# PBKDF2-HMAC-SHA256 — no hand-rolled construction, and no platform channel,
# so the round trip is testable headless. `crypto` (already transitive) has
# HMAC but no AEAD, which is the one primitive that must not be improvised.
pointycastle: ^3.9.1
# The Withings Steel HR / Activité challenge proof is a plain SHA1, not a
# cipher — declared directly now that `lib/ble/adapters/withings_steel_hr.dart`
# imports it, rather than riding along as transitive.
crypto: ^3.0.3
# Background scheduled derivation (the heavy nightly pass: sleep staging +
# 24-h spectra). Android: a real OS-scheduled WorkManager job. iOS: see the
# honest caveat in lib/compute/background_derivation.dart — app-killed heavy
# compute is opportunistic via BGTaskScheduler, never guaranteed.
workmanager: ^0.9.0
# HTTP — retained ONLY for the OTA self-update pointer (see lib/sync/update_service.dart)
# and the AI Coach's direct LLM (BYOK) calls. No backend / auth traffic anymore.
http: ^1.2.2
# Barcode scanning for the food log (lib/ui2/screens/scan_barcode.dart).
#
# The floor is not cosmetic: 7.3.0 and 7.4.0 fixed a controller-dispose bug
# that tore down ANOTHER controller's camera, and an Apple `captureOutput`
# race. This app holds a camera nowhere else today, but the first bug is the
# kind that only shows up once it does.
#
# The default Android config links the BUNDLED ML Kit model, which is what we
# want: +3-10 MB of APK in exchange for needing no Google Play Services at
# all, on a build distributed through GitHub Releases. Do NOT set the
# `useUnbundled` Gradle property.
mobile_scanner: ^7.3.1
# State + small settings persistence.
provider: ^6.1.2
shared_preferences: ^2.3.3
# Charts (for the future server-analytics view).
fl_chart: ^0.69.2
# Interactive maps for GPS workout routes (run/ride/walk). Raster tiles are
# fetched on demand from CARTO (basemaps.cartocdn.com) — OSM data, but served
# by CARTO rather than tile.openstreetmap.org, whose tile-usage policy does
# not permit app traffic. No cloud API keys, no Google/Mapbox. The
# "© OpenStreetMap contributors" attribution is rendered on every map.
# Recorded GPS points are stored on-device only (workout_route table) and are
# never uploaded — but the tile requests do tell CARTO which area is on
# screen, which PRIVACY.md states.
# flutter_map_tile_caching (offline tile cache) is a documented follow-up — it
# pulls heavier native storage deps, so v1 uses live CARTO tiles only.
flutter_map: ^7.0.2
latlong2: ^0.9.1
geolocator: ^13.0.2
# Type: Manrope + Barlow Condensed are BUNDLED under assets/fonts/ (declared
# in flutter.fonts below), not pulled at runtime — see the note there.
# Declarative motion (flutter_animate) and the five-pack icon mix that
# backed lib/ui/kit/os_icons.dart went with lib/ui. lib/ui2 has one icon
# family (lucide_icons_flutter, declared above) and one motion gate
# (lib/ui2/theme.dart), so none of them have a consumer any more.
#
# phosphor_flutter also no longer COMPILES against the current Flutter SDK —
# `IconData` became a final class, and PhosphorIconData extends it — which is
# what was failing 33 test files on main before this branch.
# Structural deep-equality (series_codec's verifyLossless) — was transitive
# via flutter itself; declared directly since lib/ code now imports it.
collection: ^1.18.0
# Injectable clock (RouteTracker's stall watchdog) — was a transitive dep via
# fake_async/flutter_test; declared directly since lib/ code now imports it.
# `clock.now()` instead of raw DateTime.now() lets fakeAsync tests control
# time deterministically instead of needing a real multi-second sleep.
clock: ^1.1.2
# Share recap cards (rendered card → image → share sheet).
share_plus: ^10.1.4
# File picker for data imports (NOOP raw CSV, Edge .db backup, WHOOP export CSV).
file_picker: ^8.1.6
# Apple Health (HealthKit, iOS) + Google Health Connect (Android) — export each
# day's derived metrics to the platform health store.
# >=12.0.0 is not optional: 11.1.1's `_alignValue` lists SLEEP_ASLEEP twice
# and never lists SLEEP_LIGHT, so every light/Core stage write threw on iOS —
# ~70% of a night, every night, and it flipped the day's export to failed too.
health: ^12.2.1
# Open the Health Connect app/settings so the user can grant per-app access
# manually (the reliable path when its in-app request dialog is locked out).
android_intent_plus: ^5.1.0
# Opt-in, consent-gated companion telemetry + health-data contribution:
# • device_info_plus — OEM / model / OS for crash-report context
# • battery_plus — phone battery + charging state (upload gate)
# • connectivity_plus — Wi-Fi check (only upload the heavy .db on unmetered)
# • uuid — stable anonymous install id (the device_id anchor)
device_info_plus: ^10.1.2 # capped <11 by `health`
battery_plus: ^6.1.0
connectivity_plus: ^6.1.0
uuid: ^4.5.1
# Home/lock-screen widget bridge (writes a snapshot to the App Group → WidgetKit).
home_widget: ^0.6.0
# OS-level notifications (band battery low / charging, health alerts, recovery,
# scheduled reminders). The single display layer; see lib/notify/. Local +
# scheduled only (no FCM — the app is cloud-free).
flutter_local_notifications: ^18.0.1
# zonedSchedule needs an initialized tz database + the device's IANA zone, so
# wind-down / weekly-recap nudges fire at the right wall-clock time.
timezone: ^0.9.4
flutter_timezone: ^3.0.1
# OTA self-update (Android sideload): read our own version, download + install the
# signed APK from the backend's update pointer, with a browser fallback.
package_info_plus: ^8.1.0
ota_update: ^7.1.0
url_launcher: ^6.3.0
notification_listener_service: ^1.0.0
flutter_secure_storage: ^10.3.1
gpt_markdown: ^1.1.7
firebase_core: ^4.11.0
firebase_crashlytics: ^5.2.4
firebase_performance: ^0.11.4+3
firebase_analytics: ^12.4.3
pdf: ^3.12.0
device_calendar: ^4.3.3
# NOTE: to build against the in-tree sibling packages during local development,
# create a (gitignored) pubspec_overrides.yaml — pub auto-detects it. Keeping the
# overrides OUT of this file means CI/release resolves the pinned git refs above
# (the siblings aren't checked out in CI, so a committed path override fails
# `flutter pub get` with exit 66).
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
# DB part guards inspect declarations and SQL arguments through the Dart AST.
analyzer: ^10.0.1
test: ^1.25.8
# no_runtime_font_fetch_test parses pubspec.yaml to assert every family the
# type scale uses is bundled rather than fetched at runtime.
yaml: ^3.1.2
flutter_launcher_icons: ^0.13.1
sqflite_common_ffi: ^2.4.0+3
# RouteTracker's stall-watchdog tests drive virtual time (was a transitive
# dep via flutter_test; declared directly since test/ now imports it).
fake_async: ^1.3.1
# day_window_dst_test moves the PROCESS timezone via libc setenv/tzset so the
# DST day-length regressions are real on a non-DST host (transitive via
# sqflite_common_ffi; declared directly since test/ now imports it).
ffi: ^2.1.0
# db_p0_fixes_test swaps PathProviderPlatform.instance for a temp-dir fake so
# exportDaysDb can run without a platform plugin (transitive via
# path_provider; declared directly since test/ now imports it).
path_provider_platform_interface: ^2.1.0
# ack_commit_sync_full_test wraps the ffi factory in SqfliteDatabaseFactoryLogger
# to spy the PRAGMA synchronous=FULL/NORMAL bracket around the ACK-gating commit
# (transitive via sqflite_common_ffi; declared directly since test/ now imports it).
# PINNED, not a caret range: that constructor is @experimental upstream, so a
# minor bump is allowed to change or withdraw it and would break the test on
# someone else's `pub upgrade` rather than on a deliberate one here.
sqflite_common: 2.5.8
# Run with `dart run flutter_launcher_icons`. TWO THINGS TO KNOW BEFORE YOU DO:
#
# · 0.13.1 rewrites ios/Runner.xcodeproj/project.pbxproj with a regex that
# matches ANY `ASSETCATALOG_COMPILER_*` setting and overwrites its value
# with the app-icon name. On this project that silently sets
# GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS, GLOBAL_ACCENT_COLOR_NAME and
# WIDGET_BACKGROUND_COLOR_NAME to "AppIcon" on the widget and watch targets.
# `git checkout -- ios/Runner.xcodeproj/project.pbxproj` afterwards: the one
# setting it needs to write (APPICON_NAME = AppIcon) is already correct, and
# the alternate-icon settings next to it must survive.
# · It does NOT generate the alternate icon. AppIconBW.appiconset is built by
# hand from assets/images/icon_bw.png at the same slots as AppIcon.
#
# adaptive_icon_foreground is a PRE-INSET copy of the icon, not the icon itself.
# Android composites both layers on a 108 dp canvas and every launcher mask
# crops it to the middle 72 dp, so full-bleed art is zoomed 1.5x — which was
# cutting the mark off both sides. assets/launcher/ is not a bundled asset dir;
# it is build-time input only.
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/icon.png"
remove_alpha_ios: true
# The icon's own plate, so the ring the mask leaves around the artwork is the
# same colour as the artwork's edge rather than the old cream.
adaptive_icon_background: "#020D1C"
adaptive_icon_foreground: "assets/launcher/icon_adaptive.png"
flutter:
generate: true
uses-material-design: true
assets:
- assets/images/
- assets/images/2.0x/
- assets/images/3.0x/
# The three community brand marks the one-icon-family rule (see
# lucide_icons_flutter below) deliberately doesn't cover — a generic
# Lucide glyph can't stand in for GitHub/Discord/Reddit's own logos.
# Official simple-icons SVGs, single fill path, tinted at paint time.
- assets/icons/
# Both families are bundled, not fetched. google_fonts resolves a missing
# family over HTTP to fonts.gstatic.com on first launch — before the user
# has seen the consent screen, and contrary to PRIVACY.md. It also lets the
# hero readiness numerals flicker or fall back on a cold offline launch.
# SIL Open Font License (OFL.txt alongside the .ttf files, from
# https://github.com/google/fonts).
fonts:
- family: Barlow Condensed
fonts:
- asset: assets/fonts/BarlowCondensed/BarlowCondensed-Bold.ttf
weight: 700
- asset: assets/fonts/BarlowCondensed/BarlowCondensed-ExtraBold.ttf
weight: 800
- family: Manrope
fonts:
- asset: assets/fonts/Manrope/Manrope-400.ttf
weight: 400
- asset: assets/fonts/Manrope/Manrope-500.ttf
weight: 500
- asset: assets/fonts/Manrope/Manrope-600.ttf
weight: 600
- asset: assets/fonts/Manrope/Manrope-700.ttf
weight: 700
- asset: assets/fonts/Manrope/Manrope-800.ttf
weight: 800