LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtOct 20, 2026, 6:23 PM
updatedAtOct 21, 2026, 12:33 AM
githubUrlhttps://github.com/neomjs/neo/issues/19922
authorneo-opus-grace
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 21, 2026, 12:33 AM

A child update merged into a parent flight is dropped when their windowIds differ

neo-opus-grace
neo-opus-grace commented on Oct 20, 2026, 6:23 PM

Context

Found while diagnosing why #19917's RealWorld v1 fix sometimes left the Popular Tags sidebar empty although /api/tags answered 200: 2 of about 16 natural runs, and 6 of 12 under a later diagnosis harness. A read-only diagnosis of the interleaving traced it to the engine; the app supplies the trigger.

The Problem

A child's update can merge into a parent flight that will never render it, and the child is still acknowledged as done:

  1. The parent (HomeComponent) is mounted, gets new data, and starts executeVdomUpdate. It sets isVdomUpdating and yields at src/mixin/VdomLifecycle.mjs:274 (setTimeout(1)); needsVdomUpdate stays true until the payload is built (:610).
  2. Inside that yield, the child (the tag list) updates. mergeIntoParentUpdate (:965-966) sees the parent's needsVdomUpdate and registers the child as merged, sets the child's own flag, and returns (:1323-1325).
  3. collectScopes(parent) marks the child collected and claims its promises (:321-322), then recurses. collectScopes(child) returns at :298 because the child's windowId (null) differs from the parent's, so the child gets no scope and no payload, and its flag stays set.
  4. The parent's depth-1 payload reduces the mounted child to a neoIgnore placeholder (src/util/vdom/TreeBuilder.mjs:74-80).
  5. resolveVdomUpdate settles the child's claimed callbacks (src/manager/VDomUpdate.mjs:224-226). A promiseUpdate() on the child resolves while its vnode still holds the old content.

End state: the child has needsVdomUpdate set, an old vnode, a newer vdom, and no merged, post-update or in-flight entry left to run it. Nothing re-runs it until something calls update() again. The change is silently lost and reported as done.

The trigger: RealWorld v1's HomeComponent creates TagListComponent in onConstructed with only parentId. Containers forward windowId only to their items (src/container/Base.mjs:319-333, :393), so the tag list keeps windowId: null. On dev the inline vdom embed (#19917) hides the drop, since the tag list rides the parent's payload as plain vdom.

The Architectural Reality

  • Merging and collection disagree about eligibility. The merge (:965) does not check the window, and collection (:298) refuses on it after the merge has already marked and claimed the child.
  • The engine's own components forward or pass windowId to the children they create: grid.Row (#18291), src/functional/component/Base.mjs:137-143, the Time trigger, the grid and table header buttons, the Chip field and the calendar week view.

The Fix

  1. Engine: in mergeIntoParentUpdate (:965), merge only when parent.windowId === me.windowId. A mismatched child then runs its own flight, at the cost of one extra worker round trip. The diagnosis ran 2,804 engine-relevant unit specs green both with and without this guard.
  2. Name the remaining gap: a windowId that changes after a merge was accepted would still be dropped at :298. Closing that means collection never marks or claims a merged child it will skip, and hands it back as its own flight. That touches what VdomLifecycle.spec.mjs ~961 pins, so it is decided in this ticket's PR or split out with a reason.
  3. App (#19917): HomeComponent forwards its windowId to the tag list and passes windowId/appName when it creates the previews.

Acceptance Criteria

  • AC-1: A unit arm: a leaf whose windowId differs from its owner, updated while the owner's flight is yielding, renders its change, and its promiseUpdate() resolves only after that. Red on dev ({pills: 0, needsVdomUpdate: true, leafSettled: 'resolved'} in the diagnosis), green with the fix. A control arm with matching windowIds passes on both.
  • AC-2: A browser e2e for this vdom behavior change (per #19499): the held-response order (both responses held until the sidebar mounts; articles first, tags the moment that settles) renders every pill on every run. The diagnosis had it 10/10 empty on dev.
  • AC-3: The later-windowId-change gap from The Fix is closed, or carried out with its reason.

Out of Scope

  • The app side, which #19917 carries.

Related

#19917 (the trigger) · #19916 / #19921 (the same settlement area) · #18291

Live latest-open sweep: latest 20 open issues at 2026-10-20T16:23Z, plus gh search issues --owner neomjs for "mergeIntoParentUpdate windowId" and "merged child update dropped windowId"; no equivalent A2A claim sweep: no claim on vdom merging in the window MC sweep: "child component update merged into parent vdom flight is lost: promiseUpdate resolves but the DOM never shows the change, windowId null", 5 results; January's sibling-race work, a different mechanism; no prior decision Own-assignment sweep: #19916 and #19921 touch the mount loop, not merging

Retrieval Hint: "mergeIntoParentUpdate windowId mismatch collectScopes drops merged child promiseUpdate resolves" Origin Session ID: dcd54a9c-cc39-4b54-b3f3-f892704cfa86

tobiu referenced in commit 0ec1810 - "fix(vdom): guard parent merge and collection against windowId mismatch (#19922) (#19936)" on Oct 21, 2026, 12:33 AM
tobiu closed this issue on Oct 21, 2026, 12:33 AM