Files
HealthLog/src/app
Marc-André Bombeck 227eb69b63 perf(medications-intake): consume compliance rollup tier
Swaps `/api/medications/intake?scope=compliance` onto the rollup
reader behind a coverage probe — a user with intake events but no
rollup rows still gets a correct response from the legacy live
aggregator and triggers the boot backfill in the background so the
next request lands on the rollup path. Every write site that mutates
`MedicationIntakeEvent` (POST + PUT + DELETE + per-medication import,
bulk batch, telegram callbacks, external API ingest, admin restore)
now fires `recomputeMedicationComplianceForEvent` for the affected
user-day. Bulk + import collapse the per-row hooks to one recompute
per distinct `(medicationId, dayKey)` so a 500-row ingest still costs
a bounded fold. Purge wipes the rollup partition alongside the
intake-event deleteMany. Eliminates the 3.2 s cold mount the
v1.4.38 perf analysis attributed to the unbounded event findMany.
2026-05-18 12:30:25 +02:00
..
2026-05-17 19:07:03 +02:00
2026-05-16 19:46:43 +02:00
2026-05-15 22:59:10 +02:00
2026-05-14 23:49:32 +02:00
2026-03-10 20:14:33 +01:00
2026-05-15 22:59:10 +02:00
2026-05-14 23:49:32 +02:00
2026-05-15 22:59:10 +02:00
2026-05-17 19:07:03 +02:00
2026-03-10 20:14:33 +01:00