Skip to main content

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​

Sweep completed; body reports how many tasks were reported as CPT-missed.

Response Headers
    Idempotency-Replayed

    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.