Skip to content

Wave 2.4 (VPS half): server-driven tiles + typed hero + /tags — and deploy-proof snapshot jobs#102

Merged
RubyWolff27 merged 2 commits into
mainfrom
feat/whoop-wave2.4-tiles
Jul 10, 2026
Merged

Wave 2.4 (VPS half): server-driven tiles + typed hero + /tags — and deploy-proof snapshot jobs#102
RubyWolff27 merged 2 commits into
mainfrom
feat/whoop-wave2.4-tiles

Conversation

@RubyWolff27

Copy link
Copy Markdown
Owner

The last headless Wave-2 seam (REPORT §6 B4/B3), plus a scheduler fix found by batch-2 live acceptance.

Server-driven tiles + hero (41ce916)

  • core/whoop_tiles.py: /summary now carries tiles: [{id,label,value,unit,accent,order}] — stable ids, semantic accent tokens, explicit order, composed server-side from the summary's own metrics (no new DB reads). Unavailable metric → no tile. Sabbath → no strain tile, readiness shows Rest. A new VPS metric reaches the phone with zero app changes.
  • Typed hero block {state, state_color, headline, severity}: amber/red prevention OVERRIDES readiness colour/severity — the safety channel outranks performance.
  • GET /api/v1/whoop/tags serves the tag vocabulary (read-scope allowed).
  • COCKPIT_DERIVER_VERSION → "whoop-summary-v2" so stored snapshots regenerate with tiles; the CI pin test updated in the same commit.
  • Goose renderer half is device-gated — later phone session.

Snapshot jobs survive deploys (1df16de)

Batch-2 live acceptance caught the post-deploy warmup one-shot missed by 18s (double-restart window) and removed, leaving the snapshot 8h stale — every phone refresh fell back to the ~45s live path until the next 3h tick. misfire_grace_time=600 + coalesce on both snapshot jobs.

Verification

  • 371 unit tests pass locally (16 new tile tests; 26 pre-existing no-local-Postgres failures identical on main — plus one known-flaky DB-retry test that flips intermittently).
  • Four linters clean under CI flags; mypy at the 9-error main baseline.
  • Additive keys only (tiles, hero); Sabbath semantics pinned by fixture tests; CI contract pins checked at build time.

ISA: PAI/MEMORY/WORK/whoop-bitter-lesson-audit/ISA-wave2.4-tiles.md (7/8; ISC-8 = this PR + live acceptance).

🤖 Generated with Claude Code

RubyWolff27 and others added 2 commits July 10, 2026 20:04
…abulary

whoop_summary now emits additive `tiles` (stable-id, ordered, semantically
accented) and `hero` blocks derived from its own already-computed fields, so a
new VPS metric reaches the phone with zero app changes. Prevention (the safety
channel) can only escalate a tile's/hero's colour and severity, never
downgrade what readiness itself earned, and always supplies the hero headline
when it fires amber/red. Strain naturally drops off the Sabbath because
prescribe_strain already reports unavailable that day.

Also adds GET /api/v1/whoop/tags/vocabulary (built-in tag suggestions + the
user's own past tags) for the "Tag Today" picker — deliberately not reusing
the /tags path, which already serves per-day tag history with a different
response shape.

Bumps COCKPIT_DERIVER_VERSION to whoop-summary-v2 so stored cockpit snapshots
regenerate with the new fields, and updates the CI-pinned version assertion.
… coalesce)

Live acceptance on the Wave-3-batch-2 deploy found the post-deploy warmup
one-shot missed by 18s (double-restart) and removed, and the running build
killed mid-flight — leaving the snapshot 8h stale, so /summary fell back to
the ~45s live path until the next 3h tick. A 10-minute misfire grace plus
coalesce lets a restart-straddled tick still run once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RubyWolff27
RubyWolff27 merged commit 066f92d into main Jul 10, 2026
8 checks passed
@RubyWolff27
RubyWolff27 deleted the feat/whoop-wave2.4-tiles branch July 10, 2026 11:20
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