fix(session): bound in-memory session mirror - #1225
Merged
Merged
Conversation
code-yeongyu
force-pushed
the
fix/mem-session-mirror-budget
branch
4 times, most recently
from
August 31, 2026 08:12
679c636 to
0a570a0
Compare
code-yeongyu
force-pushed
the
fix/mem-session-mirror-budget
branch
from
August 31, 2026 09:48
2662896 to
2a99856
Compare
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.
Summary
ResidentStringStoreto a conservative 64 MiB FIFO cache; the JSONL remains authoritative when a blob is evicted.SessionManagermirror while preserving metadata and reloading pruned entries from disk for branching.TDD evidence
RED (commit
4c7cc71cc, before implementation):GREEN (commit
91d6a12b1plus final fixture commit, current HEAD):The literal requested filter
src/core/session-managerwas also attempted, but this repository's Vitest roots contain tests undertest/; that invocation exits 1 withNo test files found. The valid remote filters used above aretest/session-manager/session-mirror-budget.test.tsandtest/session-manager.Verification
MAC_TEST_TIMEOUT_S=2400 bun /tmp/senpi-mac-test.mjs fix/mem-session-mirror-budget -- test/session-manager(exit 0).origin/main(b618e8cd4) before final push.Summary by cubic
Bounds the in-memory session mirror so long-lived sessions no longer consume unbounded RAM; the JSONL stays authoritative and evicted or trimmed data reloads from disk when read.
ResidentStringStorenow evicts the oldest externalized strings past a 64 MiB per-session budget; evicted blobs reload from the JSONL when read.Written for commit 2a99856. Summary will update on new commits.