Repository navigation
Conversation
Six growing agent conversations on a shared 8,192-token system prefix with one-offs between turns, two cohorts of interleaved chats, and unique one-off prompts, replayed through Store.begin/keep/lookup/restore/remove at 4, 8 and 16 GiB. Shared cuts reach the store, so a common system prompt restores as a prefix. A frequency/probation selector runs beside main's for comparison; production eviction is unchanged. zig build cache-agent-replay prints the records. Refs #3241
This was referenced Nov 13, 2026
Owner
Author
|
Closing: this PR's only commit is already on main as a45c3e0.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3241 (prompt cache eviction). Measurement first: this extends the host cache replay with agent-style traces, run through the store's real eviction paths (
Store.begin, reservation, keep, lookup, restore, remove). Production eviction is unchanged.Traces (48 rounds, seed 7) at 4, 8 and 16 GiB of charged snapshot storage:
agent_loops: six growing conversations on a shared 8,192-token system prefix, two unique one-offs (1,024 to 12,000 rows) after each agent turn. 864 requests.interleaved_chats: two six-session cohorts with a 2,048-token shared prefix each; the cohort changes halfway. 192 requests.one_off: 384 unique prompts, 256 to 16,384 rows.Shared cuts now reach the store, so a common system prompt restores as a prefix. A test removes that forwarding and fails as expected (restores 0 instead of 8,192).
A frequency/probation selector was tried against a no-regression gate fixed before it was built. It is rejected:
Agent loops gain, but chats lose badly, so main's policy stays. The selector stays in the replay only as a comparison arm, so the next candidate can be measured on the same frozen traces.
Checks on today's main:
zig build -Dfixed-cpu compile-cache-replay-host test-cache-replay-host test-cache-agent-host cache-agent-replayexits 0 and prints the same 18 records as the original run. Lean check: 341 problems, same as main. These are host replay counts, not GPU prefill time; no device run is needed because no runtime code changes.