mirror of
https://github.com/pydantic/pydantic-ai-harness.git
synced 2026-07-21 10:55:35 +00:00
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.