LearnNewsExamplesServices
Frontmatter
id19590
titleDragDrop unit fixtures must survive preceding browser-global teardown
stateClosed
labels
bugaitesting
assigneesneo-gpt-emmy
createdAtOct 11, 2026, 5:34 AM
updatedAtOct 11, 2026, 6:05 AM
githubUrlhttps://github.com/neomjs/neo/issues/19590
authorneo-gpt-emmy
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 11, 2026, 5:48 AM

DragDrop unit fixtures must survive preceding browser-global teardown

neo-gpt-emmy
neo-gpt-emmy commented on Oct 11, 2026, 5:34 AM

Context

The v13.2 candidate at f1fbfe5c08196d418bd5ef5c80a99eff13a3cb30 has a red Engine Tests unit job: the refused-native-move case at test/playwright/unit/main/addon/DragDrop.spec.mjs:105 throws ReferenceError: window is not defined at src/main/addon/DragDrop.mjs:441. Its retry passes; fail-on-flaky correctly leaves the job red.

The Problem

The spec installs EventTarget-backed window and document once during module evaluation. The physical-window describe's beforeEach restores method stubs, but does not reinstall those globals. A controlled preceding-fixture deletion reproduces the exact current test body's exception; restoring its existing windowRef makes that same body pass, including its unhandled-rejection observer controls. This proves a fixture-lifetime vulnerability, not the identity of the original CI poisoner.

The Architectural Reality

The main-thread drag path legitimately consumes browser window coordinates. Node unit tests own their simulated browser globals. The merged DomEvents/Touch fixture repair in #19218 establishes the neighboring per-test ownership pattern; it did not cover DragDrop.

Design authority: the hosted unit failure and the spec's existing EventTarget fixture contract. No production behavior is being changed. Decision Record impact: none. Contract Ledger: N/A; no consumed runtime surface changes.

The Fix

Reinstall the spec's existing browser fixtures at the appropriate per-test boundary, preserve teardown restoration, and add a deterministic preceding-delete control that fails without the repair. Keep the refused-move observer's positive and negative assertions intact.

Acceptance Criteria

  • Physical-window drag tests establish their own window/document fixtures before execution and restore borrowed global state correctly.
  • A preceding-delete regression fails without the repair and passes with it.
  • Existing refused-move and no-document-reset assertions remain effective; the focused spec and relevant neighboring fixtures pass.
  • The change is test-only, with no production guard, timeout increase, skip, retry-policy change or weakened assertion.

Out of Scope

Identifying an unproven CI poisoner, changing native drag behavior, broad fixture infrastructure, and release publication.

Avoided Traps

A green retry does not repair fixture ownership. Guarding production window reads would conceal a Node harness defect on a browser-only path.

Related and sweep receipt

Related: #19217, #19218, #19552; v13.2 stability. Live latest-open sweep: latest 20 open Engine issues and latest 30 A2A messages checked at 2026-10-11 03:33Z; no equivalent active claim found. MC sweep: DragDrop/window/fixture teardown surfaced the earlier document-root incident; targeted helper recall recovered the DomEvents/Touch fixture decision (session 4c0a5550-17ba-4752-9852-846afa537c86). KB returned no directly matching fixture ticket. Live historical search found no open duplicate. Own-assignment sweep: two open issues (#16151 and #15526), neither overlaps this unit fixture. Retrieval Hint: "DragDrop physical window drag refused native move preceding fixture teardown". Origin Session ID: 56e85f26-e03f-486f-8cd7-94db0602291c

Post-merge receipt: https://github.com/neomjs/neo/issues/19590#issuecomment-6105197617

tobiu referenced in commit e8af9f3 - "test(main): own DragDrop browser fixtures per test (#19590) (#19591)" on Oct 11, 2026, 5:48 AM
tobiu closed this issue on Oct 11, 2026, 5:48 AM