Skip to content

Add optional WASM policy composition to the Complete game template - #713

Merged
EHotwagner merged 2 commits into
mainfrom
routine/templates-wasm-a-0b808ff1e703
Oct 13, 2026
Merged

EHotwagner merged 2 commits into
mainfrom
routine/templates-wasm-a-0b808ff1e703

Conversation

@EHotwagner

@EHotwagner EHotwagner commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Add an explicitly selected WASM policy advisor to the Complete game template. FsGgWasmPolicyExample=true composes the public Contracts/Browser 0.3.0 packages, independent SDK-based C/Rust guests, and the package-owned Worker lifecycle in the production renderer. The option defaults to false. Other bundles and both legacy descriptors exclude the optional source; the ordinary player lock, two existing pure example modules and installed routine producer remain unchanged.

The adapter accepts advice only from the current initialized worker/request, validates and copies its illustrative byte format, and gives it no game authority. Candidate replacement and shutdown use the published lifecycle identities; retained, disposed, malformed, trapped or timed-out results are refused. Generated assets live under obj; default Vite keeps ordinary owner assets, and enabled materialization refuses reserved-path collisions. Genuine separate NuGet and Cargo locks are included, with restore-only generation routes and strict missing-lock build fences.

Validation: full enabled Program/adapter Fable 5.18.0 typecheck and emission against the exact public package closure; independent C/Rust guest compilation with verified SDK 0.3.0, WASI 34 and Rust 1.90 inputs; actual Vite production build plus a genuine option-off restore/emission/build and stale-asset toggle control. Nine production browser definitions passed in each of Chromium, Firefox and WebKit (27 passes, no skips or retries) using verified archives in a private Ubuntu image. Firefox alone required MOZ_DISABLE_CONTENT_SANDBOX=1; this qualification profile makes no product security claim. Worker counts observe owned wrapper handles and termination calls, not native exit acknowledgments. Captured response bodies joined the production output where available; missing bodies remain unknown.

The initial browser configuration failure (requested deadline500 above strict-profile250) was repaired by inheriting the selected profile ceiling. The original Firefox content-sandbox crash and the separate first-failure harness defect are retained; the fresh successful cohort used --max-failures=1. Native checks for this new source head must run normally. This delivers the opt-in source composition; clean feed-installed creation, retaining upgrades and publication remain separate. Publication is none.

The first native source head also exposed a stale aggregate UI lock assertion (9 occurrences; the genuine optional lock adds 3). The maintained test now checks all six exact owning closures and their three-identity or Scene-only sets, preserving every original version/contentHash check. Its 25-test suite passed; seven controls detect missing, shifted, duplicated or corrupted closures. The original native failure is retained.

@EHotwagner
EHotwagner merged commit 09d2f86 into main Oct 13, 2026
21 checks passed
@EHotwagner
EHotwagner deleted the routine/templates-wasm-a-0b808ff1e703 branch October 13, 2026 22:50
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