mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
`research-mode-staleness.ts` shipped in W19c-Safety as a sibling helper for a future 90-day re-acknowledgment gate on the GLP-1 drug-level chart. The wiring step never landed — the helper has zero production importers (only its co-located test consumed it). The version-bump re-prompt path in `/api/auth/me/research-mode/route.ts` already covers the regulatory contract (a copy or EMA-EPAR ratchet forces the dialog), so the calendar-staleness gate is intentionally deferred to v1.4.26 and the unused module ships off-codebase rather than sitting orphaned through the release. Also pin the PR-detection worker's null-slot dedup contract against a back-to-back invocation regression. The personal_records unique index uses NULLS NOT DISTINCT on `(userId, metricType, metricSlot, achievedAt)` — measurement-type PRs (slot = NULL) must coalesce across consecutive worker invocations even when the candidate row sits at the exact same achievedAt. A future refactor that drops the NULLS-NOT-DISTINCT semantics would silently double-insert; this test fails fast if that happens. Fix-O / code-M5 + dead-H4 + senior-M3 + L2.