Repository navigation
P5 O12 M11: the spawner as owner (MAWS's half: the launch's MAWS_LAUNCHED_BY and proof file, the endpoint's bridge and handed-off mark, the endpoint ledger's orphanAtOpen) - #431
Merged
Conversation
…proof file and MAWS_LAUNCHED_BY
A session a remote member spawned (its record's launchedBy, written once by
session.spawn) launches with its spawner named, at its start (from the intent)
and at every resume (from the record): LaunchSpec.launchedBy is the record's
launchedBy less the sealed action, which the spine writes to
<userData>/sessions/launched-by/<appSessionId>.json (0600, canonical JSON of
{member, device, opId, action}, temp file, fsync, rename) before each launch
that names it, so a resume after the file was lost writes it again. A fork, the
trust bootstrap and every session without launchedBy name nobody. The proof goes
with the record (session.delete, and the setup's and the recovery's removal of a
provisional record).
The engine host sets MAWS_LAUNCHED_BY (canonical JSON) beside MAWS_LANE=B and
SMNS_MEMBER when the spec names a spawner, over any captured value, and never
passes a captured one. The stored launch spec leaves launchedBy out, as it does
P2-C's keys. session.launch's spec gains an optional property: WIRE_MINOR 16.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…cord arrives
Lane B placement (targets.ts's laneB) answers the spine record's launchedBy
beside the placed target, never inside SessionTarget, and a query carries the
spawner its placement read. In a decision, Reads.record bridges: for a lane B
target the record source holds nothing for, whose app session it has never
seen a record for, and whose spine record names a spawner, the record read is
{owners: [the spawner], access: 'private'}. Every reader in one decision sees
that one answer, and recordsMoved compares the bridge's standing, so a record
arriving mid-decision (or one that came and went) takes the decision again. A
lagging index stays unavailable to the spawner and grade to everyone else, as
the placement rule says; no spine launchedBy, no bridge.
The first sight of a record is kept on disk per appSessionId, handed-off.json
in the endpoint's state directory (rl10/members.ts): marked at the lane B join
and at any read of a lane B record placed under its appSessionId, before the
read answers; pruned once a process of the app sessions the spine no longer
holds (session.list). Once marked, a missing record is grade for everyone,
after an endpoint restart, a /clear and a gone alike. An unenroll leaves the
file. A record source that does not say (handedOff absent) bridges nothing.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
endpoint.grant and endpoint.state are idempotent, so a claim the last process left unfinished answers a query expired, with no read-back, and a new act under its id stays in-progress, running nothing. The engine host's host.op keeps the old rule (O16 M3c's); op-ledger.ts's header says so. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ach launch; launch.test's spawner typed with its branded id spawn.test's start, resume, fork, bootstrap and unspawned launches each pass through buildEnvironment over a capture holding another MAWS_LAUNCHED_BY: the spawned session's carry its spec's, the rest none. launch.test's spawner fixtures take AppSessionId, which tsc requires and vitest does not check. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…By.appSessionId The launch spec's spawner names its app session as an AppSessionId, which the codec addresses as it does spec.appSessionId; the coverage snapshot is rewritten with MAWS_ADDRESS_PATHS_WRITE=1 (CI's unit 1/4 caught it). Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…nplaced record marked by its engine session, a bridged subscription held at the first record From the branch's independent review (reviewer-high, three P1s and a P2): - A mark that can't be written yet no longer counts as written: the record is withheld (Members.record answers none) and the session reads as handed off, closed to everyone, until a later write holds; nothing is decided on a sight a restart would forget. - A lane B record the join can't place under its app session (the engine host away, or not listing it) is marked by its engine session; handedOff takes the target, so a placement on that engine session after a restart finds it. The engine session's mark goes once its record is joined. - A member frame tells the record's listeners before the join awaits the engine host, by its engine session, and again once joined: a subscription the bridge granted is held at once by a first record that grants its spawner nothing. - An acquisition's resume and its no-output retry are pinned to find the proof before each launch (service.test). handed-off.json gains engineSessionIds beside appSessionIds. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ngine session's mark passed to its app session once placed From the review's second round: - A lane B record not yet joined is marked by its engine session before the join awaits the engine host, so a restart while the join is outstanding loses nothing. - A placement that lands on a marked engine session (handedOff) marks its app session in its stead, as the join and a record read do, in one write that drops the engine session's mark, so a /clear after it stays covered. - The held-subscription test captures the inbox before the first record goes (on CI the subscription ended before the old capture, unit 2/4). Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…he lag order and a query's placement corrected, Interfaces §H's proof file, sminos binding file and handed-off mark as built, the Decision Log entry (residue, review); three tech-debt rows; the wave 2 ledger's M11 names Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ane opens B's spawned session with nothing listed on B, never says it can't place it, and no waiting line stays; B's sminos lists it afterwards (the merge gate's red, run 41293457305) Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 1, 2026
…17 (M3's entry after M11's 16, the manifest regenerated from master's); QueryBinding's launchedBy beside StreamBinding; a pty-host query's binding placed nowhere (M3) with M11's spawner read for the others; the endpoint ledger's orphanAtOpen note naming forward.open Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 1, 2026
…), WIRE 16; the spawner as owner from a session's first second; residue (b) an edge on O8's record actions; O17 corrected to cua #251's pins; two flake rows and the worktrees signature Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 1, 2026
… fallback, the #431 merge at WIRE 17 with the listing wait removed, the in-app browser's tabs for a remote session as an allow-list) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 1, 2026
…432, O12 M11 #431, O7 M3 #433, O17's document #430, O7 M5 re-plan #434 and #436, #437, #438) into p5-o16 The WIRE retake: master is at WIRE_MINOR 19, so O16 takes 20. The comment keeps master's entries through (19); O16's additions (M2, M5, M3b, M3c fix wave 2), named under (16) on the branch, now follow under (20). WIRE_CAPABILITIES is master's list plus host.holder. The manifest is master's (minor 19) regenerated with pnpm wire:manifest at 20: against master it adds commands.daemon.restartEngineHost, commands.host.handover and events.daemon.engineHandover, changes O16's additive status and supervisor fields, and lists host.holder. routes.json auto-merged and its pin holds. Conflicts, each resolved keeping both sides: - src/shared/ipc/wire.ts: WIRE_MINOR 20 as above. - src/shared/ipc/wire-manifest.json: master's, regenerated (above). - src/shared/host/detached-transport.ts: O16's report() (the status ask before the link is reported) keeps its shape; O5 M5's socketFd joins the port it reports. - src/shared/host/op-ledger.ts: the orphanAtOpen comment names the services', the endpoint's (O12 M11) and the engine host's (O16 M3c) ledgers; none opens without it now. - src/mawsd/daemon.ts: O5 M5's session.removed listener and O16's tellEngineHandover side by side; at the stop, O5's cua socket close and cache watch end, then engineHandover.stop(). - src/mawsd/front.ts: FRONT_COMMANDS holds daemon.restartEngineHost and session.capabilities. - src/mawsd/cli.ts: O16's sessionHostsLine and O5 M6's renderText. - src/engine-host/launch.ts: O12 M11's MAWS_LAUNCHED_BY and O16's MAWS_HOLDER_SOCKET. - src/services/spine-root.test.ts: FRONT_EVENTS holds session.capabilitiesChanged and daemon.engineHandover. - test/support/mawsd-scene.ts: the stand-in's events hold O5 M5's session.status and O16's maws.pane.show and host.supervisorStatus. - scripts/mawsd-pack.test.mjs: O16's two session host pack tests and O5 M6's two --render tests. - devenv/validate.sh: the header names the session host check and the render runtime check; both run. 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.
Summary
This is MAWS's half of P5 O12 M11, "the spawner as owner" (
docs/doperpowers/plans/2026-10-27-p5-o12-sminos-owners.md, M11 and Interfaces §H). sminos's half landed first, as doperpowers #450 (sminos 1.28.0).A lane B session that a member spawns on another machine through
session.spawnis now that member's from its first second, without waiting for that machine's sminos to list it. Once this lands, O7 can drop its main-side wait of up to 60 s.LaunchSpec.launchedBycarries the session's ownlaunchedBy. The start reads it from the intent; every resume reads it from the record, throughsession.start,session.acquireand the acquisition's no-output retry. A fork and the trust bootstrap get none.<userData>/sessions/launched-by/<appSessionId>.json, mode 0600, atomically. It holds the canonical{member, device, opId, action}, and a write that fails fails the launch.session.deleteremoves the file, as do a setup's rollback and the recovery when they remove a provisional record.buildEnvironmentsetsMAWS_LAUNCHED_BY({appSessionId, member, device, opId, proofFile}) besideMAWS_LANE. A captured value never passes to a session without a spawner (EXCLUDED_KEYS).WIRE_MINORis 16.laneB) returns the spine record's spawner beside the target.Reads.recordanswers{owners: [spawner], access: 'private'}for a lane B target that sminos holds no record for, while its app session isn't handed off. Every reader in one decision sees that answer, and the bridge's standing is part ofrecordsMoved.unavailablegoes only to a caller standing on the recorded engine session, the bridge counting; everyone else hearsgrade. This is P5 O7 M4: diff, files, uploads and spawn on another machine; history over the channel #427's order.handed-off.jsonin the endpoint's state directory).grade: across an endpoint restart, a/clearand agone.session.list.orphanAtOpen. Its actions are idempotent, so a claim the last process left unfinished answersexpired.The plan's corrections (the lag order, a query's placement, the proof file's place, sminos's binding file name) and the residue are in O12's Decision Log entry "M11's MAWS half as built". The tech-debt tracker gains three rows; the wave 2 ledger gets M11's names as built.
Residue
Each item is accepted in the Decision Log.
/clearreplaced the record's engine session before the record arrived, or while the join was in flight. The bridge then holds on the new engine session until that session's record arrives. It matters only once O8 can move owners in the first seconds. The fix, mapping the record to its app session byownersProof[0].opId, is a tracker row due before O8's record actions.Tests
Acceptance 10 (MAWS side):
src/services/sessions/spawn.test.ts): throughmachine.op, with a genuinely sealed action (signStepUp,isAction). The proof is canonical and 0600 whensession.launchruns, and its envelope passes sminos's check.session.deleteremoves the proof.buildEnvironment.service.test.ts).launch.test.ts,launch-mapping.test.tsandfile-session-state-store.test.ts.test/endpoint/targets.test.ts, "the spawner as owner", 13 cases):launchedBy;gone, a/clear, a restart, and a restart with the join outstanding;test/endpoint/actions.test.ts): an unfinished endpoint claim reopened answers a queryexpiredand a new actin-progress. It fails without the option.Gate: static,unit GREEN on 85c1a90, run 41289857321. The head 4f908f8 (master merged and the docs) is GREEN too, run 41291960996. The merge gate's
--gates allthen failede2e:remote, whose first spawn step pinned the wait from before M11, so that step now pins M11's end state (d10985d).--gates allon d10985d, run 41299237023: 55 green includinge2e:remote; one red,unit 2/4'ssrc/engine-host/documents/search.test.ts("never extracts a large artifact in the background … a search still catches it up"), which M11 doesn't touch and which passed on 4f908f8.--gates uniton the same head is GREEN, run 41303512172.Review
Built by an executor (opus) on O7 M4's head, then master merged in.
doperpowers:reviewer-high, two rounds. Every code finding was fixed:
Two design findings were accepted as residue (a) and (b).
doperpowers:reviewer-medium on the merged branch.
/clearduring the join), folded into (b).The review stopped there: the last round found only residue.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)