awc_names: fail on incomplete bank directory scans #2450
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2450"
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-27T10:34:27Z.
Claimed in the coordination issue as: AWC-NAMES-INCOMPLETE-BANK-WALK
What and why
A recursive bank scan used the default os.walk error handling. An unreadable subtree could leave a partial set of banks while the command returned success and replaced a previous report. Propagate bank traversal errors through the normal CLI error path. The synthetic regression yields one valid bank before injecting the traversal failure and checks the previous report byte-for-byte.
Tested
Windows, Python 3.14.7. The regression reproduced on the parent and passed with the change.
python -I tests/test_awc_names.pygit diff --checkpassed.The integrated checkout passed 6,374 semantic tests across 500 files. CI's macOS job failed in the calibrated-texture replacement test, as it did on the unchanged main baseline.
GPUs tested: N/A (CPU-only synthetic tests).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:03:10Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_awc_names -v -> 37 tests OK (1 skip), including the new incomplete-bank-directory rejection case. Not approving yet: the branch is 606 commits behind current main, so a rebase is needed before the final diff can be reviewed.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T06:52:19Z.
#2450 | head
9671df1ea9(merged cleanly with main09c153948) |python -I tests/test_awc_names.py| red on main:FAILED (failures=1)(test_incomplete_bank_walk_preserves_report:AssertionError: 0 != 2) | green on PR+main:37 tests OK(-k test_incomplete_bank_walk_preserves_report:1 test OK) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
load_banksintools/awc_names.py(os.walk(source, onerror=scan_failed)raising unreadable-subtree errors before writing output so existing reports stay intact on exit code2), and verified bothPR + main(09c153948) and a combinedmain + #2450 + #2449merge:git merge(ort) auto-mergedtools/awc_names.pyandtests/test_awc_names.pywith zero conflicts (38 tests OKintests/test_awc_names.py). Also passedtests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:42:40Z.
Red/green: tests/test_awc_names.py fails 1 assertion on main (an incomplete bank walk still overwrites the report and exits 0) and passes with the PR (cloud run on main
7daa4a4).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)