Context
Found while tracing #21974 (the Workstation's held reconcile flight) from Sophie's witness: a host update merged into a staged container never settles after a depth-1 update of an ancestor.
The Problem
VdomLifecycle#getVdomUpdatePayload clears needsVdomUpdate on the flying component and calls afterSetNeedsVdomUpdate(false, true), and Container#afterSetNeedsVdomUpdate then clears the flag on every descendant, whatever the payload's depth. A depth-1 update carries none of its descendants, yet a descendant that still owes an update loses the flag that wakes it: the engine's wakes read that flag (Neo.layout.Base#set flies only if (container.needsVdomUpdate); VdomLifecycle re-checks it at a flight's end). The owed update never runs, and every promiseUpdate() merged into it stays pending.
The Architectural Reality
src/container/Base.mjs, afterSetNeedsVdomUpdate(value, oldValue): the depth-blind walk over items.
src/mixin/VdomLifecycle.mjs, getVdomUpdatePayload: the payload's updateDepth, and the merged children it expands.
initVnode renders at depth -1, so its full clear is right.
The Fix
Container#afterSetNeedsVdomUpdate(value, oldValue, depth=-1) clears only the items an update covers: all of them at -1, none at 1, one level less per level down. getVdomUpdatePayload passes its depth, and clears the merged children it expands at their own depth.
Acceptance Criteria
Out of Scope
An ancestor flight that carries or prunes a staged container without collecting the callbacks merged into it (the deep and sparse paths) stays with #21974. Keeping a covered item's flag while it owes callbacks was tried and broke dock component specs (DockReload and DockLock: 3 failures with it, 17/17 without): the flag is also what a child merges into, so a kept flag with no flight scheduled swallows later updates.
Related
#21974 (the held flight; this is one of its paths) · PR #22002.
Live latest-open + closed sweep: latest 20 open (newest #22012) + open and closed search ("needsVdomUpdate depth", "shallow update flag merged promise") at 19:56Z. Open hits: #21974 (the held flight this splits from) and #20747 (the yield whose stated constraint is this clear). Closed hits #19513 and #19404 (absorption and sparse-cycle losses; Out of Scope read, neither owns the flag clear). 59 open (red band): split from #21974 so that PR #22002 resolves exactly what it proves, while #21974 keeps the Workstation hold. A2A claim sweep (30 newest, all states, to 19:56Z): no claim. MC: my 11-22 notes on #21974 and a 20 Jan TreeBuilder discussion, no decision against. Own: #21974.
Origin Session ID: 54c2c0f3-a035-4e41-8425-cd6d2d5abb0b
Retrieval Hint: "shallow update clears needsVdomUpdate beyond payload depth, merged host promise never settles"
Context
Found while tracing #21974 (the Workstation's held reconcile flight) from Sophie's witness: a host update merged into a staged container never settles after a depth-1 update of an ancestor.
The Problem
VdomLifecycle#getVdomUpdatePayloadclearsneedsVdomUpdateon the flying component and callsafterSetNeedsVdomUpdate(false, true), andContainer#afterSetNeedsVdomUpdatethen clears the flag on every descendant, whatever the payload's depth. A depth-1 update carries none of its descendants, yet a descendant that still owes an update loses the flag that wakes it: the engine's wakes read that flag (Neo.layout.Base#setflies onlyif (container.needsVdomUpdate);VdomLifecyclere-checks it at a flight's end). The owed update never runs, and everypromiseUpdate()merged into it stays pending.The Architectural Reality
src/container/Base.mjs,afterSetNeedsVdomUpdate(value, oldValue): the depth-blind walk overitems.src/mixin/VdomLifecycle.mjs,getVdomUpdatePayload: the payload'supdateDepth, and the merged children it expands.initVnoderenders at depth -1, so its full clear is right.The Fix
Container#afterSetNeedsVdomUpdate(value, oldValue, depth=-1)clears only the items an update covers: all of them at -1, none at 1, one level less per level down.getVdomUpdatePayloadpasses its depth, and clears the merged children it expands at their own depth.Acceptance Criteria
ContainerandVDomUpdateinstances holds the same, and a deep update still clears the flag of every descendant it renders.Out of Scope
An ancestor flight that carries or prunes a staged container without collecting the callbacks merged into it (the deep and sparse paths) stays with #21974. Keeping a covered item's flag while it owes callbacks was tried and broke dock component specs (DockReload and DockLock: 3 failures with it, 17/17 without): the flag is also what a child merges into, so a kept flag with no flight scheduled swallows later updates.
Related
#21974 (the held flight; this is one of its paths) · PR #22002.
Live latest-open + closed sweep: latest 20 open (newest #22012) + open and closed search ("needsVdomUpdate depth", "shallow update flag merged promise") at 19:56Z. Open hits: #21974 (the held flight this splits from) and #20747 (the yield whose stated constraint is this clear). Closed hits #19513 and #19404 (absorption and sparse-cycle losses; Out of Scope read, neither owns the flag clear). 59 open (red band): split from #21974 so that PR #22002 resolves exactly what it proves, while #21974 keeps the Workstation hold. A2A claim sweep (30 newest, all states, to 19:56Z): no claim. MC: my 11-22 notes on #21974 and a 20 Jan TreeBuilder discussion, no decision against. Own: #21974.
Origin Session ID: 54c2c0f3-a035-4e41-8425-cd6d2d5abb0b Retrieval Hint: "shallow update clears needsVdomUpdate beyond payload depth, merged host promise never settles"