Repository navigation
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 8b04cdd7 on Windows 11: python -I tests/test_bink_index.py -> 20 tests, OK (1 skipped); git diff --check clean.
An unlistable sub-folder now fails the Bink index instead of silently skipping its files, matching the other walk fixes; the synthetic index tests pass. No blocking issue.
|
Tested
AI-assisted. |
8b04cdd to
e9382fe
Compare
|
Right, chmod 0o000 is a no-op on the runner. Added a second regression that forces the same PermissionError through os.scandir so the guard is exercised on Windows and under root; the chmod case stays as the real-filesystem check. Red/green on the new case: fails against main's bink_index.py (scan completes, exit 0), passes with the onerror fix. Full file: 21 tests OK. Rebased on d0835dd, head now e9382fe. |
|
Tested e9382fe merged with main 98fa503 on Linux (WSL2) Python 3.12.16 and native Windows 11 Python 3.13.1: pass.
|
|
Tested head
AI-assisted review (Gemini 4 Neon). |
27c2b16 to
675daed
Compare
|
Follow-up from the tracker note about the The guard that decides whether The guard now uses the same Also rebased onto current main ( Tested here:
AI-assisted. |
sds-228
left a comment
There was a problem hiding this comment.
Code review of 675daed: still clean at the new head. An unlistable subfolder still fails the tool rather than silently dropping its files, with expanded fixture coverage. 22 tests OK (1 skipped); compileall and diff check clean.
AI-assisted (OpenCode).
…ping its files os.walk() without onerror skips a directory it cannot list, so indexing a tree with a locked folder reported the rest and exited 0. scan_target now passes an onerror that re-raises, and main's existing OSError handler turns it into one error line and exit 2. Two regressions: the chmod case (skips where chmod is not enforced) and a scandir-forced case that runs on every platform.
The guard walks the target to see whether --out names an existing input. Without onerror an unlistable sub-folder was skipped, so an input inside it passed the check and got truncated by the report write (verified on main: rc 0, input replaced). The guard walk now uses the same _walk_error as the scan and reports one error line with exit 2 before anything is scanned or written.
675daed to
64082b9
Compare
|
Rebased on current main ( Heads up for anyone who tested the earlier refs: AI-assisted. |
|
Tested 64082b9 merged with main 3faac55 on Linux (WSL2), Python 3.12.16: pass.
|
|
Reviewed and tested
Notes, none blocking:
AI-assisted. |
Claimed in the coordination issue as: #4257 (comment)
What and why
bink_index.py scan_targetindexes a directory withos.walk(target)and noonerror. os.walk silentlyskips a sub-folder it cannot list, so the index reported the remaining files and exited 0, hiding an
incomplete directory. Reproduced on 03b09a0: a directory with
a.bikin the root andsub/b.bikreports128 unread bytes; after
chmod 000onsubit reports 64, exit 0. The walk now passes anonerrorthatre-raises, which
main()'s existingexcept OSErroraroundscan_targetturns into onebink_index: error: cannot read ...line and exit 2. Same os.walk/onerror completeness gap as #4277 / #4342 /#4355. Open #4015 touches the scan's sorting/formatting (lines 191+), not the walk's error handling.
Tested
Linux, Python 3.14.10, CPU only, no game files (synthetic Bink 2 streams).
tests/test_bink_index.py::TestCommandLine::test_unlistable_subfolder_is_a_clean_error_not_a_silent_skip:chmod 000a sub-folder,bink.mainreturns 2 with abink_index: error:line and no traceback (skips whenthe folder is still listable, e.g. running as root or on Windows). Red on the base: exit 0. Green: whole file 20 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).