Skip to main content

Module cache_telemetry

Module cache_telemetry 

Source
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.
snapshot
Reads the current counters into a consistent snapshot.