LearnNewsExamplesServices
Frontmatter
id19612
titleA vdom unit spec can run before the Helper's lazy StringFromVnode loads
stateClosed
labels
bugaitesting
assigneesneo-opus-ada
createdAtOct 11, 2026, 5:58 PM
updatedAtOct 11, 2026, 6:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/19612
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 11, 2026, 6:15 PM

A vdom unit spec can run before the Helper's lazy StringFromVnode loads

neo-opus-ada
neo-opus-ada commented on Oct 11, 2026, 5:58 PM

Context

On #19607's Engine Tests run 38153117809 (head e73c8b6586, 2026-10-11 15:55Z), the unit job failed on one flaky test while 4,871 passed. The PR is docs-only:

test/playwright/unit/vdom/HelperMoveIntoInsertedSubtree.spec.mjs › "VdomHelper — a node moving into a freshly inserted subtree › after a text child, the move lands behind the text's closing comment" Error: VDom Helper render utilities are not loaded yet!

The retry passed. The job still fails on a flaky test, so any PR can turn red on it, release-day PRs included.

The Problem

src/vdom/Helper.mjs loads its render utility lazily: importUtil() runs from initAsync() and does await import('./util/StringFromVnode.mjs') when useDomApiRenderer is false. create() throws "VDom Helper render utilities are not loaded yet!" if Neo.vdom.util.StringFromVnode is still missing (Helper.mjs:238-239). The spec sets useDomApiRenderer: false and calls VdomHelper.create synchronously in its first test. Nothing makes that test wait for the dynamic import, so whichever finishes first decides the result.

I authored the spec in #19191.

The Architectural Reality

Seven vdom specs set useDomApiRenderer: false. Five of them (Advanced, Calendar, FragmentHelper, FragmentMoves, Helper) import src/vdom/util/StringFromVnode.mjs statically. The import registers Neo.vdom.util.StringFromVnode before any test runs, and importUtil() then skips the dynamic load. DeltaGrammar.spec.mjs is a pure-module test that never calls Helper.create. HelperMoveIntoInsertedSubtree.spec.mjs is the only one that calls create without the static import.

The Fix

Add import StringFromVnode from '../../../../src/vdom/util/StringFromVnode.mjs'; to the spec, the same line as Helper.spec.mjs:17. Test-only, no engine change.

Acceptance Criteria

  • The spec imports StringFromVnode statically, as its five siblings do. (#19613, merged as 2381d1c175)
  • Ten fresh-process runs of the spec pass. The PR records the before and after base rates of the first test from fresh-process runs. (#19613 Test Evidence: 10/10 after; 10/10 before in isolation, so the mechanism probe carries the evidence: the util was absent at module evaluation and present at the first test, 3/3, and present at module evaluation after the fix)

Out of Scope

Making Helper#create await its own utility. The engine's lazy load is deliberate: create is synchronous, and every renderer-specific spec preloads its utility.

Related

#19191 (the spec's origin), #19607 (where it surfaced)

Live latest-open sweep: latest 20 open issues read at 2026-10-11T16:00Z, no equivalent. A2A in-flight sweep: no claim on this spec. Search for the error string and the spec name: no issue.

Retrieval Hint: "VDom Helper render utilities are not loaded yet StringFromVnode lazy import unit spec race"

tobiu referenced in commit 2381d1c - "test(vdom): the moved-into-inserted-subtree spec loads its renderer before its first test (#19612) (#19613) on Oct 11, 2026, 6:15 PM
tobiu closed this issue on Oct 11, 2026, 6:15 PM