Skip to content

fix(work-unblock): sweep every 15 minutes so one lands after the token reset - #18731

Draft
kyle-sexton wants to merge 1 commit into
mainfrom
fix/work-unblock-sweep-every-15-min
Draft

kyle-sexton wants to merge 1 commit into
mainfrom
fix/work-unblock-sweep-every-15-min

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: admission starvation diagnosis from the hub's metrics (36 of 68 lane starts budget-stopped in 24 h).

Hold: the 15-minute cadence differs from the owner's approved :16 schedule; it waits on the owner's choice.

Summary

The scheduled work-unblock sweep is the only scheduled path that re-fires deferred issues. It ran at :54 on the assumption that the GITHUB_TOKEN core window resets at :40-:50. The reset minute drifts from day to day, so the sweep now lands late in the window, where the start gate's 21-minute projection stops the starts it would make.

Fix

  • The schedule becomes 4,19,34 * * * * plus 49 * * * *, so one sweep runs within 15 minutes of any reset, whatever minute it drifts to.
  • publish-lane-level (hourly by owner decisions Q111 and Q113) runs only on the 49 * * * * entry, matched with github.event.schedule.
  • The stale comment that fixed the reset at :40-:50 is removed. The reason lives in the commit message.

Basis:

  • Reset minutes from the repository's CI token-call log, 2026-11-10 to 2026-11-24: :38, :48, :53, :58, :14, :18, :22, :34, :42, :46, :50, :56, :12. No fixed minute stays after the reset for more than a few days.
  • A sweep costs 8 to 15 core calls (the same log, 12 runs), so the three extra runs an hour cost about 30 calls, 0.6% of the 5,000 pool.
  • The hourly rotations in label-unblocked.mjs (readmitReady, rescanSplitParents, keyed on the UTC hour) already run several times an hour through the workflow_run sweeps, so extra scheduled sweeps in the same hour change no outcome.
  • publish-lane-level's carry reads the newest scheduled run that kept a lane-level-state artifact, searching up to 10 runs (.github/scripts/pr-merge/rotation.mjs:42-43). With four scheduled runs an hour it skips the three that keep none. That leaves about 2.5 hours of cover before it falls back to the published level, against 10 hours before.

Verification

  • scripts/check-affected.sh --tests on the change: see the run below.
  • After merge: the next scheduled runs start at :04/:19/:34/:49, and only :49 shows a Publish Lane Level job. The hub's budget-stop count should fall below 10% of starts within 24 h.

Related

🤖 Generated with Claude Code

…n reset

The scheduled sweep ran once an hour at :54, on the assumption that the
GITHUB_TOKEN core window resets at :40-:50. The reset minute drifts from
day to day: between 2026-11-10 and 2026-11-24 it sat at :38, :48, :53,
:58, :14, :18, :22, :34, :42, :46, :50, :56 and :12. A :54 sweep now lands
about 40 minutes into the window, where the budget start gate's 21-minute
projection stopped 36 of the last 68 lane starts it reached; the only
re-fire batches that worked followed hand-dispatched sweeps just after the
reset.

Four sweeps a quarter-hour apart (:04, :19, :34, :49) put one within 15
minutes of any reset. A sweep costs 8 to 15 core calls, so the three extra
runs an hour cost about 30 calls, 0.6% of the 5,000 pool. publish-lane-level
still decides once an hour: it runs on the :49 entry only, matched by its
schedule string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant