Documentation / Build

See recovery and a hard failure

Try a bounded rework loop, then an unrecoverable worker crash. Their results are deliberately different.

Simulated business logic; no AWS or AI calls. From the runner checkout. Download the displayed JSON into the checkout root. The local runner reads JSON.

Exhaust a rework loop

shell
cargo run --locked --bin rippflow-local -- \
  failure.workflow.json \
  ok-item.bin,corrupt-item.bin \
  --handler "python3 examples/python/handler.py"

Expected: rework stops at its loop limit and finalize-batch completes. This fallback advances the workflow; design an explicit failure path when that is unsafe.

Crash a worker

shell
cargo run --locked --bin rippflow-local -- \
  failure.workflow.json \
  ok-item.bin,fatal-crash.bin \
  --handler "python3 examples/python/handler.py"

Expected: two attempts, a dropped/DLQ log entry, and a nonzero exit because the workflow stalls. This command intentionally fails; it does not write to a real SQS DLQ.

Workflow definition

JSON

json
{
  "name": "deliberate-failure-retry",
  "version": "2.0.0",
  "default_group": "python-standard",
  "phases": {
    "process-item": {
      "requires": [],
      "service": "simulated.processor",
      "scope": "per_shard",
      "inputs": {
        "simulated": true,
        "strict": true
      },
      "sla": {
        "timeout_secs": 60,
        "max_attempts": 2
      }
    },
    "audit-item": {
      "requires": [
        "process-item"
      ],
      "service": "simulated.auditor",
      "scope": "per_shard",
      "outcomes": {
        "completed": {
          "advance_barrier": true
        },
        "rework": {
          "rerun_phase": "process-item",
          "max_loops": 2,
          "override_inputs": {
            "strict": false,
            "fallback_mode": true
          }
        }
      }
    },
    "finalize-batch": {
      "requires": [
        "audit-item"
      ],
      "service": "simulated.finalizer",
      "scope": "fan_in_all",
      "mode": "sync_lambda",
      "terminal": true
    }
  }
}

YAML

yaml
name: deliberate-failure-retry
version: 2.0.0
default_group: python-standard
phases:
  process-item:
    requires: []
    service: simulated.processor
    scope: per_shard
    inputs:
      simulated: true
      strict: true
    sla:
      timeout_secs: 60
      max_attempts: 2
  audit-item:
    requires:
      - process-item
    service: simulated.auditor
    scope: per_shard
    outcomes:
      completed:
        advance_barrier: true
      rework:
        rerun_phase: process-item
        max_loops: 2
        override_inputs:
          strict: false
          fallback_mode: true
  finalize-batch:
    requires:
      - audit-item
    service: simulated.finalizer
    scope: fan_in_all
    mode: sync_lambda
    terminal: true

Download: JSON · YAML

Verified sources

Checked 2026-11-05.

Let's talk

Contact Rippflow

Tell us about your workflows, deployment or pricing.

We'll reply to your email.

Search docs

Search workflows, handlers and operations.