Repository navigation
sminos 1.27.6: daemon/sends.json drops the sessions gone (#159) - #427
Merged
Merged
Conversation
#159: Sends kept one seq per session ever sent to, forever. A reserve now drops, at most once an hour (SENDS_PRUNE_S) and in the write it makes anyway, each entry whose session is not running, whose bridge holds no socket and none of whose seqs is in flight: its bridge's kept mark is then every key it took, and a later send to it is taken above that mark. An unreadable file still refuses every send and is never rewritten. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Review of 94da765: the bridge's kept mark is no floor for a dropped entry. The daemon sweeps a kept file a day idle, and a child's failed save leaves it behind the mod's, so a pruned session's next send could take seq 1 again. The file is now version 2, `{version, floor, seq}`: an entry dropped raises `floor` to its seq, and a session with no entry starts above it. Version 1's file reads as floor 0; a daemon from before refuses version 2's rather than reuse a key. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
Versions kept at this branch's 1.27.7. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
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.
What
daemon/sends.json, the RL10sendRPC's seq per session (#426, sminos 1.27.4), never dropped an entry. So it held one integer for every session ever sent to remotely. Board ticket #159.Now a reserve drops an entry when all of these hold:
sminos.session_running);bridge.endpoint);Sends.waiting).The session being reserved always stays. Pruning happens at most once every
SENDS_PRUNE_S(an hour), inside the write a reserve makes anyway, so it adds no write.A durable floor. The file is now version 2,
{version, floor, seq}.flooris the highest seq of any entry ever dropped. A session with no entry starts atmax(floor, bridge mark) + 1, so a dropped session's next send goes above every seq it was ever handed.The ticket assumed the bridge's kept mark alone was a safe floor. Review showed it is not, and reproduced a reused key:
Compatibility. A version 1 file is read as floor 0. A 1.27.4 daemon refuses a version 2 file ("cannot be kept", so every send fails) rather than reuse a key below the floor. An unreadable file still refuses every send and is never rewritten, and the file is still replaced atomically at mode 0600.
Tests
test_rpcs.py, new classSendsPruned:flooris 9. Before the floor fix this test returned 8, and with the kept file swept it would return 1.The existing send tests in
test_rpcs.py,test_words.pyandtest_rl10.pypass unchanged.Docs: the scripts
CLAUDE.mdsend paragraph, andSends' docstring.Validation Evidence
python3 -B -I runtest.py sminos/tests/test_rpcs.pypasses 160 tests (SendsPrunedincluded),test_words.pypasses 62 andtest_rl10.pypasses 44, all on this machine.ci-gateon a233d99 is GREEN, https://github.com/SSFSKIM/doperpowers/actions/runs/40683266558 (94da765, before the floor, was GREEN too, run 40682066644).doperpowers:reviewer-mediumran two rounds. Round 1 found a P2 (no durable floor; a swept kept file or a failed bridge save let a pruned session's next send reuse a key, reproduced hermetically) and was fixed in a233d99. Round 2 found nothing material, and both reproductions now allocate above the old seq.Residue
None.
sminos 1.27.6.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)