Automation
Simulated‑First Is a Product Safety Boundary
Designing automation systems that default to simulation, require explicit real-world authorization, and record planned operations narrows accidental blast radius while preserving developer velocity.
- Automation Safety
- Design Patterns
- Operational Resilience
A system that defaults to simulation, requires explicit real-world authorization, and records planned operations reduces accidental blast radius without blocking useful development.
When designing a control plane for device or infrastructure changes I treated simulation as a safety boundary: not a decorative dry‑run but the primary mode of interaction. That safe default reduces human error, surfaces mismatches early, and makes the cost of checking expectations low enough that humans actually do it.
Make simulation the safe default
Treat the simulator as the API’s normal mode. Requests return a concrete plan of actions, expected side effects, and a confidence score tied to the validation harness. This enforces a pattern where intent is separated from execution and creates a low‑friction rehearsal loop: operators iterate on plans until acceptance criteria are met, then request real execution.
Tradeoffs: developers face an additional explicit step to go live, and the simulation layer must be maintained. The cost is worth it when the blast radius of a mistake is nontrivial; it is wrong when the system is read‑only or when latency of real changes is the primary product constraint.
Separate intent from execution with explicit acknowledgement
Require an explicit acknowledgement before any real action. Acknowledgement should:
- be auditable (who, when, why);
- bind to a specific plan hash and environment allowlist; and
- include a rollback policy and dry‑run timestamp.
The explicit acknowledgement acts as a least‑privilege gate: issuing it should require a role that’s authorized to move from simulation to reality. Store the acknowledgement as an immutable event in the audit log so a later review knows exactly which plan was accepted.
Costs and failure modes: requiring acknowledgements can be bypassed if operator credentials are over‑broad or if the acknowledgement process itself becomes a rubber stamp. Mitigate by limiting who can sign and by automating checks that the plan meets acceptance criteria before the UI enables the acknowledgement control.
Define and enforce environment allowlists
An environment allowlist is the mapping that says which targets (hosts, namespaces, device groups, or accounts) accept simulated‑to‑real promotion. Make the allowlist explicit and versioned:
- allowlists are declarative files committed alongside automation code;
- each allowlist entry includes scope, justification, and required reviewer role; and
- enforcement belongs to the execution adapter, not the UI.
Allowlist enforcement reduces blast radius by refusing execution on out‑of‑scope targets. It also documents operational boundaries and makes authorization deterministic. Be candid about costs: allowlists add operational work to keep up to date and must be coupled with alerts when drift is detected.
Track parity and drift between simulation and reality
Simulated plans are only useful if they reflect reality closely. Build a parity‑checking pipeline that compares the simulated plan to a sampled execution environment and reports two classes of drift:
- structural drift: the plan’s steps don’t map to available adapters or APIs; and
- semantic drift: the same steps would produce different side effects (config formats, timing, or error modes).
Use regression checks, small smoke runs in canary environments, and post‑execution reconciliation to measure parity. When drift is large, surface it as a blocking validation error that requires updating the simulator or the adapters.
Failure modes: over‑trusting simulation leads to complacency. If teams stop running reconciliations, the confidence score becomes meaningless. The correct response is to instrument reconciliation coverage and make parity a visible operational KPI.
Validation, rollback, and acceptance criteria
Treat the simulation → acknowledge → execute sequence as a multi‑step transaction with clear acceptance criteria at each boundary.
- Validation: automated checks that a plan meets schema, safety heuristics, and policy; failures return actionable counterexamples.
- Human Acceptance: the explicit acknowledgement where an operator confirms the plan hash and target allowlist. The UI should show delta, blast‑radius estimate, and rollback options.
- Execution: adapter layer runs the plan, emits structured logs, and writes a final execution digest.
- Rollback: precompute a rollback plan in simulation when the operation is not trivially reversible, and require a rollback approval pathway.
Design for minimal blast radius by making rollbacks explicit, rehearsable, and fast. Don’t assume a single universal rollback works—document when rollbacks are compensating actions that carry their own risks.
Simulated‑First Checklist (reusable)
Use this checklist before promoting a simulated plan to real execution:
- Plan produced and schema‑validated.
- Acceptance criteria present and green (health checks, preconditions).
- Environment allowlist includes every intended target.
- Plan hash and human rationale captured in an explicit acknowledgement.
- Rollback plan exists and is rehearsed at least in a canary environment.
- Parity score above threshold; no structural drift flagged.
- Audit event written and replicable to long‑term logs.
This checklist is a minimum barrier. If your system allows batch promotions, run the checklist for each subgroup in the batch.
When simulated‑first is the wrong tool
Simulated‑first is not a panacea. It is a poor fit when:
- the product is inherently real‑time and the cost of delaying execution undermines value; or
- the adapters cannot model behavior deterministically (highly distributed or timing‑sensitive devices where simulation would be misleading).
In those cases, prefer observation and replay probes, stronger canarying, and faster safe‑stop mechanisms rather than simulation masquerading as truth.
Grounded takeaway
Treat simulation as a safety boundary: make it the safe default, require explicit acknowledgement tied to a versioned environment allowlist, and invest in parity checks so simulations stay honest. The pattern reduces accidental blast radius and lets teams iterate on plans without touching production until they’re ready. If you want to discuss a checklist or read the templates I use, send a note to /contact.