strict-web mode (and in every meow test run), meow is hermetic by
default: the sources of ambient nondeterminism — wall-clock time, randomness,
environment variables, timezone, and locale — are routed through one governed seam
that, by default, substitutes a deterministic stand-in for the real host source. A
grant swaps the real source back in.
The result: run the same code twice, on two different machines, in two different
timezones, and you get byte-identical output.
The three sources
Clock
A fixed virtual clock instead of wall-time.
Randomness
A seeded ChaCha20 stream instead of OS entropy.
Environment
Invisible host environment instead of
process.env.The virtual clock
By default,Date.now(), new Date(), and performance.now() read from a fixed
virtual origin — 2026-06-07T00:00:00Z — rather than the host wall clock. The
clock advances only as the runtime’s own timer queue fires (setTimeout); it
does not track real elapsed time.
A program measuring elapsed wall-time sees zero progression under the default
clock. That’s intentional and exactly what a test runner wants — it makes
timing-dependent code reproducible instead of flaky.
Seeded randomness
Math.random() and crypto.getRandomValues() draw from a ChaCha20 CSPRNG
seeded with a fixed 32-byte seed. The stream is identical across runs and machines.
crypto.subtle (hashing, signing, key derivation) is unaffected — it’s
deterministic by nature.
Timezone & locale pinning
A fixed clock value isn’t enough on its own: V8/ICU read the hostTZ and LANG
to render dates and locale-default Intl. So under the virtual clock, meow also
pins the process timezone to UTC and the default locale to en_US.UTF-8
before the isolate is created.
Granting the real host
Determinism is the default, not a cage. Opt back into real sources per-capability:node-compat mode, the real clock, OS entropy, and full environment are on by
default — no grant needed. See Permissions & trust for the
full grant model.
Why this matters
Reproducible tests
No more
flaky tests that depend on the current time, a random seed, or the CI
box’s timezone. Snapshot a value once; it holds forever.Reproducible builds
The same inputs produce the same artifacts — across developer laptops and CI
runners.
Edge & serverless
Code that’s deterministic by default ports cleanly to distributed,
short-lived execution environments.
Easier debugging
A bug that reproduces on your machine reproduces on everyone’s. Nondeterminism
is a grant you can see in the command line.
Scope
Next: the permission model
How grants compose, and what
--trust actually turns on.