INTERRUPTED EFFECTS · RECEIPTS

Interrupted agent effect: reuse a receipt after a lost ACK

Crash an agent between creating an invoice and recording it, resume, and count how many invoices and emails one order produced.

Computed drill · sixty inspection seconds

Event trace

    Computed data

    Final metrics

    Three fixed steps for one fictional order. The billing service returns the stored invoice for a repeated key; the mail provider drops a repeated dedupe key. A crash loses only process memory, never the checkpoint store. Partial writes inside a single service, concurrent workers and compensation are not modeled.

    A lost acknowledgement

    Defaults: Interrupted step Create invoice, Interruption point After the effect, before the ACK is recorded, Resume policy set to Resume from the checkpoint, checkpoint written after the call returns, no keys. Billing creates INV-1, then the worker crashes. The checkpoint does not show the step, so the resumed worker creates INV-2 and then sends one email: DUPLICATE INVOICE, 2 invoices. Tick Idempotency key on invoice creation: billing returns the stored receipt for key order-77, EXACTLY ONCE.

    Where the crash happens

    Before the call takes effect is harmless: nothing was created and the retry creates INV-1 once. Interrupt Email the invoice after the effect: the invoice is checkpointed, but the email is sent again, DUPLICATE EMAIL. Dedupe key on the email send fixes it. Restart the plan from step 1 ignores the checkpoint; with no keys an email-step crash produces 2 invoices and 2 emails, and with only the invoice key it still sends 2 emails.

    Marking work done too early

    Set Checkpoint written to Before calling and the interruption point to Before the call takes effect. The checkpoint already says the invoice exists, so the resumed worker skips it and emails an invoice that was never created: MISSING INVOICE. The same mistake on the email step gives MISSING EMAIL. A checkpoint should record a completed effect, or record intent and be paired with a key.

    Reading the board

    External effects shows the invoice IDs and the email count; Durable checkpoint shows which steps are marked done. The table compares expected and actual effects and names what protected each one. With No interruption every setting gives EXACTLY ONCE. The trace shows run 1 up to the crash, the resume decision, and each retried or skipped step.

    Replay and limits

    Any change recomputes the run and rewinds it; the Complete-run preview states the outcome at once. Play and Pause walk through the events, Next event jumps one event, Restart rewinds, Speed runs from 0.25x to 2x and Inspection time seeks from 0 to 60 seconds, where the outcome and final metrics appear. Three fixed steps for one fictional order. A crash loses only process memory, never the checkpoint store. Concurrent workers, partial writes inside one service and compensation are not modeled.

    Views are my own and do not represent any employer, past or present.

    Search