Context
grid/GridViewFocus.spec.mjs is red in every #17844 battery census — 32 reds at 3044d7f86b, 21 at 03219a75b7, this arm in both. The 2026-09-15 census diagnosed it: the spec is wrong, not the engine. It reads the pointer-modality stamp one worker round trip too early, and has done so since #18066 changed which event first focuses the View.
No visible defect is behind it. The grid focuses correctly, paints no accidental ring, and clears the class on blur; only the spec's read order is stale.
Live latest-open sweep: checked the latest 20 open issues at 2026-09-15T07:30Z; no equivalent found. A2A in-flight sweep (30 messages, all read-states): no overlapping claim. Own-assignment sweep: #17844 is the parent census ticket and stays open; no leaf owns this arm.
The Problem
The AC-1/AC-2 arm polls until the View owns focus, then reads the modality state synchronously in the next call:
await expect.poll(async () => (await readFocus()).active, {...}).toBe(viewId);
const f = await readFocus();
expect(f.pointer, 'pointer focus stamps neo-focus-pointer atomically').toBe(true);src/main/DomAccess.mjs:379 adds neo-focus-pointer immediately before node.focus(), so for a programmatic focus the class and the focus do arrive together — which is what the arm was written against. #18066 ("a grid click keeps its mousedown default so focus reaches the View", PR #18065) stopped suppressing the click's default, so the browser now focuses the View natively on mousedown — one App-Worker round trip before the DomAccess.focus message that carries the stamp.
The poll therefore exits on the native focus, and the immediately following read lands inside the gap: activeElement is already the View, neo-focus-pointer is not there yet. The arm fails on a system behaving exactly as designed.
The ring assertion is unaffected in the gap — the native focus paints no ring here either — so the contract worth asserting is both sides of the gap, not one read at an arbitrary point in it.
The Architectural Reality
test/playwright/e2e/grid/GridViewFocus.spec.mjs — the AC-1/AC-2 arm, plus a @summary line still describing the pre-#18066 single-source focus as "the atomic pointer stamp".
src/main/DomAccess.mjs:379-396 — the modality contract: stamp before focus(), replace with neo-focus-keyboard on the first keydown, remove on blur. Unchanged by this ticket.
src/grid/View.mjs — the single focus anchor for the multi-body grid (tabIndex: -1). Unchanged by this ticket.
- The arm is Neural-Link-gated, so it only executes with
NEO_AGENTOS_RUNTIME_ROOT wired (#18246).
The Fix
In GridViewFocus.spec.mjs, replace the single post-focus read with the two-sided assertion the contract actually makes:
- Assert no ring as soon as the View holds focus — that is true throughout the gap and is the property a user would see break.
expect.poll for neo-focus-pointer, instead of requiring it in the same read as the focus.
- Assert no ring again once the stamp has landed.
Correct the @summary and the arm comment so they describe the two-source focus path rather than the retired single-message one.
Engine behaviour is untouched; this is a test-only correction.
Acceptance Criteria
Out of Scope
- The other 20 reds in the
#17844 census — each is dispositioned there.
- Any change to the
DomAccess modality contract or to grid.View's focus ownership.
- Making the native and programmatic focus paths converge on one message: the gap is legitimate, and closing it would be an engine change with no observed user-facing symptom.
Avoided Traps
- Do not "fix" this by asserting the stamp before focus. The order is browser-owned; the only stable contract is the eventual state plus the ring's absence throughout.
- Do not weaken the arm to a bare poll. A poll alone passes vacuously if the stamp is never removed from a previously-focused node — the ring assertions on both sides of the gap are what keep it discriminating.
- Run the whole spec file, never a single
--grep'd arm — #17844 trap 3.
Decision Record impact
none.
Related
#17844 (the census that found and diagnosed it) · #18066 / PR #18065 (the mousedown-default change that opened the gap) · #15195 (the focus-ownership contract the arm witnesses) · #18246 (the Neural-Link gating that decides whether it runs at all)
Origin Session ID: 148d12cc-9777-46e4-bfb9-a422479153a5
Retrieval Hint: query_raw_memories("GridViewFocus neo-focus-pointer stamp lands after native mousedown focus")
Context
grid/GridViewFocus.spec.mjsis red in every#17844battery census — 32 reds at3044d7f86b, 21 at03219a75b7, this arm in both. The 2026-09-15 census diagnosed it: the spec is wrong, not the engine. It reads the pointer-modality stamp one worker round trip too early, and has done so since#18066changed which event first focuses the View.No visible defect is behind it. The grid focuses correctly, paints no accidental ring, and clears the class on blur; only the spec's read order is stale.
Live latest-open sweep: checked the latest 20 open issues at 2026-09-15T07:30Z; no equivalent found. A2A in-flight sweep (30 messages, all read-states): no overlapping claim. Own-assignment sweep:
#17844is the parent census ticket and stays open; no leaf owns this arm.The Problem
The AC-1/AC-2 arm polls until the View owns focus, then reads the modality state synchronously in the next call:
await expect.poll(async () => (await readFocus()).active, {...}).toBe(viewId); const f = await readFocus(); expect(f.pointer, 'pointer focus stamps neo-focus-pointer atomically').toBe(true);src/main/DomAccess.mjs:379addsneo-focus-pointerimmediately beforenode.focus(), so for a programmatic focus the class and the focus do arrive together — which is what the arm was written against.#18066("a grid click keeps its mousedown default so focus reaches the View", PR #18065) stopped suppressing the click's default, so the browser now focuses the View natively onmousedown— one App-Worker round trip before theDomAccess.focusmessage that carries the stamp.The poll therefore exits on the native focus, and the immediately following read lands inside the gap:
activeElementis already the View,neo-focus-pointeris not there yet. The arm fails on a system behaving exactly as designed.The ring assertion is unaffected in the gap — the native focus paints no ring here either — so the contract worth asserting is both sides of the gap, not one read at an arbitrary point in it.
The Architectural Reality
test/playwright/e2e/grid/GridViewFocus.spec.mjs— the AC-1/AC-2 arm, plus a@summaryline still describing the pre-#18066single-source focus as "the atomic pointer stamp".src/main/DomAccess.mjs:379-396— the modality contract: stamp beforefocus(), replace withneo-focus-keyboardon the first keydown, remove on blur. Unchanged by this ticket.src/grid/View.mjs— the single focus anchor for the multi-body grid (tabIndex: -1). Unchanged by this ticket.NEO_AGENTOS_RUNTIME_ROOTwired (#18246).The Fix
In
GridViewFocus.spec.mjs, replace the single post-focus read with the two-sided assertion the contract actually makes:expect.pollforneo-focus-pointer, instead of requiring it in the same read as the focus.Correct the
@summaryand the arm comment so they describe the two-source focus path rather than the retired single-message one.Engine behaviour is untouched; this is a test-only correction.
Acceptance Criteria
grid/GridViewFocuspasses with the Brain runtime wired (NEO_AGENTOS_RUNTIME_ROOT=<brain checkout> npm run test-e2e -- grid/GridViewFocus --workers=1).neo-focus-pointer, so the poll cannot pass vacuously.src/changes.#17844's failure table records this arm as fixed at the next census.Out of Scope
#17844census — each is dispositioned there.DomAccessmodality contract or togrid.View's focus ownership.Avoided Traps
--grep'd arm —#17844trap 3.Decision Record impact
none.
Related
#17844(the census that found and diagnosed it) ·#18066/ PR #18065 (the mousedown-default change that opened the gap) ·#15195(the focus-ownership contract the arm witnesses) ·#18246(the Neural-Link gating that decides whether it runs at all)Origin Session ID: 148d12cc-9777-46e4-bfb9-a422479153a5
Retrieval Hint:
query_raw_memories("GridViewFocus neo-focus-pointer stamp lands after native mousedown focus")