glb_writer: cover failed replacement of a read-only GLB on Windows #719
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/719"
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 kirigayakazima on 2026-11-24T12:51:05Z.
GLB-WRITER-RO-CLEANUP. Main already restores writable permissions before removing staging files. This PR retains regression coverage for failed replacement of a read-only output. It checks that the old GLB survives, the temporary file is removed, and the original error propagates. Covers a forced replacement failure and a real read-only destination on Windows.
Windows verification on
c8bf0e7b6plus this branch: python -I tests/test_glb_writer.py passed 76 tests. No game data; no dependencies. GPUs tested: n/a. Refresh AI-assisted with OpenAI Codex (GPT-6).Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:25:25Z.
Review: APPROVED
Audited and verified. Clean-room compliant.
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-25T04:02:41Z.
Review: APPROVED
Approving. Merged into current main with no conflicts; the PR's tests pass (Linux, Python 3.13). Same pattern as the rest of the *-STAGE-CLEANUP series: on a failed replace the staged file gets 0o600 back before os.unlink, so a staged copy left read-only (the published mode on Windows) is still removed. Only the staging/permission lines change.
AI-assisted (Claude).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:01:10Z.
Hi @kirigayakazima, thanks for this pull request. It currently conflicts with
main(conflicting file(s):tools/glb_writer.py), so it carries theneeds rebaselabel. CONTRIBUTING.md asks authors to rebase their branch onmain; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:46:34Z.
Tested
85b87608fmerged (no commit) withmainbd643e46e: Windows 11 10.0.26300, Python 3.12.4, CPU only. The PR is test-only, and the fix it covers is already inmain.python -I tests/test_glb_writer.pygives 76 tests OK.main, I removedmain's own cleanup, theos.chmod(tmp_path, 0o600)beforeos.removein the failure path oftools/glb_writer.py(from39d3dc489). Both new tests then fail, each leaving a.glb-*.tmpstaging file behind:test_failed_replace_over_readonly_glb_cleans_staging_fileandtest_windows_readonly_glb_failure_cleans_staging_file. So the PR's tests catch that regression.check_no_game_data.pyis clean.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:53:18Z.
Merged. Tested by @TheGeogeo on head
85b87608fmerged with mainbd643e46e(Windows 11, Python 3.12.4, CPU only, no GPU needed):tests/test_glb_writer.py76 OK; with main's own cleanup (os.chmodbeforeos.remove,39d3dc489) removed, both new tests fail and leave a.glb-*.tmpfile, so they guard that fix. The 4 red CI jobs of 03:00 (check, stdlib-tests-linux, macos-python, semantic-tests) were red on main at the same time. Thanks @kirigayakazima!AI-assisted: yes