Part of #20370 (linked natively); graduated from D#18775 (OQ1, OQ2, OQ3, OQ5, OQ6). Blocked by the adapter leaf.
Context
The off-socket path is only as safe as the guards it keeps. D#18775 measured each guard once, by probe; this leaf turns those probes into the regression specs that keep the path honest.
The Architectural Reality
The write path: admitWrite (src/ai/admitWrite.mjs:39) enforces the multi-writer lock; TransactionService.begin fails closed without a writer pair.
Existing pins of the release seam: test/playwright/unit/ai/ClientAgentDisconnect.spec.mjs and test/playwright/unit/ai/TransactionService.spec.mjs.
focus_window is registered by src/ai/client/RuntimeService.mjs and calls Neo.Main.windowNativeFocus itself.
The Fix
One spec family over the test entry and the adapter, each spec with a control that fails when its guard is removed.
Discussion Criteria Mapping & Leaf Slice
The regression covers exactly the six hosted services:
src/ai/client/ComponentService.mjs
src/ai/client/DataService.mjs
src/ai/client/DockService.mjs
src/ai/client/InstanceService.mjs
src/ai/client/InteractionService.mjs
src/ai/client/RuntimeService.mjs
Acceptance Criteria
Refusal (OQ2): a call with an incomplete pair is refused before dispatch, and no write lands.
No socket reads (OQ1): across reads, an enforced write and its undo in each of the six services, a trapped socket records zero reads; the control fires when the trap is bypassed.
Identical off-socket (OQ3): the five write calls in the suite's census (setProperties, executeDockOperation, createInstance, simulateEvent, driveDrag) give the same result, state and transaction stack through an agent_message frame and through the test entry; a control detects a divergent envelope.
Two-pair conflict (OQ2): while pair A holds a subtree lock, pair B's overlapping write is denied.
Lifetime (OQ6): test A writes and throws; after fixture cleanup, test B's fresh pair meets no stale conflict and inherits no undo stack.
No denylist (OQ5):focus_window on an unknown id refuses off-socket exactly as on-socket, with no native focus call.
Out of Scope
Physical window journeys and the recorder (Bridge tier, #19655); SharedWorker apps.
Decision Record
Decision Record: Not needed (D#18775).
Decision Record impact: aligned-with neomjs/neo#adr:extended-nl-multi-writer-write-enforcement.
unowned-rationale: blocked by the adapter leaf; any peer claims it once that lands, and the epic's steward (Vega) reviews.
Part of #20370 (linked natively); graduated from D#18775 (OQ1, OQ2, OQ3, OQ5, OQ6). Blocked by the adapter leaf.
Context
The off-socket path is only as safe as the guards it keeps. D#18775 measured each guard once, by probe; this leaf turns those probes into the regression specs that keep the path honest.
The Architectural Reality
admitWrite(src/ai/admitWrite.mjs:39) enforces the multi-writer lock;TransactionService.beginfails closed without a writer pair.test/playwright/unit/ai/ClientAgentDisconnect.spec.mjsandtest/playwright/unit/ai/TransactionService.spec.mjs.focus_windowis registered bysrc/ai/client/RuntimeService.mjsand callsNeo.Main.windowNativeFocusitself.The Fix
One spec family over the test entry and the adapter, each spec with a control that fails when its guard is removed.
Discussion Criteria Mapping & Leaf Slice
The regression covers exactly the six hosted services:
src/ai/client/ComponentService.mjssrc/ai/client/DataService.mjssrc/ai/client/DockService.mjssrc/ai/client/InstanceService.mjssrc/ai/client/InteractionService.mjssrc/ai/client/RuntimeService.mjsAcceptance Criteria
setProperties,executeDockOperation,createInstance,simulateEvent,driveDrag) give the same result, state and transaction stack through anagent_messageframe and through the test entry; a control detects a divergent envelope.focus_windowon an unknown id refuses off-socket exactly as on-socket, with no native focus call.Out of Scope
Physical window journeys and the recorder (Bridge tier, #19655); SharedWorker apps.
Decision Record
Decision Record:Not needed (D#18775). Decision Record impact: aligned-withneomjs/neo#adr:extended-nl-multi-writer-write-enforcement.unowned-rationale: blocked by the adapter leaf; any peer claims it once that lands, and the epic's steward (Vega) reviews.
Origin Session ID: 0c8e30ea-3ef2-41c6-9d56-139ec7d52392
Retrieval Hint: "off-socket handleRequest refusal two-pair conflict writer lifetime regression"