Skip to content

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 12 Sep 17:43
· 61 commits to main since this release

Fixed

  • Whether a day's activity totals are final is now read off the day itself. Oura's class_5_min carries one character per five-minute slot, so a day reporting a full 288 of them has been closed out; sync stores the length in a new daily_activity.class_5_min_slots column and report reads it. The converse does not hold, and the rule does not claim it: a count below 288 is not evidence a day is still open. A day's span is timestamp(d+1) − timestamp(d), so travelling east shortens it — 2023-12-15 came back with 276 slots and 13,637 steps, 2024-01-13 with 270 and 15,736, both closed long ago — while 288 also comes back for 23-hour days and caps longer ones. So the slot count is read as positive evidence of closure only, and a day short of 288 falls back to the old next-day rule rather than being called open. The old rule inferred it instead — a day counted as complete once a later day had its own record — which described the ring's behaviour rather than the day, and came apart wherever the two did: a ring that stopped uploading froze its last day as "still accumulating" forever, keeping real steps out of every average; a report timezone west of the ring's discarded a day the cache had already closed; and completeThrough could name a day holding no activity record at all, promising an average over a day the table never printed. Rows written before the column exists keep NULL and take the same fallback, so an upgraded cache fills in as sync re-fetches each day — sync --from fills older days on demand. Because the slot count can only ever close a day and never reopen one, upgrading never makes a day with an activity record less complete than it already was: over a real 1,044-day cache the two rules together name exactly the days the old rule named. (#74)
  • db trends, db stats and db week now use that same judgement, so the screens stop disagreeing about one week (the all-time averages in db stats move by a few steps for the same reason: the day in progress no longer counts). db trends averaged the day in progress as though it were whole while report excluded it, and db week showed its part-day steps unmarked: the same seven days gave a 7,610 step average in one place and 6,639 in another. Activity, steps and active calories now stop at the last complete day in the window; sleep and readiness are final once they exist and still cover all of it. The week table marks the day with * and DaySummary carries partial, matching what report has always shown. (#75)
  • sync no longer aborts on a heart-rate sample without a timestamp. The day column is derived from it, so a null threw a TypeError at insert time, outside the CLI's error mapping, and every collection after hr in the run never synced. A row whose identity field is missing, null, empty, or not the type the column stores is now dropped before insert, counted in the JSON under dropped and named on the collection's line (1 dropped (no timestamp/source)); the row was unusable anyway, since those columns are what it would have been stored under. A row is judged by the columns its table keys on, not by the manifest's identity fields: a daily summary Oura sends without an id is still stored under its day. (#106)
  • An empty 200 from a snapshot endpoint no longer clears its table. ring is fetched whole every run and was replaced with whatever came back, so a partial read or an upstream hiccup deleted every ring and the JSON showed nothing in removed. The snapshot path now follows the rule the ranged collections already had: an empty answer describes nothing, so the rows are kept and reported under refused with the --prune=ring hint; a ring genuinely gone from the account is applied with that flag. Rings a non-empty response no longer lists are counted in removed, as they always should have been. (#105)
  • db trends and db stats say what is missing on an empty cache instead of printing a header over nothing, or seventeen lines of 0 rows. Both now carry the same "run oura-cli sync, then this command again" line that db today and db week already print. (#85)
  • report --period month chunks its week buckets from the newest day back, so the remainder of a 30-day window is the oldest row and is labelled with its size (2026-08-13 (2 days)), not an unlabelled stub at the bottom that read as activity collapsing by 85 %. The * note names the bucket it marks (the week of …) instead of saying "today" above a table with no day rows. (#84)
  • The describe and manifest snapshots now cover the real command registry. The old snapshot was built from a hand-listed fixture that did not include sync, so #103 added --prune to a published contract and no test moved. The registry lives in src/commands/registry.ts, the contract test asserts it matches the argv normalizer's command set, and the fixture-based tests stay as they were, since a controlled input is what they need. (#104)