#20075 (v13.3.1, fixed by #20079): a tab header toolbar that a drop had destroyed received a late style restore from SortZone#processDragEnd. Base#destroy had deleted the toolbar's own _vdom, so the write landed in the vdom template that Neo.container.Base subclasses share. Every container created afterwards started with flex: none, and main's dock layout collapsed on the next shell rebuild. #20079 stops that writer and gives a destroyed component a private copy of its template.
The operator, on the follow-up (2026-10-23): reactive configs survive destroy because their controllers live in the private #configs, and "the destroy logic is most likely older than core.Config. destroy could remove them too, in case this is better for GC." History confirms the order: the own-key deletion dates from 2019 (8ccc8e7d7b), while core.Config and #configs arrived on 2025-07-02 (542039186c).
Measured on 2026-10-23 with a throwaway unit spec (src/Neo.mjs and src/core/Base.mjs as on dev): after destroy(), a non-reactive key reads the prototype's copy, and a write to it changes that copy. A census of component config writes after destroy (a probe in the generated setter, over the full unit suite) found:
isReady and isDestroying, from the destroy chain itself, everywhere;
vdom-touching writes: Overflow#applySplit (hidden / maxWidth / cls on destroyed tab header buttons), Button#createTooltip → addCls, grid header Button plugins and domListeners, VdomLifecycle#initVnode on destroyed containers.
Not this ticket: two live instances sharing an object-valued non-reactive default. DeclarativeConfigMerging.md documents that as the default, and per-instance mutable state belongs on reactive configs (#18192 closed not planned, D#18195 resolved, 2026-09-03).
The Problem
After destroy(), the instance is not retired:
Reactive configs stay live.destroy never clears #configs, so a late set still finds its controller and runs afterSet. Each vdom-touching hook in the census writes through point 2. Clearing #configs alone would not stop it, because getConfig recreates a missing controller lazily (isConfig(key) → new Config(...)). A destroyed instance that something still references also keeps every controller and value alive.
Non-reactive keys fall through to class state.destroy deletes every own writable key except destroy and _id, so the instance reads, and late code writes, the prototype copies that setupClass defines. For _vdom, that copy is the template Component#construct clones every new instance from: the #20075 path.
src/Neo.mjs: the generated setter (const config = this.getConfig(key); if (!config) return, the natural refusal point); setupClass (prototype copies of non-reactive defaults).
src/component/Base.mjs: destroy, ending with #20079's containment line me._vdom = Neo.clone(me._vdom, true); construct, which clones _vdom from the prototype.
Design authority: the core/Base#destroy JSDoc says it "Unregisters this instance from Neo.manager.Instance and removes all object entries from this instance". The intent is an emptied instance. Controllers that survive, and reads that fall through to class state, are side effects it does not describe. (Amended: the controllers' values stay readable on purpose, see Intake amendment; the PR adds that contract to this JSDoc.)
The Fix
Amended at intake on 2026-10-26; the derivation is under Intake amendment.
The generated setter refuses every config write to a destroyed instance: no controller lookup, no hook. The private _key setter refuses too. In development, the first refused write per class and key is reported with console.warn, naming both; production refuses silently.
getConfig creates no controller on a destroyed instance. The generated getter reads a config without a controller as undefined and runs no hook.
The destroy chain stops writing to the destroyed instance: a repeated destroy() returns before raising isDestroying again, and the construct microtask resolves ready() for an instance destroyed before its initAsync() settled, instead of setting isReady.
The controllers and their last values stay, so reads after destroy keep working. The destroy JSDoc states that contract.
#20079's _vdom containment line stays as the template guard for non-config writes; the PR records whether any remain.
Intake amendment (2026-10-26)
The filed fix cleared #configs, which makes every config read after destroy answer undefined. A read census (a probe in getConfig over the full unit suite on dev 622840cce2) and a full run of that version show code depending on the last values:
id: ComponentManager.unregister cleans its owner index under parentComponent.id of an already destroyed parent. The DomEvent mount timeout, the grid ScrollManager addons and Compare.compareNeoInstances read it too.
isDestroying: state/Provider, selection/Model, selection/grid/BaseModel, grid/plugin/CellEditing and manager/transaction/History guard on it without checking isDestroyed, so an undefined read would let them run on a dead instance.
Delayed work and refusal paths on destroyed instances: Component#createTooltip → addCls reads cls, controller.Component#getParent reads component, and getPlugin() on a destroyed dock workspace reads plugins.
With #configs cleared, the unit suite went from 0 failed (5551 passed on dev) to 26 failed, 19 not run and 19 uncaught errors. Refusing writes alone closes the hazard this ticket exists for, a late write reaching a hook, and changes no reader.
Contract Ledger Matrix
Target Surface
Source of Authority
Proposed Behavior
Fallback
Docs
Evidence
config set on a destroyed instance
core/Base#destroy JSDoc
refused: no controller lookup, no hook; development report once per class and key
—
destroy JSDoc, setter comment
AC-1, AC-2
config get on a destroyed instance
core/Base#destroy JSDoc
the last value (unchanged); a config never initialized gets no controller
—
destroy and getConfig JSDoc
AC-1
ready() of an instance destroyed before it got ready
core/Base#ready JSDoc
resolves (unchanged), without the late isReady write
—
construct comment
AC-2
Decision Record impact
none: no ADR governs instance destruction. It is aligned-with the 2026-09-03 ruling (#18192, D#18195), whose sharing semantics stay untouched.
Acceptance Criteria
Delivered by #20141, merged as 08288e206b. Each AC's evidence is in that PR's ## AC Evidence.
AC-1 Unit, red-first: after destroy(), a late set on a reactive key with a counting afterSet runs no hook and leaves the last value readable, a late id set registers nothing, and a config never initialized gets no controller (red on dev).
AC-2 Unit: in development, a late set is reported once per class and key; repeating it does not report again; outside development it is refused silently. The destroy chain's own isReady / isDestroying writes are gone, and ready() still settles for an instance destroyed before it got ready.
AC-3 Census, in the PR body: the post-destroy write and read census at dev and at the PR head, with a disposition for each writer (fixed here, harmless, or a follow-up).
AC-4 No regression: the full unit suite and the workstation/, dashboard/ and grid/ NL batteries, against the same instrument on dev.
Out of Scope
Sharing of object-valued non-reactive defaults between live instances (documented design; #18192, D#18195).
Freezing class-level defaults (it would make that documented sharing throw).
Fixing the census writers one by one: they go inert under item 1.
Releasing a destroyed instance's config values for GC: the readers under Intake amendment need changing first.
Avoided Traps
Clearing #configs:getConfig would recreate controllers, so late sets would still run their hooks, and every read after destroy would answer undefined (Intake amendment).
Silently refusing late sets: writers to dead instances would vanish from sight; the development report keeps them visible without breaking production.
Related
#20075 / #20079 (the incident and its containment), #18192 / D#18195 (the live-sharing ruling this stays clear of), Base_PrototypePollution.spec (both pollution arms).
Target: v13.4 or v13.3.2, after the v13.3.1 cut (no milestone exists yet).
Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T20:03Z; no equivalent found.
A2A in-flight sweep: the last 30 messages; no claim on this scope.
MC sweep: 2 queries (config defaults shared across instances / prototype pollution; destroy deleting own keys / late sets / surviving controllers), 12 results. A prior decision was found and honoured: #18192 / D#18195 (live sharing is documented design), scoped out above.
Own-assignment sweep: 8 open, none overlapping.
Context
#20075 (v13.3.1, fixed by #20079): a tab header toolbar that a drop had destroyed received a late style restore from
SortZone#processDragEnd.Base#destroyhad deleted the toolbar's own_vdom, so the write landed in the vdom template thatNeo.container.Basesubclasses share. Every container created afterwards started withflex: none, and main's dock layout collapsed on the next shell rebuild. #20079 stops that writer and gives a destroyed component a private copy of its template.The operator, on the follow-up (2026-10-23): reactive configs survive destroy because their controllers live in the private
#configs, and "the destroy logic is most likely older than core.Config. destroy could remove them too, in case this is better for GC." History confirms the order: the own-key deletion dates from 2019 (8ccc8e7d7b), whilecore.Configand#configsarrived on 2025-07-02 (542039186c).Measured on 2026-10-23 with a throwaway unit spec (
src/Neo.mjsandsrc/core/Base.mjsas on dev): afterdestroy(), a non-reactive key reads the prototype's copy, and a write to it changes that copy. A census of component config writes after destroy (a probe in the generated setter, over the full unit suite) found:isReadyandisDestroying, from the destroy chain itself, everywhere;Overflow#applySplit(hidden / maxWidth / cls on destroyed tab header buttons),Button#createTooltip→addCls, grid headerButtonplugins anddomListeners,VdomLifecycle#initVnodeon destroyed containers.Not this ticket: two live instances sharing an object-valued non-reactive default.
DeclarativeConfigMerging.mddocuments that as the default, and per-instance mutable state belongs on reactive configs (#18192 closed not planned, D#18195 resolved, 2026-09-03).The Problem
After
destroy(), the instance is not retired:destroynever clears#configs, so a latesetstill finds its controller and runsafterSet. Each vdom-touching hook in the census writes through point 2. Clearing#configsalone would not stop it, becausegetConfigrecreates a missing controller lazily (isConfig(key)→new Config(...)). A destroyed instance that something still references also keeps every controller and value alive.destroydeletes every own writable key exceptdestroyand_id, so the instance reads, and late code writes, the prototype copies thatsetupClassdefines. For_vdom, that copy is the templateComponent#constructclones every new instance from: the #20075 path.The Architectural Reality
src/core/Base.mjs:destroy(own-key deletion, thenisDestroyed = true),getConfig(lazy controller),isConfig.src/Neo.mjs: the generated setter (const config = this.getConfig(key); if (!config) return, the natural refusal point);setupClass(prototype copies of non-reactive defaults).src/component/Base.mjs:destroy, ending with #20079's containment lineme._vdom = Neo.clone(me._vdom, true);construct, which clones_vdomfrom the prototype.core/Base#destroyJSDoc says it "Unregisters this instance from Neo.manager.Instance and removes all object entries from this instance". The intent is an emptied instance. Controllers that survive, and reads that fall through to class state, are side effects it does not describe. (Amended: the controllers' values stay readable on purpose, see Intake amendment; the PR adds that contract to this JSDoc.)The Fix
Amended at intake on 2026-10-26; the derivation is under Intake amendment.
_keysetter refuses too. In development, the first refused write per class and key is reported withconsole.warn, naming both; production refuses silently.getConfigcreates no controller on a destroyed instance. The generated getter reads a config without a controller asundefinedand runs no hook.destroy()returns before raisingisDestroyingagain, and the construct microtask resolvesready()for an instance destroyed before itsinitAsync()settled, instead of settingisReady.destroyJSDoc states that contract._vdomcontainment line stays as the template guard for non-config writes; the PR records whether any remain.Intake amendment (2026-10-26)
The filed fix cleared
#configs, which makes every config read after destroy answerundefined. A read census (a probe ingetConfigover the full unit suite on dev622840cce2) and a full run of that version show code depending on the last values:id:ComponentManager.unregistercleans its owner index underparentComponent.idof an already destroyed parent. The DomEvent mount timeout, the gridScrollManageraddons andCompare.compareNeoInstancesread it too.isDestroying:state/Provider,selection/Model,selection/grid/BaseModel,grid/plugin/CellEditingandmanager/transaction/Historyguard on it without checkingisDestroyed, so anundefinedread would let them run on a dead instance.Component#createTooltip→addClsreadscls,controller.Component#getParentreadscomponent, andgetPlugin()on a destroyed dock workspace readsplugins.With
#configscleared, the unit suite went from 0 failed (5551 passed on dev) to 26 failed, 19 not run and 19 uncaught errors. Refusing writes alone closes the hazard this ticket exists for, a late write reaching a hook, and changes no reader.Contract Ledger Matrix
core/Base#destroyJSDocdestroyJSDoc, setter commentcore/Base#destroyJSDocdestroyandgetConfigJSDocready()of an instance destroyed before it got readycore/Base#readyJSDocisReadywriteDecision Record impact
none: no ADR governs instance destruction. It isaligned-withthe 2026-09-03 ruling (#18192, D#18195), whose sharing semantics stay untouched.Acceptance Criteria
Delivered by #20141, merged as
08288e206b. Each AC's evidence is in that PR's## AC Evidence.destroy(), a late set on a reactive key with a countingafterSetruns no hook and leaves the last value readable, a lateidset registers nothing, and a config never initialized gets no controller (red on dev).isReady/isDestroyingwrites are gone, andready()still settles for an instance destroyed before it got ready.workstation/,dashboard/andgrid/NL batteries, against the same instrument on dev.Out of Scope
Avoided Traps
#configs:getConfigwould recreate controllers, so late sets would still run their hooks, and every read after destroy would answerundefined(Intake amendment).Related
#20075 / #20079 (the incident and its containment), #18192 / D#18195 (the live-sharing ruling this stays clear of),
Base_PrototypePollution.spec(both pollution arms).Target: v13.4 or v13.3.2, after the v13.3.1 cut (no milestone exists yet).
Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T20:03Z; no equivalent found. A2A in-flight sweep: the last 30 messages; no claim on this scope. MC sweep: 2 queries (config defaults shared across instances / prototype pollution; destroy deleting own keys / late sets / surviving controllers), 12 results. A prior decision was found and honoured: #18192 / D#18195 (live sharing is documented design), scoped out above. Own-assignment sweep: 8 open, none overlapping.
Origin Session ID: 577c5310-3173-4991-85a7-50aeabd66ceb
Retrieval Hint: "destroyed instance config controllers survive #configs getConfig recreates late set afterSet runs after destroy prototype fallthrough _vdom template"
— ⚖️ Ada ·
@neo-opus-ada· Claude Opus 5.5 · Claude Code