You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wizer pre-init is validated (#25, PR #82: findings 22–24) but currently invisible to consumers: the knowledge lives in the findings log, two issue threads, and a feature-gated bin's doc comment. This issue turns the experiment into something a downstream repo can find and adopt. Blocked on #82 merging.
wizer-preinit (component-test-runner, feature wizer) wizens unmodified suite artifacts — init is the contract's own all() via version-last invoke syntax (polymorph:test/tests.all@0.1.0()), no SDK hook, no extra export. Tags sections survive; scheduling/drift/lock --check work unchanged on the wizened artifact; artifact-sha256 differences are provenance-only (#44). Measured on the 10k synthetic: per-instance all() 3.15ms → 663µs; K=1 full-isolation run 30.8s → 7.1s sequential, 1.14s at --jobs 8.
Tooling
Library entry point for SUT-importing suites — the shipped bin only satisfies WASI + test-context, but real consumer suites (webcrypto, websocket) import a SUT host module, and component instantiation is eager, so wizening them fails even though init never calls the SUT. Expose wizen_with(configure_linker, make_data) in component-test-runner mirroring Runner::with_data, so consumers reuse the linker setup they already have; the bin becomes the plain-suite convenience wrapper.
Runner execution-policy doc — Runner execution-policy guidance #22's owed consolidated document is the primary home: wizening is an instance-granularity decision, so the K-knob cost table gets a "K=1 at scale → wizen" row with the measured numbers, plus the anti-recommendation (deltic/browser: no CoW, instantiate 3×, net ~1.5× at best — K>1 stays the JS-leg lever; K=0: irrelevant, the build amortizes to one ~12ms).
Suite-writing guide (components/sample-suite/README.md) — short "large suites" section: build normally, one wizer-preinit command, when it pays, link to the policy doc.
Cross-references — one line each in ct-runner's rustdoc (next to the cases_per_instance docs) and the README scope list. Not the design commitments — this is guidance, not contract.
The snapshot freezes whatever registry construction observed (env, entropy, clocks — baked at wizen-time values for every future instance). For contract-conforming suites this is Pre-initialized suites (build-time wizer snapshot of the case table) #25's determinism feature, but it must be stated: an env-parameterized registry stops being parameterizable.
Run the wizened artifact everywhere downstream (runners, lockfile generation, hashing) rather than mixing artifacts.
Upstream edges, for anyone hitting them: keep_init_func strip rewrite is broken (Wizer components from Rust fail unless keep_init_func(false) bytecodealliance/wasmtime#13168, open; moot for all()-as-init where keeping is mandatory); the wave func-name lexer rejects prerelease versions (@0.3.0-rc-…) in call form; wasmtime wizer CLI can't stub resource imports or handle nested components, and defaults WASI off (-S cli) — which is why the library route is the mechanism.
Wizer pre-init is validated (#25, PR #82: findings 22–24) but currently invisible to consumers: the knowledge lives in the findings log, two issue threads, and a feature-gated bin's doc comment. This issue turns the experiment into something a downstream repo can find and adopt. Blocked on #82 merging.
What exists after #82
wizer-preinit(component-test-runner, featurewizer) wizens unmodified suite artifacts — init is the contract's ownall()via version-last invoke syntax (polymorph:test/tests.all@0.1.0()), no SDK hook, no extra export. Tags sections survive; scheduling/drift/lock --checkwork unchanged on the wizened artifact; artifact-sha256 differences are provenance-only (#44). Measured on the 10k synthetic: per-instanceall()3.15ms → 663µs; K=1 full-isolation run 30.8s → 7.1s sequential, 1.14s at--jobs 8.Tooling
test-context, but real consumer suites (webcrypto, websocket) import a SUT host module, and component instantiation is eager, so wizening them fails even though init never calls the SUT. Exposewizen_with(configure_linker, make_data)in component-test-runner mirroringRunner::with_data, so consumers reuse the linker setup they already have; the bin becomes the plain-suite convenience wrapper.actions/setupwiring — installwizer-preinitat the consumer's Cargo.lock rev alongsidect-runner/component-test-cli(actions/setup: consumer tool bootstrap (install component-test-cli/ct-runner at the Cargo.lock rev, cache, pins gate) #56's pattern). Consider awizen: trueinput on the relevant action so the CI path is one flag.component-test wizensubcommand — fits the CLI's composition/execution scope (component-test CLI: composition, execution, aggregation #13); would subsume the bin. Optional; don't hold the rest on it.wasm-optpost-pass spike — Pre-initialized suites (build-time wizer snapshot of the case table) #25 predicts init-only code goes dead after snapshotting; measure whether it claws back meaningful artifact size (bench: 122KB → 1.29MB).Discoverability (the actual point)
components/sample-suite/README.md) — short "large suites" section: build normally, onewizer-preinitcommand, when it pays, link to the policy doc.cases_per_instancedocs) and the README scope list. Not the design commitments — this is guidance, not contract.Caveats the docs must carry
keep_init_funcstrip rewrite is broken (Wizer components from Rust fail unless keep_init_func(false) bytecodealliance/wasmtime#13168, open; moot for all()-as-init where keeping is mandatory); the wave func-name lexer rejects prerelease versions (@0.3.0-rc-…) in call form;wasmtime wizerCLI can't stub resource imports or handle nested components, and defaults WASI off (-S cli) — which is why the library route is the mechanism.