Skip to content

process-yield test: load the spine with a read that wakes no engine host (the design-system seed flake) - #415

Merged
SSFSKIM merged 1 commit into
masterfrom
process-yield-seed
Oct 31, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
process-yield-seed

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Fixes the flake in src/mawsd/process-yield.test.ts › "from the refusal to [spine] released: …" (the checkpoint changed no row and no schema of the index; 4 sightings across three branches on 2026-10-30/31, each green on rerun; latest class 1a run 41225432077).

What was written, and when

  • The engine host seeds the built-in design systems (Classroom, MAWS, Official) at its first start over a store that never held one (src/engine-host/design-systems/seed.ts), before its startup admission gate opens (seed-gate.ts, bounded at 8 s).
  • The test loaded the spine with session.list, a discovery read: since the discovery wake (M6 fix round 1, item 7) it starts the parked engine host. The seed reaches index.sqlite only through the spine's library sync (src/services/library/sync.ts): the held artifacts.changed events drained at the host's first streaming, then the connection's reconcile from library.snapshot, which also drops the O2 fixture's own library row ("Launch plan"), since the host's store never held it.
  • session.list answers once the discovery pass is heard, without waiting for that sync, and mawsd parks the host at the same moment. The sync then ends in one of three ways: reconciled, with its snapshot failed host_unavailable (about a third of loaded local runs), or, when the park fails reads the sync still has queued, with a successor host woken for them that reconciles and reads every text a second later.
  • The flake: that sync landed between the before-read and the refusal. The CI diff and a local reproduction (1 in 160 runs, 4 parallel workers plus 12 yes) both show the reconciled set arriving: the built-ins added, the fixture row dropped, the FTS shadow tables changed to match.
  • The yield does not write it. At the refusal, spine.yield → release('yield') → settle → stopRoot run within microtasks when the root is idle (it was idle in every instrumented run). The library's stop() drops any answer that arrives later: in 7 of 20 instrumented runs, the reconcile was still in flight at the refusal and never landed.

The fix

The spine is loaded by attention.list, a machine read that wakes no engine host, so nothing the host seeds can reach the index around the readings. After the release, the test asserts that the daemon log holds no spawned a supervisor, so a future load that wakes a host fails loudly instead of flaking. The whole-index comparison is unchanged, and its message now carries the daemon log.

Two earlier versions on this branch waited for the library's first sync to end instead: first for the fixture row gone or the snapshot failure logged, then also for no host running or every text read. The independent review (reviewer-medium) showed that each could accept early when a park fails queued reads and wakes a successor; I forced one such path locally and confirmed it. That end can't be observed from outside without coupling the test to the sync's internals, so the branch was squashed to the load change, which the reviewer then judged correct.

Verification

  • Locally, 4 parallel workers plus 12 yes: this head passed 100/100 (and 100/100 on its first base). The pre-fix test failed 1 in 160 under the same load, with the CI signature.
  • Power: a write injected into the yield's stop (the index part in spine-root.ts, just before index.close()) fails this test 3/3.
  • Gate: scripts/ci-gate.sh --gates static,unit,unit:darwin,probes --class1a pool --runner macos --peer none, run 41233634236, green. The run's tree is 56421ad7497933de2a8257f14ad8b1162853b3f6, equal to the head's, and the test ran in unit 1/4.

Notes for the architect

  • Not changed, and a design point rather than this flake: when the root is busy at a refusal, the release waits on it. The library sync sits outside settling by design and keeps applying host answers during that wait, so D53(a)'s "only its stores' close" holds for an idle root. This was not observed here.
  • A product observation: the discovery wake parks the host while the library's first sync is in flight. After a CLI session.list on a cold daemon, the library can therefore stay unreconciled (seeded systems missing, stale rows listed) until the next host connection.

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

…e host (attention.list), and the test asserts no host started; a discovery read (session.list) woke the parked host, whose first start seeds the built-in design systems, and the library's first sync brought them into the index (dropping the fixture's row) on the host's clock, sometimes between the readings around the refusal (the 4 sightings' flake); the whole-index comparison is unchanged and now carries the daemon log

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 9997393 into master Oct 31, 2026
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)
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