Repository navigation
Conversation
This was referenced Oct 29, 2026
Open
…pen alarms A PR that GITHUB_TOKEN opens or pushes gets pull_request runs held for approval (#240 sat with CI action_required), while a workflow_dispatch run needs none. ci.yml now takes workflow_dispatch, and hack/bot-ci-dispatch runs it on each same-repo autobump/* branch opened by github-actions[bot] that has no run at its head, re-running a first-attempt failure once. It keeps one bot ci.yml run in flight (BOT_CI_MAX_INFLIGHT) and defers while a human PR's CI is queued, since one run is about 39 jobs against a 20-40 job pool. The three nightly PR jobs call it after create-pull-request, and the new hourly 'Bot sweep' workflow (job ci-fill) fills in what they deferred. hack/autobump-branch-reset generalises the digest job's stale-branch step to all three PR jobs: a bump branch whose workflow files differ from main's is deleted before create-pull-request, whose force-push GitHub would refuse. The merge gate's checks move to hack/gate_lib.sh. ci_status reads ci.yml at a SHA through a pull_request run or a dispatch run on the PR branch; once the dispatched run is green, held entries of 'CI' and 'Auto-merge Dependabot PRs' no longer block. base_ok ignores release-only bot commits on main, so the three release commits per launcher release no longer force a sync. The gate prints every open ci-alarm issue and refuses (exit 4) a PR that changes .github/ or shipped paths while one is not acked; ledger, docs, bench and test PRs are never refused. ci.yml gains a last job, alarms, which warns on every open ci-alarm issue and on a missing, disabled or quiet Watchdog workflow, and never fails. dependabot-auto-merge.yml is deleted: it ran gh pr merge --auto on an unprotected main, merged nothing in 500 runs, and held a run on every bot PR.
…top on an unreadable run pool
88plug
force-pushed
the
claude/fresh-bot-pr-ci
branch
from
October 30, 2026 00:20
e72ade5 to
c2ffee0
Compare
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.
Bot PRs get real CI without a manual approval, the merge gate accepts that CI, and open alarms are printed wherever the gate or CI runs. This is the bot-pr-ci part of the freshness CI/CD design. It uses GITHUB_TOKEN only.
Why
GitHub holds pull_request runs on a PR that GITHUB_TOKEN created or updated: they wait for approval with conclusion
action_requiredand run no jobs. That is how #240 sat with CI held while only CodeQL ran. Aworkflow_dispatchrun is never held. ci.yml has no event-specific logic, so a dispatched run on the PR branch tests the same head.What changes
ci.yml
workflow_dispatchtrigger. Its concurrency key falls back toci-<sha>, and dispatched runs are never cancelled.alarms. It prints one::warning::per openci-alarmissue, with its URL and whether it carriesalarm-ack. It also warns when theWatchdogworkflow is missing, disabled, or has had no successful run in 3 h.alarmsjob reads issues and actions only. It cannot fail CI: the script exits 0 and the job is continue-on-error.tests/bot_ci_dispatch_test.shin the detection-tests job.hack/bot-ci-dispatch
[--branch B] [--workflow ci.yml]autobump/*branches whose author is github-actions[bot]. It never touches forks or human branches.BOT_CI_MAX_INFLIGHTbot runs (default 1) are queued or running at once. It does nothing while a ci.yml run of a human PR is queued, so bot CI cannot starve the 20-40 job pool.headBranchnull) counts as a human run. An unreadable run pool stops the script with exit 1 rather than dispatching blind.hack/autobump-branch-reset
<branch>autobump/<name>on origin when its.github/workflowsdiffer from main's. Otherwise create-pull-request's force-push from GITHUB_TOKEN is refused once this PR changes ci.yml.autobump/.build-and-push.yml
autobump-branch-resetbefore create-pull-request andbot-ci-dispatch --branchafter it, under the sameif:.actions: write.gh run list -w ci.yml -e workflow_dispatch -b <branch>)..github/workflows/bot-sweep.yml ('Bot sweep')
bot-sweep.ci-fillrunshack/bot-ci-dispatchto fill in what the nightly deferred. Later parts add theknown-issuesandmergejobs.hack/gate_lib.sh (new) and hack/gate_merge.sh
READ,RUNS,code,base_okandrules_stalemove togate_lib.sh.rules_staleandcodeare byte-identical to the old copies.ci_status <sha> <branch>printsgreen|pending|failed|none. It looks at ci.yml at the SHA through a pull_request run or a workflow_dispatch run on that branch, and the latest completed run decides. Held runs are not counted as attempts; held runs alone count as failed, as before.ACTION_REQUIREDentries of 'CI' and 'Auto-merge Dependabot PRs' no longer block, in either the rollup or the run list. A held run with no dispatched run still exits 1, so human fork PRs are unchanged.base_oknow ignores release-only bot commits on main. These are commits with arelease: ... [skip release]subject, authored by 88plug-bot or github-actions[bot], that touch only the release files (and only theVERSION="..."line of scripts/k3d-gpu). The three bot commits of each release no longer force a sync.alarm-ack, it exits 4 on a PR that changes.github/or a shipped path, both at the start and again just before the merge. It prints the alarm URLs andgh issue edit N --add-label alarm-ack.hack/release-pathsonce it exists.gate_lib.shnext to itself first, then in the repository'shack/. A scratchpad copy of the gate alone therefore still works from a checkout of main.Deleted: .github/workflows/dependabot-auto-merge.yml
gh pr merge --autoon a main with no required checks.README: one sentence on where a bump PR's CI comes from.
Owner action needed
Issues are disabled on this repository (
has_issues: false), so no ci-alarm issue can exist yet. Until Issues are enabled in Settings > General > Features:WARNING: could not list the open ci-alarm issues (the '88plug/k3d-gpu' repository has disabled issues); the alarm check was skipped;The alarm part (P1) needs Issues on as well. Nothing in this PR changes repository settings.
Tests (all run locally on this branch, rebased on 74ff63e)
Tests first. The new gate cases were run against main's hack/gate_merge.sh: 12 of them fail there for the expected reasons (no dispatched-run acceptance, held runs terminal, a release-only base forces a sync, alarms ignored, no library lookup) and 55 pass.
CI on this head (c2ffee0). ci.yml pull_request run 40979116002 is green on attempt 2. Attempt 1 had one failure, in a test this PR does not touch: tests/crescent_hold_test.sh, "TERM during the slotted gate's busy wait stops the hold at once" (hold.sh was still running 10 s after TERM on the runner). It passed on the re-run of that job, locally, and on main. It looks timing-sensitive on a loaded runner.
New gate cases
gate_lib.sh: 11 cases.[skip release]syncs.GATE_RELEASE_PATHSpatterns are honoured;Wiring test
if:, withactions: write.alarmsjob's own script runs against a fake gh: two alarms, no Watchdog, a stale Watchdog, a Watchdog that never succeeded, a disabled Watchdog, and gh down.Live read-only checks
hack/bot-ci-dispatchagainst the repo: no open github-actions[bot] PR from an autobump/ branch today, exit 0, nothing dispatched.ci_evalfrom gate_lib.sh on live heads:green(pull_request run, success);failed(held runs alone);green.RUNSon 7bf76ba givesfailed CI=action_required,...without held_ok andgreenwith it.open_alarmsfails with "the '88plug/k3d-gpu' repository has disabled issues", which the gate turns into the warning above.Post-merge checks (eyes-on)
gh run list -w ci.yml -e workflow_dispatch -b <branch>.Known limits and still unverified
Docs=action_required. Only 'CI' and 'Auto-merge Dependabot PRs' are excused, as specified. Until a later part dispatches Docs too, approving that one held run clears it; the App token upgrade removes the hold.pulls/N/filescall at the same time.