diff --git a/.planning/STATE.md b/.planning/STATE.md index a900e5a03..78ee3a584 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -1,7 +1,7 @@ # v1.4.16 marathon — state log -Status: phase-0-done -Last update: 2026-05-09T23:12:52+02:00 +Status: finished +Last update: 2026-05-10T04:05+02:00 > Previous milestone: `docs/audit/v1415-summary.md` (live: `/api/version=1.4.15`, > image digest `sha256:ace7d441f47b…`). @@ -523,17 +523,72 @@ Last update: 2026-05-09T23:12:52+02:00 ## Phase E — Release v1.4.16 -- [ ] Pre-release verify -- [ ] Bump package.json + CHANGELOG -- [ ] Tag + push v1.4.16 -- [ ] GHCR build (verify both main + tag green; C3 v1.4.16 fix may finally help main) -- [ ] Coolify deploy -- [ ] /api/version=1.4.16 confirmed -- [ ] Production smoke -- [ ] GH release +- [x] Pre-release verify +- [x] Bump package.json + CHANGELOG +- [x] Tag + push v1.4.16 +- [x] GHCR build (verify both main + tag green; C3 v1.4.16 fix DID help main) +- [x] Coolify deploy (retag-on-host fallback; auto-deploy still races GHCR) +- [x] /api/version=1.4.16 confirmed (transition at 2026-05-10T03:45:58+02:00) +- [x] Production smoke (13/14 200; `/dashboard` 404 expected — root is dashboard) +- [x] GH release — https://github.com/MBombeck/HealthLog/releases/tag/v1.4.16 - [ ] Docs site + landing site sync - [ ] `docs/audit/v1416-summary.md` (Marc-Brief) -- Detailed report: `.planning/phase-E-report.md` +- Detailed reports: `.planning/phase-E1-report.md`, `.planning/phase-E2-report.md` + +### Status block — Phase E2 (deploy + verify) + +- 2026-05-10T03:48+02:00 — Phase E2 complete; v1.4.16 LIVE at + https://healthlog.bombeck.io. + - **GHCR**: BOTH runs `success` — Wave-C C3 fix (drop arm64 from + main-branch publish) was effective. Run `25616783583` (tag) + + `25616782255` (main) both green. + - **Image digest**: `ace7d441f47b…` (v1.4.15) → `05f8a126d639…` + (v1.4.16). Visibly changed. + - **/api/version transition**: `1.4.15` → `1.4.16` at + `2026-05-10T03:45:58+02:00` (1 s after host-side retag returned; + well under 5 min cap). + - **Coolify auto-deploy**: NO — same race as v1.4.14/v1.4.15. + Coolify fired on chore(release) commit at `01:40:17Z` BEFORE + GHCR finished, so pulled stale local `:latest`. Ran + retag-on-host fallback (`docker pull :1.4.16 && docker tag + :1.4.16 :latest && docker compose up -d app`). + - **Smoke (14 routes, Marc's session)**: 13/14 200; `/dashboard` + 404 expected (root `/` is the dashboard, no `/dashboard` route + exists — same response shape on v1.4.15, NOT a regression). + - **GH release**: https://github.com/MBombeck/HealthLog/releases/tag/v1.4.16 + (created via `gh release create v1.4.16`, notes from + `sed -n '3,171p' CHANGELOG.md`; awk recipe in the phase-E2 brief + had a precedence issue and only captured the version header — sed + range-extract used instead). + - **Outstanding for v1.5**: Coolify auto-deploy race (Marc-side UI + flip per `docs/audit/v1416-auto-deploy-fix.md`); arm64 reinstatement + via native `ubuntu-24.04-arm` matrix (currently amd64-only post-C3). + - Detailed report: `.planning/phase-E2-report.md`. + +### Status block — Phase E1 (verify + tag) + +- 2026-05-10T03:40+02:00 — Phase E1 complete on origin/main. + - Verification: `pnpm typecheck` 0 errors, `pnpm lint` 0 errors / 12 + pre-existing warnings, `pnpm test` 1540/1540 (192 files, 4.29s), + `pnpm test:integration` 59/59 (16 files, 8.35s). `pnpm format:check` + skipped per project convention (not in CI; `pnpm format` corrupts + `.planning/` markdown list-markers — already observed in Phase 0). + `pnpm build` + `pnpm e2e` deferred to CI Docker (Node 22). + - Release commit: `d443c22 chore(release): v1.4.16` (package.json + 1.4.15→1.4.16 + CHANGELOG entry, English-only per Marc's "alles + Englisch" note). + - Tag pushed: `v1.4.16` (annotated, message `HealthLog v1.4.16`). + - Push: `5e89382..d443c22 main -> main` + `[new tag] v1.4.16` to + `github.com:MBombeck/HealthLog.git`. + - GHCR run: id `25616783583` (Build & Publish Docker Image on + `v1.4.16`) — in_progress at write time. Sibling runs on `main`: + GHCR `25616782255`, Security & Quality `25616782285`, Integration + tests `25616782236`, e2e `25616782233`. + - 4 stale dotted-segment export route directories remain untracked + (`src/app/api/export/{full-backup.json,measurements.csv,medications.csv,mood.csv}/`) + — the live plain-segment routes shipped in B7. Left out of the + release commit. + - Detailed report: `.planning/phase-E1-report.md`. --- @@ -637,3 +692,45 @@ B3, B4, C1, C5). regression. `pnpm format:check` flags 34 .planning/docs/test files but is not in any CI workflow. Detailed report: `.planning/phase-wave-a-gate-report.md`. + +## Status block — Phase E3 (docs + landing sync) + +- 2026-05-10T03:55+02:00 — Phase E3 complete. healthlog-docs + + healthlog-landing both pushed to origin/main. + - **healthlog-docs** (Starlight): 9 pages refreshed + (`8addef4`) + 3 new deep-dive pages (`2a5802b`): + `/insights/how-it-works/`, `/dashboard/comparison/`, + `/settings/ai-providers/`. Astro build green: 44 pages built. + - **healthlog-landing** (Next.js): `softwareVersion` 1.4.15 → + 1.4.16 + AI hero card rewrite + 5 new feature-list entries + + 2 capability badges (`3d17207`). `pnpm build` green. + - No "Claude / AI / agent / marathon / phase" leak in either + repo. Co-Author trailer present on all three commits. + - Detailed report: `.planning/phase-E3-report.md`. + +## Status block — v1.4.16 marathon FINISHED + +- 2026-05-10T04:05+02:00 — v1.4.16 marathon closed. + - **Live**: `/api/version=1.4.16` on https://healthlog.bombeck.io + since 03:45:58+02:00. + - **Image digest**: + `sha256:05f8a126d63962d9a4af4769de830d3fee022d634787e811b4339ee464420daa` + (was v1.4.15: `sha256:ace7d441f47b…`). + - **GH release**: https://github.com/MBombeck/HealthLog/releases/tag/v1.4.16 + - **Smoke**: 13/14 200 (`/dashboard` 404 expected — root `/` is + the dashboard, not a regression). + - **Verification**: `pnpm typecheck` 0 errors, `pnpm lint` 0 + errors / 12 pre-existing warnings, `pnpm test` 1539/1539, + `pnpm test:integration` 59/59. + - **Marc-Brief**: `docs/audit/v1416-summary.md` written; commit + `docs(audit): v1.4.16 release summary` pushed to origin/main. + - **v1.5 backlog seeded**: `.planning/v15-backlog.md` (the + tactical follow-ons) + `.planning/phase-D-product-lead-review.md` + (the strategic v1.5 backbone — Marc's recommended 6-week focus: + C.1 + C.2 + C.4 + C.7 + C.10 + C.11a Apple Health). + - **Outstanding for v1.5**: Coolify image-digest auto-deploy + (Marc-side UI flip), native arm64 runner matrix for + docker-publish, prompt-tuning ratchet on B5e feedback storage, + dedicated `/insights/compare` page, iOS contract freeze + bulk + endpoint, S3 backup push, Apple Health import. + - Status: **finished**. diff --git a/docs/audit/v1416-summary.md b/docs/audit/v1416-summary.md new file mode 100644 index 000000000..e94589a7c --- /dev/null +++ b/docs/audit/v1416-summary.md @@ -0,0 +1,281 @@ +# HealthLog v1.4.16 — Release Summary + +## Marc-Brief + +✅ Live: v1.4.16 on `https://healthlog.bombeck.io` — image digest +`sha256:05f8a126d639…` (was v1.4.15: `ace7d441f47b…`), `/api/version` +returns `1.4.16`. + +🆕 **What's new** + +- AI insights now show **WHY** each recommendation appears — data + window, comparison, deviation — with a confidence meter and a + thumbs feedback control on every rec. +- Medical citations on relevant recommendations (AHA / ESH / ESC / + WHO / DGE), opening the source guideline in a new tab. +- Multi-provider AI fallback chain configurable in Settings → AI + (Codex / OpenAI direct / Anthropic / Local / Admin OpenAI). +- Apple-Health-style chart polish: gradients, rich tooltips, in-target + shading, 90-day median personal baseline, mood emoji glyphs. +- Comparison overlay on charts, tiles, and the AI summary: "vs. last + month" / "vs. last year" with delta callout. +- New Settings → Export consolidates doctor-report PDF + measurements + / medications / mood CSV + full JSON backup in one page. +- Achievements page (`/achievements`) plus dashboard preview card. +- Onboarding tour for new users (skippable, replayable). +- Admin host-load chart, app-log preview with JSON inspector, and + AI-quality dashboard. +- Backup full lifecycle — restore, download, upload, audit trail. + +🔧 **What's fixed** + +- BD-Zielbereich percentage finally counts in-range readings (predicate + was too narrow — was always 0% on normotensive data). +- Trend on "all" filter shows a meaningful split-half delta instead of 0. +- Top-tile selector actually filters now (widget enum bug; layout PUT + silently 422'd). +- Login overview no longer strips umlauts ("Nürnberg", "München", + "Düsseldorf", "Köln"). +- `/admin/api-tokens` table is responsive on mobile (card list at ` mounts on `/insights`), C2 wired + (`8a5b6de` — `` mounts on `/`), C3 on-surface + comparison toggle (`6e74d38`). +- **HIGH** (9 fixed inline): `5f7b9d8`, `6863ecb`, `fb12f09`, + `c3451a4`, `2f057f4`, `5661439`. 11 HIGH deferred to v1.5 backlog. +- **Simplify** (7 of 8 apply-yes landed): `f3025a8`. F1 + F8 are + apply-no flagged for Marc. +- **Product-Lead review** stands as-is and IS the strategic v1.5 plan + (`.planning/phase-D-product-lead-review.md`). +- Style cleanup: `c63cddc`. + +### Wave E — Release + +| Item | Result | +| ------------------------------------------- | ----------------------------------------------------- | +| Pre-release verify | `pnpm typecheck` clean; `pnpm test` 1540/1540; integration 59/59 | +| Release commit | `d443c22 chore(release): v1.4.16` | +| Tag | `v1.4.16` (annotated) | +| GHCR — tag run | `25616783583` success, digest `2f1a0d6b381d…` | +| GHCR — main run | `25616782255` success, digest `4841bef396ad…` | +| Coolify auto-deploy | NO — same race as v1.4.14/v1.4.15; retag-on-host fallback used | +| Live image digest | `sha256:05f8a126d63962d9a4af4769de830d3fee022d634787e811b4339ee464420daa` | +| `/api/version` transition | `1.4.15` → `1.4.16` at `2026-05-10T03:45:58+02:00` | +| Smoke (14 routes, Marc's session) | 13/14 200; `/dashboard` 404 expected (root is dashboard) | +| GH release | https://github.com/MBombeck/HealthLog/releases/tag/v1.4.16 | +| Docs site | `8addef4` + `2a5802b` on `healthlog-docs/main` (44 pages, three new deep-dive pages) | +| Landing site | `3d17207` on `healthlog-landing/main` (1.4.15 → 1.4.16, AI cards updated) | + +--- + +## What was deferred + why + +Full backlog: `.planning/v15-backlog.md`. Highlights: + +- **11 HIGH from QA → v1.5 backlog**: H3 strict B5b/B5c/B5d wiring + into `/api/insights/generate`, H4 `findRecommendationsMissingRationale()` + is a no-op on parsed payload, H7 comparison overlay single-period + audit, H8 ai-section seedKey race-window, design H5 hero gradient + bump, design H8 DE fallback-chain row overflow, senior-dev H1 (`src/lib/ai/` + 19 flat files re-shape), senior-dev H2 (`` 690 LOC + god-component split), senior-dev H3 (`` 417 LOC + split), code-review H5 + H6 cumulative duplication. Sized in the + product-lead review. +- **2 simplify-no items**: F1 `runWithFallback` test-only (delete and + migrate or wire to strict variant — Marc's call), F8 + `RecommendationCard.normalise()` indirection (mechanical rewrite + spans 8+ JSX sites). +- **Native ARM runner matrix** for `docker-publish` — qemu-arm64 + SIGILL forced amd64-only on main; native `ubuntu-24.04-arm` matrix + is the v1.5 plan. +- **Coolify image-digest auto-deploy** — still on git-push trigger; + deferred per Marc's "leave it" call. Marc-side UI flip is the 5-min + realistic fix per `docs/audit/v1416-auto-deploy-fix.md`. +- **Cross-user feedback aggregation prompt-tuning ratchet** — B5e + set up the storage and the daily aggregator; the prompt-mutation + loop itself is v1.4.17 / v1.5 work. +- **Dedicated `/insights/compare` page** — B8 deferred this; the + overlay-on-charts ships in v1.4.16. i18n keys + `comparison.insightsCallout.{lastMonth,lastYear}` reserved so the + future component drops in clean. +- **Senior-dev H1 + H2 splits from v1.4.15** — both still open; + carry forward into v1.4.17 architectural pass. +- **Mood-chart H3 (chart-presentation) from v1.4.15** — chart- + ownership rule keeps this with charts owners; pick up next time + a chart-presentation pass runs. + +--- + +## CI / Test status + +- `pnpm typecheck` — 0 errors. +- `pnpm lint` — 0 errors / 12 pre-existing warnings. +- `pnpm test` — **1539 unit tests** green (started v1.4.16 marathon + at ~1048; +491 net across A/B/C/D/E waves). +- `pnpm test:integration` — **59 / 59** green (was 31 at v1.4.15). +- `pnpm format:check` — not in CI; new files prettier-formatted via + `c63cddc` style sweep. +- `pnpm build` + `pnpm e2e` — deferred to CI Docker (Node 22) per + project convention; CI runs green. + +--- + +## Production state + +- **URL**: `https://healthlog.bombeck.io` +- **`/api/version`**: `1.4.16` ✓ +- **Image digest**: + `sha256:05f8a126d63962d9a4af4769de830d3fee022d634787e811b4339ee464420daa` + (was v1.4.15: `sha256:ace7d441f47bd8c69fd0c5e2417b7f6c53bc387aa10c9aa541ad5e6321e9581d`) +- **Smoke** (14 routes, Marc's session): 200 across `/`, `/insights`, + `/auth/login`, `/settings/integrations`, `/settings/notifications`, + `/settings/ai`, `/settings/export`, `/admin`, `/admin/users`, + `/admin/backups`, `/admin/system-status`, `/admin/app-logs`, + `/achievements`. `/dashboard` 404 expected — HealthLog's dashboard + lives at `/` (PWA convention), there is no `/dashboard` route in + the App Router tree (NOT a regression — same shape on v1.4.15). +- **Deploy method**: GHCR-tag-build `:1.4.16` succeeded (Wave-C C3 + fix dropped arm64 on main and made BOTH GHCR runs green for the + first time since v1.4.13). Coolify auto-deploy fired on the + `chore(release)` commit before GHCR finished and pulled the host's + stale local `:latest` cache; retag-on-host fallback (`docker pull + :1.4.16 && docker tag :1.4.16 :latest && docker compose up -d app`) + flipped `/api/version` 1 s after the up command returned. +- **Coolify auto-deploy**: still fires on every git-push (deferred + per Marc's call); v1.5 plan in `docs/audit/v1416-auto-deploy-fix.md`. +- **GitHub release**: https://github.com/MBombeck/HealthLog/releases/tag/v1.4.16 +- **Tag naming** (unchanged since v1.4.14): GHCR-OCI tag is `:1.4.16` + (no `v` prefix); git tag is `v1.4.16`. + +--- + +## Docs / Landing + +- **healthlog-docs** (Starlight) — 44 pages, three new deep-dive + routes: + - `/insights/how-it-works/` — recommendation card walk-through, + deterministic confidence computation, fallback hard-fail policy, + "low confidence" semantics, feedback usage today + planned, + per-user privacy. + - `/dashboard/comparison/` — toggle UX, forward-shift overlay + semantics, what vs.-last-month / vs.-last-year actually compute, + sparse-data handling, deferred follow-ups. + - `/settings/ai-providers/` — setup paths for all five providers, + fallback-chain editor, test-connection, credential storage table. +- **healthlog-landing** (Next.js) — `softwareVersion 1.4.15 → + 1.4.16` in JSON-LD; AI-insights hero card rewritten as "AI insights + that show their work" leading with explainability + confidence + + citations; capability badges row picks up two new badges. + +--- + +## v1.5 strategic outlook + +The Product-Lead review at `.planning/phase-D-product-lead-review.md` +contains the full v1.5 roadmap and is the strategic plan for v1.5. +Top items to look at: + +1. **Coolify image-digest trigger** (C.1) — replaces git-push churn. + 5-min Marc-side UI toggle. +2. **Native ARM runner matrix** (C.2) — re-add `linux/arm64` to + GHCR matrix via native `ubuntu-24.04-arm` runner. +3. **Cross-user feedback ratchet → prompt-tuning** (C.3) — append + per-(severity × confidence_band) "OMIT" / "REPHRASE" rules to + PROMPT_VERSION when a bucket's helpful-rate drops below threshold. +4. **Dedicated `/insights/compare` page** (C.4) — sticky baseline + picker + `aiInsightResponseSchema.comparison` field + + `` above the recs grid. +5. **iOS native client API contract freeze** (C.7) — versioned + `/api/v1/` router, `POST /api/measurements/bulk` for offline-queue + replay, document the 24h access / 90d refresh defaults so iOS + doesn't surprise-fail at 24h+ε. +6. **Apple Health import via iOS** (C.11a) — XML parse + map + + bulk endpoint; the natural pipe is the iOS app. +7. (See review §C.5 streaming + A/B + per-user prompt prefix, §C.6 + charts library decision, §C.8 security hardening sweep, §C.9 + performance, §C.10 S3 backup push, §C.11 Garmin / Oura + integrations.) + +Marc's recommended 6-week focus pick from the review: **C.1 + C.2 + +C.4 + C.7 + C.10 + C.11a Apple Health**. + +--- + +## Hard-Reload reminder + +`Cmd+Shift+R` (Mac) / `Ctrl+Shift+R` (Linux/Win) — the new service +worker otherwise still serves v1.4.15 chunks from cache. One-shot is +enough.