Skip to main content
José David Baena
Back to the review scope

Synthetic teaching case · not client work

Async Reliability Review: sample handoff

One virtual debit succeeds, then the worker crashes before it records the result. This sample shows how a bounded review could separate observed evidence, assumptions, risks, and owned next actions.

Every fact below comes from the deterministic public model. It does not describe a client engagement, GitHub production behavior, or a measured reliability outcome.

Open the modeled scenario

Scope and evidence boundary

Flow
One virtual debit operation and one injected crash
Failure point
After the modeled debit, before the result is recorded
Evidence
Two deterministic traces generated by lib/async-failures.ts
Decision
Whether retry may repeat the effect or must reconcile first

Model assumptions

  • One virtual debit operation and a single injected fault; no real payment, broker, or network is used.
  • The durable case assumes a stable operation key and a downstream contract that can deduplicate or look up that same intent.
  • The downstream idempotency record is retained throughout the modeled retry window and is atomically tied to the effect.
  • Operation lookup eventually succeeds, storage is available, and authorization is checked before dispatch.
  • Outages of the lookup service, expired deduplication records, concurrency, and timing distributions are not modeled.

Failure map

BoundaryEvidence in the modelReview question
Dispatch intentRecorded only in the durable traceWhich stable identity survives worker replacement?
External effectThe virtual debit happens before the injected crashCan the downstream system find or deduplicate the intent?
Recorded resultAbsent when the worker restartsDoes the runtime represent UNKNOWN separately from FAILED?
ReplayNaive retry repeats; durable recovery looks up the keyWhich evidence and owner authorize another dispatch?

Evidence summary

Naive loop

Attempts
2
Effects
2
Status
Duplicate debit
  1. 01ToolCalled
  2. 02DebitApplied
  3. 03ProcessCrashed
  4. 04ToolCalledAgain
  5. 05DebitAppliedAgain

Durable runtime

Attempts
2
Effects
1
Status
Recovered by operation key
  1. 01DispatchIntentRecorded
  2. 02DebitApplied
  3. 03ProcessCrashed
  4. 04RunReplayed
  5. 05OperationLookupFound
  6. 06ToolResultRecorded

The model produces two attempts and two effects for the naive loop. With the stated durable-runtime assumptions, it produces two attempts and one modeled effect, then reports “Recovered by operation key.”

Prioritized recommendations

  1. P0Carry one operation key across every delivery attemptThe worker, downstream effect, lookup path, and replay tooling need the same stable identity. A delivery ID alone does not identify the business intent.
  2. P0Represent an unknown outcome instead of guessingAfter a crash or timeout, reconcile the operation key before another effect-capable call. Missing acknowledgement is not proof that the effect failed.
  3. P1Make retention at least as long as the replay windowA deduplication record that expires before delayed retries or manual replay can turn an old operation into a new effect.
  4. P1Name the recovery owner and required evidenceThe runbook should state who can pause dispatch, inspect the operation record, approve replay, and verify the final business state.

Replay and ownership handoff

Before replay

  • Pause or bound new dispatch for the affected operation.
  • Look up the stable operation key at the effect boundary.
  • Confirm deduplication retention still covers the replay.
  • Record who authorizes replay and verifies final state.
Use the full Replay Readiness Checklist

What this sample cannot decide

  • Your real provider's idempotency semantics.
  • Your replay window, storage availability, or concurrency.
  • Who has operational authority in your organization.
  • Whether a real incident had the same failure sequence.

Use the shape, not the synthetic conclusion

A real review replaces this model with your authorized evidence, names the unknowns, and leaves implementation and operational ownership with your team.