Ticket lifecycle sweeps, dry run by default (POST)
const url = 'https://example.com/api/cron/stale-in-progress?dry_run=0';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"dry_run":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/cron/stale-in-progress?dry_run=0' \ --header 'Content-Type: application/json' \ --data '{ "dry_run": 1 }'Scheduled hourly as the stale-in-progress stage of the Slipstream hourly-sweeps
schedule (scripts/cron-stale-in-progress.sh, which sends dry_run=1 unless
TICKET_LIFECYCLE_LIVE=1). Same behaviour and parameters as GET; dry_run may also
be sent as a JSON body field ({"dry_run": 0}), the query string winning when both
are present. Protected by CRON_SECRET via the x-cron-secret header.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Dry run is the DEFAULT. Only 0 runs the lifecycle sweeps for real; 1, an empty value, any other value and an absent parameter all count and sample without writing.
Request Body
Section titled “Request Body ”Responses
Section titled “ Responses ”Lifecycle sweep result
object
AND of the three sweeps’ ok. The best-effort retention sweep never affects it.
True unless the caller sent an explicit dry_run=0.
object
False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.
Candidate rows read.
Tickets closed, moved or archived (in a dry run, the tickets that would be).
Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.
True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.
Up to 25 tickets the sweep acted on or skipped.
object
Closed | would_close | returned | would_return | archived | would_archive | skipped
object
False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.
Candidate rows read.
Tickets closed, moved or archived (in a dry run, the tickets that would be).
Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.
True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.
Up to 25 tickets the sweep acted on or skipped.
object
Closed | would_close | returned | would_return | archived | would_archive | skipped
object
False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.
Candidate rows read.
Tickets closed, moved or archived (in a dry run, the tickets that would be).
Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.
True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.
Up to 25 tickets the sweep acted on or skipped.
object
Closed | would_close | returned | would_return | archived | would_archive | skipped
object
Missing or invalid CRON_SECRET