GPU-DISASM-SCRATCH-ERROR: Report GPU disassembly staging failures before translation #1841

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

@⁠delysidemanYT1 on GitHub · 2026-11-25 12:58 UTC · original
delysidemanYT1:gpu-disasm-scratch-error → main · +39 −3 · 2 files · 1 commits · open

Claimed in the coordination issue as: GPU-DISASM-SCRATCH-ERROR
Claim: #1608

Report permission or I/O failures when creating the selected disassembly directory or copying listings into it. Both regressions use synthetic failures, verify the translator is not called, and cover cleanup after a copy fails.

Targeted checks on Windows: python -m unittest discover -s tests -p test_run_gpu_tests_paths.py and git diff --check. No game files. AI-assisted (Codex).

**@⁠delysidemanYT1** on GitHub · 2026-11-25 12:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1841) `delysidemanYT1:gpu-disasm-scratch-error` → `main` · +39 −3 · 2 files · 1 commits · open Claimed in the coordination issue as: GPU-DISASM-SCRATCH-ERROR Claim: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608 Report permission or I/O failures when creating the selected disassembly directory or copying listings into it. Both regressions use synthetic failures, verify the translator is not called, and cover cleanup after a copy fails. Targeted checks on Windows: python -m unittest discover -s tests -p test_run_gpu_tests_paths.py and git diff --check. No game files. AI-assisted (Codex).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:07:58 +00:00
Author
Owner

@⁠GeorgiyDemo on GitHub · 2026-11-25 14:08 UTC · original

Tested 4dae81e91 on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against main 71a769d7d (GPU test tooling; no GPU run):

  • python3 -I tests/test_run_gpu_tests_paths.py: 23 tests, OK at this head.
  • The same file on main: 2 errors — test_cannot_create_disassembly_staging_directory and test_cannot_copy_disassembly_into_staging_directory; the translator-is-not-called assertions are part of those tests.
  • Not run: a real permission failure on a GPU run; both regressions use synthetic I/O failures.

AI-assisted; synthetic fixtures only, no game data.

**@⁠GeorgiyDemo** on GitHub · 2026-11-25 14:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1841#issuecomment-7164829001) Tested `4dae81e91` on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against `main` `71a769d7d` (GPU test tooling; no GPU run): - `python3 -I tests/test_run_gpu_tests_paths.py`: **23 tests, OK** at this head. - The same file on `main`: **2 errors** — `test_cannot_create_disassembly_staging_directory` and `test_cannot_copy_disassembly_into_staging_directory`; the translator-is-not-called assertions are part of those tests. - Not run: a real permission failure on a GPU run; both regressions use synthetic I/O failures. AI-assisted; synthetic fixtures only, no game data.
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-25 15:37 UTC · original

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

python -m pytest -q tests/test_run_gpu_tests_paths.py:

  • PR: 23 passed. main: 21 passed. The new tests pass on Windows.

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-25 15:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1841#issuecomment-7167136345) Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. `python -m pytest -q tests/test_run_gpu_tests_paths.py`: - PR: 23 passed. main: 21 passed. The new tests pass on Windows. (AI-assisted test run; output checked by hand.)
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-25 17:12 UTC · original · reviewed

Independent test report (Windows 11, Python 3.14, origin/main + PR head).

Verdict: LGTM (pre-existing Windows failure is unrelated)
tests/test_run_gpu_tests_paths.py: main 21 passed + 2 failed subtests (with PYTHONUTF8=1; 21 passed without); PR head 23 passed + the same 2 failed subtests (23 passed without PYTHONUTF8) (+2 new tests pass). Mutation check (new tests against old script): both new tests fail (test_cannot_create_..., test_cannot_copy_...), plus the same 2 pre-existing subtests.
Pre-existing, not from this PR: with PYTHONUTF8=1 on a non-English Windows, WorkDirectory.test_file_blocking_work_directory_is_a_cli_error[blocked_child='' and 'spirv'] fails. The child runs with -I, which ignores PYTHONUTF8, so it writes the localized OS error in the ANSI code page (cp1252 here: 0xe9 = "é"). The parent's text=True decodes it as UTF-8, the reader thread raises UnicodeDecodeError, and result.stderr is None (TypeError at line 145). Without PYTHONUTF8 the file passes (21 passed on main, 23 on this PR). Worth a separate issue: pass -X utf8 to the child and encoding="utf-8" to subprocess.run, or decode with errors="replace".
The staging TemporaryDirectory and copy errors now return 2 with a clear message, and the test asserts the staging dir is cleaned up.
AI-assisted: yes (Claude Code ran the tests; I read them).

**@⁠MoonEyes** on GitHub · 2026-11-25 17:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1841#pullrequestreview-6061839326) · **reviewed** Independent test report (Windows 11, Python 3.14, origin/main + PR head). Verdict: LGTM (pre-existing Windows failure is unrelated) tests/test_run_gpu_tests_paths.py: main 21 passed + 2 failed subtests (with PYTHONUTF8=1; 21 passed without); PR head 23 passed + the same 2 failed subtests (23 passed without PYTHONUTF8) (+2 new tests pass). Mutation check (new tests against old script): both new tests fail (test_cannot_create_..., test_cannot_copy_...), plus the same 2 pre-existing subtests. Pre-existing, not from this PR: with PYTHONUTF8=1 on a non-English Windows, WorkDirectory.test_file_blocking_work_directory_is_a_cli_error[blocked_child='' and 'spirv'] fails. The child runs with -I, which ignores PYTHONUTF8, so it writes the localized OS error in the ANSI code page (cp1252 here: 0xe9 = "é"). The parent's text=True decodes it as UTF-8, the reader thread raises UnicodeDecodeError, and result.stderr is None (TypeError at line 145). Without PYTHONUTF8 the file passes (21 passed on main, 23 on this PR). Worth a separate issue: pass -X utf8 to the child and encoding="utf-8" to subprocess.run, or decode with errors="replace". The staging TemporaryDirectory and copy errors now return 2 with a clear message, and the test asserts the staging dir is cleaned up. AI-assisted: yes (Claude Code ran the tests; I read them).
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/1841/head:github-bot/gh-1841'
git switch 'github-bot/gh-1841'

Merge

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