test(parity): fold the whole fixture history so the walk keeps the rollup path

The fixtures built their rollups with the read refresh, which folds ninety
days. Under the stricter coverage a type folded only that far takes the
live path; the fixtures now fold the whole history first, as the boot
backfill does, so the walk still reads the rollup tier.

The analytics snapshots change only in what the old coverage hid: the
summaries count all 120 weight and blood-pressure readings instead of the
91 the folded window held, with the means and the all-time in-target share
that follow from them.
This commit is contained in:
Marc-André Bombeck committed 2026-10-31 11:54:28 +01:00
1 parent 2d1f3fef1e
commit defa43d46c
8 files changed
+39 -27

No files matched your search

@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -1425,7 +1425,7 @@
"meta": {
"analytics": {
"slim_summaries": {
"row_count": 566,
"row_count": 624,
"type_count": 11,
"path": "rollup",
"year_over_year_types": 0,
@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -1293,7 +1293,7 @@
"bpInTargetPct": 11,
"bpInTargetPct7d": 14,
"bpInTargetPct30d": 17,
"bpInTargetPctAllTime": 12,
"bpInTargetPctAllTime": 13,
"bpInTargetPctPriorMonth": 10,
"bpInTargetPctPriorYear": null,
"bpInTargetCount90": 90,
@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -1293,7 +1293,7 @@
"bpInTargetPct": 11,
"bpInTargetPct7d": 14,
"bpInTargetPct30d": 17,
"bpInTargetPctAllTime": 12,
"bpInTargetPctAllTime": 13,
"bpInTargetPctPriorMonth": 10,
"bpInTargetPctPriorYear": null,
"bpInTargetCount90": 90,
@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -27,11 +27,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_SYS": {
"count": 91,
"count": 120,
"latest": 123,
"min": 123,
"max": 137,
"mean": 129.92,
"mean": 130,
"median": 130,
"avg7": 131.14,
"avg30": 130,
@@ -49,11 +49,11 @@
"avg30LastYear": null
},
"BLOOD_PRESSURE_DIA": {
"count": 91,
"count": 120,
"latest": 78,
"min": 78,
"max": 86,
"mean": 81.96,
"mean": 81.95,
"median": 82,
"avg7": 81.43,
"avg30": 81.8,
@@ -195,6 +195,10 @@ beforeAll(async () => {
const rollups = await vi.importActual<
typeof import("@/lib/rollups/measurement-rollups")
>("@/lib/rollups/measurement-rollups");
// The whole history, as the boot backfill folds it: the read refresh
// alone covers ninety days, and a type folded only that far is not
// covered, so the walk would take the live path for it.
await rollups.recomputeUserRollups(OWNER_ID);
await rollups.ensureUserRollupsFresh(OWNER_ID);
await settleBackgroundTasks();
owner = await makeSession(ownerRow);
@@ -362,6 +362,10 @@ beforeAll(async () => {
const rollups = await vi.importActual<
typeof import("@/lib/rollups/measurement-rollups")
>("@/lib/rollups/measurement-rollups");
// The whole history, as the boot backfill folds it: the read refresh
// alone covers ninety days, and a type folded only that far is not
// covered, so the walk would take the live path for it.
await rollups.recomputeUserRollups(OWNER_ID);
await rollups.ensureUserRollupsFresh(OWNER_ID);
const moodRollups = await vi.importActual<
typeof import("@/lib/rollups/mood-rollups")
@@ -378,6 +382,10 @@ beforeAll(async () => {
});
await seedSparseRecord(SPARSE_ID);
// Measurement rollups only: the mood tier stays empty on purpose.
// The whole history, as the boot backfill folds it: the read refresh
// alone covers ninety days, and a type folded only that far is not
// covered, so the walk would take the live path for it.
await rollups.recomputeUserRollups(SPARSE_ID);
await rollups.ensureUserRollupsFresh(SPARSE_ID);
await settleBackgroundTasks();
sparse = await makeSession(sparseRow);