Skip to content

NR3: redeliver a job once, only while it is still queued - #23

Merged
pullely merged 1 commit into
mainfrom
orun/NR-4-redelivery-dedupe
Sep 30, 2026
Merged

pullely merged 1 commit into
mainfrom
orun/NR-4-redelivery-dedupe

Conversation

@pullely

@pullely pullely commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #19 and #21. On its first successful run the sweeper redelivered the same 40 stranded deliveries three minutes in a row. Each job stayed queued while its first runner booted, so each round launched another runner: about 48 idle instances, which then served orun-cloud#1732's lanes and flattered its start latency.

  • Queued check: before redelivering, the sweeper checks the job is still queued, using an installation token (the App already has Actions: read).
  • Per-job backoff: redeliveries are recorded by job id in /nimbus-runners/redelivery/state. A job is redelivered at most once per 4 minutes and 3 times in total.

Tested against stubbed GitHub and SSM:

  • the exact 19-digit delivery id is posted;
  • not-queued and not-allowed jobs are skipped;
  • the second sweep backs off.

🤖 Generated with Claude Code

When the fixed sweeper first ran it redelivered the same 40 stranded
deliveries three minutes running: each job stayed queued while its first
runner booted, so every round launched another runner (~48 idle instances).

The sweeper now asks GitHub (installation token, Actions: read) whether the
job is still queued, and records each redelivery by job id in an SSM
parameter: at most once per 4 minutes and 3 times in total per job.
Tested against stubbed GitHub and SSM: exact 19-digit ids, not-queued and
not-allowed jobs skipped, the second sweep backs off.

Orun-Task: NR-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullely
pullely merged commit 588804f into main Sep 30, 2026
4 checks passed
@pullely
pullely deleted the orun/NR-4-redelivery-dedupe branch September 30, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants