Skip to content

docs(loops): record the 2026-07-25 api-drift run against spec 1.37 - #24

Merged
drakulavich merged 2 commits into
mainfrom
docs/api-drift-run-2026-07-25
Jul 25, 2026
Merged

docs(loops): record the 2026-07-25 api-drift run against spec 1.37#24
drakulavich merged 2 commits into
mainfrom
docs/api-drift-run-2026-07-25

Conversation

@drakulavich

Copy link
Copy Markdown
Owner

Updates docs/loops/api-drift-watcher-state.md for this week's api-drift-watcher run — the first one that had a spec to diff against.

Result: no drift

cloud.ouraring.com is reachable again, so the egress blocker from the 2026-07-17 baseline is closed (noted in the file, kept one cycle before deletion).

Current spec is 1.37 (1.38+ 404s; the baseline guessed 1.35). Every field in the dependency table is present in 1.37 with no removals, renames, or type changes.

Full 1.35 → 1.37 diff: 0 paths added/removed, 0 schemas added/removed, 1 schema changed — ValidationError gained ctx and input (Pydantic v2 error shape). Response payloads untouched.

Three findings, filed separately

Diffing code against a real spec for the first time surfaced three fields declared string that the spec marks nullable — daily_stress.day_summary, workout.label, sleep.type. Not a break (nullable columns, and importDaily already wrote w.label ?? ''). Fixed in #23.

The field-hash column was broken

Worth calling out, since it is the file's whole drift signal.

The hashes recorded on 2026-07-17 (63c05075bfc2, c5b01cb3b7fe, …) cannot be reproduced by the recipe the file documents — sha256(sorted, comma-joined field paths). I tried the current code's field names sorted/declaration-order/with-types/with-spaces, and this file's own "Fields read" cells verbatim and re-tokenised. Nothing matches any row.

The field lists were correct — they still match src/api/types.ts exactly, field for field. Only the hashes were wrong, which means the column could never have flagged a change.

Repaired by:

  • recomputing every hash,
  • printing the hashed string verbatim in the Fields read cell (already sorted, comma-joined, no spaces), so the input is not left to prose interpretation,
  • pinning the recipe to a copy-pasteable command.

Every row now self-verifies from the file alone:

$ printf '%s' 'bpm,source,timestamp' | shasum -a 256 | cut -c1-12
f612441464e4

I checked all 9 rows this way — hash matches and field list is sorted.

Also added for the next run

  • The unread-but-available surface per endpoint (12 fields on daily_activity, 13 on sleep, plus heartrate.timestamp_unix and daily_cardiovascular_age.pulse_wave_velocity), so a future feature does not have to re-derive it.
  • The spec URL pattern and the probe-upward-until-404 trick for finding the current version.
  • That the vo2max endpoint is served as vO2_max (capital O), not daily_vo2_max — relevant whenever that dormant surface gets wired up.

Docs only; no CHANGELOG entry since nothing user-visible changes.

First run with a spec to diff against — cloud.ouraring.com is reachable
again, so the egress blocker recorded on 2026-07-17 is closed.

No drift on the consumed surface: every field the CLI reads is present in
1.37 unchanged. The full 1.35 -> 1.37 diff is one schema, ValidationError,
which gained ctx and input; response payloads are untouched.

Diffing code against a real spec did surface three fields declared string
that the spec marks nullable (day_summary, workout label, sleep type) —
fixed in #23.

Also repairs the field-hash column. The baseline hashes could not be
reproduced by the documented recipe under any spelling tried, including
this file's own field lists, so the column could never have signalled
drift. The field lists themselves were correct and still match the code.
Recomputed, and the recipe is now a copy-pasteable shell command with the
hashed string printed verbatim in the table, so every row self-verifies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DRnTxyiiF3XHiyFqZJ3soz
@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown

Greptile Summary

Updates the API drift watcher state for the 2026-07-25 run.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/loops/api-drift-watcher-state.md Records the latest drift run and now accurately states that #23 remains open and the corresponding type declarations are unchanged.

Reviews (2): Last reviewed commit: "docs(loops): say the mismatches are file..." | Re-trigger Greptile

Comment thread docs/loops/api-drift-watcher-state.md Outdated
Greptile review: the file described the three nullability findings as
"Fixed in #23" while this branch still carries the old declarations, so a
reader landing on this commit would see the record and the code disagree.
Reworded to "filed", with the open state called out explicitly.

Also records that all three are absent from their schema's `required` list
— they can be omitted, not merely null — and drops the duplicate mention
of that in the paragraph above the table.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DRnTxyiiF3XHiyFqZJ3soz
@drakulavich
drakulavich merged commit c3a76d6 into main Jul 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant