Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/compute/derivation_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,10 @@ import 'vendor_sleep.dart';
// shrank every minute of an ordinary day against it and strain read 0.0; the
// day after a hard session is the usual case. Strain, trimp_net, quiet_hrr and
// the strain curve move; stored history re-scores on the recompute.
const int kAlgoVersion = 142;
// 142 → 143: a day whose energy would come out above 5x basal (hours of
// artifact HR over the flex gate billed 7-9k kcal, analytics #111) now has no
// energy instead of that figure. Only such days move; stored day output only.
const int kAlgoVersion = 143;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
/// The sibling SHAs this version was derived against, asserted against
/// pubspec.yaml in test/db_serve_version_and_reads_test.dart.
///
Expand Down Expand Up @@ -2202,7 +2205,7 @@ const int kAlgoVersion = 142;
// REPIN @ b92686a: analytics main, #113 merge (hmm stager and lutealFlags moved
// in from edge, code unchanged), no kAlgoVersion bump: WHOOP output is the
// same.
const String kAnalyticsPin = 'f29472e64719670fe74e31521f4975c34dc113cd';
const String kAnalyticsPin = 'f931073276615d7761da63bb75367eef79c77034';
// Repinned to analytics main's tip, which carries BOTH PR #72 (hrv_freq
// Welch gap guard) and PR #73 (overreachingConjunction rhr quantum guard) —
// the two independent kAlgoVersion bumps above (93 and 94). Verified both
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: f29472e64719670fe74e31521f4975c34dc113cd
resolved-ref: f29472e64719670fe74e31521f4975c34dc113cd
ref: f931073276615d7761da63bb75367eef79c77034
resolved-ref: f931073276615d7761da63bb75367eef79c77034
url: "https://github.com/OpenStrap/analytics.git"
source: git
version: "1.0.0"
Expand Down
4 changes: 3 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,9 @@ dependencies:
# Logic unchanged, so WHOOP output is unchanged.
# analytics main @ #116 merge (f29472e): steadyRestingHr, strain is priced
# on the median of prior nights' resting HR (#471).
ref: f29472e64719670fe74e31521f4975c34dc113cd
# analytics PR #117 (fix/energy-artifact-hr @ f931073): a day above 5x
# basal returns no energy. Merge the analytics PR first.
ref: f931073276615d7761da63bb75367eef79c77034
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

# BLE — flutter_blue_plus is the maintained cross-platform GATT client.
flutter_blue_plus: ^1.36.8
Expand Down
2 changes: 1 addition & 1 deletion test/daily_energy_consistency_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void main() {
// quietly stop being true. Same profile, same series, height alone.
const short = Profile(ageYears: 35, weightKg: 80, heightCm: 150, sex: 'm');
const tall = Profile(ageYears: 35, weightKg: 80, heightCm: 195, sex: 'm');
final hr = <double>[for (var i = 0; i < 600; i++) 130.0];
final hr = <double>[for (var i = 0; i < 540; i++) 130.0];

final s =
DerivationEngine.wakeDayEnergy(hr, profile: short, restingHr: 55, deviceFamily: 'gen4')!;
Expand Down
2 changes: 1 addition & 1 deletion test/ed2a_substrate_transfer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void main() {
markTestSkipped('committed golden is UTC; run this test with TZ=UTC');
return;
}
expect(kAlgoVersion, 142, reason: 'ED-2b repins analytics; transfer remains exact');
expect(kAlgoVersion, 143, reason: 'ED-2b repins analytics; transfer remains exact');
final fixture = _fixture();
final baseline = substrateFromDecodedPage(fixture.frames, fixture.rr);
final transferred = Substrate.fromTransfer(baseline.toJson());
Expand Down
4 changes: 2 additions & 2 deletions test/ed2b_algo_version_114_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:openstrap_edge/compute/derivation_engine.dart';
void main() {
// WHY: finalized days need a new version when the analytics pin changes outputs.
test('ED-2b adoption and workout rest repin name their output changes', () {
expect(kAlgoVersion, 142);
expect(kAlgoVersion, 143);
// #116 steadyRestingHr moves strain, so 142.
expect(kAnalyticsPin, 'f29472e64719670fe74e31521f4975c34dc113cd');
expect(kAnalyticsPin, 'f931073276615d7761da63bb75367eef79c77034');
final src = File('lib/compute/derivation_engine.dart').readAsStringSync();
final at = src.indexOf('// 121 → 122');
expect(at, isNonNegative);
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/whoop_freeze/gen4_minus0400.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"day_result": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-13",
"day_confidence": 0.6,
Expand Down Expand Up @@ -25975,7 +25975,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-14",
"day_confidence": 0.6,
Expand Down Expand Up @@ -51627,7 +51627,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-15",
"day_confidence": 0.6,
Expand Down Expand Up @@ -76518,23 +76518,23 @@
"metric_series_version": [
{
"date": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
Expand All @@ -76544,7 +76544,7 @@
"wake_day_features": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-13",
"active_min": 90,
Expand Down Expand Up @@ -77752,7 +77752,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-14",
"active_min": 240,
Expand Down Expand Up @@ -78960,7 +78960,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-15",
"active_min": 40,
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/whoop_freeze/gen4_plus0530.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"day_result": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-13",
"day_confidence": 0.6,
Expand Down Expand Up @@ -25975,7 +25975,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-14",
"day_confidence": 0.6,
Expand Down Expand Up @@ -51627,7 +51627,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-15",
"day_confidence": 0.6,
Expand Down Expand Up @@ -76518,23 +76518,23 @@
"metric_series_version": [
{
"date": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
Expand All @@ -76544,7 +76544,7 @@
"wake_day_features": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-13",
"active_min": 90,
Expand Down Expand Up @@ -77752,7 +77752,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-14",
"active_min": 240,
Expand Down Expand Up @@ -78960,7 +78960,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-15",
"active_min": 40,
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/whoop_freeze/gen4_utc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"day_result": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-13",
"day_confidence": 0.6,
Expand Down Expand Up @@ -25975,7 +25975,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-14",
"day_confidence": 0.6,
Expand Down Expand Up @@ -51627,7 +51627,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-15",
"day_confidence": 0.6,
Expand Down Expand Up @@ -76518,23 +76518,23 @@
"metric_series_version": [
{
"date": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen4",
"coverage_devices": "",
Expand All @@ -76544,7 +76544,7 @@
"wake_day_features": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-13",
"active_min": 90,
Expand Down Expand Up @@ -77752,7 +77752,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-14",
"active_min": 239,
Expand Down Expand Up @@ -78960,7 +78960,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-15",
"active_min": 40,
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/whoop_freeze/gen5_minus0400.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"day_result": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-13",
"day_confidence": 0.6,
Expand Down Expand Up @@ -26153,7 +26153,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-14",
"day_confidence": 0.6,
Expand Down Expand Up @@ -51978,7 +51978,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"date": "2026-07-15",
"day_confidence": 0.6,
Expand Down Expand Up @@ -77031,23 +77031,23 @@
"metric_series_version": [
{
"date": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen5",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen5",
"coverage_devices": "",
"priority_hash": "accel1Hz=;hr1Hz=;ppgRedIr=;rrIntervals=;skinTempRaw="
},
{
"date": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"source": "band",
"device_family": "gen5",
"coverage_devices": "",
Expand All @@ -77057,7 +77057,7 @@
"wake_day_features": [
{
"day_id": "2026-07-13",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-13",
"active_min": 90,
Expand Down Expand Up @@ -78265,7 +78265,7 @@
},
{
"day_id": "2026-07-14",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-14",
"active_min": 240,
Expand Down Expand Up @@ -79473,7 +79473,7 @@
},
{
"day_id": "2026-07-15",
"algo_version": 142,
"algo_version": 143,
"payload_json": {
"day_id": "2026-07-15",
"active_min": 40,
Expand Down
Loading
Loading