Aglet

Triage cancellation races at the job commit boundary

Cancellation can arrive while a job is committing, leaving a status that does not explain whether durable work happened. Triage one occurrence around the commit boundary. Record the cancellation request, commit evidence, worker acknowledgement, output, and final readback so a race is not reduced to button timing.

Establish what is happening

  1. Capture both competing timelines

    Record job ID, cancellation request and acknowledgement, transaction start and commit, worker phase, output write, and terminal status. Use a shared clock or state revision where available. Keep a request received by the worker separate from a request merely accepted by an API.

  2. Read the durable result

    Inspect the committed record, output identity, side effects, and any idempotency or reconciliation marker after the race. Compare a cancel-before-commit case with a cancel-after-commit case. Treat missing readback as unknown rather than interpreting a canceled label as proof of no write.

  3. Find the status mapping break

    Identify where cancellation, commit, and terminal state become one visible status. Check whether a late cancellation overwrites a committed success or leaves the job canceled with effects. Preserve the exact sequence and first contradictory record for the next investigation.

What to carry forward

Return request and commit order, durable effects, acknowledgement semantics, readback, and terminal status for matched races. Classify the scope as pre-commit cancellation, post-commit mapping, unknown outcome, or stale display. Keep the final result unresolved when commit evidence is incomplete.

Technical background: Celery documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow