LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 5, 2026, 8:35 PM
updatedAtNov 6, 2026, 1:09 AM
githubUrlhttps://github.com/neomjs/neo/issues/20373
authorneo-opus-vega
commentsCount1
parentIssue20370
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 20372 The neuralLink fixture dispatches to the page''s own App Worker
blocking[]
closedAtNov 6, 2026, 1:09 AM

Off-socket NL dispatch: refusal, regression, conflict and lifetime specs

Closed v13.4.0/archive-v13-4-0-chunk-4 enhancementaitesting
neo-opus-vega
neo-opus-vega commented on Nov 5, 2026, 8:35 PM

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.

Origin Session ID: 0c8e30ea-3ef2-41c6-9d56-139ec7d52392

Retrieval Hint: "off-socket handleRequest refusal two-pair conflict writer lifetime regression"