Add a Dry Run Before an Automation Changes Real Data

MacFastSearch · September 15, 2026 · 5 min read
Computer screen displaying HTML code for a web development project

A dry run shows what an automation intends to change before it makes those changes. It is particularly useful for batch updates, file operations, imports, and messages sent to many recipients. The important design question is what the preview proves. A list saying “100 records processed” is much less useful than a clear account of which records would change, why they qualify, and what their new values would be.

Build the dry run around a real decision: whether this particular set of actions is ready to execute. It should expose mistakes in selection, assumptions, and scale while leaving the business data untouched. Treat it as one layer of verification, alongside permissions, backups, and checks on the final result.

Separate planning from execution

Structure the workflow so one step identifies proposed actions and another performs them. The planning step should produce a readable list containing stable record identifiers, current values where relevant, proposed values, and reasons. This makes the same logic available to both the preview and the actual run.

Avoid maintaining two unrelated versions of the automation, one labeled safe and another labeled live. They can drift until the preview no longer represents the operation that follows. Shared planning logic helps, although you still need to verify that the execution step applies the plan correctly.

For example, an automation that closes inactive support records could produce one entry per record with its last activity date and the rule that qualified it. A reviewer can then spot a recently updated record or an unexpected category before anything is closed.

Define what must remain unchanged

List every possible side effect, including less obvious ones. The workflow may update a database, send a notification, move a file, create an audit entry, or call an external service. A dry run that avoids the main update but still sends real customer emails is not a safe preview of that operation.

Use read-only credentials where practical, and direct test outputs to an isolated location. Be aware that even reads can produce access logs or consume API quota. The relevant promise is that the dry run will not perform the business mutations under review, not that the entire computing environment will remain literally unchanged.

Check helper functions as well as the main routine. A function called “prepare record” may save a timestamp or reserve an identifier. Follow the actual behavior rather than relying on a reassuring name. Document any unavoidable side effects clearly in the preview instructions.

Make selection rules visible

Show the exact scope: source system, account, folder, date range, filters, and exclusions. A correct update applied to the wrong set of records is still a serious error. Include the time zone used for date boundaries and explain how missing or invalid values are handled.

Provide counts for selected, excluded, unchanged, and invalid records. Then include examples from each group. If the expected workload is about twenty records and the preview selects two thousand, the operator should notice immediately without reading a long log.

Use explicit limits for a first live run. A maximum record count or narrow allowlist can prevent an accidental broad operation. If the plan exceeds the limit, stop and require a deliberate revision rather than silently taking the first few records in an unspecified order.

Review differences, not just totals

A useful preview shows before-and-after values where that is safe. For a rename, show the old and new path. For a status update, show the previous and proposed status. For an email, show the intended recipient and the rendered content in a protected preview, taking care not to expose sensitive details to unnecessary viewers.

Highlight ambiguous cases separately. A record that matches two conflicting rules should not be buried in the successful group. Mark it for review or skip it according to a documented policy. The dry run should help the operator understand uncertainty rather than disguising it as a clean total.

Allow the reviewer to trace an entry back to its source. A stable identifier is more dependable than a title that several records share. If the source changes while the review is underway, that relationship is also necessary for checking whether the plan is still current.

Handle the gap between preview and execution

A preview is a snapshot, and the source may change afterward. Decide how the live run detects stale assumptions. It might compare a version number, modification timestamp, or current value before applying each change. If the record no longer matches the reviewed state, skip it for a fresh review instead of overwriting newer work.

For consequential operations, store the approved plan and execute that specific plan with appropriate freshness checks. Do not present one set of records for approval and then rerun a broad query that selects a different set at execution time without making the difference visible.

Set a reasonable validity period for approval based on how quickly the data changes. A file cleanup in a quiet archive and a live inventory update have different needs. The operator should know when a new preview is required.

Test failures before relying on the mode

Use a disposable dataset to verify that dry-run mode leaves the relevant data unchanged. Include records that should change, records that should be skipped, missing fields, duplicate identifiers, and an unavailable dependency. Compare the dataset before and after the preview.

Test the live path on that same sample and reconcile the result with the proposed plan. This checks that the preview describes the operation accurately. A dry run can be perfectly harmless while still predicting the wrong outcome, so both properties matter.

Make the selected mode conspicuous in the interface and logs. Avoid a small optional flag whose absence silently enables a large destructive action. The interaction should make it clear when the operator is reviewing and when they are authorizing execution.

Close the loop after the real run

After execution, report completed, skipped, failed, and uncertain actions separately. Compare those results with the reviewed plan. A timeout may leave an uncertain result that requires checking the destination before retrying.

Retain enough evidence to explain what happened without keeping unnecessary sensitive payloads. The strongest dry-run workflow creates a chain from intended scope to reviewed changes to verified outcomes. That chain turns a preview from a reassuring label into a practical tool for preventing avoidable mistakes.

Illustrative stock photo: Mohammad Rahmani / Unsplash. Unsplash License.