chore(release): v1.28.21 — sleep history heals itself; plateau context; sync diagnostics

A one-time background pass re-reads each connected account's Google Health
sleep history so nights stored twice before the sleep fix collapse to their
true total (new sleep_repaired_at marker, migration 0238; watermark-safe,
enqueued once at boot per un-repaired connection).

The sleep night read reports when two writers disagree about the same night —
the served total is unchanged, the disagreement rides along as an annotation
(sourceDiscrepancy on the night DTO) so clients can mark the number instead of
silently picking a side.

A GLP-1 medication whose weight has plateaued on the current dose says so next
to the estimated drug level (efficacy tab + insights) — a factual note from the
existing detector, association only, verb-guard covered.

Google Health diagnostics: the sync log now separates a daily-totals read that
returned nothing from one the importer could not parse
(googleHealth.rollup.emptyResponse vs droppedAll), and the connection test's
structure probe reports the raw response envelope key names when a rollup type
parses to zero — a per-account naming drift becomes visible from one report.
This commit is contained in:
Marc-André Bombeck committed 2026-07-10 21:23:00 +02:00
1 parent 49be6851ec
commit 1212ed91d5
34 files changed
+1256 -7

No files matched your search

@@ -115,6 +115,7 @@ async function runStructureProbe(
try {
let points: Record<string, unknown>[];
let requestShape: string | undefined;
let envelopeKeys: string[] | undefined;
if (dataType.timeField === "rollup") {
// One minimal dailyRollUp exercise per rollup type (7-day range) — the
// probe reports the response skeleton AND which documented request
@@ -130,6 +131,13 @@ async function runStructureProbe(
onShape: (shape) => {
requestShape = shape;
},
// Raw envelope key names of the first page (names only). When the
// parse yields zero points this is the one signal that separates
// "the service returned nothing" from "the service returned points
// under a key this reader does not know" — per-cohort naming drift.
onEnvelopeKeys: (keys) => {
envelopeKeys = keys;
},
},
);
} else {
@@ -155,6 +163,9 @@ async function runStructureProbe(
count: points.length,
structure: points.length > 0 ? describeStructure(points[0]) : null,
...(requestShape ? { requestShape } : {}),
// Only meaningful when the parse came back empty — a populated parse
// proves the envelope key already matches.
...(points.length === 0 && envelopeKeys ? { envelopeKeys } : {}),
};
} catch (e) {
results[name] =