Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Safe Cloudflare Workflow Dry-Runs for Publishing Queues

Description and use

Implementing a dryRun flag in Cloudflare Workflows enables safe simulation of publishing without invoking external services or writing to databases, saving costs and preventing false success reports.

Problem

Publishing automation that relies on a dryRun flag can still consume external quotas or falsely report success if the code invokes language models, image services, or database writes before checking the flag.

Outcome

Implementing a dryRun flag that bypasses all side-effecting steps allows safe simulation against production queues without consuming external quotas or producing false success reports.

Workflow

  • Configure workflow step to accept a dryRun parameter
  • Read queue items using step.do
  • If dryRun is true, return a simulation payload with status "simulated", selectedItem, reviewStatus "not-run", providerCallsSkipped true, writesSkipped true
  • Otherwise proceed with normal publishing logic

Evidence

When a publishing automation relies on a boolean flag named dryRun, it often fails to protect external budgets if the code invokes language models, image services, or database writes before inspecting that flag.

Source

Configure your workflow step to accept a dryRun parameter, skip external side-effect bindings entirely when it is true, and return an explicit simulation payload.

Source

If dryRun is true, return a simulation payload with status "simulated", selectedItem, reviewStatus "not-run", providerCallsSkipped true, writesSkipped true

Source

  • Record date: 2026-10-24T01:26:08.089Z