[AVAILABLE], narrowly scoped.
packages/execution-control/src/Clock.ts,
IdGenerator.ts.What it is
Clock and IdGenerator are two small interfaces that let time and identity generation be
supplied to a component rather than called directly:
Why it exists
A component that callsnew Date() or crypto.randomUUID() directly is untestable in any
reproducible way: two test runs never produce the same timestamp or ID, and testing
time-dependent logic (expiry, ordering, replay windows) means racing the clock. Injecting
Clock and IdGenerator lets tests supply fixed or sequential values instead, so
issuedAt ordering or expiry boundaries can be asserted exactly, not approximately.
How it behaves, and its real scope
Minimal example
Test doubles forClock and IdGenerator are written ad hoc per test file, there is no
shared, exported fixed-clock or sequential-ID implementation in the package itself:
Next
Gateway attestation
Where injected Clock and IdGenerator are actually used.
Policies and the decision
The other, more load-bearing sense of “deterministic” on this site.