Repository navigation
model: MN-REQ-05.5 session cap evicts least-recently-touched saveable session (proposed) - #219
Merged
Merged
Conversation
… session (proposed, not shipped)
…op, ship sync test
Owner
Author
|
ba87659 (re-review of 38ba83a) Blocking items:
Also done:
Decisions:
Tests: 128 passed and 26 xfailed ( |
…check note; ship doc; operator doc + changelog
…r lost-lease claim; modified_at touch field; reserved on other-llm rid
…q tie order, regression + xfail tests
…hip-sync strict xfails, surface split, classifier, helper constants
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.
MODEL ONLY, plus tests; no engine code. The engine at 12feb2b still refuses at the cap with
limit_exceeded.MN-REQ-05.5: at the session cap (MEMNET_MAX_SESSIONS), opening or loading a session evicts the live session that has gone untouched the longest.
Rules:
evicting, and its save runs outside the cap lock. The victim's own lock is held from the pick through the save, the drop and its removal from the registry.sessions_unsaveable_held) for the admin.restored=truewith no alerts.limit_exceededand says in plain words that all sessions are in use.sessions_evicted), by name or tag, never by id.evictSavingnow leaves only on its ownEvEvictSavedevent.evictShipped=false.Tests:
tests/test_session_evict.pyhas 22 runtime pytest checks on the in-process engine, using MEMNET_MAX_SESSIONS=3 and a temp snapshot dir. They cover eviction order, exemptions, restore fidelity (rows, edges, ACL, no lease), refusal, no snapshot dir, cap=2 concurrent opens, the atomic write and crash safety, and touches. The whole module is marked xfail (non-strict) until the engine ships, so CI stays green. Make the mark strict when the engine lands. MN-VER-05-S03 to S09 now point to these tests.Later, not dropped:
session_evictedrefusal for a caller holding an evicted id.Built by Claude haiku, reviewed by Claude sonnet, review fixes applied. Do not merge without owner review.