Skip to content

ci: offset benchmark cron + scaffold dormant CF Worker fallback#36

Merged
arimxyer merged 3 commits into
mainfrom
chore/benchmark-cron-offset
May 11, 2026
Merged

ci: offset benchmark cron + scaffold dormant CF Worker fallback#36
arimxyer merged 3 commits into
mainfrom
chore/benchmark-cron-offset

Conversation

@arimxyer
Copy link
Copy Markdown
Collaborator

Summary

  • Move update-benchmarks.yml cron from */30 * * * * to 13,43 * * * * to dodge GitHub's half-hour-boundary throttling. Run history showed ~50% of slots dropped and overnight gaps of 3–4 hours.
  • Scaffold a Cloudflare Worker at infra/benchmark-trigger/ that can invoke workflow_dispatch on a Cloudflare cron as a fallback if the offset isn't enough. Inactive by defaultwrangler.toml's [triggers] block is commented out, so nothing fires until someone explicitly activates it.

Why

Public repos on round-boundary crons get deprioritized under load. Recent gap pattern (UTC):

Time window Typical gap
13:00–22:00 ~55–75 min
22:00–07:00 2–4 hours
07:00–13:00 1–2 hours

The offset is a free one-line change that typically recovers a meaningful chunk of dropped slots. The dormant worker is the next escalation lever if the offset alone isn't enough — Cloudflare Workers cron triggers fire reliably (sub-minute precision).

The workflow's git diff --quiet data/benchmarks.json && exit 0 step makes duplicate invocations harmless, so once activated, both can fire concurrently without polluting history.

Plan to evaluate

  1. Merge.
  2. Wait ~1 week, then re-run gh run list --workflow=update-benchmarks.yml --limit 50 to compare gap distribution.
  3. If gaps over 2 hours persist (especially overnight), follow infra/benchmark-trigger/README.md to activate the worker. Otherwise leave dormant.

Test plan

  • Worker typechecks (bun run typecheck)
  • Worker bundles via wrangler deploy --dry-run
  • Verify next scheduled run after merge fires on the new :13 or :43 slot
  • Re-evaluate gap pattern after ~1 week to decide on worker activation

🤖 Generated with Claude Code

arimxyer and others added 3 commits May 11, 2026 12:30
GitHub Actions throttles `*/30 * * * *` heavily under load — recent
30-run history shows ~50% of slots dropped and overnight gaps of
3–4 hours. Shifting to `13,43 * * * *` moves us off the contended
boundary and typically recovers most missed slots.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds infra/benchmark-trigger/ — a Cloudflare Worker that can invoke
`workflow_dispatch` on update-benchmarks.yml as a fallback for
GitHub Actions cron throttling. The worker is scaffolded but NOT
deployed: wrangler.toml's [triggers] block is commented out.

Activate only if the offset cron (`13,43 * * * *`) doesn't recover
enough slots. Activation steps and rationale in
infra/benchmark-trigger/README.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI runner upgraded to clippy 1.95.0, which tightened these lints to
errors under `-D warnings`. Both are mechanical auto-fix suggestions
and unrelated to this PR's cron change — applied here to unblock the
merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arimxyer arimxyer merged commit 9f33df3 into main May 11, 2026
3 checks passed
arimxyer added a commit that referenced this pull request May 11, 2026
Uncomment the [triggers] block in wrangler.toml and update the README
status. The worker is now scheduled at `17 * * * *` and deployed at
models-benchmark-trigger.ari111097.workers.dev.

Activated after the offset cron (PR #36) missed its first :43 slot,
suggesting the offset alone wouldn't be enough. The worker uses a
separate code path (workflow_dispatch) that bypasses GH's cron
scheduler, so it should fire reliably even when GH throttles the
scheduled runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant