tools: skip Ogg Opus outputs that already exist, so a stopped audio e… #2145

Open
github-bot wants to merge 1 commit from github-bot/gh-2145 into main AGit
Owner

@⁠fiestorra on GitHub · 2026-11-25 23:18 UTC · original
fiestorra:awc-skip-existing → main · +54 −9 · 3 files · 1 commits · draft

…xport resumes

awc_opus.py repacked every bank on every run, so a stopped assets run redid the whole Ogg Opus step: on one machine 664,446 .ogg files were already written and the restart began at bank 0. The stage marks the step done only after it finishes, so there was no per-bank resume.

--skip-existing leaves an output that exists alone before packing a music channel or writing a stream's .ogg/.wav, and make_game.py passes it in the audio step. The staged writer publishes atomically, so an existing file is always complete.

Measured on a 1 MB bank with 29 outputs: first export 0.8 s, second with the flag 0.23 s and 0 files rewritten, while the same export without the flag does rewrite them. tests/test_awc_opus.py covers that with the control.

Claimed in the coordination issue as:

Depends on:

Fixes:

What and why

Tested

GPUs tested:

AI-assisted:

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.
**@⁠fiestorra** on GitHub · 2026-11-25 23:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2145) `fiestorra:awc-skip-existing` → `main` · +54 −9 · 3 files · 1 commits · draft …xport resumes awc_opus.py repacked every bank on every run, so a stopped assets run redid the whole Ogg Opus step: on one machine 664,446 .ogg files were already written and the restart began at bank 0. The stage marks the step done only after it finishes, so there was no per-bank resume. --skip-existing leaves an output that exists alone before packing a music channel or writing a stream's .ogg/.wav, and make_game.py passes it in the audio step. The staged writer publishes atomically, so an existing file is always complete. Measured on a 1 MB bank with 29 outputs: first export 0.8 s, second with the flag 0.23 s and 0 files rewritten, while the same export without the flag does rewrite them. tests/test_awc_opus.py covers that with the control. Claimed in the coordination issue as: <!-- the item ID from the open "Coordinating who works on what" issue, for example TEST-17, or a link to your claim --> Depends on: <!-- #N for every pull request this one builds on or conflicts with (see AGENTS.md; the coordination issue lists the open pull requests); delete the line if it builds on none and conflicts with none --> Fixes: <!-- #N for each issue this closes (GitHub closes it on merge); delete the line if it closes none --> ### What and why <!-- What this changes and the problem it solves. --> ### Tested <!-- What you ran and on which GPU and driver (CONTRIBUTING.md). For the shader translator: how many shaders translate and pass spirv-val, before and after. --> GPUs tested: <!-- vendor, model, driver and OS of each GPU the GPU tests ran on, or n/a --> AI-assisted: <!-- yes or no (AGENTS.md asks a coding agent to say so) --> ### 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.
awc_opus.py repacked every bank on every run, so a stopped assets run redid
the whole Ogg Opus step: on one machine 664,446 .ogg files were already
written and the restart began at bank 0. The stage marks the step done only
after it finishes, so there was no per-bank resume.

--skip-existing leaves an output that exists alone before packing a music
channel or writing a stream's .ogg/.wav, and make_game.py passes it in the
audio step. The staged writer publishes atomically, so an existing file is
always complete.

Measured on a 1 MB bank with 29 outputs: first export 0.8 s, second with the
flag 0.23 s and 0 files rewritten, while the same export without the flag
does rewrite them. tests/test_awc_opus.py covers that with the control.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:20:03 +00:00
github-bot force-pushed github-bot/gh-2145 from e1ecca55ee to 99de22f4ea 2026-11-26 11:36:42 +00:00 Compare
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 12:23 UTC · original

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU, no game data). Merges cleanly. With this PR, python -I tests/test_awc_opus.py: 62 tests OK. The PR's test file against main's tools: 1 error, so the new test fails on main and passes with the change. compileall clean.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 12:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2145#issuecomment-7191947945) Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU, no game data). Merges cleanly. With this PR, python -I tests/test_awc_opus.py: 62 tests OK. The PR's test file against main's tools: 1 error, so the new test fails on main and passes with the change. compileall clean. AI-assisted: yes (Claude Code)
Author
Owner

@⁠fiestorra on GitHub · 2026-11-26 14:50 UTC · original

Thanks - that is the third independent verification of this one and the only one on Linux, so it covers the half the two Windows runs could not see.

Recording what it establishes: on main a73a57e1, Ubuntu 24.04 x86-64, Python 3.13, no GPU and no game data, the branch merges cleanly, python -I tests/test_awc_opus.py gives 62 tests OK, compileall is clean, and - the part that matters for a new test - running the PR's test file against main's tools/ gives one error, so the new test fails without the change and passes with it. That is a real before/after, not just "the suite is green".

For the record, the claim in the body is measured on one machine only: a 1 MB bank with 29 outputs, first export 0.8 s, second run with the flag 0.23 s and 0 of 29 files rewritten, while the same export without the flag rewrites them. What that does not prove, and nothing here claims: that the skip is safe for a bank whose outputs are truncated mid-write (the writer publishes each file atomically, which is why an existing file is assumed complete) and that a resumed run over the full 664,446-file export behaves the same - neither has been run.

Nothing to adjust on my side. Thank you for taking the time to run it on the platform where the stage's own resume logic is easiest to get wrong.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-26 14:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2145#issuecomment-7195399019) Thanks - that is the third independent verification of this one and the only one on Linux, so it covers the half the two Windows runs could not see. Recording what it establishes: on `main` `a73a57e1`, Ubuntu 24.04 x86-64, Python 3.13, no GPU and no game data, the branch merges cleanly, `python -I tests/test_awc_opus.py` gives 62 tests OK, `compileall` is clean, and - the part that matters for a new test - running the PR's test file against `main`'s `tools/` gives one error, so the new test fails without the change and passes with it. That is a real before/after, not just "the suite is green". For the record, the claim in the body is measured on one machine only: a 1 MB bank with 29 outputs, first export 0.8 s, second run with the flag 0.23 s and **0 of 29 files rewritten**, while the same export without the flag rewrites them. What that does not prove, and nothing here claims: that the skip is safe for a bank whose outputs are truncated mid-write (the writer publishes each file atomically, which is why an existing file is assumed complete) and that a resumed run over the full 664,446-file export behaves the same - neither has been run. Nothing to adjust on my side. Thank you for taking the time to run it on the platform where the stage's own resume logic is easiest to get wrong. Written with an AI assistant.
github-bot force-pushed github-bot/gh-2145 from 99de22f4ea to 67d19c6892 2026-11-27 07:56:01 +00:00 Compare
Author
Owner

@⁠fiestorra on GitHub · 2026-11-27 07:53 UTC · original

Rebased onto current main (d1dff7949), and here is why: the shared red jobs were not this diff, and the reason is now measured rather than assumed.

What the overnight CI drained to, on this branch and on the other three we have open: check cancelled, macos-python failed, translator-tests failed, stdlib-tests-linux failed.

  • macos-python fails on main too. Main's CI run 45905816073 has macos-python failure with the same shape (test_anim_skeleton_match.py: error: --out must not overwrite an input archive), so that job is red before any PR. Not ours and not fixable from here.
  • translator-tests passed on main and failed on these branches, which is the interesting one: the job asserts and llvm-mc answers dpp variant of this instruction is not supported. That support arrived in main after these branches' base - c5f180751 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP) and its review commit - so a branch based on a73a57e13 carries fixtures that its own translator cannot handle. Rebased onto d1dff7949, tests/semantic/test_dpp_compare.py and test_dpp_bound_ctrl_modifiers.py both run OK on the new head.

New head after the rebase: 67d19c689, MERGEABLE.

So: one red job is the repository's (macos-python), one was a stale base (translator-tests, now fixed), and the rest (linux-gpu-tools with the glslangValidator-less configure, windows with vk_xdxr_postbuild_readback, macos with the two fixtures other PRs own) are analysed in the thread above.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-27 07:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2145#issuecomment-7212921115) Rebased onto current `main` (`d1dff7949`), and here is why: the shared red jobs were not this diff, and the reason is now measured rather than assumed. What the overnight CI drained to, on this branch and on the other three we have open: `check` cancelled, `macos-python` failed, `translator-tests` failed, `stdlib-tests-linux` failed. - **`macos-python` fails on `main` too.** Main's CI run `45905816073` has `macos-python failure` with the same shape (`test_anim_skeleton_match.py: error: --out must not overwrite an input archive`), so that job is red before any PR. Not ours and not fixable from here. - **`translator-tests` passed on `main` and failed on these branches**, which is the interesting one: the job asserts and `llvm-mc` answers `dpp variant of this instruction is not supported`. That support arrived in `main` after these branches' base - `c5f180751 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)` and its review commit - so a branch based on `a73a57e13` carries fixtures that its own translator cannot handle. Rebased onto `d1dff7949`, `tests/semantic/test_dpp_compare.py` and `test_dpp_bound_ctrl_modifiers.py` both run **OK** on the new head. New head after the rebase: `67d19c689`, `MERGEABLE`. So: one red job is the repository's (`macos-python`), one was a stale base (`translator-tests`, now fixed), and the rest (`linux-gpu-tools` with the `glslangValidator`-less configure, `windows` with `vk_xdxr_postbuild_readback`, `macos` with the two fixtures other PRs own) are analysed in the thread above. Written with an AI assistant.
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/2145/head:github-bot/gh-2145'
git switch 'github-bot/gh-2145'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2145'
git switch 'github-bot/gh-2145'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2145'
git switch 'github-bot/gh-2145'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2145'
git switch 'main'
git merge --squash 'github-bot/gh-2145'
git switch 'main'
git merge --ff-only 'github-bot/gh-2145'
git switch 'main'
git merge 'github-bot/gh-2145'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.