Repository navigation
Conversation
…an unused import Review of e64ab4a: CORE_TEMPLATE_FLOOR claimed the scaffolder writes it, but only its own test read it; check-publish-state imported satisfiesSpecifier and never called it.
…an exact version e64ab4a moved templates to `>=` for @threenative/*, but build.spec and publication.spec still compared each pin to the exact workspace version, so three tests went red on main. They now read the expected form from scripts/version-range.ts, the one owner of it.
The floating-template change (e64ab4a) reaches new games only once create-threenative publishes again, and 0.2.18 is already on npm. release:prepare bumped the cohort (core 0.3.14, create-threenative 0.2.19), regenerated the MCP tool surfaces and re-pinned the scaffold hashes. Its publish-state check passed.
The threaded Wasm build runs on shared memory, which any thread can grow. Emscripten refreshes a thread's views only inside its own glue (growMemViews), so after a pool worker grew the memory the game thread's HEAPU8 kept the old length. A pointer the engine handed back past it threw "Offset is outside the bounds of the DataView" in readValue: the intermittent template-nonvisual (shooter) boot red. A shared buffer never detaches, so a short view stays right below its end. The bridge now refreshes only when an access passes its cached heapBytes (an integer compare, no memory.buffer read per crossing): view(end), wordView(end) and reach(end) at readValue, alloc's zeroing, attribute views, readDoubles/writeDouble/readByte/writeByte/readWord and heapF64(end). The refresh (heapFor in browser-abi-types) rebuilds from memory.buffer and puts the fresh HEAPU8/HEAPF64 on the module, and the cold readers that take a raw _malloc pointer (renderer handles and read-backs, storage read-back, TSL uniform-read cache, matrix copy/equals) pass their end to it. The identity test for non-shared memory is unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
New games now install the newest published engine. Starter kits declare
>=0.3.14for@threenative/*instead of an exact version.create-threenativestays exact.Why does it matter?
Before, a new game got the engine that was current when
create-threenativewas last published. An engine patch reached new games only after a CLI repack. This PR publishes[email protected]so the floating templates reach users.Done
✅
e64ab4af3— templates float the engine with a floor (it was pushed straight tomain;developnow carries it too).✅ Review fix: the dead
CORE_TEMPLATE_FLOORexport and an unused import are gone.✅ Test fix:
build.specandpublication.specexpected exact pins and were red aftere64ab4af3. They now read the form fromscripts/version-range.ts.✅ Release cohort prepared: core 0.3.13 → 0.3.14, create-threenative 0.2.18 → 0.2.19, MCP surfaces regenerated, scaffold hashes re-pinned.
✅ Flake fix (
88389d95f):template-nonvisual (shooter)failed twice on this PR withRangeError: Offset is outside the bounds of the DataView. Cause: in the threaded Wasm build, a pool worker grows shared memory and the game thread'sHEAPU8keeps the old length. The bridge now refreshes its views when a read passes the cached length. That is one integer compare, and nomemory.bufferread on the hot path. Red-green test inbridge-crossings.spec.ts.Checks run locally
pnpm release:prepare— publish-state check passed, "Nothing was published".packages/create-threenative/__tests__, version-range, check-version-pins, check-publish-state, release, prepare-release, engine-mcp server).vitest packages/three-native/__tests__: 602 of 602 passed after the flake fix.pnpm typecheck,pnpm lint(warnings only),check-version-pins.Risk
>=has no ceiling: a future breaking major reaches new games from old templates. Existing games stay frozen by theirpnpm-lock.yaml.