Repository navigation
Conversation
Dequeueing, admin-merging or closing a pull request drops it from the develop merge queue but does not cancel the merge-group run GitHub already started, so that run keeps holding self-hosted runners for a verdict nothing will read: run 37093098790 ran 9 jobs for #404 after #404 had merged. The janitor only swept the head ref, which never names that branch. It now also cancels queued and in-progress runs whose branch starts with `gh-readonly-queue/<base>/pr-<number>-`, built from the event's own base ref and PR number through `env:` — no `github.*` context reaches the shell — and filtered in jq off one `gh run list --json databaseId,status,headBranch --limit 100`. The fork, develop/main-head and self-run guards are unchanged. Evidence: - `pnpm exec vitest run scripts/__tests__/ci-structure.spec.ts scripts/__tests__/ci-efficiency.spec.ts` — the janitor case now pins the env-built prefix and the `startswith` filter: red on the old workflow (1 failed | 134 skipped), green on the new one (182 passed). - `pnpm lint` clean. - The step's shell, extracted and run against a stub `gh`, cancelled the head ref's in-progress run plus both of PR 404's queued/in-progress merge-group runs, and spared a completed run, a `main`-based group, another PR's group, `pr-4040` and the janitor's own run id.
jonit-dev
enabled auto-merge
October 3, 2026 05:02
Contributor
Author
|
Folded into #409 (one PR for the CI follow-ups). |
auto-merge was automatically disabled
October 3, 2026 05:13
Pull request was closed
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.
Closing or admin-merging a PR drops it from the develop merge queue, but the merge-group run GitHub already started keeps going — run 37093098790 held 9 self-hosted jobs for #404 after #404 merged, and the janitor only ever swept the head ref, which never names that branch.
The cancel job now also sweeps queued/in-progress runs whose branch starts with
gh-readonly-queue/${BASE_REF}/pr-${PR_NUMBER}-, built from the event throughenv:and filtered in jq off onegh run list --json databaseId,status,headBranch --limit 100. Fork, develop/main-head and self-run guards unchanged.Evidence: the janitor case in
scripts/__tests__/ci-structure.spec.tspins the env-built prefix and thestartswithfilter — red on the old workflow (1 failed), green on the new one (182 passed withci-efficiency.spec.ts);pnpm lintclean; the step shell smoke-tested against a stubghcancelled both of PR 404's group runs and spared a completed run, amaingroup, another PR's group and its own run id.