Sweep Codex Results
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
Inspect the data fetches, transforms, gates, and output this recipe runs.
Settings
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.