Repository navigation
mawsd spine: an event's load wakes no engine host nobody wants - #409
Merged
Merged
Conversation
…o engine host until a need reaches it; its adapter sends a host that is not ready nothing, so the release's events no longer respawn an engine host exiting when idle (P5 O16 M2b's daemon (e) race: the index's fs.state was held across the host's close and launched a successor at its park); every part configures the next wanted host at its welcome; unit-tested over the supervisor core, failing on master 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. |
…oot never answers while the engine host is parked and no app attaches (pre-existing on master's idle end state; PR #409's review) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 31, 2026
…ents no longer wakes an engine host no one wants (PR #409, master d3b3ea2), with a follow-up for a command waiting on a parked host; a machine that another paired app watches stays loaded (item 5's cold reading needs no other app's channel open); the tracker gains e2e:discover's catalog-backed 5 s assertions 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)
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 race
On the daemon shape, with no app attached,
mawsdasks the engine host to exit when idle and the spine releases on its own quiet clock (MAWS_SPINE_QUIET_MS, 10 s). A session's idle release that lands just after sends events that load the spine again (spine-seam.ts,wake→ensure('event')). That load's parts talk to the engine host as it exits. A request that lands between the host's close and its park is held by the supervisor core, and the park then launches a successor for it: a pointless engine-host respawn and another idle period. P5 O16's M2b found it ine2e:supervisor-daemoncase (e) (runs 41214627305 and 41217185059). Under the new unit test on master, the held request is the index source'sfs.state: itssync()chainsfs.bind/fs.scan/fs.statewhatever each answers.The fix
The invariant is stated in
spine-seam.ts, where the spine decides: a load that only the engine host's events caused never wakes or respawns an engine host nobody wants.The seam. It marks each load
wantedfrom its trigger, and marks it wanted once a need reaches it, which is anyensurefor a command or the endpoint.The adapter. The spine's single path to the engine host,
SpineHostsAdapter.dispatch, refuses an engine-host request at once (host_unavailable) when the load is not wanted and the host is notready. Such a request is then never held for an exiting host, and never launches a parked one. A ready host is still sent everything.Nothing is lost. A newly welcomed host already gets its configuration from each part at its welcome:
engine.configure,engine.policy.set,host.configure,artifacts.setDefaults) push at everyready;So the next host that is wanted is configured then, by the same path.
A real need still wakes the host as today. That covers a command-caused load, or a client's or the endpoint's command reaching an event-caused one.
Tests
src/mawsd/spine-event-wake.test.ts(new) runs the real services root over the real supervisor core, with mawsd's on-demand detached engine host ontest/support/fake-supervisor.ts. It replays case (e)'s timeline:engine.configure,engine.policy.set,host.configureandfs.scanat its welcome, under the same event load.src/mawsd/spine-seam.test.tshas one new case for the gate's semantics. An event load sends a host that is not ready nothing, a ready host everything, and after a need everything. A command load sends everything.spine-seam,spine-event-wake,daemon-spine,daemon,daemon-permanent,front,daemon-lockandhost-supervisorpassed (168 tests). eslint is clean on the touched files, andtsc -p tsconfig.node.jsonis clean.Review
One
doperpowers:reviewer-mediumpass found one issue, and I deferred it. A spine command whose handler waits on the session service's boot (session.intent.list, for example) does not answer while the engine host is parked and no app attaches. The boot waits for the host's first streaming. On master the race's pointless respawn happened to leave the host up after the race, so such a command answered. With this PR the post-race state is the same as the end of every other idle cycle (the spine cold and the host parked), where master already hangs on that command: a command load with the host parked answered nosession.intent.listwithin 4 s on master's seam. Fixing it means deciding which commands are a need for the engine host (a product call next to the discovery wake), so it is logged indocs/tech-debt-tracker.mdrather than patched here.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)