Repository navigation
mawsd spine: a command that waits on the engine host wakes it from its park - #411
Merged
Merged
Conversation
…s park; the session service's boot waits for the host's first streaming, so a command waiting on the boot (session.intent.list, session.create, session.acquire) is the need: a wanted load's adapter tells the daemon, which restarts the park clock from the need and pings the host through the supervisor's hold-and-launch; a command that never waits on the boot, and an event's load, wake nothing; unit-tested over the supervisor core and through the daemon (both fail on master), e2e:supervisor-daemon case (n); the tracker row PR #409 added is closed Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS 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. |
…exit when idle that goes after the need was told (the link streaming, the load's barrier not passed) has its successor woken for it (PR #411's review); e2e case (n)'s bound listed as a liveness bound with its reason (the static gate's raw-time-bound check) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
…parked one (PR #411, master 4118fa6); O4 M2 accepted at its first stop, with dashboard-live-data's long case (red on master since UX2-L) fixed on its branch; the wave 2 ledger gains the spine's wanted and need names, O4's delivery log line and the shared cross-build samples file Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
… conversation over the RL2 link and lane B placement reading the spine's record first, its merge gated onto master after #409 and #411; unit-daemon e2e groups never on the mini's home runner; O5 M4's two departures accepted; the wave 2 ledger gains O5 M4's names and shared files Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
…for landing 1 O7 M2 (#410), CI-opt's #412 (LAUNCHD_E2E, the sweep before gate-peer.sh stop) and #416 (e2e:remote on the hosted Macs), #411, #414, #415. Conflicts reconciled side by side: the render and remote namespaces in names, grades, schema and its test, and the link surface's client rules; the router's host binding keeps daemonRenders under master's routeLaneB; the default-spec count is 103 (render-host and remote); gate.yml's comment keeps both groups' notes. #410's host-supervisor forward and StandIn.clients hunks merged to master's text (no duplicate). The wire minor and the generated snapshots follow in their own commits. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
…est is never sent to a host leaving under it On the merged tree a request right after a discovery wake's park still failed (process-park-race.test.ts, RED: artifacts.create answered host_unavailable "engine-host disconnected before answering"). Its path is the front's forward to hosts.forward (a bare client's, the render host's reads for another machine's Export), which #411's need does not cover. engine-requests.ts now carries every client request to the engine host through mawsd (the front's, the endpoint's, the artifact endpoint's lookups, the render seam's answers): each is a need (the park clock restarts from it), no park is asked while any is in flight (DaemonClocks.engineRequests), and one that arrives after the ask waits for that host's exit (then the supervisor starts the next for it), or takes the ask back from a host still serving after EXIT_SETTLE_MS (live rows). e2e:machines' machine-side scene no longer waits for the park. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
This was referenced Oct 31, 2026
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.
The hang
The setup: the daemon shape, the spine cold, the engine host parked and no app attached. That is the end state of every idle cycle. In that state, a command whose handler waits on the session service's boot never answered:
session.intent.list,session.create,session.acquire.engineHostSettled). On the daemon shape only two things wake a parked host: an app's attachment, and the discovery wake, which coversDISCOVERY_READSonly.PR #409's review found it, and #409 logged it as a tracker row. This PR fixes it and removes that row.
The fix: the wait is the need
SessionService.ready(). While the boot has not passed its wait for the host, that wait now tells its host dependencyneed().need()to the spine's hosts adapter.SpineHostsAdapter.need()forwards it only for a load the seam counts as wanted (a client's or the endpoint's command). An event's load still wakes nothing; that is mawsd spine: an event's load wakes no engine host nobody wants #409's invariant.needEngineand does two things:DaemonClocks.engineNeeded). Without this, after an idle period the clock's ask is overdue the moment the woken host is ready, and the host exits before the boot. The unit test shows that without the restart the second idle cycle's command never answers. A need that comes during a discovery wake also leaves that wake's park to the clock.engine.ping). The supervisor holds the ping while the host starts or closes, and launches a parked host for it. That is the supervisor's existing hold-and-launch; the supervisor and its link are unchanged.attention.list, for example);Tests
src/mawsd/daemon-parked-need.test.ts(new). It runs the real daemon in process with the product's options, the services entry as its spine, and a stand-in engine host on the real socket layer.session.intent.listand the endpoint'ssession.createandsession.acquireanswer withinDISCOVERY_WAKE_BOUND_MS(8 s). That is the bound a discovery read keeps for the same callers: the tightest caller deadline, 10 s, less the answer's way back.attention.listloads the spine and wakes nothing.src/mawsd/spine-event-wake.test.ts. Three cases run over the real root and the supervisor core:On master the boot-waiting cases fail. mawsd spine: an event's load wakes no engine host nobody wants #409's cases stay green.
src/mawsd/clocks.test.ts. Two cases: a need restarts the park clock, and a need during a discovery wake leaves its park to the clock.e2e/supervisor.spec.tscase (n), daemon shape only.session.intent.listover machine.sock then wakes a new engine host and answers within the bound.unit:darwin is not reached. No file in
scripts/darwin-unit-files.shimports, directly or transitively, a file this PR changes.Review
One
doperpowers:reviewer-mediumpass. Its one finding (P2) is fixed inc6dbe964f.SpineHostsAdapterkeeps the need until its load streams, and tells it again when the link leavesready. The daemon's ping is then held across the close, and the successor launches for it.spine-event-wake.test.tscovers the overlap (the barrier's resync unanswered, the host armed, the command, then the host's idle exit). It fails without the fix.The same commit lists case (n)'s bound in
gate-plan.test.mjs'sLIVENESS_BOUNDS, with its reason. The static gate's raw-time-bound check requires it.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)