Skip to content

Promote develop to main: a disposed game's rapier setup resolves instead of failing the page - #669

Merged
jonit-dev merged 1 commit into
mainfrom
develop
Nov 12, 2026
Merged

jonit-dev merged 1 commit into
mainfrom
develop

Conversation

@jonit-dev

Copy link
Copy Markdown
Contributor

Second promotion for the 0.3.13 publish. The previous merge (f5d255dfe) reached main green and re-cut the native tag, and the release lane then failed its own upgrade proof on a second blocker the first one had been hiding.

What the proof reported (pnpm:gameplay, starter and platformer, 24 s and 35 s):

TN_PLAYTEST_BRIDGE_MISSING ... page reported: Error: rapier() was disposed before it initialized.

PRD-860's start gate made rapier().setup return its cleanup rather than ready, so nothing awaits the Wasm init: when a reload or a stop races it, the generation check threw into an unhandled rejection and the page reported a boot failure it never had.

The change: a superseded generation installs nothing and resolves, reporting TN_PHYSICS_SETUP_SUPERSEDED; recast() skips installing into a context that is gone. A live game still fails closed (TN_PHYSICS_NOT_READY; recast() without rapier() still throws).

Verified: packages/physics 36 files / 280 tests, including a new spec that drives setup → dispose → settle and asserts nothing was installed and the marker was reported; pnpm quality; pnpm typecheck; pnpm check:docs.

Already on main from the previous promotion: the render → renderer adoption, and worker errors that name their own line.

…ing the page

PRD-860's start gate made `rapier().setup` return its cleanup instead of
`ready`, so nothing awaits the Wasm init any more: when a reload or a stop
races it, the generation check threw into an unhandled rejection and the page
reported it as a boot failure. That is what the 0.3.13 release proof hit once
the retired `render` key stopped failing first —
`TN_PLAYTEST_BRIDGE_MISSING ... rapier() was disposed before it initialized` —
on both starter and platformer, in 24 s and 35 s.

The superseded generation now installs nothing and resolves, reporting
`TN_PHYSICS_SETUP_SUPERSEDED`; `recast()` skips installing into a context that
is gone. A live game still fails closed (`TN_PHYSICS_NOT_READY`, and a
`recast()` without a `rapier()` still throws).

Verified: packages/physics 36 files / 280 tests (a new spec pins the
dispose-races-init path: nothing installed, `runtime.rapier` untouched, the
marker reported), `pnpm quality`, `pnpm typecheck`.
@jonit-dev
jonit-dev merged commit 4847511 into main Nov 12, 2026
121 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant