ci: add a concurrency group to xma2-decoder.yml (CI-XMA2-CONCURRENCY) #608

Merged
TuroYT merged 2 commits from upstream-pr/608 into main 2026-11-29 20:41:55 +00:00
TuroYT commented 2026-11-24 09:53:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TuroYT on 2026-11-24T09:53:19Z.


Claimed in the coordination issue as: CI-XMA2-CONCURRENCY (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7127997219)

xma2-decoder.yml is the only workflow in .github/workflows/ without a top-level concurrency: block. It runs on windows-latest, so a superseded pull request run keeps a Windows runner busy until it finishes.

This adds the same block ci.yml uses, with the group prefix xma2-decoder-:

  • group: xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
  • cancel-in-progress: ${{ github.event_name == 'pull_request' }}

A pull request cancels its superseded run. A push gets its own group, because run_id is unique per run, so a burst of merges cannot replace a queued main run before it starts. This is the shape #771 gives ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml, which leaves this file to this PR. Nothing else in the file changes.

The branch is based on origin/main. #595 (persist-credentials: false on checkout) was still open when this branch was made. Its hunk is elsewhere in the same file, so the two do not overlap.

Tested:

  • python3 -I -c "import yaml,glob; ..." parses every file in .github/workflows/: prints ok.
  • The parsed concurrency of xma2-decoder.yml is the expected mapping, and the top-level keys are name, on, permissions, concurrency, jobs.
  • git diff --check: clean. git diff --numstat: 5 added lines, 0 removed.
  • python3 -I tests/test_ci_registration.py: 15 tests OK.
  • python3 -I tests/test_no_game_data_workflow.py: 3 tests OK.
  • python3 -I tests/test_runtime_paths.py: 5 tests OK.
  • python3 -I tests/test_pr_conflict_label.py: 12 tests OK.
  • python3 -I scripts/check_no_game_data.py .github/workflows/xma2-decoder.yml: exit 0.
  • Group expression, worked through by hand and not executed: two different PRs give xma2-decoder-pull_request-<n> with different n. A push has no PR number, so it falls through to the run id, giving xma2-decoder-push-<run_id>, a different group for every push. cancel-in-progress is false for a push.

Review follow-up: MoonEyes pointed out that the first revision keyed a push on the ref, so two pushes to main shared one group and GitHub, which keeps at most one pending run per group, replaced the queued one. The second commit uses the run id, as #771 does for the other workflows.

Not tested:

  • The workflow itself was not run. There is no way to run GitHub Actions here, and actionlint is not installed. The CI run on this PR is the real check.
  • Cancellation on GitHub was not observed.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5469883734 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/608). Originally posted by [TuroYT](https://github.com/TuroYT) on 2026-11-24T09:53:19Z. --- Claimed in the coordination issue as: CI-XMA2-CONCURRENCY (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7127997219) `xma2-decoder.yml` is the only workflow in `.github/workflows/` without a top-level `concurrency:` block. It runs on `windows-latest`, so a superseded pull request run keeps a Windows runner busy until it finishes. This adds the same block `ci.yml` uses, with the group prefix `xma2-decoder-`: - group: `xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}` - `cancel-in-progress: ${{ github.event_name == 'pull_request' }}` A pull request cancels its superseded run. A push gets its own group, because `run_id` is unique per run, so a burst of merges cannot replace a queued main run before it starts. This is the shape #771 gives `ci.yml`, `jactionlint.yml`, `no-game-data.yml` and `runtime.yml`, which leaves this file to this PR. Nothing else in the file changes. The branch is based on origin/main. #595 (`persist-credentials: false` on checkout) was still open when this branch was made. Its hunk is elsewhere in the same file, so the two do not overlap. Tested: - `python3 -I -c "import yaml,glob; ..."` parses every file in `.github/workflows/`: prints `ok`. - The parsed `concurrency` of xma2-decoder.yml is the expected mapping, and the top-level keys are name, on, permissions, concurrency, jobs. - `git diff --check`: clean. `git diff --numstat`: 5 added lines, 0 removed. - `python3 -I tests/test_ci_registration.py`: 15 tests OK. - `python3 -I tests/test_no_game_data_workflow.py`: 3 tests OK. - `python3 -I tests/test_runtime_paths.py`: 5 tests OK. - `python3 -I tests/test_pr_conflict_label.py`: 12 tests OK. - `python3 -I scripts/check_no_game_data.py .github/workflows/xma2-decoder.yml`: exit 0. - Group expression, worked through by hand and not executed: two different PRs give `xma2-decoder-pull_request-<n>` with different n. A push has no PR number, so it falls through to the run id, giving `xma2-decoder-push-<run_id>`, a different group for every push. `cancel-in-progress` is false for a push. Review follow-up: MoonEyes pointed out that the first revision keyed a push on the ref, so two pushes to main shared one group and GitHub, which keeps at most one pending run per group, replaced the queued one. The second commit uses the run id, as #771 does for the other workflows. Not tested: - The workflow itself was not run. There is no way to run GitHub Actions here, and actionlint is not installed. The CI run on this PR is the real check. - Cancellation on GitHub was not observed. AI-assisted (Claude Code).
MoonEyes commented 2026-11-24 13:56:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-24T13:56:57Z.


The YAML parses and the block matches the other workflows' shape. Two PRs get separate groups (xma2-decoder-pull_request-601 / -602), and a push can never cancel a PR run or the reverse. It also applies cleanly together with #595.

One claim in the description is not accurate: "A push to main ... is never cancelled." Two pushes to main both resolve to xma2-decoder-push-refs/heads/main. GitHub keeps at most one pending run per group, so a queued main run is replaced by a newer one even with cancel-in-progress: false. Only the running build is safe. The inline comment says this correctly; the description does not.

This is the exact pattern #771 removes from ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml, and #771 leaves xma2-decoder.yml to this PR. Suggest using ${{ github.event.pull_request.number || github.run_id }} here so the five workflows stay consistent, or noting in the description that #771 will align it.

Note: the workflow runs on this PR are still action_required, so jactionlint and the XMA2 job have not executed yet.

AI-assisted review (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7133583821 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/608#issuecomment-7133583821). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-24T13:56:57Z. --- The YAML parses and the block matches the other workflows' shape. Two PRs get separate groups (`xma2-decoder-pull_request-601` / `-602`), and a push can never cancel a PR run or the reverse. It also applies cleanly together with #595. One claim in the description is not accurate: "A push to main ... is never cancelled." Two pushes to main both resolve to `xma2-decoder-push-refs/heads/main`. GitHub keeps at most one pending run per group, so a queued main run is replaced by a newer one even with `cancel-in-progress: false`. Only the running build is safe. The inline comment says this correctly; the description does not. This is the exact pattern #771 removes from ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml, and #771 leaves xma2-decoder.yml to this PR. Suggest using `${{ github.event.pull_request.number || github.run_id }}` here so the five workflows stay consistent, or noting in the description that #771 will align it. Note: the workflow runs on this PR are still `action_required`, so jactionlint and the XMA2 job have not executed yet. AI-assisted review (Claude Code).
TuroYT commented 2026-11-24 14:19:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TuroYT on 2026-11-24T14:19:26Z.


Fair point, and thanks for catching it. Two pushes to main did share xma2-decoder-push-refs/heads/main, so a queued run could be replaced even with cancel-in-progress: false. The description was wrong to say a push is never cancelled.

24569ea switches the group to pull_request.number || run_id, the shape #771 gives the other four workflows, with the same comment. The description now says that and no longer claims a push is never cancelled. The YAML still parses and the four workflow-reading tests pass; the workflow itself has not run yet because its checks are waiting for approval.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7134188452 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/608#issuecomment-7134188452). Originally posted by [TuroYT](https://github.com/TuroYT) on 2026-11-24T14:19:26Z. --- Fair point, and thanks for catching it. Two pushes to main did share `xma2-decoder-push-refs/heads/main`, so a queued run could be replaced even with `cancel-in-progress: false`. The description was wrong to say a push is never cancelled. 24569ea switches the group to `pull_request.number || run_id`, the shape #771 gives the other four workflows, with the same comment. The description now says that and no longer claims a push is never cancelled. The YAML still parses and the four workflow-reading tests pass; the workflow itself has not run yet because its checks are waiting for approval.
TuroYT commented 2026-11-24 15:55:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TuroYT on 2026-11-24T15:55:35Z.


The windows-ffi job failed on this PR at "Link and run the synthetic C++ ABI smoke test", and it is not caused by this change (the diff only adds the concurrency: block).

The link step reports LNK2019: unresolved external symbol __imp_WaitOnAddress (also __imp_WakeByAddressSingle and __imp_WakeByAddressAll) and LNK1120: 3 unresolved externals. The same error is in the log of the XMA2 decoder run for the push to main at d0da7dade (13:44 UTC) and in the run for feat/acphal-xma2-decoder, so main is red on this job too.

Those three functions come from synchronization.lib, which the cl line of that step (ws2_32.lib userenv.lib ntdll.lib) does not list. #877 adds it to runtime/CMakeLists.txt only; it does not touch this workflow.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7136842538 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/608#issuecomment-7136842538). Originally posted by [TuroYT](https://github.com/TuroYT) on 2026-11-24T15:55:35Z. --- The `windows-ffi` job failed on this PR at "Link and run the synthetic C++ ABI smoke test", and it is not caused by this change (the diff only adds the `concurrency:` block). The link step reports `LNK2019: unresolved external symbol __imp_WaitOnAddress` (also `__imp_WakeByAddressSingle` and `__imp_WakeByAddressAll`) and `LNK1120: 3 unresolved externals`. The same error is in the log of the `XMA2 decoder` run for the push to `main` at d0da7dade (13:44 UTC) and in the run for `feat/acphal-xma2-decoder`, so `main` is red on this job too. Those three functions come from `synchronization.lib`, which the `cl` line of that step (`ws2_32.lib userenv.lib ntdll.lib`) does not list. #877 adds it to `runtime/CMakeLists.txt` only; it does not touch this workflow.
zmasi commented 2026-11-29 00:08:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:08:52Z.


Native Windows 11 Verification (24569ea83e) — PASS

Diff-audited .github/workflows/xma2-decoder.yml (+6/-0) and verified merged onto origin/main (829530dbd0) on Windows 11 (10.0.26200, Python 3.12.10 with -I).

Results

  • Baseline vs PR:
    • On origin/main, .github/workflows/xma2-decoder.yml had no concurrency: block.
    • #608 adds group: xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }} with cancel-in-progress: ${{ github.event_name == 'pull_request' }}, coalescing superseded pull-request runs per PR number while giving push runs unique run_id groups so main push workflows are never canceled by subsequent merges.
  • CI Workflow & Policy Suites (PR #608 merged onto origin/main):
    • python -I tests/test_ci_registration.py: Ran 18 tests in 21.886s — OK
    • python -I tests/test_ci_main_signal.py: Ran 6 tests in 0.002s — OK
    • python -I tests/test_ci_expected_failures.py: Ran 14 tests in 0.071s — OK
    • python -I tests/test_no_game_data_workflow.py: Ran 3 tests in 2.015s — OK
    • python -I tests/test_progress_dashboard_ci.py: Ran 21 tests in 0.195s — OK
    • python -I scripts/check_no_game_data.py & tests/test_text_write_line_endings.py (3/3): OK.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247908381 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/608#issuecomment-7247908381). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:08:52Z. --- ### Native Windows 11 Verification (`24569ea83e`) — PASS Diff-audited `.github/workflows/xma2-decoder.yml` (`+6/-0`) and verified merged onto `origin/main` (`829530dbd0`) on Windows 11 (`10.0.26200`, Python `3.12.10` with `-I`). #### Results - **Baseline vs PR**: - On `origin/main`, `.github/workflows/xma2-decoder.yml` had no `concurrency:` block. - `#608` adds `group: xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}` with `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`, coalescing superseded pull-request runs per PR number while giving `push` runs unique `run_id` groups so `main` push workflows are never canceled by subsequent merges. - **CI Workflow & Policy Suites (`PR #608` merged onto `origin/main`)**: - `python -I tests/test_ci_registration.py`: **`Ran 18 tests in 21.886s — OK`** - `python -I tests/test_ci_main_signal.py`: **`Ran 6 tests in 0.002s — OK`** - `python -I tests/test_ci_expected_failures.py`: **`Ran 14 tests in 0.071s — OK`** - `python -I tests/test_no_game_data_workflow.py`: **`Ran 3 tests in 2.015s — OK`** - `python -I tests/test_progress_dashboard_ci.py`: **`Ran 21 tests in 0.195s — OK`** - `python -I scripts/check_no_game_data.py` & `tests/test_text_write_line_endings.py` (`3/3`): **`OK`**. AI-assisted.
TheGeogeo commented 2026-11-29 01:13:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T01:13:18Z.


Checked 24569ea83 merged (no commit) with main 87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only.

  • CI only: no local test exercises this, so there is no red/green to show.
  • .github/workflows/xma2-decoder.yml still parses (1 job). It adds a concurrency group that cancels superseded pull-request runs and keeps every push run.
  • The workflow meta-tests give the same result as on main: test_runner_calls_all_tests.py, test_no_game_data_workflow.py, test_progress_dashboard_ci.py and test_runtime_paths.py all pass.

No blocker from my side.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248640916 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/608#issuecomment-7248640916). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T01:13:18Z. --- Checked `24569ea83` merged (no commit) with `main` `87a39df94`: Python 3.12.4, Windows 11 10.0.26300, CPU only. - CI only: no local test exercises this, so there is no red/green to show. - `.github/workflows/xma2-decoder.yml` still parses (1 job). It adds a `concurrency` group that cancels superseded pull-request runs and keeps every push run. - The workflow meta-tests give the same result as on `main`: `test_runner_calls_all_tests.py`, `test_no_game_data_workflow.py`, `test_progress_dashboard_ci.py` and `test_runtime_paths.py` all pass. No blocker from my side. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!608
No description provided.