Repository navigation
Conversation
…pping its manifests
|
Tested 403e467 on Windows, CPython 3.14.7, CPU only (no GPU, no game files): pass. This adds a real Windows permission failure, because the permission test skips on Windows. The test file runs 27 cases with one skip, at this head and at the merge base. The permission case skips because I made
I found no defect. AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 403e4678 on Windows 11: python -I tests/test_world_names.py -> 27 tests, OK (1 skipped); git diff --check clean.
An unlistable sub-folder now fails the world-name scan instead of silently skipping its manifests, matching the other walk fixes. No blocking issue.
|
The fix is right - the base exits 0 and reports 1 name while silently dropping the sub-folder, and the PR exits 1 with one 26/27 tests pass with the new one skipped, Same gap as #4417: AI-assisted review, no game files, no GPU. |
…k a folder The regression test self-skips on Windows and as root, and CI runs this file only on windows-latest, so the guard was never exercised in CI. Force os.scandir to raise for one folder instead, in-process, which reproduces the same PermissionError on every platform. AI-assisted.
|
Both points addressed. The dead chmod test stays as the real-filesystem check, and a new one forces the same PermissionError through os.scandir so it runs on the windows-latest job and under root. Rebased and pushed: head 3cdfe54, 28 tests OK in the file, compileall and diff --check clean. |
Claimed in the coordination issue as: #4257 (comment)
What and why
world_names.py build_dictionarydiscovers manifests in a directory tree withos.walk(path)and noonerror. os.walk silently skips a sub-folder it cannot list, sobuildreported the remaining manifestsand exited 0, hiding an incomplete scan. Reproduced on 03b09a0:
build --manifeston a tree with amodels/manifest.jsonin the root and in a sub-folder yields 2 names; afterchmod 000on the sub-folder ityields 1, exit 0. The walk now passes an
onerrorthat re-raises, whichmain()'s existingexcept (OSError, ValueError, json.JSONDecodeError)turns into oneERROR:line (exit 1, the tool'sconvention). Same os.walk/onerror completeness gap as #4277 / #4342 / #4355 / #4372 / #4385.
Tested
Linux, Python 3.14.10, CPU only, no game files (synthetic manifests).
tests/test_world_names.py::DictionaryTest::test_unlistable_subfolder_is_a_clean_error_not_a_silent_skip:chmod 000a sub-folder,WN.main(["build", "--manifest", assets, "--out", out])returns 1 with anERROR:line and no traceback (skips when the folder is still listable, e.g. running as root or on Windows). Red on
the base: exit 0. Green: whole file 27 OK.
python -m compileall -q make_game.py tools tests,git diff --checkclean.Checklist
docs/design.md, with how it was confirmed. (no translator rule changed)AI-assisted (Tacit).