mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
The seven per-card generators embedded the full ~360-day daily array per metric plus correlation pair arrays, and never touched the WEEK/MONTH/YEAR rollup tier. A dense daily weigher ran the weight snapshot ~80-110 KB; a many-type account could push general-status past 100 K tokens. Embed the shared graded series instead of the full daily array, cap the embedded correlation/paired arrays to their most recent entries, skip measurement types with no data in general-status, and apply a generic 24 000-char snapshot budget that sheds yearly -> weekly -> array-tails -> recent until it fits. The applyPayloadBudget daily buckets stay in-process to drive the latest-day focus, in-target gates, and correlation pairing; only the compact shape reaches the prompt. Measured on a 2-year daily account: weight-status ~15 KB, general-status ~12 KB across six dense types — both well under the cap.