Repository navigation
sminos: prove the four stand-in Resume cases live (#84) - #294
Merged
Merged
Conversation
…ainst the engine (#84) live-resume-check.py now drives each Resume as the daemon runs it (sealed, received, checked, claimed in the ledger, executed on workers) and covers what rested on the claude stand-in: delivery after Resume (recorded, then delivered for the same key), two Resumes at once (one daemon: one done, one session-live; two raw launches: one process holds the session), claim reconciliation after a daemon stop (job kept, job not kept, a holder older than the launch), and the seat cases (a stopped seat resumes, a retired one is refused unsupported). 14 of 14 pass against claude 2.1.304. The stand-in corrected where the run contradicted it: the engine's session record carries startedAt, and every --bg job, fresh or resumed, is named by its session id's first 8 characters. Each holder now binds a socket of its own, so a session held again after a kill can be held. test_j_the_live_checks_call_path_runs_against_the_stand_in pins every mode of the check's daemon side and its sminos reads against the stand-in. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Its claims were jobless and its check passed with no holder at all when the session had none before the launch; it now requires the --bg process that started before the claims' launch. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
9 of 12 tasks
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.
Board #84: the four Resume behaviours that rested only on the
claudestand-in are now proven live against claude 2.1.304 bysminos/tests/mods/live-resume-check.py, and pinned so a release that breaks one fails loudly.What the check covers
A terminal session runs one turn, joins its project and ends. Then, in one run:
sayfrom another machine and the owner's message from the desk, owed to the ended session, are reportedrecordedonce by the daemon's tick. After Resume, the next tick delivers both: the outcome for the same key turnsdelivered, and the words reach the session's transcript.--bgjob under its own id. The ledger's launch and job are that process's. The engine's record carriesstartedAt.session-live(kept).done, the othersession-live, and there is one launch. Two rawclaude --bg --resumelaunches at once from two processes leave one process holding the session.donefrom that job's process.donefrom the--bgprocess its launch started.interruptedonce the window passes.copy-started, with the copy stopped.sminos spawnstarted, then stopped, resumes under its own id and reads as running. Once retired, its session is refusedunsupportedand nothing is launched.Every RPC runs as the daemon runs it: sealed, received with its code, checked, claimed in the ledger, executed on workers. A daemon stop is a process exit right after the job is kept, or right before. The next daemon is a fresh
Rpcsreading that ledger.test_rpcs.py'stest_j_the_live_checks_call_path_runs_against_the_stand_inruns every mode of the check's daemon side, and its reads of sminos, against the stand-in. A change to those call paths therefore fails CI, not only a by-hand run.Live run (claude 2.1.304, haiku)
The first run passed 13 of 14. The failure was the check's own: its "past the window" restart ran on a clock 421 s ahead, so the outcomes it kept carried a future
done_at. The jobless reconcile after it then counted those two claims as Resumes still running. That case now runs last.What the engine showed
startedAt. The session record carries it (ms). The resumed process started 0.5–2.6 s after the launch in every Resume, solaunched_bynever fell back tops(the ticket's comment; the Linuxpstolerance itself is Narrow SDE no-subagents clauses to a reviewer-dispatch ban (v7.64.0) #85).--bgjob is named by its session id's first 8 characters: a freshsminos spawnjob as well as each Resume's. The engine keeps one job directory per session and reuses it for every Resume of it. A copy gets its own (its new session's first 8).backgrounded · <job> (idle — send a prompt to start), and one process holds the session. The engine does not start a copy here; it joins the second launch to the running job.blockedfor a session's first--bgjob,donefor a seat whose job had finished a turn. Nothing in Resume reads it.Stand-in corrections
fake_claude.py: the session record carriesstartedAt, and a fresh--bglaunch is named by its session's first 8 characters, as the engine's are.test_rpcs.py(63) andtest_policy_requests.py(43) pass locally. No sminos product code changed, so there is no version bump.Review
doperpowers:reviewer-medium(opus) on 219b150..7748601 returned "correct", with one P3 finding. The older-process case never required the older process, so with no holder it would pass with two jobless claims. 40d5d3c adds that requirement. Run 2's detail line shows the condition held there:('bg', …, True, -1.55).ci-gate: GREEN on 40d5d3c (https://github.com/SSFSKIM/doperpowers/actions/runs/39383191997).
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)