Skip to content

P5 O4: the machine's services in mawsd (connectors, delivery, library reads, catalog machine half); WIRE_MINOR 14 - #424

Merged
SSFSKIM merged 87 commits into
masterfrom
p5-o4
Nov 1, 2026
Merged

SSFSKIM merged 87 commits into
masterfrom
p5-o4

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 1, 2026

Copy link
Copy Markdown
Owner

P5 O4 moves the machine's services into mawsd: the connectors (route D's grant store, the owner's OAuth sign-in, leases and watches), delivery, the library's file reads and the catalog's machine half. On the daemon shape they run in mawsd's lazily loaded spine, and on the embedded shape in main's root. The spec and its full record are in docs/doperpowers/plans/2026-10-31-p5-o4-services.md: acceptance 1 to 11, Decision Log D1 to D48, and Outcomes & Retrospective. M1 landed earlier as #399. This PR carries M2 to M4.

What changes

  • Wire. The change is additive only and WIRE_MINOR goes 13 → 14, with O5's landing 1 at 13 (D48).
    • 30 commands become machine-owned:
      • connectors.{open, declare, call, watch, unwatch, refresh, visibility, close, servers, connect, reconnect, disconnect, signIn, signInCancel, windowShown, adoptGrant}
      • artifacts.{connectorGrants, grantConnectorTool, revokeConnectorTool}
      • delivery.{status, connect, cancel, receipts, deliver}
      • library.{content, read, openExternally, reveal}
      • catalog.{engine, engineRefresh}
    • 5 events: connectors.{watchUpdate, serversChanged, signInChanged}, delivery.receipt and catalog.engineChanged.
    • 2 capabilities: host.connectors and machine.connectors.
  • Grant custody. Route D's grants are sealed under the machine's file key: format /2, AES-256-GCM with the id as AAD. Main adopts the legacy /1 records once per launch through connectors.adoptGrant, a conditional replacement under the store's lock. No credential stays in main's memory.
  • What stays in main. The window reporter (fail closed), the thin delivery.send (export, then delivery.deliver), the catalog's person half, and connectors.reset so the renderer can rebuild its leases after a daemon restart.
  • Drive. It shows absent and is refused before any export, because there is no gws (owner Q3, D38). Drive over MCP is Send to Drive through a Drive MCP connector, no gws CLI #400.
  • The transition (D11, D45, D46). A pre-O4 app on an O4 mawsd is refused on all three sockets, and the answer always reports at least one live session.
    • The old app then waits under its update banner and retries every 5 s.
    • mawsd exits at idle, because a refused connection never counts as activity.
    • The old app's next retry starts its own build's mawsd and is served by it.
    • The refusal line is logged at most once a minute per app and socket.
  • Dataset refresh (D12, D43). The refresh announcement wakes and holds a cold spine. The engine host keys the dataset refresh and the connectors' host leg on host.connectors.

Validation Evidence

Claim Run Result
Landing head 5f0e056 (merge of master 04c8e49), every gate scripts/ci-gate.sh 5f0e056b1 --gates all --lane hosted --class1a pool --runner macos, default peer 04c8e49 (wire 3.13) 41264101762: green at attempt 1, 53 jobs, e2e:discover and e2e:cross-build among them, no flaky pass; run tree 29748b979 = head tree
Docs-only commits after the landing head scripts/ci-gate.sh <head> --gates static 41268693318 on a46b7d1 (the PR head): green
Cross-build scenes on M4's code (6/6) 41241367666 on d44c4f2 Both halves of acceptance 3's old-host rule asserted at app level: the kept pre-O4 host settles noClient, and this build's host is answered by mawsd
D45's refusal, idle exit and what follows the exit 41240105999 (tree 606f12f51) and 41241367666 mawsd gone 91 s after the app quit, with an idle time of 90 s. The old app's build check never fires (D46)
--gates all on the M4-start merge 41237391511 on f09d9a7 Green. One pool preemption, unit 2/4, was green on its rerun
Class 1a and unit:darwin 41242913549 on 6ec983f; 41245040844 on 918ddf8 (the adoption fix) Green
e2e:local-latency-daemon on the mini 41246075649 on 03df807, valid Delta-to-frame p50 25.2 / p95 37.9 ms (bounds 26.45 / 42.56). Round trip 1.2 / 2.3 ms (bounds 2.9 / 6.3)
e2e:daemon-idle, 3 valid runs by Rule B 41250130368, 41256679901, 41259169670 on 03df807; baseline 41254248544 91,267 / 92,595 / 93,715 KiB against the 99,145 bound. CPU 0.10–0.13 s against 1.12. No Q2. Five runs voided by their own validity checks, as Outcomes records
e2e:default on a self-hosted Mac 41244364528 Green
Whole-branch review doperpowers:reviewer-high over origin/master...03df80763, plus a follow-up on 918ddf8 One P2 (D47), fixed. The follow-up was clean

The measured series ran on 03df807. Two things came after it: the whole-branch review's fix 918ddf8, which is main-side, off the latency path and changes no mawsd code, and the master merge. Neither was re-measured, by the architect's decision (D47, D48).

For CI-opt: one .github hunk. .github/scripts/gate-plan.test.mjs LIVENESS_BOUNDS renames one entry (the connector client’s kill, D10) and adds dashboard-live-data's 180 s operation-deadline bound.

Unresolved Review Findings

  • Spine-internal engine-host requests are not park needs (src/mawsd/engine-requests.ts, D48). O5's park counter counts the client requests that mawsd forwards. The spine's own requests are not counted, and these now include O4's moved parts: connectors.call (up to 180 s), library.read, catalog.engine and delivery's artifacts.get. Master's sessions service already works this way.
    • The exposure is bounded: a host parks only when it has no live row, and connector calls run through a live session's engine.
    • Routing these requests through the counter would undo mawsd spine: an event's load wakes no engine host nobody wants #409.
    • The architect opens a tracker row at landing: an in-flight spine request defers the park without counting as a need.
  • This build's app on an older unit (LaunchAgent) mawsd. Connectors answer unknown_command until O2's LaunchAgent repair at launch, or until the adoption retry at the next streaming (D47). Accepted as transitional.
  • The pre-O4 app's banner restart button does nothing against an O4 mawsd. mawsd ignores exit now from a connection it refused (D37). The button causes no loop; the next attempt waits again.
  • src/services/connectors/connect-outlives-asker.test.ts:58-62. Its until is bounded by loop turns rather than time. Deferred as minor.
  • Already tracker rows: the stranded watch, and D41's re-read.

Residue

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…de; main's side; the e2e cases), each reviewed before the next

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…t keys the connectors and the dataset refresh on a declaring client's connection (connectorsPresence); mawsd declares it beside host.attachment; WIRE_MINOR 13

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… machine.connectors on engine-host.sock and machine.sock (D11); an agent's dataset refresh wakes and is held by a cold spine (D12)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…e refused app announced; the interim until 2b), D11's text corrected, the hello's appPid surprise

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…t refused before any export; main's send reads the machine's status first)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…/main/index.ts taken from master, app.ts imports excludeFromBackup from @shared/fs/backup-exclusion)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d delivery into src/services/; root-wiring.test.ts retired (main composes no connectors); the move alone, the next commits make it build

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…, connectors.adoptGrant, delivery.deliver, the connectors.reset event, grades) and the spine's composition of connectors, sign-in and delivery (ConnectorsDeps, window reports, adoptSealed, the process-wide epoch, delivery's admission and tombstones); main composes none of them; the Electron sealer and e2e guard in legacy-custody.ts; connectors tests over the bus

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…he store's and the provider's adoption (adoptSealed, adopt), the process-wide epoch and the stop's closes; delivery.deliver's admission and tombstones (D15, D38's absent case kept); Electron's sealer and the E2E guard's tests beside legacy-custody; main's tests drop the moved modules' mocks; comments repointed to the new paths

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…tive: 24 commands and 4 events join as the machine's), the route snapshot, the owner pins in the schema suites, WIRE_MINOR 13's note

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…delivery.status, connect, deliver), the spine lists with the connectors' 24 names, the composition test (a lease, its declaration, the owner's rows, Drive over a fake gws, a delivery, its receipt gone with the release; a refused run too), claimable by grade with a replayed grant, the per-client case over machine.sock, and the bundle guard's markers; the front's socket client and the scripted connector host shared in test support

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…from the engine host's listing, at its load and at each streaming notice; a status heard meanwhile is the newer word (a spine loaded after a session became ready heard no status for it)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… result

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…th documents reviewed as plain-string records; the budgets read the connectors' and delivery's bounds from constants modules alone (the services' graph, the custody's JXA among it, off the budgets' chunk); the detached welcome lists host.connectors; sign-in reads the session listing at the load only while the engine host streams, so a load never starts a parked host ahead of the discovery wake

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ead through the admitted descriptor, Drive given a private 0600 copy made through it in a 0700 directory of the service's own, removed with the export); an identity's adoptions run in turn, its uniqueness read after the seal, a Connect or Reconnect for it busy meanwhile; an acknowledged Disconnect is tracked until its grant is forgotten and revoked (D17)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…export only while its path still names that file (device and inode against the admitted descriptor); a directory, another file or a link in its place is left and logged; recursive removal is the service's own copy directories' alone

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…imports Foundation by subscript (ObjC["import"]), the same call, so the chunk it shares with the budgets carries no text the bundle guard reads as a deferred load

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d run before the owner switch on both shapes and for main's own calls, an answer short-circuiting the route, a throw answered as a handler's; an intercepted command consults none

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…the JXA's subscript import

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… the app and reported as connectors.windowShown under the page's client through the router's before seam, its first lease command waiting for the report to land, a change reported in order, re-read every WINDOW_RECHECK_MS while followed, reportAgain for a restarted machine; P3-H H4's window cases moved here, and the report over main's router on both shapes

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…'s delivery.status read before anything is exported and a state that cannot send refused with no export; the export (Notion's dialect for Notion, Markdown alone) handed to delivery.deliver with its revision and the artifact's title; a cancel during the export phase answered through the router's before seam, the export let finish and removed, nothing handed off

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… shapes: the window reporter over the router's before seam, the one-time adoption of format 1 grants bound to connectors.adoptGrant under main's client (at the machine host's first streaming on the daemon shape, at once on the embedded one), connectors.reset at each later streaming after every page is marked unreported; delivery.send registered over the export service and the machine's delivery.status and delivery.deliver

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…rface's lease on connectors.reset (D28): a new open, its declaration and visibility as last asked, each watch started again with its listener under ids the client maps, before anything asked meanwhile; a call in flight answers as the host did; a lease answering after a reset overtook its open is closed

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… safeStorage, as main's root now composes the window reporter, the adoption and delivery.send

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…hat the machine did not take a page's window

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ises

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… machine answered its delivery, so a second send under it answers busy and a cancel never marks it while the first run is delivered; main still answers only an export-phase cancel

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…s refusal as reached; the library's four reads, retagged machine, answer their fresh artifact id no artifact <sampled id> (invalid_input by the engine host's store, unchanged by the move); the probe's answer and its rule move to the samples module, held by the unit test

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… a provisional yield is held as a need of the load the lift resumes

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…d's own answer (no artifact <sampled id>); any other refusal naming the sampled id is a refused sample

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… O7 M2; root-wiring.test.ts stays retired, the app-root suites' electron mock carries both safeStorage and systemPreferences)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…rver behind it) and expectMockCustody (the scene-free custody check expectScratchCustody now calls)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ost.sock and machine.sock naming machine.connectors, the update banner; the build check and D11's residual recorded); (downgrade, daemon) plants a format 1 grant the keeper adopts and the pre-O4 peer lists unreadable; (update, daemon) reads which host lists host.connectors

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…session (the architect's ruling, O3-D's refusal too)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…p waits on it and shows its banner; a pre-O4 app is refused on pty-host.sock too, so it holds no client on the idle clock; the refusal line is logged once a minute per app and socket (refusal-log.ts)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…sockets, the banner and mawsd's idle exit with only the refused app asking, and records what follows the exit; the (pre-O3 app, daemon) scene expects the old app to wait on the refusal

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…cessary

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…e at app level, an agent's dataset refresh with no app through each serving host's dashboard seam (noClient from the kept pre-O4 host keyed on the app's attachment, answered by mawsd from this build's host); the pre-O4 scene always asserts mawsd's exit, by the restart or by its idle clock, and a re-executed mawsd of this build's idle exit; the admission table covers pty-host.sock

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ts residual is empty, as the scene's first run recorded; D11's sentence and acceptance 10 corrected

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… daemon) scene now imports

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ch review's main-side fix (the architect at stop 2)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…chine host's next streaming when the machine could not take a record yet

The updated app's first streaming can be a still-running pre-O4 mawsd's, which answers connectors.adoptGrant unknown_command before the build check restarts it; the pass latched for the launch and the grants stayed format 1 until the next one (acceptance 2). adoptLegacyGrants now reports retry when a record was left under unknown_command, host_unavailable, timeout or the machine's own unavailable; startAppConnectors keeps the pass due in that case and runs it again at the next streaming, beside the reset (at once when that streaming came while the pass ran), one pass at a time. A pass the sealer stopped, a failed pass and a settled one never run again, so the Keychain is still asked at most once per launch. Unit cases over startAppConnectors and adoptLegacyGrants, and the reviewer's reproduction with the production watchDaemon.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…nterim execution report at stop 2

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…RE_MINOR 14

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… park needs, three open points)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…; the execution report

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T03:22:41.846592Z
We couldn’t complete this review. Comment @codex review to try again.
a46b7d1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@SSFSKIM
SSFSKIM merged commit f015170 into master Nov 1, 2026
SSFSKIM added a commit that referenced this pull request Nov 1, 2026
… its series met every bound); O12 gains M11, the spawner as owner (PR #423); O5 landing 1's series met every bound; a tracker row for spine requests and the park; the wave 2 ledger gains O4 M4's and O5 M5's names

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 1, 2026
…sted Mac

render-host.spec.ts:144 went red only under the packaged binary and landed
unseen (#418, #424): packaged was explicit-only, and --gates all is the
plan's default set, so no landing gate and no default run ever built the
packaged app. Where packaged would run on GitHub's hosted Macs
(packagedHosted: the direct route, HOSTED_MAC_JOBS admits it, a macOS lane,
not a reserved final ref) the default set now holds it, as two macos-26
shards. Mirror and final refs, where it would build on the mini, keep it
explicit. finalRef and packagedHosted move above the default set, which
reads them; the summary's From names packaged only when it joined.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant