Expand description
Read-cache reliability telemetry.
The subjective “re-reads feel unreliable” signal is turned into data here:
every event that wipes or invalidates a fully-delivered entry — and thus
forces the next read to re-send the whole file instead of the cheap
[unchanged] stub — increments a process-global counter grouped by cause.
Counters are monotonic AtomicU64s. They are surfaced ONLY in the
ctx_cache status diagnostic, never inside a cacheable tool-output body, so
output determinism (#498) is preserved.
Structs§
- Snapshot
- Immutable snapshot of the re-delivery counters.
Functions§
- record_
compaction - Fully-delivered entries whose delivery flag was reset by a host compaction.
- record_
conversation_ mismatch - A re-read that fell back to full content because the reading conversation differed from the one the entry was delivered to (conversation scoping, #954).
- record_
eviction - Fully-delivered entries evicted under RAM / token-budget pressure.
- record_
idle - Fully-delivered entries dropped by an idle-TTL cache clear.
- record_
raw_ cap - Framed output was larger than raw content —
cap_to_raw()fell back to verbatim to prevent negative savings. Tracked so the dashboard can distinguish “no savings” from “savings prevented inflation”. - snapshot
- Reads the current counters into a consistent snapshot.