Context
Stage host-integration research reproduced the same failed Canvas admission in development and composed production. The mounted observation checkpoint binds the inputs and loader results. A missing renderer module returns success:false; a module that registers its singleton and then throws also returns success:false, but the current host can still initialize that renderer and publish Canvas readiness.
The Problem
SharedCanvas.initAsync() ignores the returned Canvas.loadModule() outcome. It waits for a namespace stub whether import succeeded or failed. With no stub, later offscreen registration calls initGraph on undefined; with a partially registered or previously available stub, failed admission can appear ready. Teardown likewise reaches a namespace renderer even when this host never initialized its graph.
The older closed #8811/#8950/#8952 work covers transfer, loader placement and worker/stub ordering. Those dispositions do not resolve the current negative-result/foreign-graph ownership cases. Memory hits f957de5a and 6fec004c preserve that history rather than establish a current repair.
The Architectural Reality
src/app/SharedCanvas.mjs owns module/stub admission, graph readiness, sizing and visibility. src/component/Canvas.mjs owns transfer/unregister; src/worker/Canvas.mjs owns the structured loader result. Base.construct() resolves ready() only after initAsync() returns, so throwing on expected admission failure wedges that promise. Renderer namespaces are shared routing addresses, not per-host graph ownership.
Design authority: SharedCanvas's lifecycle JSDoc says it initializes the graph when offscreen canvas is ready; the observed undefined initGraph is a crash, and publishing Canvas ready after an explicit import refusal contradicts that lifecycle.
The Fix
Consume the existing loader outcome before admitting graph work. Use an internal per-host admission/owned-graph guard and the existing isCanvasReady config; do not add a second writable readiness authority. Expected failure settles live host initialization normally and emits an addressed canvasLoadFailed notification. Skip transfer/graph/theme/resize work for refused hosts; unregister only their own transferred canvas if a race already transferred it. Clear only a graph this host actually started, with its captured renderer/window. Fence continuations against destruction and stale captured window identity. Preserve successful delayed-stub and preloaded/no-import-path hosts.
Prescription checked: src/app/SharedCanvas.mjs owns this concern. The ordinary Canvas loader keeps its current return contract. New focused tests belong beside SharedCanvasVisibility.spec.mjs; the mounted Stage fixture supplies the real consumer falsifier.
Contract Ledger
| Target surface |
Authority |
Result / fallback |
Docs and evidence |
Canvas.loadModule() → SharedCanvas.initAsync() |
Existing {success,path,error} writer in src/worker/Canvas.mjs |
Negative or rejected load never admits renderer work; live host ready() settles |
Loader/host JSDoc; failed-without-stub and failed-with-stub controls |
isCanvasReady / canvasReady |
SharedCanvas graph-init boundary |
Publish only for successful admission and this live host's graph; preloaded hosts retained |
Existing config/event JSDoc; delayed-success and mounted controls |
canvasLoadFailed |
SharedCanvas's per-host admission failure |
One addressed event with host, renderer, configured path and categorical reason; listener failure cannot wedge initialization |
New event JSDoc; event/ready settlement assertions |
| Transfer, teardown and sizing |
Component Canvas maps + SharedCanvas owned-graph boundary |
Refused or retired host never clears another renderer; own transfer/graph retired once |
Lifecycle JSDoc; close-during-load and surviving-renderer browser control |
Acceptance Criteria
Out of Scope
Automatic retries, new loader roots/manifests, installed bundle or runtime-extension activation, Base readiness redesign, Sparkline's independent initializer, renderer shader/partial-allocation repair and generic GPU memory reclamation.
Avoided Traps
A namespace stub as admission proof; throwing an expected failure and stranding Base.ready(); clearing a shared renderer the failed host never owned; a second mutable load-status config; claiming the independent Sparkline path fixed.
Decision Record impact: none — correction at the existing SharedCanvas lifecycle owner, no extension-host approval.
Structure map: N/A — Body primitive plus an established sibling test directory.
Related
neomjs/neo-stage#58 · neomjs/neo-stage#32. The source-built research and separately installed extension gates remain distinct.
Origin Session ID: 03290248-0760-4e87-b12b-040a5d5dbb14
Retrieval Hint: SharedCanvas negative Canvas load result partial registration false readiness; Stage32 checkpoint6163886671.
Creation sweeps (2026-10-14 08:25:10 UTC): live latest 20 open Engine issues and current 30-row all-state inbox checked, no competing ticket/claim; MC problem query returned the current reproduction plus two historical stub/path entries, no prior decline or current repair. Own-assignment sweep: three open Engine issues, none overlapping this lifecycle result. Related closed predecessor bodies read.
Context
Stage host-integration research reproduced the same failed Canvas admission in development and composed production. The mounted observation checkpoint binds the inputs and loader results. A missing renderer module returns
success:false; a module that registers its singleton and then throws also returnssuccess:false, but the current host can still initialize that renderer and publish Canvas readiness.The Problem
SharedCanvas.initAsync()ignores the returnedCanvas.loadModule()outcome. It waits for a namespace stub whether import succeeded or failed. With no stub, later offscreen registration callsinitGraphon undefined; with a partially registered or previously available stub, failed admission can appear ready. Teardown likewise reaches a namespace renderer even when this host never initialized its graph.The older closed
#8811/#8950/#8952work covers transfer, loader placement and worker/stub ordering. Those dispositions do not resolve the current negative-result/foreign-graph ownership cases. Memory hitsf957de5aand6fec004cpreserve that history rather than establish a current repair.The Architectural Reality
src/app/SharedCanvas.mjsowns module/stub admission, graph readiness, sizing and visibility.src/component/Canvas.mjsowns transfer/unregister;src/worker/Canvas.mjsowns the structured loader result.Base.construct()resolvesready()only afterinitAsync()returns, so throwing on expected admission failure wedges that promise. Renderer namespaces are shared routing addresses, not per-host graph ownership.Design authority: SharedCanvas's lifecycle JSDoc says it initializes the graph when offscreen canvas is ready; the observed undefined
initGraphis a crash, and publishing Canvas ready after an explicit import refusal contradicts that lifecycle.The Fix
Consume the existing loader outcome before admitting graph work. Use an internal per-host admission/owned-graph guard and the existing
isCanvasReadyconfig; do not add a second writable readiness authority. Expected failure settles live host initialization normally and emits an addressedcanvasLoadFailednotification. Skip transfer/graph/theme/resize work for refused hosts; unregister only their own transferred canvas if a race already transferred it. Clear only a graph this host actually started, with its captured renderer/window. Fence continuations against destruction and stale captured window identity. Preserve successful delayed-stub and preloaded/no-import-path hosts.Prescription checked:
src/app/SharedCanvas.mjsowns this concern. The ordinary Canvas loader keeps its current return contract. New focused tests belong besideSharedCanvasVisibility.spec.mjs; the mounted Stage fixture supplies the real consumer falsifier.Contract Ledger
Canvas.loadModule()→SharedCanvas.initAsync(){success,path,error}writer insrc/worker/Canvas.mjsready()settlesisCanvasReady/canvasReadycanvasLoadFailedAcceptance Criteria
ready(), emits one failure event, and makes zeroinitGraph/canvasReady/theme/resize calls.Out of Scope
Automatic retries, new loader roots/manifests, installed bundle or runtime-extension activation, Base readiness redesign, Sparkline's independent initializer, renderer shader/partial-allocation repair and generic GPU memory reclamation.
Avoided Traps
A namespace stub as admission proof; throwing an expected failure and stranding
Base.ready(); clearing a shared renderer the failed host never owned; a second mutable load-status config; claiming the independent Sparkline path fixed.Decision Record impact: none — correction at the existing SharedCanvas lifecycle owner, no extension-host approval. Structure map: N/A — Body primitive plus an established sibling test directory.
Related
neomjs/neo-stage#58 · neomjs/neo-stage#32. The source-built research and separately installed extension gates remain distinct.
Origin Session ID: 03290248-0760-4e87-b12b-040a5d5dbb14 Retrieval Hint: SharedCanvas negative Canvas load result partial registration false readiness; Stage32 checkpoint6163886671.
Creation sweeps (2026-10-14 08:25:10 UTC): live latest 20 open Engine issues and current 30-row all-state inbox checked, no competing ticket/claim; MC problem query returned the current reproduction plus two historical stub/path entries, no prior decline or current repair. Own-assignment sweep: three open Engine issues, none overlapping this lifecycle result. Related closed predecessor bodies read.