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
Guest languages route randomness through wasi:random — including transitive dependencies and runtime internals (hashmap seeds). So instead of SDK-level RNG discipline (unenforceable convention), composition can inject determinism structurally: a provider component exports wasi:random to the suite, deterministically seeded under runner control. No guest cooperation needed, in any language; there is no ambient entropy to cheat with.
Shape
The provider exports wasi:random to the suite and a seed-control surface to the runner core — the context-provider topology again, and plausibly the same component: the factory already marks case boundaries, so new-context(seed) can reseed the wasi:random stream per case, even on a shared suite instance.
Default seed derived from the case name (reproducible-by-name with zero configuration); runner overrides for exploration runs or replay.
Results schema (L4): record the effective seed per case; runners support replay by re-provisioning a recorded seed.
This doubles as a flagship demonstration of component-native test infrastructure: native harnesses fight for determinism with preload hacks and per-language RNG plumbing; here it is one node in the composition graph.
Limits (do not oversell)
Determinism ≠ randomness alone. Clocks (wasi:clocks is virtualizable the same way — cf. webrtc-datachannels' Shadow lab for where full network/time determinism leads), host-import completion order, and cooperative scheduling nondeterminism remain. This makes the case's own logic replayable, not the whole execution.
insecure-seed is consumed at instance startup (hashmap seeding): per-case reseeding governs get-random-bytes streams; instance-level seeds are set once. Clean under instance-per-case runners; a documented nuance for shared instances.
Pass-through policy: suites testing cryptography may need real entropy semantics for specific cases; the provider should support pass-through, selectable by runner policy.
Guest languages route randomness through
wasi:random— including transitive dependencies and runtime internals (hashmap seeds). So instead of SDK-level RNG discipline (unenforceable convention), composition can inject determinism structurally: a provider component exportswasi:randomto the suite, deterministically seeded under runner control. No guest cooperation needed, in any language; there is no ambient entropy to cheat with.Shape
wasi:randomto the suite and a seed-control surface to the runner core — the context-provider topology again, and plausibly the same component: the factory already marks case boundaries, sonew-context(seed)can reseed thewasi:randomstream per case, even on a shared suite instance.This doubles as a flagship demonstration of component-native test infrastructure: native harnesses fight for determinism with preload hacks and per-language RNG plumbing; here it is one node in the composition graph.
Limits (do not oversell)
wasi:clocksis virtualizable the same way — cf. webrtc-datachannels' Shadow lab for where full network/time determinism leads), host-import completion order, and cooperative scheduling nondeterminism remain. This makes the case's own logic replayable, not the whole execution.insecure-seedis consumed at instance startup (hashmap seeding): per-case reseeding governsget-random-bytesstreams; instance-level seeds are set once. Clean under instance-per-case runners; a documented nuance for shared instances.