LearnNewsExamplesServices
Frontmatter
id19651
titleCapture projection state when grid keyboard navigation fails
stateClosed
labels
enhancementaitestinggrid
assigneesneo-gpt-sophie
createdAtOct 12, 2026, 2:42 PM
updatedAtOct 12, 2026, 3:45 PM
githubUrlhttps://github.com/neomjs/neo/issues/19651
authorneo-gpt-sophie
commentsCount0
parentIssue19515
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 12, 2026, 3:45 PM

Capture projection state when grid keyboard navigation fails

Closed Backlog/active-chunk-8 enhancementaitestinggrid
neo-gpt-sophie
neo-gpt-sophie commented on Oct 12, 2026, 2:42 PM

Context

The retained failure in the investigation receipt contains both stale c12 and correct c3 selected in the DOM. It has no worker-side snapshot, so it cannot identify where the stale projection began. The root-cause and repair acceptance criteria remain on #19515; this leaf delivers only the missing failure evidence.

The Problem

Temporary terminal probes passed without reproducing the intermittent failure. Repeating unchanged green stress runs cannot classify that historical occurrence. The existing keyboard-scroll regression should retain useful model and projection evidence when it next fails in CI.

The Architectural Reality

test/playwright/e2e/grid/KeyboardNavigationScroll.spec.mjs uses the Engine-only fixture and reads the first selected DOM cell. src/grid/View.mjs:135 exposes selection-model items through selectedCells; src/worker/App.mjs:384 exposes read-only getConfigs. Row VDOM and adopted vnode have different representations. These reads are sequential observations across threads, not one atomic snapshot.

Design authority: not applicable โ€” this adds diagnostic evidence, without changing the existing navigation contract.

The Fix

Add a failure-only afterEach collector in the existing spec. Capture DOM first (all selected cells, target/selected rows, identifiers, scroll position), then worker-backed selectedCells, row VDOM/vnode projections, mounted columns and update flags. Use the existing Engine RPC; retain Engine-only selection. Bound read waiting to three seconds, preserve partial evidence on read failure, and never replace the original failure when collection or attachment fails.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback / edge case Docs Evidence
New grid-selection-state JSON attachment This diagnostic leaf; existing failure evidence linked above Unexpected test failure attaches DOM and subsequent worker state with observation times Missing grid/instances recorded; rejected or stalled reads retain partial evidence; attachment failure warns; original failure preserved Collector JSDoc explains non-atomic reads and limits Real-browser stale-DOM and stalled-worker controls
Existing keyboard-scroll arm KeyboardNavigationScroll.spec.mjs and original regression contract Original key sequence, timing and assertions unchanged; passing runs collect nothing No per-key waits, retries, or alternate selected-cell choice Existing spec narrative retained Diff comparison and clean focused run

Decision Record impact: none. Agent OS structure-map: N/A; this is an existing Engine test, with no new module or runtime surface.

Acceptance Criteria

  • An unexpected failure attaches the DOM-first and worker projection evidence described above, sufficient to distinguish a deliberately stale DOM class from a correct model/VDOM/vnode selection.
  • A stalled worker read is bounded to three seconds, preserves the DOM snapshot and original assertion failure, and records the diagnostic error.
  • The clean existing regression passes without a diagnostic attachment; its input sequence and assertions remain unchanged and it stays eligible for Engine-only E2E runs.

Out of Scope

Reproducing or repairing the underlying intermittent producer, changing engine code, weakening assertions, broadening the test fixture, or closing #19515.

Avoided Traps

A synthetic stale DOM is a control for the collector, not a reproduction of the original defect. Green reruns do not retire the historical failure. An always-on probe or per-key RPC would alter timing; a Brain fixture would remove this spec from Engine-only selection.

Related

Related: #19515

Origin Session ID: bcad2075-59c0-49e7-9676-628af19c3033 Retrieval Hint: "KeyboardNavigationScroll c12 c3 stale extra selected terminal projection evidence"

Live latest-open sweep: latest 20 open Engine issues read at 2026-10-12T12:42Z; no separate diagnostic leaf found. A2A sweep: latest 30 messages across read states, no competing claim; Ada acknowledged Sophie's existing lane. MC sweep: problem-noun queries returned the retained October probes and unrelated keyboard work; no decision retiring the missing-evidence problem. Own-assignment sweep: one open issue, #19515, body read in full; its root-cause/repair scope must remain open. KB and live spec-name search point to that investigation and prior editing regressions. This bounded diagnostic is split solely to give the shippable evidence collector its own close target.