Repository navigation
ci: dispatch autobump within a minute of a Ruby release - #85
Conversation
GitHub fires the hourly autobump cron only every 8 to 10 hours, so new Rubies waited that long to build. Add a Cloudflare Worker that checks ruby/ruby's releases every minute and dispatches autobump (rubies only) when a release has no recipe yet, with a cooldown so it never stacks runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryAdds a Cloudflare Worker that checks for missing Ruby recipes every minute and starts
No new actionable issues were found. Reviews (3) · Last reviewed commit: "fix(watcher): send the dispatch body as ..." · Reviewed by Greptile |
The newest run can be a queued run that concurrency cancelled while an older run is still working, so look at the last 20 runs, not just one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f412d05. Configure here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Before: new Ruby releases were picked up by the hourly autobump cron, but GitHub drops most of those runs. Since the hourly cron landed on Nov 23 it has fired about every 8 to 10 hours (e.g. Nov 27 05:00, 15:00, 23:25, Nov 28 07:41, 16:51 UTC), so a new Ruby could wait most of a day to start building.
After: a Cloudflare Worker (
watcher/) checks ruby/ruby's releases every minute and dispatches autobump as soon as a release has no recipe, so the build starts within about a minute of the GitHub release. The hourly cron stays as the fallback.No added GitHub Actions usage: the per-minute polling runs on Cloudflare, not Actions. The only Actions runs it starts are the autobump runs a new release needs anyway (plus a retry every few minutes if the tarball reaches cache.ruby-lang.org after the GitHub release). It doesn't add a workflow or a cron; CI only gains a few-second
node --teststep in the existing syntax job.The worker picks missing versions with the same rules as autobump (newest stable per series from 3.2, prereleases of series with no stable yet), ported to JS and tested against the same cases as
test/autobump_check_test.sh. It never stacks runs: it skips while any recent autobump run is queued or running, and waits a cooldown after the last run (3 minutes for a release under 2 hours old; 30 minutes up to a day; after that it leaves the release to the hourly cron and its failure email). Idle cost is two authenticated GitHub API calls a minute.How: autobump gets a
rubies_onlydispatch input so the watcher's runs skip the bundled-gems job. The worker is scheduled-only (workers_dev: false), so there is no public URL that could spend the token.Deploy (one time, not done by this PR): create a fine-grained token for jdx/ruby with Actions read/write and Contents read, then
cd watcher npx wrangler deploy npx wrangler secret put GITHUB_TOKEN🤖 Generated with Claude Code
Note
Medium Risk
Touches the release automation path by dispatching
autobumpwith a GitHub token and changing when bundled-gem updates run; behavior is gated by tests and cooldowns, but misconfiguration could spam dispatches or delay gem bumps.Overview
Adds a Cloudflare Worker (
watcher/) that runs every minute, comparesruby/rubyreleases torecipes/rubies.yml, and dispatches the existingautobumpworkflow when a missing version would be added under the same rules as autobump (ported inversions.mjs, tested againstautobump_check_test.sh). It avoids duplicate runs by honoring in-flight workflows, age-based cooldowns (3 min / 30 min / defer to hourly cron), and only postsrubies_only: truedispatches.Autobump gains a
workflow_dispatchrubies_onlyinput so watcher-triggered runs skip thebundled-gemsjob; the hourly cron remains documented as fallback. CI’s syntax job runsnode --test watcher/test/*.test.mjs, and.wrangler/is gitignored for local Wrangler deploys.Reviewed by Cursor Bugbot for commit 57b1029. Bugbot is set up for automated code reviews on this repo. Configure here.