Skip to content

Dry-run

Rehearsal of an operation in read-only mode: all steps are performed, but no actual changes occur. This is a practice run before the actual launch.

Why is it needed

  • See exactly what a script or agent would do before it does it;
  • Catch logic errors without the risk of damaging data;
  • Verify that the targets are chosen correctly — for example, that a migration affects exactly the right pages.

Example

# dry-run: only output what would be done
for article in articles:
    print(f"[dry-run] would have created: {article.title}")
    # article.create()  # commented out

After reviewing the output, remove the dry-run and run with actual write operations.

In agent systems

In conjunction with LLM, dry-run is a mandatory step: the model first shows the plan of changes and waits for human confirmation, and only then writes to the database or API. This approach reduces the cost of errors.

See also

← All terms