mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @petski3 on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2930
Engine 0.1.43.1 (
a0116b2), same code in 0.1.44.1 and 0.1.45 (477ac13) (include/strata/core/conversation_cache.hpp,drop_superseded). Linux, 2x gfx906 layer split,--conversation-cache-mib 20480 --conversation-cache-slots 4,--prompt-cacheat its default 6,--prompt-cache-every16384. Client: pi (OpenAI chat completions, reasoning on, reasoning not sent back in the history).Workflow: MAIN -> SUB (many turns) -> MAIN, as in #342. MAIN is evicted again once SUB's conversation is long.
What the log shows (one SUB conversation, MAIN parked):
Every turn whose reply contained thinking is re-rendered by the client without it, so the next prompt diverges 5 tokens before the previous prompt's end, the engine resumes at the turn-boundary checkpoint and parks the outgoing state (the #342 case).
drop_supersededthen looks for that copy's deepest checkpoint in the outgoing chain by exact equality. On a long conversation the chain's 6 slots hold the root plus 4-5 periodic (16K) checkpoints, every continuation turn adds a turn-boundary checkpoint, and the LRU rotation drops the boundary the copy was parked at within a few turns. In the stretch above there were 5 continuation turns between the two parks (elsewhere 20+), so the copy is never recognised,make_roomevicts oldest-first and MAIN goes after 4 such parks. The eviction counter climbs on every park (35 -> 41) withparked=4throughout.Raising
--prompt-cachedoes not fix it (20+ turns between parks).--conversation-cache-min-tokensdoes not apply (SUB is longer than MAIN).Proposed fix: when the outgoing chain holds a checkpoint deeper than the copy's deepest one (the boundaries that pushed it out), the outgoing conversation starting with that checkpoint says the same thing as holding it. It continued from there, so the entry is this conversation a turn or more back:
A sibling conversation that shares only the root (or a branch) has its own, deeper, boundary checkpoint which the outgoing ids do not start with, so it is kept. A chain with nothing deeper than the entry has not rotated anything, so the equality rule stays the whole rule there. All existing cases in
conversation_cache_test.cppstill pass (including "ties prefer most recently parked" and the "what is NOT superseded" block). A test that reproduces the rotation (three continuation turns per park with a 3-slot chain) fails on the current header (one parked copy of SUB at a time although its boundary rotated out) and passes with the change. Running it patched here since 2026-10-14.Side observation from the same run, maybe worth its own issue: with the mmap arena (
STRATA_ARENA_MMAP=1) on a 64 GB box the parked snapshots (12.3 GB at the time) were paged out to swap because--conversation-cache-min-free-mibreads MemAvailable, which counts the experts.bin page cache as free; parking then took 20-28 s per switch and the watchdog ended the engine on a 60 s stall in "parking the previous conversation". A floor against anonymous RAM (MemAvailable minus the engine's own mapped file pages) would have refused those parks.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.