Skip to content
Recued
Menu
← Back to recipes

Sweep Codex Results

by recued-core v1

D-179 worked example, stage 2 (the sweeper; the scheduled-operate shape). Reconciles queue rows against completion-marker evidence with no dynamic-key reads: it lists rows still in play (state open OR fail_timeout - the latter so a marker that lands just after a timeout still upgrades the row on a later sweep, before the failure handler finalizes it) and the <result_key>.exit.<code> marker files, joins them by result_key membership, and flips each matched row to success (exit 0) or fail (non-zero). A result_key with both a 0 and a non-zero marker (a rare double launch) resolves to success - success wins. Matched markers are consumed here (deleted) so the next sweep is idempotent and downstream handlers stay file-free. An OPEN row past the timeout with no matched marker becomes fail_timeout; a young open row with no marker is left open (skip - reclassified next cycle). A marker that arrives before its row (codex faster than the next kickoff tick) is an orphan this cycle and is left for the next. Once a row is finalized (done / failed_notified by a handler) it is terminal; a marker arriving after that is an accepted orphan.

How it works 31 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (31 steps)
listing ?
reconcilable filter
Filter by condition
guard_rows guard
Stop if reconcilable is empty
open_rows filter
Filter by condition
reconcilable_keys map
Extract from each item
now date_add
Add 0 days to
files ?
markers filter
Filter by condition
split_markers map
Extract path from each item
outcomes map
Extract from each item
matched filter
Filter by condition
succ_outcomes filter
Filter by condition
succ_keys map
Extract from each item
nonzero_outcomes filter
Filter by condition
fail_outcomes filter
Filter by condition
fail_keys map
Extract from each item
matched_keys map
Extract from each item
succ_rows filter
Filter by condition
fail_rows filter
Filter by condition
mark_success ?
mark_fail ?
consume_markers ?
with_age map
Extract value.queued_at from each item
aged_out filter
Filter by condition
stale_rows filter
Filter by condition
mark_timeout ?
open_count count
Count items in open rows
success_count count
Count items in succ rows
fail_count count
Count items in fail rows
timeout_count count
Count items in stale rows
card to_summary
Format results as a summary card
Settings 2 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

timeout minutes setting = 240
result file slug setting =

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

Where it runs

Device + server Runs on your device (browser) or your server.

Data it touches

Warehousedata.shared

About

Tags

codexsweeperreconcilepipelined-179scheduled-operate

Details

31 steps 2 configurable settings recipe_id: sweep-codex-results