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#4618
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3404
Author: @xrip
Created: 10/20/2026
Status: 🔄 Open
Base:
main← Head:pr/conversation-cache-older-copies📝 Commits (1)
7518f3bconversation cache: an older, shorter copy of the outgoing conversation is superseded by its shared tokens📊 Changes
2 files changed (+48 additions, -24 deletions)
View changed files
📝
include/strata/core/conversation_cache.hpp(+22 -24)📝
src/core/conversation_cache_test.cpp(+26 -0)📄 Description
Problem and result
ConversationCache::drop_superseded(#342) drops a parked copy of the outgoing conversation only when the outgoing checkpoint chain holds that copy's deepest checkpoint. That covers a client that re-renders the last reply. It misses a client that rewrites its last turns a few turns back (agents trim tool output and thinking): the copy's deepest checkpoint is past the rewrite, and once the conversation has grown, the chain's spread checkpoints (8 here) no longer hold anything near the copy's end. The stale copy then stays parked: it takes the byte budget (5.7 GB of an 8 GiB budget for a 300K-token copy here) and is evicted later in place of another conversation, or, with a disk tier, written out.Related discussion
Follow-up to #342 (closed), whose rule this keeps. Found while running the disk tier of #1937; this change does not depend on it.
Approach
superseded_at()(new, private) holds the rule fordrop_superseded()andparked_prefix_tokens(), which had the deepest-checkpoint test twice: first #342's rule unchanged, then the new one (std::mismatchfor the shared tokens).Validation
Passed:
conversation_cache_test(CPU build,-DSTRATA_BUILD_CONVERSATION_TESTS=ON, GCC 14 innvidia/cuda:13.3.0-devel-ubuntu24.04): 4,774 checks, among them the new case (a copy rewritten 4 of 40 tokens from its end is dropped, 5 of 41 is kept, with the outgoing chain thinned to the root) and every existing #342, borrowing and park-gain check.conversation_file_test: 201 checks.Failed: none.
Not run:
Limits
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.