You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-queue: a gate pass older than the PR's latest comment should not count #93
Follow-up from the #85 security quick check (#85 (comment), note n3).
When comment spam spends both the job token's REST and GraphQL limits, a gate run that should revoke a pass on the same head (a new NOT SAFE lens comment, a deleted override, a switch to draft) posts nothing. The older pass stays the newest check and the merge queue can merge on it (the queue uses its own token, so the spam does not slow it). A new head never reuses an older pass.
Cost to cause: about a thousand comment events in an hour from people allowed to comment (collaborators only on this fork). Very visible.
Proposed fix: the pr-queue counts a gate pass only if it was posted after the PR's latest comment / ready-state change. Otherwise the queue waits for the next gate run.
Closing: the main case is already covered by the gate, and the proposed queue rule would cost more than it closes (measured in #283, merged cd16b60, section "Not fixed here").
Already covered.head_gate.start() (fork-ci/actions/head-check/head_gate.py) posts an in-progress check run on the head, with the gate App's token, before it reads any comment. As the newest check run of that name it voids the older pass at once, whatever happens to the run after that (spent job-token limits included). So a revoking event (new NOT SAFE lens comment, deleted override, switch to draft) that starts a gate run removes the old pass even if the run then cannot read or post its verdict.
What is left. A gate run that never starts or cannot post the in-progress check (the App's own limit spent too, or Actions dropping the event). Reviews and inline review comments do not start the gate at all: that is head gate: reviews and inline review comments do not re-run the gate #88.
Why not the queue rule. The queue does not merge on the pass (GitHub auto-merge does, for an armed up-to-date PR). The queue rule would only bite if the queue disarmed up-to-date PRs, which it can only do when it runs (each push to main, every 15 min), cannot see deleted comments, and would disarm PRs in the normal seconds between any comment and the gate run it starts.
Reopen if a run that never starts turns out to matter in practice.
Activity
scuttletoby commentedon Nov 17, 2026
Closing: the main case is already covered by the gate, and the proposed queue rule would cost more than it closes (measured in #283, merged cd16b60, section "Not fixed here").
head_gate.start()(fork-ci/actions/head-check/head_gate.py) posts an in-progress check run on the head, with the gate App's token, before it reads any comment. As the newest check run of that name it voids the older pass at once, whatever happens to the run after that (spent job-token limits included). So a revoking event (new NOT SAFE lens comment, deleted override, switch to draft) that starts a gate run removes the old pass even if the run then cannot read or post its verdict.Reopen if a run that never starts turns out to matter in practice.