Sweep every still-open task whose CPT has passed and report it as missed
POST/cpt-miss-sweeps
The Clock-driven half of the promise feedback loop with order-management (ADR 0014 §5, this service's own ADR-0025): scans every task still open (Pending or Claimed — i.e. not Completed) and, for each whose CPT is at or before now, publishes TaskCPTMissed. Unlike /task-lease-expirations, this never mutates the task's own lifecycle state — a CPT miss is a fact reported upstream, not a state transition. A collection-level action on the tasks resource, mirroring /task-lease-expirations's own convention exactly. Not idempotent in the usual sense by design: a task still open past its CPT is reported again on every sweep pass for as long as it remains open — order-management's RepromiseOrder consumer is explicitly designed (ADR 0014 §5) to be idempotent on (orderId, sourceEventId) because of this. Takes no request body.
Request
Responses
- 200
- 400
- 409
- 500
Sweep completed; body reports how many tasks were reported as CPT-missed.
Response Headers
Present, with the value true, ONLY when this answer is the stored replay of an earlier request that used the same Idempotency-Key (the handler did not run again). The first execution never carries it.
The Idempotency-Key header is missing (idempotency-key-required) or not 1-128 printable ASCII characters (idempotency-key-invalid) on a POST, or the request body could not be read or contains a NUL character (malformed-request-body), or the request body is malformed JSON, a required field is missing or empty, or a field value is invalid (e.g. a task type outside the TaskType enum).
The Idempotency-Key was already used with a different method, path or body (idempotency-key-reused). Use a new key for a genuinely different request. Distinguished from a business conflict by the problem type.
An unexpected server-side failure (e.g. a repository or event-publisher error).