Skip to content

Merge backstop sweep (POST) — cronmergebackstoppost

POST
/cron/merge-backstop
curl --request POST \
--url 'https://example.com/api/cron/merge-backstop?dry_run=1&catch_up=1&pages=1'

Scheduled hourly as the merge-backstop stage of the Slipstream hourly-sweeps schedule (scripts/cron-merge-backstop.sh, which pages on nextCursor). The pg_cron job merge-backstop (supabase/migrations/20261016030000_chore_cron_jobs.sql, scheduled inactive until HO-18167) posts ?pages=2, running both pages in one request. Same parameters as GET.

dry_run
string
Allowed values: 1

Classify and report without writing any merge-close.

catch_up
string
Allowed values: 1

Widen the pass (200 tickets, 30 pushes per project, 7-day PR lookback) for a backlog drain.

before
string format: date-time

Keyset cursor — only tickets with updated_at strictly before this timestamp; take it from a previous response’s nextCursor.

pages
integer
default: 1 >= 1 <= 2

Ticket-sweep pages to run in this request (HO-18165). Each page after the first continues from the previous page’s nextCursor and runs only the ticket sweep; all pages share one sweep deadline. The response reports the pages run and the LAST page’s truncated/nextCursor.

Backstop run result

Media type application/json
object
ok
required
boolean
dryRun
required
boolean
catchUp
required
boolean
pages

Ticket-sweep pages this request ran (HO-18165); at most the pages asked for.

integer
truncated
required

True when the LAST ticket-sweep page stopped before every candidate was seen (full page or deadline).

boolean
nextCursor
required

The last page’s cursor; pass back as before to continue paging; null when nothing remains.

string | null
earlierSweeps

The sweepUnmergedTickets counters of every page BEFORE the last, in order (the last page is sweep); empty for a one-page request; a null entry is a page that threw.

Array<object | null>
repair

RepairMergedRolesWhereMergedAtSet counters.

object
key
additional properties
any
sweep

The last page’s sweepUnmergedTickets counters; null when that page threw.

object | null
prSweep

SweepRecentGithubPrs counters; null when that sweep threw.

object | null

Malformed before cursor (INVALID_CURSOR) or pages outside 1..2 (INVALID_PAGES)

Missing or invalid CRON_SECRET