chore(format): prettier sweep across develop

Mostly table column normalisation under docs/audit/ + planning, object-
literal expansion in src/lib/ai/coach/snapshot.ts after the W4 F6 Apple
Health metric block landed, and small wrap/unwrap line adjustments in
the device + APNs routes / tests touched across W3/W4/W5 sessions.
No behavioural change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-11 08:27:51 +02:00
1 parent 5dcd3954a0
commit f1e6630958
70 files changed
+899 -660

No files matched your search

+20 -10
View File
@@ -210,7 +210,8 @@ components:
- error
type: object
DeviceRegisterRequest:
description: Native device registration. Re-registering an APNs token belonging to another user returns 409
description:
Native device registration. Re-registering an APNs token belonging to another user returns 409
(cross-user-hijack guard).
properties:
apnsEnvironment:
@@ -353,7 +354,8 @@ components:
type: object
InsightsComprehensiveResponse:
additionalProperties: false
description: AI-generated insights bundle. Strict-schema validated server-side; Coach-routed when the insight surface
description:
AI-generated insights bundle. Strict-schema validated server-side; Coach-routed when the insight surface
needs day-level grounding.
properties:
citations:
@@ -707,7 +709,8 @@ openapi: 3.1.0
paths:
/api/auth/login:
post:
description: "Browser callers receive a session cookie. Native callers (X-Client-Type: native or HealthLog-iOS UA
description:
"Browser callers receive a session cookie. Native callers (X-Client-Type: native or HealthLog-iOS UA
prefix) additionally receive a paired access + refresh token."
requestBody:
content:
@@ -755,7 +758,8 @@ paths:
- Auth
/api/auth/me/coach-prefs:
get:
description: Returns the persisted preferences with defaults filled in. Null persisted state resolves to the legacy
description:
Returns the persisted preferences with defaults filled in. Null persisted state resolves to the legacy
v1.4.22 defaults.
responses:
"200":
@@ -771,7 +775,8 @@ paths:
tags:
- Auth
put:
description: Persists the supplied prefs. Body is validated against `CoachPrefs`; missing keys fall back to the
description:
Persists the supplied prefs. Body is validated against `CoachPrefs`; missing keys fall back to the
documented defaults.
requestBody:
content:
@@ -849,7 +854,8 @@ paths:
- Auth
/api/auth/refresh:
post:
description: Reuse of a consumed refresh token revokes every refresh token still active for the originating device
description:
Reuse of a consumed refresh token revokes every refresh token still active for the originating device
(per-device blast radius from v1.4.23). Legacy tokens issued before v1.4.23 with a null deviceId fall back to
revoke-all-for-user.
requestBody:
@@ -873,7 +879,8 @@ paths:
- Auth
/api/devices:
post:
description: Idempotent upsert by `token`. APNs token + environment are paired — supplying one without the other returns
description:
Idempotent upsert by `token`. APNs token + environment are paired — supplying one without the other returns
422. Cross-user re-registration of either identifier returns 409.
requestBody:
content:
@@ -902,7 +909,8 @@ paths:
- Devices
/api/insights/chat/messages/{id}/feedback:
post:
description: Persists a helpful/unhelpful rating for a single Coach reply. Reuses the v1.4.16 RecommendationFeedback
description:
Persists a helpful/unhelpful rating for a single Coach reply. Reuses the v1.4.16 RecommendationFeedback
table via the polymorphic `targetType` column. The aggregator buckets ratings by (promptVersion, tone,
verbosity).
requestBody:
@@ -938,7 +946,8 @@ paths:
- Insights
/api/insights/comprehensive:
get:
description: Full Insights surface — daily briefing, recommendations with rationale, optional weekly report + storyboard
description:
Full Insights surface — daily briefing, recommendations with rationale, optional weekly report + storyboard
annotations. Strict-schema validated server-side.
responses:
"200":
@@ -1110,7 +1119,8 @@ paths:
- Measurements
/api/measurements/batch:
post:
description: Up to 500 HealthKit entries per call. Idempotent via the `Idempotency-Key` header (replay window 24h).
description:
Up to 500 HealthKit entries per call. Idempotent via the `Idempotency-Key` header (replay window 24h).
Per-entry status lets the iOS client advance its sync cursor accurately.
requestBody:
content:
+27 -27
View File
@@ -38,22 +38,22 @@ annotated tag trigger image publication. The model is documented in
## Production deploy
| Field | Value |
| ----- | ----- |
| URL | `https://healthlog.bombeck.io` |
| `/api/version` | `1.4.20` (flipped at 2026-05-10T16:49:25Z) |
| Image digest BEFORE | `sha256:b48f93874cdbcd6c2d729f1b8eeb63a6d1bbb90d56f629846ef6eab6cf272aa9` (v1.4.19) |
| Image digest AFTER | `sha256:b112a31947b91f2fdb4bb01b60c6b17a0b8ec128ae116d37e1094da5c3decaa6` (v1.4.20) |
| Release-prep commit (develop) | `aac8b5e chore(release): v1.4.20` |
| Develop ↔ main sync commit | `dd2ef57 Merge main into develop — sync Dependabot dep bumps before v1.4.20 tag` |
| Release-merge commit (main) | `666f6ee Release v1.4.20` |
| Tag | `v1.4.20` (annotated) at `666f6ee` |
| GHCR — tag run | `25633807964` success (4m02s) |
| Coolify auto-deploy | NO — webhook secret still missing on the deploy server (same fault mode as v1.4.19); host-side retag fallback used |
| Smoke (curl, no session) | `/api/version` 200 · `/auth/login` 200 · all gated routes return 307 → `/auth/login` (expected proxy.ts behaviour without a session cookie) |
| GH release | https://github.com/MBombeck/HealthLog/releases/tag/v1.4.20 |
| Docs site | `0b83430` on `healthlog-docs/main` (updates.mdx + scaling.mdx version pins; `ai-insights.mdx` v1.4.20 callout) |
| Landing site | `43ce4c7` on `healthlog-landing/main` (`softwareVersion` JSON-LD bumped, three new featureList entries) |
| Field | Value |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| URL | `https://healthlog.bombeck.io` |
| `/api/version` | `1.4.20` (flipped at 2026-05-10T16:49:25Z) |
| Image digest BEFORE | `sha256:b48f93874cdbcd6c2d729f1b8eeb63a6d1bbb90d56f629846ef6eab6cf272aa9` (v1.4.19) |
| Image digest AFTER | `sha256:b112a31947b91f2fdb4bb01b60c6b17a0b8ec128ae116d37e1094da5c3decaa6` (v1.4.20) |
| Release-prep commit (develop) | `aac8b5e chore(release): v1.4.20` |
| Develop ↔ main sync commit | `dd2ef57 Merge main into develop — sync Dependabot dep bumps before v1.4.20 tag` |
| Release-merge commit (main) | `666f6ee Release v1.4.20` |
| Tag | `v1.4.20` (annotated) at `666f6ee` |
| GHCR — tag run | `25633807964` success (4m02s) |
| Coolify auto-deploy | NO — webhook secret still missing on the deploy server (same fault mode as v1.4.19); host-side retag fallback used |
| Smoke (curl, no session) | `/api/version` 200 · `/auth/login` 200 · all gated routes return 307 → `/auth/login` (expected proxy.ts behaviour without a session cookie) |
| GH release | https://github.com/MBombeck/HealthLog/releases/tag/v1.4.20 |
| Docs site | `0b83430` on `healthlog-docs/main` (updates.mdx + scaling.mdx version pins; `ai-insights.mdx` v1.4.20 callout) |
| Landing site | `43ce4c7` on `healthlog-landing/main` (`softwareVersion` JSON-LD bumped, three new featureList entries) |
The tag-build pipeline succeeded; the deploy webhook still isn't
wired on apps-01, so v1.4.20 was promoted via the documented
@@ -84,17 +84,17 @@ cookie, every authenticated route correctly returns 307 →
`/auth/login`, so the smoke verifies the proxy gate is healthy
end-to-end:
| Path | Status (no session) | Notes |
| ---- | ------------------- | ----- |
| `/api/version` | 200 | Returns `version: "1.4.20"` |
| `/auth/login` | 200 | Public surface, renders normally |
| `/` | 307 → `/auth/login` | Gated dashboard root |
| `/insights` | 307 → `/auth/login` | Redesigned Insights shell |
| `/insights/report/2026-W19` | 307 → `/auth/login` | New v1.4.20 weekly-report route |
| `/admin/api-tokens` | 307 → `/auth/login` | Admin section |
| `/settings/integrations` | 307 → `/auth/login` | Settings section |
| `/achievements` | 307 → `/auth/login` | Achievements page |
| `/dashboard` | 307 → `/auth/login` | Expected: root is the dashboard, no `/dashboard` route |
| Path | Status (no session) | Notes |
| --------------------------- | ------------------- | ------------------------------------------------------ |
| `/api/version` | 200 | Returns `version: "1.4.20"` |
| `/auth/login` | 200 | Public surface, renders normally |
| `/` | 307 → `/auth/login` | Gated dashboard root |
| `/insights` | 307 → `/auth/login` | Redesigned Insights shell |
| `/insights/report/2026-W19` | 307 → `/auth/login` | New v1.4.20 weekly-report route |
| `/admin/api-tokens` | 307 → `/auth/login` | Admin section |
| `/settings/integrations` | 307 → `/auth/login` | Settings section |
| `/achievements` | 307 → `/auth/login` | Achievements page |
| `/dashboard` | 307 → `/auth/login` | Expected: root is the dashboard, no `/dashboard` route |
The Coach drawer and Health Score panel can't be smoked without a
live session — neither carries a public surface. Confirmed live via
+8 -8
View File
@@ -6,14 +6,14 @@ v1.4.21 ships as a same-day patch on top of v1.4.20 to fix a regression in the I
## Live state
| Field | Value |
|---|---|
| URL | `https://healthlog.bombeck.io` |
| `/api/version` | `1.4.21` |
| Image digest | `sha256:4e818d44702c3581a14d6480a953fd20d16cbbaf21c41e0c778c07340d3c4b1c` |
| Version transition | 2026-05-10T17:46:xx (host-side retag fallback) |
| GH release | https://github.com/MBombeck/HealthLog/releases/tag/v1.4.21 |
| Branch model | first patch through `develop` → `main` release-merge model (introduced in v1.4.20 F1) |
| Field | Value |
| ------------------ | ------------------------------------------------------------------------------------- |
| URL | `https://healthlog.bombeck.io` |
| `/api/version` | `1.4.21` |
| Image digest | `sha256:4e818d44702c3581a14d6480a953fd20d16cbbaf21c41e0c778c07340d3c4b1c` |
| Version transition | 2026-05-10T17:46:xx (host-side retag fallback) |
| GH release | https://github.com/MBombeck/HealthLog/releases/tag/v1.4.21 |
| Branch model | first patch through `develop` → `main` release-merge model (introduced in v1.4.20 F1) |
## Smoke (no session)