Files
David SF 39cd255485 fix(cache_stability): latch collapse state so a sustained collapse warns once
The re-baseline fix warned once only when the collapsed prefix stayed at the
collapsed read value. Macroscope found the hole: a provider that keeps writing an
unread cache (read stays low, write stays high) re-baselines to read+write, holds
the mark high, and re-warns every step; re-baselining to read alone still lets the
intervening max() re-grow the mark and warns every other step.

Track a per-key `collapsed` latch instead: warn only on the transition into a
collapse, keep the prefix as a plain high-water mark, and re-arm when a healthy
read-back clears the latch. A sustained collapse -- caching off, or a prefix that
moves every request -- warns exactly once; a genuine second collapse after the
cache re-stabilizes warns again.

Drop the "may be added as the capability matures" hedge from the Logfire docs.
2026-07-17 12:50:09 -05:00
..
2026-07-13 16:15:40 -05:00