Determinism
Cheat sheet · https://pcornel.dk/topic.php?topic=5154
Answer
Determinism means the same defined inputs and relevant state lead to the same automation decision or output, making behavior predictable and testable.
Remember
- Determinism ≠ idempotency; deterministic code can repeatedly create the same unwanted side effect.
- Determinism ≠ repeatability; a procedure can be repeatable while an external allocator returns different addresses or IDs.
- Randomness ≠ always bad; generated values can be acceptable when their use and persistence are explicit.
- Same visible input ≠ same complete input if time, environment, inventory ordering or external state also affects logic.
First checks
- Pinned versions (requirements.txt, lock files) — deterministic inputs
terraform providers lock— provider lock- Sorted/ordered outputs — stable results
Verify in this order
fixed inputs + locked deps → same output
Where it usually breaks
Deterministic decision logic proves predictability for a defined input set; it does not prove the resulting action is idempotent, safe or correct.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Determinism automation boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / inputs | Owner, scope and authoritative inputs are explicit and versioned where applicable | Hidden defaults, stale inventory or competing sources of truth |
| Decision / execution | Plan or decision is explainable and actions are bounded per target | Blind fan-out, implicit assumptions or success based only on executor status |
| State / verification | Target is re-observed and acceptance criteria prove the intended outcome | No read-back, perpetual drift, partial side effects or unresolved exceptions |
| Recovery / evidence | Retry, rollback or escalation behavior is defined and auditable | Unknown partial completion, unsafe retry or evidence lost during remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5154