LearnNewsExamplesServices
Frontmatter
id18359
titleA destroy-sentinel rejection bypasses the dock projection recovery entirely
stateClosed
labels
bugaicoredashboard
assigneesneo-opus-ada
createdAtSep 5, 2026, 3:13 PM
updatedAtSep 5, 2026, 5:34 PM
githubUrlhttps://github.com/neomjs/neo/issues/18359
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 5, 2026, 5:34 PM

A destroy-sentinel rejection bypasses the dock projection recovery entirely

Closed v13.2.0/archive-v13-2-0-chunk-19 bugaicoredashboard
neo-opus-ada
neo-opus-ada commented on Sep 5, 2026, 3:13 PM

Context

Found while probing #18352 — a probe that destroys a component mid-flight produced a rejection the projection recovery could not handle, and the failure mode is worse than the probe.

Filed separately from #18352 rather than folded in: that ticket's mechanism is pane identity across a retired shell, this one is the catch block that decides whether the recovery runs at all. Two mechanisms in one ticket is what splitting #18352 out of #18275 existed to avoid.

Sweeps. Live latest-open read at 2026-09-05T13:12Z, no equivalent. Keyword sweep isDestroyed rejection sentinel catch across all states: two hits — this surface is unfiled; #18010 (CLOSED) is the same sentinel family with a different failure (an expected teardown reject becoming an unhandled-rejection storm) and is referenced below. A2A in-flight sweep at 13:12Z: no overlapping claim. Own-assignment sweep: #18352 is the same file and is the ticket this was found under.

The Problem

Reconciler.reconcileProjection marks a failed projection so the workspace can recognise it and spend its one repair:

} catch (error) {
    error.isDockProjectionFailure = true;      // :561
    error.projectionRecovery      = initialProjection
        ? await this.settleFailedInitialProjection({...})
        : await this.settleFailedProjection({...});
    throw error
}

error is not always an object. Neo.isDestroyed is Symbol.for('Neo.isDestroyed') (Neo.mjs:121) and the engine uses it as a rejection sentinel: core/Base.mjs:516 rejects pending awaits with it when an instance is destroyed, and component/Base.mjs:1346 rejects pending vdom callbacks with it. The awaited host.promiseUpdate() inside this try block is exactly such an await.

Assigning a property to a primitive throws in strict mode, so when a shell or the host is destroyed while a projection flight is in the air:

TypeError: Cannot create property 'isDockProjectionFailure' on symbol 'Symbol(Neo.isDestroyed)'
    at Reconciler.reconcileProjection (src/dashboard/dock/projection/Reconciler.mjs:561)

Consequences, in order:

  1. the failure is never marked isDockProjectionFailure;
  2. settleFailedProjection never runs — the recovery is bypassed entirely, so a host left holding two shells stays that way;
  3. Workspace#onDockProjectionFailed re-throws, because its first act is if (!error?.isDockProjectionFailure) throw error;
  4. the sentinel is replaced by a TypeError naming none of the cause, so the log points at the annotation rather than the destroy.

Step 2 is the damage. Steps 1, 3 and 4 are how it stays invisible.

The Architectural Reality

The engine already treats this value as expected, and the dock package already guards it — twice. Ten sites compare against the sentinel rather than assuming an Error:

Site Shape
Neo.mjs:1253, :1264 unhandled-rejection handling special-cases it
component/MagicMoveText.mjs:347 if (e === Neo.isDestroyed) return
dashboard/dock/Workspace.mjs:2450 error !== Neo.isDestroyed && errors.push(...)
dashboard/dock/Workspace.mjs:2886 if (error === Neo.isDestroyed || me.isDestroyed || host.isDestroyed)
dashboard/dock/interaction/DockSplitter.mjs:501 error !== Neo.isDestroyed && console.error(...)
ai/client/TourRunner.mjs:341, :395, :449, :484 if (e === Neo.isDestroyed) …

Workspace.mjs:2886 is the dock's own recovery-adjacent guard, one file away from the defect. The Reconciler is the outlier, not the pioneer.

Both catch sites are affected, not one:

  • Reconciler.mjs:470 — the initial-projection catch, error.isDockProjectionFailure = true
  • Reconciler.mjs:561 — the main-projection catch, same line

The Fix

Guard the sentinel before annotating, in both catch blocks, following Workspace.mjs:2886's existing shape.

A destroyed host has nothing to recover and nothing to repair into: re-projecting into a destroyed shell is not a fallback, it is a second failure. So the sentinel should short-circuit — settle nothing, annotate nothing, rethrow the sentinel unchanged so the layers above it (which already recognise it) behave as they do everywhere else.

The guard must be error === Neo.isDestroyed, not a truthiness or typeof test: the point is to preserve the engine's existing sentinel contract, not to defend against arbitrary primitives.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Reconciler.reconcileProjection catch Reconciler.mjs:561 sentinel rethrown unannotated; recovery skipped deliberately any other throw ⇒ today's path, unchanged JSDoc states why a destroyed host is not recoverable unit arm below
initial-projection catch Reconciler.mjs:470 same same same unit arm below
Neo.isDestroyed sentinel Neo.mjs:121, core/Base.mjs:516 unchanged — consumed, not redefined — — 10 existing guard sites
Workspace#onDockProjectionFailed Workspace.mjs:3064 unchanged — its !error?.isDockProjectionFailure rethrow stays correct — — —

Acceptance Criteria

  • AC-1 — red-first unit arm: a projection whose awaited flight rejects with Neo.isDestroyed currently produces a TypeError naming isDockProjectionFailure; after the fix the sentinel propagates unchanged and no TypeError is raised.
  • AC-2 — the arm's control proves the recovery was skipped deliberately, not crashed past: settleFailedProjection is not invoked on the sentinel path, and is invoked for an ordinary Error in the same fixture. One arm without the second half cannot tell "guarded" from "still broken, differently".
  • AC-3 — both catch sites covered; a test pins :470 as well as :561, since they carry the identical line and a fix applied to one reads as complete.
  • AC-4 — an ordinary Error still gets isDockProjectionFailure, still reaches settleFailedProjection, and still returns one of the four verdict strings byte-identically.
  • AC-5 — dashboard unit + components/dashboard green at head, pre-existing intermittents named rather than absorbed.

Out of Scope

  • #18352's pane-identity mechanism. Same method, different failure; that ticket stays as filed.
  • Auditing every catch block in src/ for the same assumption. main/DeltaUpdates.mjs:1027 and form/field/fileUpload/Xhr.mjs:99 annotate a caught value too, but neither awaits a Neo instance promise, so neither is reachable by this sentinel. Widening this into a codebase sweep would trade a provable two-site fix for an unbounded one.
  • Changing the sentinel. Neo.isDestroyed works and has ten consumers.

Avoided Traps

  • Defending against "any primitive". A typeof error === 'object' guard would suppress the TypeError and silently swallow a real sentinel into the recovery path, which is the wrong behaviour wearing the right symptom.
  • Treating a destroyed host as recoverable. Scheduling the one repair into a destroyed shell replaces a clean teardown with a second failure.
  • Fixing only :561. It is the one the probe hit; :470 carries the same line and would keep the defect alive on the initial-projection path.
  • Claiming a production sighting. See the boundary below.

Boundary On The Evidence

Observed under a probe that unregisters a component mid-flight — a plausible but constructed route to the sentinel. I have not shown this occurring in production, and this ticket does not claim it.

What does not depend on the route: the catch assumes error is an object; the engine documents a non-object rejection value and rejects with it from core/Base.mjs:516; and the guard for it already exists ten times, twice inside src/dashboard/dock/. The defect is provable from those three facts without any occurrence.

Decision Record impact

none. No ADR engaged. ai/ untouched, so the §1c structure-map gate records N/A. No new .mjs file, so structural pre-flight does not fire.

Related

  • #18352 — found under it; same method, different mechanism.
  • #18010 — CLOSED; an expected teardown reject becoming an unhandled-rejection storm. Same sentinel, adjacent failure, useful prior art for what the engine expects consumers to do with it.
  • #18297 — CLOSED; a retired tab button poisoning the host vnode. The neighbouring recovery-path defect.

Retrieval Hint: Reconciler catch does error.isDockProjectionFailure = true on a value that can be Symbol.for('Neo.isDestroyed'), so a destroy-time rejection throws a TypeError and settleFailedProjection never runs