Pcornel
Automation · Automation Fundamentals

Determinism

Cheat sheet · https://pcornel.dk/topic.php?topic=5154

Back to the Topic

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

BoundaryHealthy evidenceSuspicious evidence
Intent / inputsOwner, scope and authoritative inputs are explicit and versioned where applicableHidden defaults, stale inventory or competing sources of truth
Decision / executionPlan or decision is explainable and actions are bounded per targetBlind fan-out, implicit assumptions or success based only on executor status
State / verificationTarget is re-observed and acceptance criteria prove the intended outcomeNo read-back, perpetual drift, partial side effects or unresolved exceptions
Recovery / evidenceRetry, rollback or escalation behavior is defined and auditableUnknown 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

Confirmation

Confirm action

Continue?