ci: skip a push to main that the merge queue already passed (CI-SKIP-QUEUED-PUSH) #3098

Open
github-bot wants to merge 3 commits from github-bot/gh-3098 into main AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-02 10:44 UTC · original
MoonEyes:ci/skip-queued-push → main · +54 −5 · 2 files · 3 commits · open

Claimed in the coordination issue as: CI-SKIP-QUEUED-PUSH (#2570)

Depends on: #2930 (touches the same change-scope and job if: lines; whichever merges second is rebased)

What and why

The merge queue fast-forwards main to the exact commit it tested (merge method MERGE), so the CI run on each push to main repeats a green merge_group run on the same SHA. From 1 December 22:15 to 2 December 10:00 UTC, all 25 push runs of CI were on a SHA that had already passed CI in the queue: 424 runner minutes, on the same runners the queue's jobs wait for (their p90 wait was 3.5 to 6 min).

change-scope now also runs on push. It asks the Actions API whether ci.yml already succeeded in merge_group for $GITHUB_SHA (up to three tries, 10 s apart, because the queue can move main a few seconds before its run is marked complete). Only then are check, linux-python-and-viewer and semantic-tests skipped.

Same safety as before:

  • a direct push, a failed or missing queue run, or an API error leaves queue-tested false and every job runs;
  • pull requests, the merge queue, the daily scheduled run and workflow_dispatch are unchanged;
  • no-game-data and the D3D12 workflow are untouched.

Tested

  • python -I tests/test_ci_registration.py (18 OK), tests/test_runner_calls_all_tests.py, tests/test_progress_dashboard_ci.py, tests/test_no_game_data_workflow.py: OK.
  • The API query was run by hand on a recent push SHA: it returns 1 for the merge_group run of ci.yml.
  • Measurements: 674 runs read with gh api (300 pull request, 74 merge queue, 300 push).
  • actionlint was not available locally; jactionlint runs on this pull request.

GPUs tested: n/a

AI-assisted: yes (Claude Opus 5.5; a separate read-only reviewer agent on Claude Opus 5.5 audited the diff and accepted it, and its one remark, the retry, is included).

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

A .github/ change: a second maintainer has to agree.

🤖 Generated with Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-02 10:44 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3098) `MoonEyes:ci/skip-queued-push` → `main` · +54 −5 · 2 files · 3 commits · open Claimed in the coordination issue as: CI-SKIP-QUEUED-PUSH (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) Depends on: #2930 (touches the same `change-scope` and job `if:` lines; whichever merges second is rebased) ### What and why The merge queue fast-forwards `main` to the exact commit it tested (merge method MERGE), so the CI run on each push to `main` repeats a green `merge_group` run on the same SHA. From 1 December 22:15 to 2 December 10:00 UTC, all 25 push runs of CI were on a SHA that had already passed CI in the queue: 424 runner minutes, on the same runners the queue's jobs wait for (their p90 wait was 3.5 to 6 min). `change-scope` now also runs on push. It asks the Actions API whether `ci.yml` already succeeded in `merge_group` for `$GITHUB_SHA` (up to three tries, 10 s apart, because the queue can move `main` a few seconds before its run is marked complete). Only then are `check`, `linux-python-and-viewer` and `semantic-tests` skipped. Same safety as before: - a direct push, a failed or missing queue run, or an API error leaves `queue-tested` false and every job runs; - pull requests, the merge queue, the daily scheduled run and `workflow_dispatch` are unchanged; - `no-game-data` and the D3D12 workflow are untouched. ### Tested - `python -I tests/test_ci_registration.py` (18 OK), `tests/test_runner_calls_all_tests.py`, `tests/test_progress_dashboard_ci.py`, `tests/test_no_game_data_workflow.py`: OK. - The API query was run by hand on a recent push SHA: it returns 1 for the `merge_group` run of `ci.yml`. - Measurements: 674 runs read with `gh api` (300 pull request, 74 merge queue, 300 push). - actionlint was not available locally; jactionlint runs on this pull request. GPUs tested: n/a AI-assisted: yes (Claude Opus 5.5; a separate read-only reviewer agent on Claude Opus 5.5 audited the diff and accepted it, and its one remark, the retry, is included). ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) A `.github/` change: a second maintainer has to agree. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The merge queue fast-forwards main to the commit it tested, so every push run of
CI repeated a green merge_group run on the same SHA (25 of 25 from 1 to 2
December 2026, 424 runner minutes). change-scope now also runs on push and asks
the Actions API whether ci.yml already succeeded in merge_group for this SHA;
only then are check, linux-python-and-viewer and semantic-tests skipped. A
direct push, a failed or missing queue run, or an API error runs everything.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The merge queue can move main a few seconds before its merge_group run is
marked complete; a single query then misses it and the push reruns all of CI.
Found by the independent review of this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 10:47:29 +00:00
test_jobs_are_not_restricted_to_push_events rejected any `if:` naming the
push event, which also caught change-scope's merge-queue step: that step
skips work on a push, it does not limit a job to pushes. The check now covers
every job but change-scope, and a new case requires the merge-queue shortcut
to stay push-only, so the nightly scheduled run always runs every job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 23:04 UTC · original

VERIFY-3098 — Windows nativo: red then green, y el control hubo que hacerlo con el fichero del padre

Own commit 0f63052bd — tests/test_ci_main_signal.py (+17/−1)
Merge base recent

Ran

python -I tests/test_ci_main_signal.py      Ran 8 tests in 0.03s — OK

Negative control: git apply -R of the commit did not apply (the branch has later commits on the same file), so I used the file from the commit's parent (git show 0f63052bd^:tests/test_ci_main_signal.py):

FAIL: test_jobs_are_not_restricted_to_push_events
Ran 7 tests — FAILED (failures=1)

The modified test bites.

What the change is: the "no job is restricted to push events" check now skips change-scope, which is the one job that legitimately runs on both pull requests and pushes and only decides what the others skip — a check that flags the exception as if it were the bug. And a new test pins the other side of it: change-scope may skip a push the merge queue already passed, but only a push — the daily scheduled run and a manual dispatch still run every job on main. The test parses the workflow YAML rather than trusting a comment.

Why this matters here, of all repositories: a job silently skipped on the nightly snapshot is how main ends up red without anyone seeing it — which is exactly the state main is in tonight (see #2570: leonida-lua's tests have not compiled since 057cc94d8, and two merges landed on it anyway).

What I could not test

  • The workflow on GitHub: the test reads the YAML; whether Actions honours it is a run, and the incident in this repository's CI earlier today is not something I can reproduce locally.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 23:04 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3098#issuecomment-7361528489) ## VERIFY-3098 — Windows nativo: `red then green`, y el control hubo que hacerlo con el fichero del padre | | | |---|---| | Own commit | `0f63052bd` — `tests/test_ci_main_signal.py` (+17/−1) | | Merge base | recent | **Ran** ``` python -I tests/test_ci_main_signal.py Ran 8 tests in 0.03s — OK ``` **Negative control**: `git apply -R` of the commit **did not apply** (the branch has later commits on the same file), so I used the file from the commit's parent (`git show 0f63052bd^:tests/test_ci_main_signal.py`): ``` FAIL: test_jobs_are_not_restricted_to_push_events Ran 7 tests — FAILED (failures=1) ``` **The modified test bites.** **What the change is**: the "no job is restricted to `push` events" check now **skips `change-scope`**, which is the one job that legitimately runs on both pull requests and pushes and only decides what the others skip — **a check that flags the exception as if it were the bug**. And a new test pins the other side of it: **`change-scope` may skip a push the merge queue already passed, but only a push** — the daily scheduled run and a manual dispatch still run every job on `main`. The test parses the workflow YAML rather than trusting a comment. **Why this matters here, of all repositories**: **a job silently skipped on the nightly snapshot is how `main` ends up red without anyone seeing it** — which is exactly the state `main` is in tonight (see #2570: `leonida-lua`'s tests have not compiled since 057cc94d8, and **two merges landed on it anyway**). ## What I could not test - **The workflow on GitHub**: the test reads the YAML; whether Actions honours it is a run, and the incident in this repository's CI earlier today is not something I can reproduce locally. Written with an AI assistant.
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-02 23:28 UTC · original · reviewed

Workflow identity in the push shortcut is a prefix match. I ran the exact Bash step from 0f63052b on 81efe4566 with canned Actions API responses and jq. When the only successful run was from a different workflow whose filename began with ci.yml, the step emitted queue-tested=true. That would skip all three push jobs even though ci.yml itself had no successful run for that SHA. The real ci.yml@main, an unrelated workflow, an empty result, and an API error all behaved as intended.

Could the request use the workflow-scoped actions/workflows/ci.yml/runs endpoint, or compare the complete .path before the optional @ suffix? I tried the exact comparison in the scratch harness and all five cases passed. The five existing CI test files also passed, 53 tests total. GitHub’s workflow-runs API

**@⁠merzleckeier** on GitHub · 2026-12-02 23:28 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3098#pullrequestreview-6160911962) · **reviewed** Workflow identity in the push shortcut is a prefix match. I ran the exact Bash step from `0f63052b` on `81efe4566` with canned Actions API responses and `jq`. When the only successful run was from a different workflow whose filename began with `ci.yml`, the step emitted `queue-tested=true`. That would skip all three push jobs even though `ci.yml` itself had no successful run for that SHA. The real `ci.yml@main`, an unrelated workflow, an empty result, and an API error all behaved as intended. Could the request use the workflow-scoped `actions/workflows/ci.yml/runs` endpoint, or compare the complete `.path` before the optional `@` suffix? I tried the exact comparison in the scratch harness and all five cases passed. The five existing CI test files also passed, 53 tests total. [GitHub’s workflow-runs API](https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs-for-a-workflow)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3098/head:github-bot/gh-3098'
git switch 'github-bot/gh-3098'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3098'
git switch 'github-bot/gh-3098'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3098'
git switch 'github-bot/gh-3098'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3098'
git switch 'main'
git merge --squash 'github-bot/gh-3098'
git switch 'main'
git merge --ff-only 'github-bot/gh-3098'
git switch 'main'
git merge 'github-bot/gh-3098'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3098
No description provided.