LearnNewsExamplesServices
Frontmatter
id19467
titleDisjoint VDOM batch roots escape in-flight protection
stateClosed
labels
bugaitestingcore
assigneesneo-gpt
createdAtOct 8, 2026, 5:20 AM
updatedAtOct 8, 2026, 10:35 AM
githubUrlhttps://github.com/neomjs/neo/issues/19467
authorneo-gpt
commentsCount0
parentIssue17844
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[x] 19461 Demo B tour proof and replay lag current dock contracts
closedAtOct 8, 2026, 10:35 AM

Disjoint VDOM batch roots escape in-flight protection

neo-gpt
neo-gpt commented on Oct 8, 2026, 5:20 AM

Context

While restoring Demo B's full tour on #19461, a native headless journey at Engine 6e19f6031b produced two insertNode births for one new tab-header id in successive mixed-root and toolbar flights. Worker and VDOM membership are unique; DOM membership remains duplicated through a five-second consistency check.

A read-only pre-send scope probe now records a collected merged host with childUpdateDepth=-1 and distance=1, while only its initiating workspace is registered at depth1. The host's in-flight entry is absent and isVdomUpdating is false. Main's corresponding response contains both workspace and host vnode roots.

The Problem

VdomLifecycle#executeVdomUpdate registers only its initiating component. Payload collection can emit additional same-window, disjoint component roots. Those roots have real in-flight subtrees but do not participate in the existing updating flag/registry guard, allowing a descendant to start a conflicting flight against an older baseline.

Design authority: VDomUpdate#registerInFlightUpdate marks an update sent to the worker; VdomLifecycle#isParentUpdating uses that component's flag and captured depth to defer overlapping descendants. A collected disjoint root must carry that same protection.

The prior #17991 repair coheres an existing owner's escalated depth. Its own final body retracts a duplicate-render consequence and distinguishes #17999's canonical-reference cure. Neither establishes protection for an additional emitted root; the present runtime record is the new discriminator.

The Architectural Reality

  • src/mixin/VdomLifecycle.mjs owns collection, collision filtering, response adoption and failure release.
  • src/manager/VDomUpdate.mjs already owns in-flight depth, promises and post-update queues.
  • test/playwright/unit/vdom/VdomLifecycle.spec.mjs is the existing state/flight owner.
  • SharedWorker payload collection excludes another window; that boundary must remain intact.

The Fix

Bring every emitted disjoint component root into the existing in-flight lifecycle using its captured depth. Adopt its response before releasing blocked descendants. A rejected batch must release each tracked root, its parked promises and post-update work; do not strand a borrowed flag or overwrite a later cycle.

Use the existing registry/guard primitives. Do not change the Main insertNode apply layer or deduplicate DOM after publication. A deterministic behavioral unit and the live duplicate control decide whether the proposed protection resolves the observed rendering consequence.

Contract Ledger

Surface Authority Behavior Fallback Docs Evidence
Disjoint batch root guard Existing updating flag + in-flight depth contract Every emitted same-window root is protected at its captured depth Existing post-update deferral Owning JSDoc Deferred descendant write with held batch
Batch completion/failure Existing VDOM flight outcome contract Adopt first; release all tracked scopes/promises on success or rejection Existing retry/rejection contract Owning JSDoc Success, rejection and late-promise controls

Decision Record impact: none — restoration of existing VDOM flight ownership. No new wire/config surface. Structure map: N/A — existing Body mixin/manager and source-mirror unit spec; no new module.

Acceptance Criteria

  • A deterministic mixed-root batch reproduces an unprotected deep root on the old source.
  • Each emitted same-window root has its captured depth and updating protection; a descendant's conflicting write waits until response adoption.
  • Success and rejection release the correct scopes, callbacks and post-update work; late promises retain their next-cycle semantics.
  • Other-window roots remain excluded and are not incorrectly marked as part of the batch.
  • The native duplicate control and a subsequent toolbar write remain coherent with the prerequisite witness candidate; focused receipts name both source layers.
  • Owning unit checks pass and the result is linked to #17844/#19461; no full-battery or headed acceptance claim.

Out of Scope

Main DOM deduplication, catalog/schema changes, Demo B witness/cue repairs, and new rendering services.

Avoided Traps

No consumer sleep or redundant-commit suppression as the engine cure; that candidate was experimentally falsified. No depth freezing, because it can exclude legitimate subtree work. No inference that the older registry-value cure fixed a duplicate it did not reproduce.

Related

Related: #17844 Related: #19461

Origin Session ID: 01a11843-6adc-72c0-b895-ab4207603b32 Retrieval Hint: "disjoint VDOM batch deep merged root in-flight scope absent duplicate header"

Creation sweep: exact live disjoint/in-flight search found no equivalent open repair; prior #17980/#17991/#17999 read for ruled-out mechanisms. Own assignments include parent17844 and witness19461, whose engine exclusion requires this separate generic leaf. Memory problem queries returned adjacent or unrelated material, with no ruling against this repair. Latest-created open queue and all-state recent claims rechecked immediately before filing.

tobiu referenced in commit fb11d56 - "fix(vdom): protect every disjoint batch root (#19467) (#19468) on Oct 8, 2026, 10:35 AM
tobiu closed this issue on Oct 8, 2026, 10:35 AM