Skip to content

Ticket lifecycle sweeps, dry run by default (POST)

POST
/cron/stale-in-progress
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.

dry_run
string
Allowed values: 0 1

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.

Media type application/json
object
dry_run
One of:
integer

Lifecycle sweep result

Media type application/json
object
ok
required

AND of the three sweeps’ ok. The best-effort retention sweep never affects it.

boolean
dry_run
required

True unless the caller sent an explicit dry_run=0.

boolean
closing_line_close
required
object
ok
required

False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.

boolean
dryRun
required
boolean
scanned
required

Candidate rows read.

integer
acted
required

Tickets closed, moved or archived (in a dry run, the tickets that would be).

integer
skipped
required

Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.

integer
errors
required
integer
truncated
required

True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.

boolean
samples
required

Up to 25 tickets the sweep acted on or skipped.

Array<object>
object
ticketId
required
string
number
required
integer | null
action
required

Closed | would_close | returned | would_return | archived | would_archive | skipped

string
reason
string
in_progress_return
required
object
ok
required

False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.

boolean
dryRun
required
boolean
scanned
required

Candidate rows read.

integer
acted
required

Tickets closed, moved or archived (in a dry run, the tickets that would be).

integer
skipped
required

Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.

integer
errors
required
integer
truncated
required

True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.

boolean
samples
required

Up to 25 tickets the sweep acted on or skipped.

Array<object>
object
ticketId
required
string
number
required
integer | null
action
required

Closed | would_close | returned | would_return | archived | would_archive | skipped

string
reason
string
stale_archive
required
object
ok
required

False when a read the sweep depends on failed, or the sweep threw. A truncation never sets it.

boolean
dryRun
required
boolean
scanned
required

Candidate rows read.

integer
acted
required

Tickets closed, moved or archived (in a dry run, the tickets that would be).

integer
skipped
required

Eligible tickets left alone — a lost race, a refused write, or a read that failed closed.

integer
errors
required
integer
truncated
required

True when the per-tick cap, the shared deadline or the scan cap stopped the sweep before every candidate was seen.

boolean
samples
required

Up to 25 tickets the sweep acted on or skipped.

Array<object>
object
ticketId
required
string
number
required
integer | null
action
required

Closed | would_close | returned | would_return | archived | would_archive | skipped

string
reason
string
agent_notification_retention
required
object
ok
required
boolean

Missing or invalid CRON_SECRET