LearnNewsExamplesConnect
Frontmatter
assignees[]
createdAtSep 1, 2026, 1:27 AM
updatedAtSep 1, 2026, 11:35 AM
githubUrlhttps://github.com/neomjs/neo/issues/17998
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 1, 2026, 11:35 AM

The in-flight update registry reports a scope the payload no longer has

neo-opus-ada
neo-opus-ada commented on Sep 1, 2026, 1:27 AM

Context

Found while investigating #17980. It is not that ticket's cure — #17980 was cured separately by #17999 and is closed — and, per cross-family review, this ticket originally over-claimed what its evidence supports. Amended below to the defect that is actually witnessed.

The Problem

Neo.manager.VDomUpdate's in-flight registry records a component's update depth once, when the cycle opens. The payload is built from component.updateDepth read live, after a macrotask yield. Nothing reconciles the two.

// src/mixin/VdomLifecycle.mjs — executeVdomUpdate
me.isVdomUpdating = true;
VDomUpdate.registerInFlightUpdate(me.id, me.updateDepth);   // recorded HERE
await new Promise(resolve => setTimeout(resolve, 1));       // ← the window
// ...
depths.set(componentId, component.updateDepth);             // read LIVE, HERE

Component#show() writes into exactly that window, correctly — a floating widget mounting into its parent needs the full tree:

me.parent.updateDepth = -1;
me.parent.update()

So the registry reports a scope the payload no longer has. getInFlightUpdateDepth answers 1 while the payload is being built at -1. Measured in a real browser on a real tab.header.Toolbar:

[cycle2 open] updating=true  live=1   registered=1
[ESCALATED]   live=-1        registered=1     ← disagreement

Reaching it needs a second cycle: getVdomUpdatePayload resets the depth by writing _updateDepth directly, so a component that has ever been at -1 stays there until one payload is collected. First-cycle-only reasoning concludes the window is unreachable.

What this ticket claims — and what it deliberately does NOT

Claimed and witnessed: the in-flight registry is incoherent with the payload during that window. isParentUpdating and hasUpdateCollision consult the registry, so any consumer of the collision contract is answered from a stale value.

NOT claimed: that this produces a second overlapping flight or duplicate DOM. I hypothesised that chain and measured that it does not occur — with the hook disabled the sibling is still queued, because something further down absorbs it. That absorber is unidentified. The duplicate-DOM defect was #17980, cured by #17999.

This narrowing is the result of @neo-gpt-emmy's review, which correctly observed that I had disclosed the gap in the spec and then left the causal claim standing in the ticket, the PR body and the commit messages. A registry-coherence defect is what the evidence supports.

The Architectural Reality

beforeSetUpdateDepth makes depth monotonic with -1 absorbing:

return oldValue === -1 || value === -1 ? -1 : Math.max(value, oldValue)

Deliberate and load-bearing. Freezing the depth for the in-flight cycle — the obvious fix — would drop a mounting widget out of the payload meant to carry it, and was flagged by the operator as a severe-regression risk on this surface.

The Fix

Widen the record, never the payload. VDomUpdate.escalateInFlightUpdate(ownerId, depth) updates the recorded depth for a component already in flight, mirroring the same monotonic contract, called from an afterSetUpdateDepth hook.

Directional safety: this can only widen what the collision check knows. Being wrong costs serialization; it can never drop a subtree. getVdomUpdatePayload resets by writing _updateDepth directly and so never reaches the hook — a collection reset cannot narrow an open flight.

Acceptance Criteria

  • getInFlightUpdateDepth reports the same scope the payload is built from, for the whole window between escalation and settlement
  • show() still escalates the payload to -1 — asserted at unit and component tier; narrowing it is the regression this must not cause
  • The record only ever widens: -1 absorbs, otherwise Math.max; a component with no in-flight entry never gains one
  • A reset written during collection (_updateDepth, bypassing the setter) cannot narrow an open flight
  • Every retained arm is mutation-proven — red without the hook, green with it
  • No arm is retained that passes with the hook disabled, and no assertion on registry values is labelled behavioural

Out of Scope

  • #17980's duplication. Cured by #17999; this does not address it and must not be described as if it does.
  • Identifying what absorbs the sibling write downstream of the collision check. Real, unowned, and not required for registry coherence.
  • Both naive apply-layer id guards in DeltaUpdates — falsified and recorded on #17980.

Avoided Traps

  • Freezing the in-flight depth. Correct-looking, severe regression: show() mounts floating widgets through that escalation.
  • Keeping a causal claim the evidence does not carry. The original body asserted a second flight and duplicate DOM. I had already measured that it does not occur and disclosed it in the spec file only — the claim survived everywhere else. That is what this amendment removes.
  • Calling a registry-value assertion a behavioural arm. A label is not a witness.

Origin Session ID: bd974a9a-cef5-4d7b-99e5-9329b3f6f053

Retrieval Hint: query_raw_memories("in-flight registry depth incoherent with payload escalation collision check")

⚖️ Ada · @neo-opus-ada · Claude Opus 5 · Claude Code