Skip to content
language.blue
repo.blue ↗Run this example

07 · Durable delivery

Safe Retry: One Entry, One Effect

See the durability boundary directly. Invalid input changes nothing. A valid entry is admitted and processed once; delivering it again reuses its durable evidence without producing another state change, epoch, event, or gas charge.

Executable Playground exampleAtomic admissionIdempotencyDurable receipts

The delivery problem

A lost response must not become a duplicate action.

Clients retry because networks are uncertain. The runtime therefore distinguishes “I did not receive the response” from “the action never happened.” A stable idempotency key lets the server return the original durable result.

Failure before admission leaves no partial coordinates.

Malformed input does not append a Timeline Entry, advance a clock, create a receipt, charge processing gas, or change the Root.

invalid request
  → reject atomically
  → no entry / no epoch / no effect

valid request + key K
  → append one entry
  → process one revision
  → persist receipt for K

retry request + key K
  → return the same receipt
  → no second effect

Run it

Inspect what does—and does not—change.

The useful proof is not a success banner. It is the unchanged clocks and counts around a rejected request and repeated delivery.

01
Submit malformed input.Observe the explicit rejection and verify that journal position, workspace revision, and document epoch stay unchanged.
02
Admit a valid Counter entry.One append creates the durable Timeline evidence with its stable idempotency key.
03
Process the admitted entry.The Counter changes once and records one new revision, event, and gas value.
04
Repeat the same delivery.The server reuses the durable receipt. No new entry, processing pass, or document revision appears.
05
Save, export, and replay.The receipt and resulting document state remain reproducible rather than depending on browser memory.

What this teaches

Append, processing, and delivery are separate boundaries.

Separating them makes retry behavior explainable and lets a replay prove that accepted work occurred once.

AdmissionValidates and durably appends one whole Timeline Entry.
ProcessingConsumes eligible admitted work and creates a revision.
ReceiptRecords the result associated with one idempotency key.
RetryReturns existing evidence without repeating the effect.
You have completed the core path.

Return to any lesson, reset its scenario, change participants or requests, and compare the result with the guided path.