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

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u origin "github-pr/3098:github-pr/3098"
git switch "github-pr/3098"
Open
leonida/mandy
MoonEyes wants to merge 3 commits from github-pr/3098 into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
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 'github-pr/3098:github-pr/3098'
git switch 'github-pr/3098'
MoonEyes commented 2026-12-02 10:44:02 +00:00

Claimed in the coordination issue as: CI-SKIP-QUEUED-PUSH (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7342924568)

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

Claimed in the coordination issue as: CI-SKIP-QUEUED-PUSH (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7342924568) 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)
fiestorra commented 2026-12-02 23:04:24 +00:00

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.

## 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.
merzleckeier reviewed 2026-12-02 23:28:15 +00:00
merzleckeier left a comment
No description provided.
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)
Sign in to join this conversation.
No description provided.