Deterministic
also: determinism, non-deterministic, nondeterministic
Always giving the same result from the same starting conditions. A deterministic test passes every time or fails every time, never at random.
Behavior that produces identical output for identical input and state. Tests become non-deterministic when they depend on things that vary between runs: the current time, random numbers, network responses, or the order in which things finish.
A calculator is deterministic: 7 times 8 is always 56. Asking a friend to pick a restaurant is not; you may get a different answer each time.
You can only trust a test result if the test is deterministic. If an agent's test depends on today's date or a live API, it may pass today and fail tomorrow with no code change.
To make the test deterministic, I froze the clock at 2025-03-01 09:00 and fixed the random values it uses, so every run produces the same result.
Make the streak tests deterministic: use a fixed fake date instead of the real clock, and don't call the live API.
Assuming a test that passed once will always pass. If it depends on time, randomness or the network, the next run can differ.