Context
The middleware's full SSG rebuild (pages 5df4094, neo.mjs 13.2.0) failed on one route and aborted the deploy chain:
Error rendering route /apps/realworld2/index.html: TypeError: Base.on is not a function
at Favorite.onConstructed (…/neo.mjs/apps/realworld2/api/Base.mjs:60:18)
at Object.setupClass (…/neo.mjs/src/Neo.mjs:1034:23)
at …/neo.mjs/apps/realworld2/api/Favorite.mjs:41:20
Static HTML generation completed with 1 failed route(s): /apps/realworld2/index.htmlEarlier middleware runs were incremental with no content delta, so the route was never re-rendered. This full rebuild exposed it.
The Problem
apps/realworld2/api/Base.mjs onConstructed() coordinates its API singletons through static events on the class. The first instance reads the token and calls Base.fire('ready', token); every later instance calls Base.on({ready: me.onReady, scope: me}). static observable = true applies Neo.core.Observable to the prototype only, and Observable defines no static on or fire, as src/core/Observable.mjs shows. Every API singleton after the first therefore throws on construction, and the first throws when its token read resolves. The demo cannot boot, in a browser or in SSR.
The Architectural Reality
apps/realworld2/api/Base.mjs: initialTokenRequestSent, Base.fire, Base.on.
src/Neo.mjs setupClass(): static observable pushes Neo.core.Observable into the instance mixins.
The Fix
One shared static token promise. The first construction creates it from the LocalStorage read, and every instance chains onReady onto it. This drops the static-event handshake and initialTokenRequestSent. Instance-level observability stays as it is.
Acceptance Criteria
Out of Scope
- The middleware's policy of aborting the whole deploy on one failed route. That is its owner's decision.
Related
#19652 (v13.3 cut, the release that carries this to pages).
Live latest-open sweep at 2026-10-12T22:49Z, plus gh search issues for "realworld2" and the error text. No equivalent found.
Origin Session ID: 02040656-932a-48c8-8894-6f43d0368663
Context
The middleware's full SSG rebuild (pages
5df4094,neo.mjs13.2.0) failed on one route and aborted the deploy chain:Error rendering route /apps/realworld2/index.html: TypeError: Base.on is not a function at Favorite.onConstructed (…/neo.mjs/apps/realworld2/api/Base.mjs:60:18) at Object.setupClass (…/neo.mjs/src/Neo.mjs:1034:23) at …/neo.mjs/apps/realworld2/api/Favorite.mjs:41:20 Static HTML generation completed with 1 failed route(s): /apps/realworld2/index.htmlEarlier middleware runs were incremental with no content delta, so the route was never re-rendered. This full rebuild exposed it.
The Problem
apps/realworld2/api/Base.mjsonConstructed()coordinates its API singletons through static events on the class. The first instance reads the token and callsBase.fire('ready', token); every later instance callsBase.on({ready: me.onReady, scope: me}).static observable = trueappliesNeo.core.Observableto the prototype only, andObservabledefines no staticonorfire, assrc/core/Observable.mjsshows. Every API singleton after the first therefore throws on construction, and the first throws when its token read resolves. The demo cannot boot, in a browser or in SSR.The Architectural Reality
apps/realworld2/api/Base.mjs:initialTokenRequestSent,Base.fire,Base.on.src/Neo.mjssetupClass():static observablepushesNeo.core.Observableinto the instance mixins.The Fix
One shared static token promise. The first construction creates it from the
LocalStorageread, and every instance chainsonReadyonto it. This drops the static-event handshake andinitialTokenRequestSent. Instance-level observability stays as it is.Acceptance Criteria
onReadyexactly once, with the stored token, and nothing throws.pagesbump): the middleware renders/apps/realworld2/index.html.Out of Scope
Related
#19652 (v13.3 cut, the release that carries this to
pages).Live latest-open sweep at 2026-10-12T22:49Z, plus
gh search issuesfor "realworld2" and the error text. No equivalent found.Origin Session ID: 02040656-932a-48c8-8894-6f43d0368663