Context
Successor to #17976, which is closed as premise-falsified. @tobiu reported on 2026-08-31 that opening a built portal emitted the same rejection thousands of times:
Base.mjs:411 Uncaught (in promise) undefined
(anonymous) @ Base.mjs:411
promiseMessage @ Base.mjs:405
(anonymous) @ RemoteMethodAccess.mjs:164
(anonymous) @ Body.mjs:1271
Promise.then
onStoreLoad @ Body.mjs:1270
fire @ Observable.mjs:284
onCollectionMutate @ Store.mjs:1082
fire @ Observable.mjs:284
splice @ Base.mjs:1608
appendFeedBatch @ Workspace.mjs:620
#17976 attributed this to neo-config.json's basePath re-anchoring, and prescribed re-anchoring it into dist/esm. That was traced to source and refuted — the module boot chain never reads basePath, and the prescribed change would have broken resourcesPath, the Font Awesome href and every theme stylesheet root. Full trace on #17976.
What survives is the storm itself, which #17976 pushed out of scope as "the amplifier, not the fault". With the fault gone the amplifier is the whole finding, and unlike the fault it is verifiable at source without reproducing @tobiu's session.
Separated from inference: the observed operation is a Neo.main.DomAccess.scrollTo dispatch rejecting under a ticking store feed. Not established: which context produced @tobiu's specific frames — the trace names apps/workstation/view/Workspace.mjs while the reported URL is the portal, and #17976 never reconciled that. This ticket claims the mechanism, not that session.
The Problem
src/worker/Base.mjs:311 is the reply path:
} else if (promise = action === 'reply' && me.promises[replyId]) {
if (data.reject) {
promise.reject(data.data)
}A remote call therefore legitimately rejects — most notably on the dead-port teardown path, where a SharedWorker window has closed and its message port is gone. #17894 deliberately typed that rejection so consumers could discriminate expected teardown from real failure. It typed the reason. It did not add a handler, and the call sites did not grow one.
src/grid/Body.mjs:1269-1277 is the site in the trace:
if (me.mounted && !postChunkLoad) {
me.timeout(50).then(() => {
Neo.main.DomAccess.scrollTo({direction: 'top', id: me.gridContainer.view.id, value: 0, windowId})
})
}The returned promise is dropped inside a .then() callback. When it rejects there is no handler anywhere on the chain, so it surfaces as Uncaught (in promise). me.timeout(50) also means the dispatch fires 50ms after the mount check — the window it addresses may be gone by the time the message is sent, which is exactly the condition that produces the typed rejection.
Why thousands and not one. onStoreLoad runs on every collection mutation (Store.mjs → Observable#fire), and a ticking feed (appendFeedBatch in the workstation workspace) mutates the store on an interval. One unhandled dispatch per tick, indefinitely. The amplification is not incidental — it is what turns a benign teardown race into a console nobody can read, which then hides every real error underneath it.
The surface is engine-wide, and this ticket does not claim to fix it. Census on dev at 2026-09-01:
| shape |
count in src/** |
Neo.main.<Service>.<method>( call sites |
97 |
of those, dispatched inside a .then() callback with no .catch() |
8 |
.catch( anywhere in src/** |
30 |
Most of the 97 drop the promise entirely rather than chaining .then(), which is the same defect with fewer frames.
The Architectural Reality
src/worker/Base.mjs:398-411 — promiseMessage() builds the promise; :311 rejects it. Both halves are correct and neither is the defect.
src/worker/RemoteMethodAccess.mjs:164 — the generated remote stub that returns that promise. It is the seam every one of the 97 sites goes through.
src/core/Base.mjs:1172 — trap(promise) exists and is adjacent, but is not the fix: it registers a destroy-time canceller and re-rejects, so a trapped promise still needs a handler. src/component/Base.mjs:1406/1429/1591 use it correctly, always under await.
src/grid/Body.mjs:1269 and src/table/Body.mjs:615 are the same shape in two classes.
The Fix
Fix the observed storm; do not decide the engine-wide contract inside a bug ticket.
- The named sites stop being fire-and-forget.
src/grid/Body.mjs:1269-1277 (and its src/table/Body.mjs:615 twin) must dispose of the rejection rather than drop it — a scroll nudge into a window that has gone away is an expected outcome, not a failure to report.
- The disposition is stated where a reader will meet it. Whatever handling lands carries a JSDoc clause naming why this dispatch may reject and why that is not an error, so the next reader does not re-add a bare
.then().
- The engine-wide question is routed, not answered here. Whether the remaining ~95 sites are fixed one by one, whether
RemoteMethodAccess should dispose of the typed teardown rejection centrally, or whether the engine should grow an explicit fire-and-forget verb is a shaping question with engine-wide blast radius. It belongs in an Ideation Sandbox Discussion, and this ticket deliberately does not pre-empt it.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Behavior |
Fallback |
Docs |
Evidence |
grid.Body#onStoreLoad scroll dispatch (src/grid/Body.mjs:1269) |
this ticket |
a rejection from the post-timeout scrollTo is disposed of at the call site, never left unhandled |
none — an unhandled rejection here is the defect |
method JSDoc names the teardown reason |
negative control: force the dispatch to reject and assert no unhandled rejection reaches the runtime |
table.Body scroll dispatch (src/table/Body.mjs:615) |
this ticket |
same shape, same disposition |
none |
same |
same arm against the twin |
typed teardown rejection (src/worker/Base.mjs:311) |
#17894 |
unchanged — the reason stays typed and stays a rejection; this ticket adds handling, it does not silence the producer |
n/a |
existing |
the #17894 arms stay green |
| the remaining ~95 dispatch sites |
not this ticket |
undecided — routed to a Discussion |
n/a |
n/a |
census recorded above so the next owner does not re-derive it |
Decision Record impact
none. No ADR governs remote-dispatch error handling today; if the Discussion in Fix item 3 converges on a central disposition, that is where an ADR would be proposed.
Acceptance Criteria
Out of Scope
- The remaining ~95
Neo.main.* dispatch sites. Named, counted, deliberately deferred to the Discussion in Fix item 3 — a 97-site sweep inside a bug ticket is how a contract gets decided by whoever happened to be holding the keyboard.
- Changing
promiseMessage or the :311 reply path. #17894 settled the producer; this is a consumer defect.
apps/workstation/view/Workspace.mjs's ticking feed. It is the amplifier's amplifier — it makes one defect visible thousands of times, and it is correct on its own terms.
- Anything about
basePath, dist/esm module resolution, or which tree executes. That was #17976's premise and it is falsified; see its closing comment.
Avoided Traps
- Adding a bare
.catch(() => {}). It fixes the console and destroys the signal: a real scrollTo failure becomes indistinguishable from an expected teardown. The disposition has to discriminate on the typed reason #17894 provides, which is the entire reason that ticket typed it.
- Reaching for
trap() because it is nearby. core.Base#trap re-rejects by design (src/core/Base.mjs:1183); wrapping the dispatch in it changes nothing about the unhandled rejection and adds a destroy-time canceller nobody asked for.
- Fixing the amplifier instead of the fault. Slowing or debouncing the workstation feed would reduce the line count and leave the defect. #17976 already made the mistake of ranking these two; the fire-and-forget dispatch is the fault at any tick rate.
- Deciding the engine-wide contract here. 97 sites and a central seam (
RemoteMethodAccess) is a shaping question. A bug ticket that quietly settles it creates a precedent nobody reviewed.
- Treating the missing
.catch() as a style nit. It is not lint-shaped: the same omission is correct wherever the dispatch cannot reject, and the discriminator is runtime teardown state, not syntax.
Related
- #17976 — the falsified predecessor this succeeds; its closing comment carries the boot-chain trace and the reason
basePath is not the mechanism
- #17894 — typed the dead-port rejection reason this ticket relies on to discriminate expected teardown
- #17918 — the sibling
Stylesheet.mjs substring(6) derivation, which corroborates that basePath semantics are a governed contract rather than an accident
- #15031 —
initAsync() double-init and _initPromise reach-in guards; adjacent async-lifecycle debt, different mechanism
Live latest-open sweep: checked the latest 20 open neomjs/neo issues at 2026-09-01T05:44Z plus the A2A claim window (last 12 messages, ~40 min) — no equivalent ticket and no in-flight claim. Closed-state sweep on unhandled promise rejection remote returned #17894 and #17719, both closed and both about the producer side. Structure-map gate: N/A — no new or relocated .mjs file, no ai/ or Agent OS surface.
Retrieval Hint: query_raw_memories("fire-and-forget Neo.main dispatch unhandled rejection dead port teardown grid Body scrollTo"); anchors src/grid/Body.mjs:1269, src/worker/Base.mjs:311, src/worker/RemoteMethodAccess.mjs:164.
Origin Session ID: a02a9e58-2a64-491c-ae67-b936011d8f39
Authored by Grace (Anthropic Claude Opus 5, Claude Code).
Context
Successor to #17976, which is closed as premise-falsified. @tobiu reported on 2026-08-31 that opening a built portal emitted the same rejection thousands of times:
#17976 attributed this to
neo-config.json'sbasePathre-anchoring, and prescribed re-anchoring it intodist/esm. That was traced to source and refuted — the module boot chain never readsbasePath, and the prescribed change would have brokenresourcesPath, the Font Awesome href and every theme stylesheet root. Full trace on #17976.What survives is the storm itself, which #17976 pushed out of scope as "the amplifier, not the fault". With the fault gone the amplifier is the whole finding, and unlike the fault it is verifiable at source without reproducing @tobiu's session.
Separated from inference: the observed operation is a
Neo.main.DomAccess.scrollTodispatch rejecting under a ticking store feed. Not established: which context produced @tobiu's specific frames — the trace namesapps/workstation/view/Workspace.mjswhile the reported URL is the portal, and #17976 never reconciled that. This ticket claims the mechanism, not that session.The Problem
src/worker/Base.mjs:311is the reply path:} else if (promise = action === 'reply' && me.promises[replyId]) { if (data.reject) { promise.reject(data.data) }A remote call therefore legitimately rejects — most notably on the dead-port teardown path, where a SharedWorker window has closed and its message port is gone. #17894 deliberately typed that rejection so consumers could discriminate expected teardown from real failure. It typed the reason. It did not add a handler, and the call sites did not grow one.
src/grid/Body.mjs:1269-1277is the site in the trace:if (me.mounted && !postChunkLoad) { me.timeout(50).then(() => { Neo.main.DomAccess.scrollTo({direction: 'top', id: me.gridContainer.view.id, value: 0, windowId}) }) }The returned promise is dropped inside a
.then()callback. When it rejects there is no handler anywhere on the chain, so it surfaces asUncaught (in promise).me.timeout(50)also means the dispatch fires 50ms after the mount check — the window it addresses may be gone by the time the message is sent, which is exactly the condition that produces the typed rejection.Why thousands and not one.
onStoreLoadruns on every collection mutation (Store.mjs→Observable#fire), and a ticking feed (appendFeedBatchin the workstation workspace) mutates the store on an interval. One unhandled dispatch per tick, indefinitely. The amplification is not incidental — it is what turns a benign teardown race into a console nobody can read, which then hides every real error underneath it.The surface is engine-wide, and this ticket does not claim to fix it. Census on
devat 2026-09-01:src/**Neo.main.<Service>.<method>(call sites.then()callback with no.catch().catch(anywhere insrc/**Most of the 97 drop the promise entirely rather than chaining
.then(), which is the same defect with fewer frames.The Architectural Reality
src/worker/Base.mjs:398-411—promiseMessage()builds the promise;:311rejects it. Both halves are correct and neither is the defect.src/worker/RemoteMethodAccess.mjs:164— the generated remote stub that returns that promise. It is the seam every one of the 97 sites goes through.src/core/Base.mjs:1172—trap(promise)exists and is adjacent, but is not the fix: it registers a destroy-time canceller and re-rejects, so a trapped promise still needs a handler.src/component/Base.mjs:1406/1429/1591use it correctly, always underawait.src/grid/Body.mjs:1269andsrc/table/Body.mjs:615are the same shape in two classes.The Fix
Fix the observed storm; do not decide the engine-wide contract inside a bug ticket.
src/grid/Body.mjs:1269-1277(and itssrc/table/Body.mjs:615twin) must dispose of the rejection rather than drop it — a scroll nudge into a window that has gone away is an expected outcome, not a failure to report..then().RemoteMethodAccessshould dispose of the typed teardown rejection centrally, or whether the engine should grow an explicit fire-and-forget verb is a shaping question with engine-wide blast radius. It belongs in an Ideation Sandbox Discussion, and this ticket deliberately does not pre-empt it.Contract Ledger Matrix
grid.Body#onStoreLoadscroll dispatch (src/grid/Body.mjs:1269)scrollTois disposed of at the call site, never left unhandledtable.Bodyscroll dispatch (src/table/Body.mjs:615)src/worker/Base.mjs:311)Decision Record impact
none. No ADR governs remote-dispatch error handling today; if the Discussion in Fix item 3 converges on a central disposition, that is where an ADR would be proposed.Acceptance Criteria
scrollTodispatch fromgrid.Body#onStoreLoadproduces no unhandled rejection, proven by an arm that forces the reject path rather than by inspection.dev, and it must not pass merely because the dispatch never fired — non-vacuity asserted by observing the dispatch itself.src/table/Body.mjs:615twin carries the same disposition and its own arm; a fix that lands on one and not the other is the shape that let this survive.Out of Scope
Neo.main.*dispatch sites. Named, counted, deliberately deferred to the Discussion in Fix item 3 — a 97-site sweep inside a bug ticket is how a contract gets decided by whoever happened to be holding the keyboard.promiseMessageor the:311reply path. #17894 settled the producer; this is a consumer defect.apps/workstation/view/Workspace.mjs's ticking feed. It is the amplifier's amplifier — it makes one defect visible thousands of times, and it is correct on its own terms.basePath,dist/esmmodule resolution, or which tree executes. That was #17976's premise and it is falsified; see its closing comment.Avoided Traps
.catch(() => {}). It fixes the console and destroys the signal: a realscrollTofailure becomes indistinguishable from an expected teardown. The disposition has to discriminate on the typed reason #17894 provides, which is the entire reason that ticket typed it.trap()because it is nearby.core.Base#trapre-rejects by design (src/core/Base.mjs:1183); wrapping the dispatch in it changes nothing about the unhandled rejection and adds a destroy-time canceller nobody asked for.RemoteMethodAccess) is a shaping question. A bug ticket that quietly settles it creates a precedent nobody reviewed..catch()as a style nit. It is not lint-shaped: the same omission is correct wherever the dispatch cannot reject, and the discriminator is runtime teardown state, not syntax.Related
basePathis not the mechanismStylesheet.mjssubstring(6)derivation, which corroborates thatbasePathsemantics are a governed contract rather than an accidentinitAsync()double-init and_initPromisereach-in guards; adjacent async-lifecycle debt, different mechanismLive latest-open sweep: checked the latest 20 open
neomjs/neoissues at 2026-09-01T05:44Z plus the A2A claim window (last 12 messages, ~40 min) — no equivalent ticket and no in-flight claim. Closed-state sweep onunhandled promise rejection remotereturned #17894 and #17719, both closed and both about the producer side. Structure-map gate: N/A — no new or relocated.mjsfile, noai/or Agent OS surface.Retrieval Hint:
query_raw_memories("fire-and-forget Neo.main dispatch unhandled rejection dead port teardown grid Body scrollTo"); anchorssrc/grid/Body.mjs:1269,src/worker/Base.mjs:311,src/worker/RemoteMethodAccess.mjs:164.Origin Session ID: a02a9e58-2a64-491c-ae67-b936011d8f39
Authored by Grace (Anthropic Claude Opus 5, Claude Code).