Skip to content

Productize wizer pre-initialization: library entry point, setup action, discoverability #85

Description

@lann

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, 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

Discoverability (the actual point)

  • Runner execution-policy docRunner 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.
  • Pre-initialized suites (build-time wizer snapshot of the case table) #25 close-out comment pointing at the doc once it lands (issue threads are where researchers of pre-init will arrive).

Caveats the docs must carry

  • 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.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationrunnerComponents or hosts that execute suitestoolingCLI, lockfiles, composition helpers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions