ci: add a concurrency group to xma2-decoder.yml (CI-XMA2-CONCURRENCY) #608
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/608"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.ymlis the only workflow in.github/workflows/without a top-levelconcurrency:block. It runs onwindows-latest, so a superseded pull request run keeps a Windows runner busy until it finishes.This adds the same block
ci.ymluses, with the group prefixxma2-decoder-: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_idis unique per run, so a burst of merges cannot replace a queued main run before it starts. This is the shape #771 givesci.yml,jactionlint.yml,no-game-data.ymlandruntime.yml, which leaves this file to this PR. Nothing else in the file changes.The branch is based on origin/main. #595 (
persist-credentials: falseon 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/: printsok.concurrencyof 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.xma2-decoder-pull_request-<n>with different n. A push has no PR number, so it falls through to the run id, givingxma2-decoder-push-<run_id>, a different group for every push.cancel-in-progressis 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:
AI-assisted (Claude Code).
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 withcancel-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).
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 withcancel-in-progress: false. The description was wrong to say a push is never cancelled.24569easwitches the group topull_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.Imported from ubiquitarianism/leonida. Originally posted by TuroYT on 2026-11-24T15:55:35Z.
The
windows-ffijob 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 theconcurrency:block).The link step reports
LNK2019: unresolved external symbol __imp_WaitOnAddress(also__imp_WakeByAddressSingleand__imp_WakeByAddressAll) andLNK1120: 3 unresolved externals. The same error is in the log of theXMA2 decoderrun for the push tomainatd0da7dade(13:44 UTC) and in the run forfeat/acphal-xma2-decoder, somainis red on this job too.Those three functions come from
synchronization.lib, which theclline of that step (ws2_32.lib userenv.lib ntdll.lib) does not list. #877 adds it toruntime/CMakeLists.txtonly; it does not touch this workflow.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:08:52Z.
Native Windows 11 Verification (
24569ea83e) — PASSDiff-audited
.github/workflows/xma2-decoder.yml(+6/-0) and verified merged ontoorigin/main(829530dbd0) on Windows 11 (10.0.26200, Python3.12.10with-I).Results
origin/main,.github/workflows/xma2-decoder.ymlhad noconcurrency:block.#608addsgroup: xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}withcancel-in-progress: ${{ github.event_name == 'pull_request' }}, coalescing superseded pull-request runs per PR number while givingpushruns uniquerun_idgroups somainpush workflows are never canceled by subsequent merges.PR #608merged ontoorigin/main):python -I tests/test_ci_registration.py:Ran 18 tests in 21.886s — OKpython -I tests/test_ci_main_signal.py:Ran 6 tests in 0.002s — OKpython -I tests/test_ci_expected_failures.py:Ran 14 tests in 0.071s — OKpython -I tests/test_no_game_data_workflow.py:Ran 3 tests in 2.015s — OKpython -I tests/test_progress_dashboard_ci.py:Ran 21 tests in 0.195s — OKpython -I scripts/check_no_game_data.py&tests/test_text_write_line_endings.py(3/3):OK.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T01:13:18Z.
Checked
24569ea83merged (no commit) withmain87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only..github/workflows/xma2-decoder.ymlstill parses (1 job). It adds aconcurrencygroup that cancels superseded pull-request runs and keeps every push run.main:test_runner_calls_all_tests.py,test_no_game_data_workflow.py,test_progress_dashboard_ci.pyandtest_runtime_paths.pyall pass.No blocker from my side.
AI-assisted (Claude Code).