Context
An operator-requested post-merge challenge of #19468 reproduced an exception-path regression with real Container/Component instances and the standard single-thread VDOM setup.
Compared pre-PR 6e19f6031b3d7625f16197c7b8064fed0e07083a with head 08f43d63b2c88c58c7a469804b21edc82e663bf9. The merged fb11d56b24756d76f26dc6dcb8c6f8408927128d lifecycle blob is identical (763e8ab9948c1a01b2dc58d2423ae39d3a1d9a7d). This is an injected callback-failure witness, not a claim of an observed user-facing Grid outage.
The Problem
Hold a real Helper.updateBatch response, queue a later promiseUpdate() and VDOM change on its root, register a throwing VDomUpdate.registerPreUpdate() callback, then release the response.
| Observed after all started executions settle |
Before |
Merged head |
| Late promise |
rejected |
still pending |
| Update flights |
2 |
1 |
| Queued VDOM class rendered |
yes |
no |
needsVdomUpdate / parked callbacks |
false / false |
true / true |
A second control with a throwing claimed resolver leaves an in-flight registry entry on the merged head; the baseline clears it and performs the queued render. The callback failure must remain visible, but it must not strand unrelated queued work.
Design authority: VdomLifecycle.promiseUpdate() documents rejection of parked promises on a failing flight, including late requests. resolveVdomUpdate() and the existing catch own release and subsequent queued updates.
The Architectural Reality
src/mixin/VdomLifecycle.mjs:459 deletes the root from inFlightScopes before calling resolveVdomUpdate().
- Settlement invokes callbacks, unregisters the flight, releases post-updates and runs
executePreUpdates() before starting queued work.
- A synchronous throw returns to the catch with that root already absent, so its rejection/retry cleanup is skipped.
src/grid/Body.mjs#createViewData is an existing production consumer of registerPreUpdate(); the diagnostic injects a failure at that consumed hook.
VDomUpdate.executePreUpdates() already removes its hook before invocation. This is not an infinitely recurring test callback.
- Owning regression location:
test/playwright/unit/vdom/VdomLifecycle.spec.mjs.
The Fix
Make per-root settlement exception-safe in the owning lifecycle. Retire a root's cleanup responsibility only when its settlement has completed or its failure has been handled. Preserve instance/cycle identity checks so old cleanup cannot unregister a replacement or a newer flight started reentrantly. Keep all-root vnode adoption before callbacks and the new emitted-root protection.
Do not swallow callback exceptions, acknowledge an unrendered payload, broadly reject another root's successful work, or restore initiator-only protection.
Contract Ledger
| Surface |
Authority |
Required behavior |
Failure |
Documentation |
Evidence |
| Root settlement |
resolveVdomUpdate and batch catch |
Correct flight ownership remains until settlement/cleanup finishes |
Throwing hook/resolver leaves no orphaned registry or late promise |
Owning lifecycle JSDoc |
Held-response callback-failure controls |
Late promiseUpdate() |
Existing method JSDoc |
Retain next-flight success semantics; reject honestly on covered failure |
Pending work cannot silently strand |
Existing promise contract |
Late mutation plus promise, baseline/head comparison |
| Reentrant/replaced root |
Existing instance/cycle fences |
Preserve a new instance or newer flight |
Stale cleanup cannot clear it |
Existing ownership comments |
Reentry, destruction and reused-ID controls |
| Captured completion phases |
Existing pre-/post-update queues |
executePreUpdates(id, callback?) and triggerPostUpdates(ownerId, item?) run explicitly supplied detached snapshots; one-argument calls consume live entries; explicit null/undefined consumes none |
Newer hooks/queues survive, including reuse of the same callback function |
Both methods and lifecycle JSDoc |
Reentrant old/new phase controls and legacy one-argument controls |
Acceptance Criteria
Out of Scope
Changing asymmetric batching, refining scalar-depth collision coverage, Main-thread DOM deduplication, and claiming an installed FM or whole-release acceptance result. The earlier afterSetMounted callback failure that occurs before common settlement is independently tracked in #19478; the initialization control here covers the shared resolveVdomUpdate pre-hook path.
Decision Record impact: none; restores the existing exception/settlement contract. Structure map: N/A, existing Body lifecycle and spec, no new production module.
Related: #19467, #19468, #17844.
Ownership: Sophie implements this operator-prioritized stability repair. Keep batching/collision protection intact; hot-path optimization is a separate follow-up.
Origin Session ID: e6ce4d70-a7ff-454e-996d-e7c25efdf4cf
Retrieval Hint: "19468 throwing pre-update settlement root removed inFlightScopes late promise stranded"
Discovery: same-surface own-assignment bodies are #19462, #19465 and #19470, none owns this callback settlement. Live exact search for VDOM settlement callback found no equivalent. MC problem query returned prior promise-lifecycle discussions, including the warning to distinguish unit evidence from observed UI symptoms; no decision to strand callbacks was found. Latest-open and all-state mailbox sweeps are checked immediately before creation.
Live latest-open sweep: latest 20 open Engine issues and latest 30 all-state A2A messages checked at 2026-10-08T08:56Z; no equivalent ticket or competing callback-cleanup claim. Labels verified live.
Context
An operator-requested post-merge challenge of #19468 reproduced an exception-path regression with real Container/Component instances and the standard single-thread VDOM setup.
Compared pre-PR
6e19f6031b3d7625f16197c7b8064fed0e07083awith head08f43d63b2c88c58c7a469804b21edc82e663bf9. The mergedfb11d56b24756d76f26dc6dcb8c6f8408927128dlifecycle blob is identical (763e8ab9948c1a01b2dc58d2423ae39d3a1d9a7d). This is an injected callback-failure witness, not a claim of an observed user-facing Grid outage.The Problem
Hold a real
Helper.updateBatchresponse, queue a laterpromiseUpdate()and VDOM change on its root, register a throwingVDomUpdate.registerPreUpdate()callback, then release the response.needsVdomUpdate/ parked callbacksA second control with a throwing claimed resolver leaves an in-flight registry entry on the merged head; the baseline clears it and performs the queued render. The callback failure must remain visible, but it must not strand unrelated queued work.
Design authority:
VdomLifecycle.promiseUpdate()documents rejection of parked promises on a failing flight, including late requests.resolveVdomUpdate()and the existing catch own release and subsequent queued updates.The Architectural Reality
src/mixin/VdomLifecycle.mjs:459deletes the root frominFlightScopesbefore callingresolveVdomUpdate().executePreUpdates()before starting queued work.src/grid/Body.mjs#createViewDatais an existing production consumer ofregisterPreUpdate(); the diagnostic injects a failure at that consumed hook.VDomUpdate.executePreUpdates()already removes its hook before invocation. This is not an infinitely recurring test callback.test/playwright/unit/vdom/VdomLifecycle.spec.mjs.The Fix
Make per-root settlement exception-safe in the owning lifecycle. Retire a root's cleanup responsibility only when its settlement has completed or its failure has been handled. Preserve instance/cycle identity checks so old cleanup cannot unregister a replacement or a newer flight started reentrantly. Keep all-root vnode adoption before callbacks and the new emitted-root protection.
Do not swallow callback exceptions, acknowledge an unrendered payload, broadly reject another root's successful work, or restore initiator-only protection.
Contract Ledger
resolveVdomUpdateand batch catchpromiseUpdate()executePreUpdates(id, callback?)andtriggerPostUpdates(ownerId, item?)run explicitly supplied detached snapshots; one-argument calls consume live entries; explicit null/undefined consumes noneAcceptance Criteria
08f43d63, then shows the late promise settles under the existing failure contract and queued rendering can proceed.Out of Scope
Changing asymmetric batching, refining scalar-depth collision coverage, Main-thread DOM deduplication, and claiming an installed FM or whole-release acceptance result. The earlier
afterSetMountedcallback failure that occurs before common settlement is independently tracked in #19478; the initialization control here covers the sharedresolveVdomUpdatepre-hook path.Decision Record impact: none; restores the existing exception/settlement contract. Structure map: N/A, existing Body lifecycle and spec, no new production module.
Related: #19467, #19468, #17844.
Ownership: Sophie implements this operator-prioritized stability repair. Keep batching/collision protection intact; hot-path optimization is a separate follow-up.
Origin Session ID: e6ce4d70-a7ff-454e-996d-e7c25efdf4cf Retrieval Hint: "19468 throwing pre-update settlement root removed inFlightScopes late promise stranded"
Discovery: same-surface own-assignment bodies are #19462, #19465 and #19470, none owns this callback settlement. Live exact search for VDOM settlement callback found no equivalent. MC problem query returned prior promise-lifecycle discussions, including the warning to distinguish unit evidence from observed UI symptoms; no decision to strand callbacks was found. Latest-open and all-state mailbox sweeps are checked immediately before creation.
Live latest-open sweep: latest 20 open Engine issues and latest 30 all-state A2A messages checked at 2026-10-08T08:56Z; no equivalent ticket or competing callback-cleanup claim. Labels verified live.