Retry, Resume, Cancel

Summary

Retry, resume, and cancel are operational controls over persisted work, not private branches inside a job function.

Problem

Automation fails in partial states. Operators need safe ways to retry failed work, resume after repair, or cancel stale queued work without guessing which side effects already happened.

Principle

Make control actions explicit and state-aware. A retry should know the prior run, a resume should know the repaired dependency, and a cancel should leave an auditable transition.

Platform Shape

Job control routes live under app/api/jobs/routes/control.py. Execution services enqueue and dispatch work, while ops execution-state services preserve the run history and current state. Domain-specific retry semantics still belong in the domain service or job helper, not in generic runtime code.

Source Evidence

  • docs/reference/job-execution-modes.md
  • app/api/jobs/routes/control.py
  • services/execution/jobs
  • services/ops/execution_state/jobs
  • docs/engineering/concepts/idempotency-in-operational-jobs.md
  • docs/engineering/concepts/failures-are-data.md