noCV
ASAGA-106 · Persist multi-step progress

Run label compensation only when its original effect is confirmed

Practice briefTaskAdvanced

A cancellation request races label issuance and attempts to void a label that may not exist yet.

Focused work estimate
3h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
Compensation · Concurrency

Estimated field mix

  • Distributed systems60%
  • Integrations40%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Pattern topics

  • SagaApply

    Compensate only the confirmed label generation when cancellation races issuance; preserve uncertainty instead of treating a lost response as a failed effect.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional equipment-rental service approves returns through several provider calls. Partial failures leave labels issued without inspections or refunds reported before provider confirmation.

Setup prerequisites

  • Create synthetic return records and fake inspection, shipping and refund adapters.
  • Use integer money values and no real payments or messages.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Persist cancellation intent independently of provider completion.
  • Compensate only the confirmed current label generation.
  • Keep failed or unknown compensation visible for retry.

Implementation constraints

  • Never mark a return fully cancelled solely because a compensation request was sent.

Verification to include

  • Cancel after confirmed issuance and record confirmed voiding.
  • Cancel during unknown issuance and wait for reconciliation before compensation.

Deliverables

  • Cancellation/compensation state transitions

Rollout and recovery

Canary cancellation on fake providers; retain unresolved operations for bounded reconciliation.

Value of the work

For the engineer: Practice durable workflow state, compensation and uncertain outcomes.

For the team: Review recoverable business operations without assuming distributed transactions.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.