mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
Security + accessibility hardening release. Closes the highest-priority findings from a focused security audit of the v1.4.23 release: - Bearer auth fail-closed when a route declares no scope (api-handler) - Public /api/send Umami proxy now rate-limits 120 req/min/IP - Proxy nonce generation switched to btoa(...) for Edge portability - Session-expiry delete race uses deleteMany + catch (no more 500s) - POST /api/import returns the standard apiError envelope on 422 - Runtime Docker image pins Prisma 7.8 + worker deps to minors - Notifications page renders a real load-error alert - Accessibility: switch aria-labels, htmlFor pairing, mobile admin Overview link, deep-link anchors on notification settings - Chart overlays: per-chart comparisonBaseline pref, BMI/bodyFat/ sleep/steps overlay keys, TrendCard layout tolerates long labels Verification: pnpm typecheck && pnpm lint && pnpm test (2244/2244) && pnpm format:check all green.
3.5 KiB
3.5 KiB
v1.4.23 backlog — items deferred during the W6 reconcile
Captured at the close of Wave 6 (2026-05-11). Each line points at the review brief that surfaced it so the v1.4.24 marathon can pick up without re-reading the full review pack.
Design
- Settings-cog vs per-message-controls debate — Design pushback
during W6 raised concern that the v1.4.23 dual surface (per-message
thumbs in
<MessageThread>AND a global tone/verbosity sheet behind the settings cog) duplicates intent. Defer to v1.4.24 once W5 H7 surfaces enough thumbs data to know whether per-user prompt prefs drift from per-message ratings. Source:phase-W6-v1423-design-review.mdphase-W6-v1423-product-lead-review.md.
Statistics
- Pearson rigorous incomplete-beta replacement — the v1.4.23 patch
raised
MIN_PAIRED_Nfrom 14 → 20 (W5 H6) as a conservative surfacing-gate fix. The full normal-approx → incomplete-beta replacement still wants doing; data is at the precision limit for small-sample correlations. Source:phase-W6-v1423-senior-dev-review.md.
Security MEDs not applied in commit 1
- MED-1 —
apns_tokenpartial UNIQUE index. App-layer guard works today; defence-in-depth at the DB layer wants a follow-up migration with aCREATE UNIQUE INDEX … WHERE apns_token IS NOT NULL. Source:phase-W6-v1423-security-review.mdMED-1.
LOWs (all 4 reviews, deferred)
- Sec-LOW-1 — intra-batch duplicates report
insertedfor both rows (only 1 actually persists). Self-inflicted accuracy bug, no cross-user impact. Fix: dedupeprepared[]by${type}::${externalId}before theexistinglookup; add regression test intests/integration/measurements-batch.test.ts. - Sec-LOW-2 —
withIdempotencycaches the 422 "batch too large". Documented contract; surface a "retry with fresh key" hint in the error message + OpenAPI 422 description. - Sec-LOW-3 — APNs key-file read failure leaks the absolute path
into the wide-event payload. Replace
${message}with redactedmeta: { errno: err.code }. - Sec-LOW-4 —
auth.token.refresh.failedaudit row omitsuserIdeven when resolvable (already_used/expired/revokedpaths know the row). ExtendRotationResult.failureto carry the resolved userId. - Code-review LOWs — see
phase-W6-v1423-code-review.mdfor the full list (style nits, missing JSDoc on 2 helpers, unused import incoach-drawer.tsx). - Senior-dev LOWs — see
phase-W6-v1423-senior-dev-review.md. - Design LOWs — see
phase-W6-v1423-design-review.md. - Product-Lead LOWs — see
phase-W6-v1423-product-lead-review.md.
Simplify deferrals
- S-05 — deferred from Session B; see Session B notes in
phase-W6-v1423-reconcile-report.mdfor rationale (touched too many call sites for a v1.4.23 reconcile commit).
Test infrastructure
coach-prefs.test.tsintegration NextRequest URL mock issue — pre-existing failure flagged by Session A. Re-running with the reconcile changes stashed reproduces the same failure, so the cause predates v1.4.23. Needs investigation into howNextRequest's URL parsing interacts with the test harness's mockedcookies().
Tooling / harness
- Sandbox
git commitsilent no-op — Session H7 agent observedgit commitreturning success without a SHA in sandboxed mode under certain hook configurations. Candidate for a.claude/settings.jsonpermission tweak (allowgit commitunconditionally OR add a pre-flightgit status --porcelain=v1 -zconfirmation step).