mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
From PR #6833 by @mnott, unchanged. A coding agent parks one whole snapshot per turn and each older one is a strict prefix of the newest, so it can never serve a resume the newest cannot. Until now only entries whose deepest checkpoint the outgoing chain held were dropped; an agent that only appends left its older snapshots to the oldest-first eviction, which spilled them to the SSD tier (reported: 176 snapshots, 170.9 GB written in 60 minutes, two agents on one engine). Now a snapshot whose live tokens are a prefix of the incoming ids (same pictures, same steering, no pinned shared prefix) is dropped in RAM and on the SSD tier (file and index file), with one log line each. Own addition: conversation_spill_test.cpp churn test. Two agents appending 40 turns each (80 parked snapshots) never pass the tier's cap, leave one entry per conversation (two files each) that the next turn's lookup finds, and forty unrelated conversations keep the tier under the cap with the oldest-used removed with their files.