Skip to content

Fix portable example runtime and gate native/browser execution - #174

Draft
proggeramlug wants to merge 4 commits into
codex/starter-browserfrom
codex/example-loops
Draft

Fix portable example runtime and gate native/browser execution#174
proggeramlug wants to merge 4 commits into
codex/starter-browserfrom
codex/example-loops

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Several canonical examples compiled but failed during execution: native scalar arithmetic truncated fractional interpolation/easing, voxel indexing lost captured dimensions, camera/derived-coordinate writes hid game content, and WASM barrel re-exports left public color and input constants undefined. Move six games onto the shared loop with explicit cleanup, correct those runtime paths, and require real native/browser startup content checks.

Keep scalar calculations in floating point without changing their formulas. Pass voxel dimensions explicitly and materialize camera/derived coordinates at their use sites. Preserve public palette, keyboard/mouse, cursor/platform, texture and material constants through initialized exports, retaining existing values, types and shared object identity through both public entry points.

Keep linked compiler test projects on the checkout's drive: hosted projects on C: linked to the engine on D: caused Perry to emit colliding module globals that MSVC silently merged. Reject those linker warnings even when compilation exits successfully. Handle synchronous and asynchronous browser pointer-lock denial, retain the intent for a later click, and release a grant arriving after cursor cleanup.

Add actual native/WASM scalar and public-constant contracts, including invalid-value controls, alias mutation/restoration and an executed FFI guard control. The native gate runs bounded copies of unchanged update/draw and cleanup bodies, requires completed readback and one cleanup, and checks specific game content outside the HUD. The browser gate compiles unchanged original sources, verifies source/page receipts, loads the production engine/bootstrap in hosted Chrome and requires eight drawing frames, valid draw/input arguments, the expected content and one completed cleanup. Space-blaster must close audio; voxel-sandbox must restore cursor intent. Browser evidence can still run after a later native failure; both jobs remain required.

Validation:

  • Corrected local Radeon 760M / DX12 execution passes content/capture/cleanup for test3d, dungeon-crawl, isometric-rpg, kart-racer, space-blaster and voxel-sandbox. Earlier missing-terrain/character captures are rejected. All 20 canonical examples compile and link.
  • Actual native/WASM scalar contracts pass. Public-constant execution verifies all 24 colors through four alias/entry-point combinations, 102 input/platform/cursor values through each entry point, ten root texture/material constants and shared identity/mutation. A compiled engine-call control is rejected by the WASM guard.
  • All six original examples compile/splice for WASM. Actual compiled execution with recording FFI passes eight frames, valid draw/input arguments, audio/cursor cleanup and one completed game cleanup. The earlier pages fail these checks. This diagnostic does not load the renderer, browser, audio device or network.
  • Native/WASM fixed lifecycle contracts still pass. Fourteen Python acceptance controls, four monitor tests and repository/package/FFI contracts pass.
  • Initial hosted run 34576806162 passed the scalar contract and all 20 links, but all six native runs failed after WARP initialization with a numeric-argument TypeError. The duplicate-global warnings are present in all six retained compile logs.
  • Hosted run 34580890147 at da31009 passes actual browser content/cleanup for five games. Voxel Sandbox stops on an unhandled pointer-lock rejection, and the native constant fixture exposes the same cross-drive module collisions. Its failed binary also fails when replayed locally. These failures are retained; the drive-location and pointer-lock corrections await hosted verification.
  • The revised local native/WASM constant contract and all six native runtime checks pass from projects beside the checkout. Six unchanged browser builds, three pointer-lock unit controls, duplicate-global rejection controls and the repository contracts pass. The new guard rejects the actual failed hosted linker log and accepts the earlier successful local MSVC/LLD logs.

Startup checks do not qualify full gameplay/input interaction, pause/focus, resize/device loss, quality goldens or performance. The missing test3d grid lines, wider compiler/API export audit, visible Windows presentation, packaged shader dependencies and named discrete-hardware acceptance remain open.

Stacked on #173; relates to #142, #74 and #141. See docs/evidence/example-loops-v1.md and docs/evidence/example-browser-v1.md for source receipts, failures and scope. No PR merge or npm release is included.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug proggeramlug changed the title Fix scalar interpolation and qualify shared-loop examples Fix portable example runtime and gate native/browser execution Sep 11, 2026
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