Repository navigation
Skip empty schedule polls without starting a runner - #114
Open
austenstone wants to merge 3 commits into
Open
austenstone wants to merge 3 commits into
austenstone wants to merge 3 commits into
Conversation
Hourly cron polls ran a 7s job (1 rounded minute) even when no _SCHEDULE_* variable existed. Gate the job on the vars context so empty polls are skipped. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Probe run 38191176460 confirmed the gate: no _SCHEDULE_ var -> job skipped (runner=null), existing APP_ID var -> job ran. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
austenstone
marked this pull request as ready for review
October 12, 2026 02:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hourly
📅 Schedule Workflow Dispatchcron boots a runner every time, even when nothing is scheduled. This gates the job on thevarscontext so empty polls are skipped before a runner is assigned.Schedules are stored as
_SCHEDULE_*repo variables, so if none exist, the poll has nothing to do.workflow_dispatchalways runs.Baseline (last 90 days, 2026-07-13 → 2026-10-11)
schedule+ 20workflow_dispatchactions/workflows/{id}/runs?event=…total_countbasic.ymldispatch in the window (11, all on 2026-08-20 test day);codeql.ymlhad 0started_at→completed_at, last 100 cron polls (Sampled)created_at→started_atceil(exec/60)So about 1,195 runner jobs and rounded minutes per 90 days were spent listing zero variables.
After
Verification:
scheduleonly fires on the default branch, so I verified the gate with a temporary push-triggered probe on this branch, then reverted it. Run 38191176460:contains(toJSON(vars), '"_SCHEDULE_')with no schedule vars → skipped,runner_name=null, 0scontains(toJSON(vars), '"APP_ID"')(an existing var) → ran, which shows the job-levelifcan seevarskeysvarsavailability injobs.<job_id>.ifis documented in context availability.Scope and risk
actionlintis clean before and after.zizmorfindings are unchanged (5 pre-existing: unpinned refs, app-token scope, artipacked, self-repository).if:(owner/repopointing at another repo, wherevarsis the wrong repo's).Canary/rollback: After merge, confirm cron runs show the job as skipped and that a scheduled
basic.ymlstill dispatches at its time. To roll back, delete theif:line.