Repository navigation
ci: run CI on merge groups, and drop the Codecov upload token - #469
Merged
Merged
Conversation
A merge queue grades the merge commit it builds against the same required checks the pull request carries. A check whose workflow has no `merge_group` trigger never reports there, and that is a hang rather than a failure: the entry waits out the status-check timeout and is evicted. codeql.yml gets no `merge_group` trigger. Its analysis would run there, but the code-scanning roll-up check that branch protection names reports only in a pull-request context (github/codeql-action#1537, open and last confirmed 2026-05-22), so the build would gate nothing. Switching the queue on therefore means dropping `CodeQL` from the required contexts, where the ruleset's `code_scanning` rule goes on carrying it for pull requests.
The action's `use_oidc` input takes the job's own short-lived OIDC token and ignores any token supplied, so `CODECOV_TOKEN` stops being a credential worth stealing. Every same-repo pull request already ran this workflow with that secret in reach; a merge queue widens the set of authors who can reshape the job around it. The coverage job declares `id-token: write` for it, alongside the `contents: read` that job-level permissions otherwise drop. Fork pull requests are unaffected: the action skips OIDC when the head is a fork, which leaves them on the tokenless path an empty `secrets.CODECOV_TOKEN` already gave them. No step in the composite action carries `continue-on-error`, so a job that asks for OIDC without the permission to mint a token fails its upload step, the coverage job, and the aggregate gate behind it — with an error that names neither the input nor the permission.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #469 +/- ##
=======================================
Coverage 86.13% 86.14%
=======================================
Files 168 168
Lines 31409 31409
Branches 4591 4591
=======================================
+ Hits 27055 27056 +1
+ Misses 3440 3439 -1
Partials 914 914 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 19, 2026
kfox
added a commit
that referenced
this pull request
Sep 19, 2026
Merge queues are organization-gated. GitHub's gated-features text: "Pull request merge queues are available in any public repository owned by an organization, or in private repositories owned by organizations using GitHub Enterprise Cloud." kfox/c64cast is owned by a personal account, so no ruleset can enable one, and the rule is absent from the Rulesets UI. #469 added the trigger and a guard pinning it, on the assumption that enabling the queue was a settings change away. Both go, along with the docstring paragraph describing an eviction behavior nothing here can reach. CONTRIBUTING.md names the two triggers again. #469 replaced them with a pointer to ci.yml rather than enumerate a third; the clause it replaced had said "on every push", which the `branches: [main]` filter already made wrong.
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.
Two changes that make a merge queue workable here.
ci.ymlgains amerge_group:trigger. A queue grades the merge commit itbuilds against the same required checks the pull request carries, so a check
whose workflow does not trigger there never reports — which is a hang rather
than a failure: the entry waits out the status-check timeout and is evicted.
The Codecov uploads move from
CODECOV_TOKENto the job's own short-livedOIDC token. A queued pull request runs the workflow file from its own merge
commit on a base-repo ref, which widens the set of authors who can reshape the
job that holds a long-lived credential.
Enabling the queue is a settings change this branch cannot make
In this order, after merge:
CodeQLfrom the required status checks. The code-scanningroll-up check does not report on merge groups
(github/codeql-action#1537,
still open), so a queue that requires it stalls every entry until the
timeout evicts it. The ruleset's
code_scanningrule goes on covering pullrequests.
pypienvironment's deployment branches to tags (v*), asgithub-pagesalready restricts tomain.pypicurrently hasprotection_rules: []and no branch policy, andrelease.yml'spublish-pypijob declares that environment withid-token: writeandpublishes to PyPI by trusted publishing. Under a queue, a pull request could
add
merge_group:torelease.ymland strip that job'sif:; PyPIvalidates the workflow filename and the environment, and both would match.
Queuing needs write access, so this is a precondition rather than a live
hole — but no in-file guard can substitute, since the same merge commit owns
the file that would carry it.
merge_queuerule.Worth looking at closely
The Codecov step on this PR's own run. If the server declines the OIDC token,
fail_ci_if_error: falseswallows it and nothing goes red, and neithercodecov/patchnorcodecov/projectis a required context. Confirm those twopost before deleting the
CODECOV_TOKENrepository secret; nothing in the treereferences it any more.