LearnNewsExamplesServices
Frontmatter
id19478
titleA mount callback failure strands later update requests
stateClosed
labels
bugaicore
assigneesneo-gpt-sophie
createdAtOct 8, 2026, 12:43 PM
updatedAtOct 9, 2026, 1:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/19478
authorneo-gpt-sophie
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 9, 2026, 1:58 PM

A mount callback failure strands later update requests

neo-gpt-sophie
neo-gpt-sophie commented on Oct 8, 2026, 12:43 PM

Context

A bounded stability audit alongside #19477 found an earlier initialization path that never reaches common VDOM settlement. The operator prioritizes reproduced stability failures ahead of speculative hot-path optimization.

A real Component/Helper probe with the standard unit runtime produces the same result with current code and with the exact 08f43d63 public callback-dispatch methods restored in isolation. initVnode and Abstract.afterSetMounted are unchanged from that revision. This is an injected exception witness, not an observed application outage.

The Problem

Register a resolver before fresh.initVnode(true). In that resolver, mutate the component's VDOM, call late = fresh.promiseUpdate(), and throw.

Observed before fixture cleanup:

  • Initial mount rejects with the injected error.
  • late remains pending/unclaimed; needsVdomUpdate is true and the vnode still contains the earlier text.
  • There is no in-flight entry, watchdog or post-update waiter.
  • Both updateBatch and resolveVdomUpdate were called zero times. Destruction during fixture cleanup finally rejects late; the implementation did not recover it.

Design authority: the existing promiseUpdate failure contract must not strand parked requests. The accepted not-yet-mounted success exception remains binding; #18802 is NOT_PLANNED and must not be revived by this repair.

The Architectural Reality

  • src/component/Abstract.mjs#afterSetMounted claims and dispatches mount callbacks before common settlement.
  • src/mixin/VdomLifecycle.mjs#initVnode catches the synchronous callback exception, clears flight/initialization flags and releases post-update work, but leaves this new request parked with no scheduled render.
  • #19477 repairs the later resolveVdomUpdate boundary. Its initialization test covers a pre-update hook reached through that method, not this earlier mount callback.
  • Existing PromiseSettleTiming.spec.mjs controls preserve first-render and unmounted-child settlement; owning initialization/lifecycle specs can hold the failure witness.

The Fix

Repair exception cleanup at the existing initial-mount callback/initialization boundary. Settle requests covered by the failed attempt honestly and preserve or schedule their pending render work without clearing a distinct newer flight. Reuse existing lifecycle and callback ownership primitives. Keep the success-path mount exception unchanged; do not introduce a new rendering service or broad per-frame tracking.

Contract Ledger

Surface Authority Required behavior Failure Docs Evidence
Initial mount failure Existing initVnode cleanup and promiseUpdate contract No stranded request or unscheduled dirty state Reject affected requests; preserve separate newer work Owning lifecycle JSDoc Throwing mount resolver + late request
First-render success Accepted #18802 disposition / #8082 behavior Existing unmounted requests still settle at mount No regression to await-mount callers Existing promise JSDoc Current first-render and unmounted-child controls

Acceptance Criteria

  • The real-instance failure sequence reproduces before repair and afterwards leaves no permanently pending affected request.
  • Queued rendering recovers or remains explicitly retryable under the existing failure contract; no silent dirty state with no execution path.
  • Newer same-instance and reused-ID work survives old-attempt cleanup.
  • Existing first-render and unmounted-child success controls remain unchanged and pass.
  • Source/unit evidence stays distinct from any subsequently observed browser symptom.

Out of Scope

Reversing #18802's success-path decision, sparse batching/depth policy, Main DOM deduplication, and assigning this pre-existing path to the #19468 regression.

Decision Record impact: none; restores failure liveness while retaining the accepted mount exception. Structure map: N/A; existing Body lifecycle owners, no new module.

Related: #19477, #19468, #18802, #8082.

Priority/order: next stability follow-up after the currently implemented common-settlement repair. Sophie owns the follow-through; no implementation claim on this earlier boundary yet.

Discovery: exact live mount callback promiseUpdate search found no equivalent. MC recovered the #18802 success-path ruling, which this issue preserves. Own same-surface #19477 was reread and excludes this earlier entry path; other own assignments #19465/#19470 are unrelated. Latest 20 open Engine issues and 30 all-state A2A entries were checked immediately before filing; no competing initial-mount failure claim. Existing ai/bug/core labels verified in the same session.

Origin Session ID: e6ce4d70-a7ff-454e-996d-e7c25efdf4cf Retrieval Hint: "afterSetMounted resolver throws late promiseUpdate no common settlement initVnode"