tools: print the plain path, not a repr'd one, in OSError messages #128

Closed
Andretuta wants to merge 1 commit from upstream-pr/128 into main
Andretuta commented 2026-11-24 02:24:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:24:10Z.


Carried over from old PR 9861 by milas6669 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9861, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
milas6669: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Resubmission of #5760 (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts.

Claim: https://github.com/ItsNotRexed/Leonida/issues/5581#issuecomment-7100263084

What and why

Tests failed on Windows because the tools put a repr'd path in their error text. str(OSError) reprs the filename it carries, so every separator doubles on Windows (C:\\Users\\...); on POSIX there is nothing to escape, which is why the tests were green where they were written.

The messages now follow the idiom other tools use ({e.filename or <fallback>}: {e.strerror or e}), printing the path as written.

Tests run

python -I tests/test_bink_names.py     -> OK
python -I tests/test_opus_tags.py      -> OK
python -I tests/test_world_names.py    -> OK

Independently tested and verified on #5760 by @Atomic258, @YordiLorenzo, @LuanBogoqb, @cipher-droid.

No GPU used, no game data. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464892685 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/128). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:24:10Z. --- > Carried over from **old PR 9861** by `milas6669` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9861`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `milas6669`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Resubmission of `#5760` (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts. Claim: https://github.com/ItsNotRexed/Leonida/issues/5581#issuecomment-7100263084 ## What and why Tests failed on Windows because the tools put a repr'd path in their error text. `str(OSError)` reprs the filename it carries, so every separator doubles on Windows (`C:\\Users\\...`); on POSIX there is nothing to escape, which is why the tests were green where they were written. The messages now follow the idiom other tools use (`{e.filename or <fallback>}: {e.strerror or e}`), printing the path as written. ## Tests run ``` python -I tests/test_bink_names.py -> OK python -I tests/test_opus_tags.py -> OK python -I tests/test_world_names.py -> OK ``` Independently tested and verified on `#5760` by `@Atomic258`, `@YordiLorenzo`, `@LuanBogoqb`, `@cipher-droid`. No GPU used, no game data. AI-assisted.
wavehs commented 2026-11-24 02:40:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-24T02:40:14Z.


Checked this branch: tests/test_bink_names.py, tests/test_opus_tags.py and tests/test_world_names.py all OK here. On the Windows runner the same three fail because OSError.__str__ prints the filename with %r and doubles every backslash; printing the plain path fixes the assertions as they stand, which is the better side to fix than the tests (I withdrew the test-side version, #69, in favour of this). Mergeable against current main.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7120369200 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7120369200). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-24T02:40:14Z. --- Checked this branch: `tests/test_bink_names.py`, `tests/test_opus_tags.py` and `tests/test_world_names.py` all `OK` here. On the Windows runner the same three fail because `OSError.__str__` prints the filename with `%r` and doubles every backslash; printing the plain path fixes the assertions as they stand, which is the better side to fix than the tests (I withdrew the test-side version, #69, in favour of this). Mergeable against current `main`.
quartz-heron-58 commented 2026-11-24 08:28:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-24T08:28:01Z.


Tested 82bdc54f (cherry-picked onto main 1c93c869) on native Windows 11 Home (build 26300), Python 3.12.10: pass.

On main 1c93c869, python -I tests/test_bink_names.py, tests/test_opus_tags.py and tests/test_world_names.py each fail one test here, with the doubled backslashes of the repr'd path in the message. With this commit all three files end in OK. python -m compileall -q make_game.py tools tests: exit 0. No game files.

Not checked: which of the two approaches discussed on #69 the project prefers; this only confirms that this one clears the three Windows failures.

AI-assisted (Claude Code ran the tests and wrote this comment).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7126169002 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7126169002). Originally posted by [quartz-heron-58](https://github.com/quartz-heron-58) on 2026-11-24T08:28:01Z. --- Tested 82bdc54f (cherry-picked onto main 1c93c869) on native Windows 11 Home (build 26300), Python 3.12.10: pass. On main 1c93c869, `python -I tests/test_bink_names.py`, `tests/test_opus_tags.py` and `tests/test_world_names.py` each fail one test here, with the doubled backslashes of the repr'd path in the message. With this commit all three files end in OK. `python -m compileall -q make_game.py tools tests`: exit 0. No game files. Not checked: which of the two approaches discussed on #69 the project prefers; this only confirms that this one clears the three Windows failures. AI-assisted (Claude Code ran the tests and wrote this comment).
Mby159 commented 2026-11-24 09:50:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mby159 on 2026-11-24T09:50:53Z.


Verified on native Windows, because the effect of this change is Windows-only and the Linux leg of CI cannot see it.

What I ran (Windows 11 x64 10.0.29712, Python 3.13, standard library only, no game files, no GPU):

python -I tests/test_bink_names.py
python -I tests/test_opus_tags.py
python -I tests/test_world_names.py

on this pull request's head 82bdc54ffea152d60f3290ba6a3119bd54661ec2, and on current main d7576d56ae2c77564c84ffae724ffe9bdd2e6701.

On this head: 36, 25 and 31 tests - all OK.

On main: each of the three fails with one failure, for the reason @Len1k described in https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7125793012:

AssertionError: 'C:\Users\...\mount\blocked' not found in "bink_names: error: [Errno 13] permission denied: 'C:\\Users\\...\\mount\\blocked'\n"

OSError.__str__ renders the filename with repr(), so on Windows every backslash in the message is doubled and the raw path is no longer in the text. Printing error.filename and error.strerror puts the plain path back, and the three tests pass unchanged.

Two notes for whoever merges this:

  • This is the tool-side fix, so the three tests keep their original meaning ("the report names the blocked path"). #69 took the other side of it - changing the tests to expect the repr'd path - and was closed; the two cannot both land, because one asserts the doubled path and the other prints the plain one.
  • The Windows check job collects every failing file and then fails, so on main these three sit in front of everything after them in the standard-library loop.

Separately, tests/test_tool_stdout_encoding.py is red on current main for an unrelated reason: tools/exe_sha.py and tools/pr_conflict_label.py have no sys.stdout.reconfigure(errors="replace") in their __main__ block. This branch predates both tools, so that file is green here. I filed that separately as #605, so the Windows job has four red files on main, not three.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7127971055 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7127971055). Originally posted by [Mby159](https://github.com/Mby159) on 2026-11-24T09:50:53Z. --- Verified on native Windows, because the effect of this change is Windows-only and the Linux leg of CI cannot see it. **What I ran** (Windows 11 x64 10.0.29712, Python 3.13, standard library only, no game files, no GPU): ``` python -I tests/test_bink_names.py python -I tests/test_opus_tags.py python -I tests/test_world_names.py ``` on this pull request's head `82bdc54ffea152d60f3290ba6a3119bd54661ec2`, and on current `main` `d7576d56ae2c77564c84ffae724ffe9bdd2e6701`. **On this head:** 36, 25 and 31 tests - all OK. **On `main`:** each of the three fails with one failure, for the reason @Len1k described in https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7125793012: ``` AssertionError: 'C:\Users\...\mount\blocked' not found in "bink_names: error: [Errno 13] permission denied: 'C:\\Users\\...\\mount\\blocked'\n" ``` `OSError.__str__` renders the filename with `repr()`, so on Windows every backslash in the message is doubled and the raw path is no longer in the text. Printing `error.filename` and `error.strerror` puts the plain path back, and the three tests pass unchanged. Two notes for whoever merges this: - This is the tool-side fix, so the three tests keep their original meaning ("the report names the blocked path"). #69 took the other side of it - changing the tests to expect the repr'd path - and was closed; the two cannot both land, because one asserts the doubled path and the other prints the plain one. - The Windows `check` job collects every failing file and then fails, so on `main` these three sit in front of everything after them in the standard-library loop. Separately, `tests/test_tool_stdout_encoding.py` is red on current `main` for an unrelated reason: `tools/exe_sha.py` and `tools/pr_conflict_label.py` have no `sys.stdout.reconfigure(errors="replace")` in their `__main__` block. This branch predates both tools, so that file is green here. I filed that separately as #605, so the Windows job has four red files on `main`, not three. *AI-assisted.*
nilparra-dev commented 2026-11-24 17:09:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by nilparra-dev on 2026-11-24T17:09:41Z.


Independent check on native Windows 11, Python 3.13, stdlib only, from clean worktrees (no game files, no GPU):

  • #128 head 82bdc54f: tests/test_bink_names.py 36/36, test_opus_tags.py 28/28, test_world_names.py 31/31 — all OK.
  • Your diff also applies cleanly to current main 82a2aabcc (git apply --check exit 0), and all three files pass there too; python -m compileall -q make_game.py tools tests exits 0.

One merge hazard: #763 (and its earlier draft #312) changes the same assertions to expect repr(blocked). Each side passes alone, but your tools plus #763's tests in one tree give 13 failures on Windows (1 + 11 + 1), while Linux CI stays green either way. Details are in the finding I posted on #14.

This is the side I would keep — printing a readable path is better than pinning doubled backslashes into the tests. If you want, I can take over the rebase and the close-out of #763/#312; I am not opening a competing PR.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7138777133 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7138777133). Originally posted by [nilparra-dev](https://github.com/nilparra-dev) on 2026-11-24T17:09:41Z. --- Independent check on native Windows 11, Python 3.13, stdlib only, from clean worktrees (no game files, no GPU): - #128 head `82bdc54f`: `tests/test_bink_names.py` 36/36, `test_opus_tags.py` 28/28, `test_world_names.py` 31/31 — all OK. - Your diff also applies cleanly to current `main` 82a2aabcc (`git apply --check` exit 0), and all three files pass there too; `python -m compileall -q make_game.py tools tests` exits 0. One merge hazard: #763 (and its earlier draft #312) changes the same assertions to expect `repr(blocked)`. Each side passes alone, but your tools plus #763's tests in one tree give 13 failures on Windows (1 + 11 + 1), while Linux CI stays green either way. Details are in the finding I posted on #14. This is the side I would keep — printing a readable path is better than pinning doubled backslashes into the tests. If you want, I can take over the rebase and the close-out of #763/#312; I am not opening a competing PR. AI-assisted.
veqzo commented 2026-11-24 18:36:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by veqzo on 2026-11-24T18:36:37Z.


world_names.py can lose the requested output path when os.replace(tmp, path) fails. An OSError from a two-path operation can carry the destination in filename2, but the new handler prints only filename and strerror. The message then identifies the temporary file without identifying the output the user requested.

Could the handler print both paths when filename2 is present, with a synthetic failed-replace test?

AI-assisted review. I inspected the code; I did not run the project tests.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140885614 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7140885614). Originally posted by [veqzo](https://github.com/veqzo) on 2026-11-24T18:36:37Z. --- `world_names.py` can lose the requested output path when `os.replace(tmp, path)` fails. An `OSError` from a two-path operation can carry the destination in `filename2`, but the new handler prints only `filename` and `strerror`. The message then identifies the temporary file without identifying the output the user requested. Could the handler print both paths when `filename2` is present, with a synthetic failed-replace test? AI-assisted review. I inspected the code; I did not run the project tests.
abnalstlll-byte commented 2026-11-24 18:49:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:49:14Z.

Review: APPROVED


Clean-Room Audit — PR #128 (bink_names, opus_tags, world_names OSError formatting)

Clean tool-side fix that formats {error.filename}: {error.strerror} instead of {error}, eliminating repr() path escaping differences between Windows and POSIX while keeping existing test assertions clean.

Verified clean diff and clean-room boundaries (0 game data); closed duplicate #763 in favor of this approach.

Verdict: APPROVED

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045330446 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/128#pullrequestreview-6045330446). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T18:49:14Z. **Review:** APPROVED --- ### Clean-Room Audit — PR #128 (`bink_names`, `opus_tags`, `world_names` OSError formatting) Clean tool-side fix that formats `{error.filename}: {error.strerror}` instead of `{error}`, eliminating `repr()` path escaping differences between Windows and POSIX while keeping existing test assertions clean. Verified clean diff and clean-room boundaries (0 game data); closed duplicate #763 in favor of this approach. **Verdict: APPROVED**
Anonymous78e commented 2026-11-24 23:36:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Anonymous78e on 2026-11-24T23:36:44Z.


Independent Windows check of this PR, merged onto current main (507029d1e, merges cleanly; the merge touches only tools/bink_names.py, tools/opus_tags.py, tools/world_names.py).

Windows 11 Pro 26H2 (26300.9457), CPython 3.13.15, no game files:

test file main 507029d1e main + #128
python -I tests/test_world_names.py 31 run, 1 failure (test_an_unreadable_subtree_does_not_replace_the_dictionary) 31 run, OK
python -I tests/test_bink_names.py 36 run, 1 failure (test_unreadable_mount_directory_preserves_the_report) 36 run, OK
python -I tests/test_opus_tags.py 28 run, 1 failure (test_cli_reports_incomplete_directory_discovery) 28 run, OK

These are the three Windows-only failures reported today in the coordination issue (#14, the PermissionError repr finding): the tools print str(exc), whose quoted filename doubles the backslashes on Windows, so the assertion on the plain path fails. With this PR's plain-path message all three pass and nothing else in those files changes result.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147598258 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7147598258). Originally posted by [Anonymous78e](https://github.com/Anonymous78e) on 2026-11-24T23:36:44Z. --- Independent Windows check of this PR, merged onto current `main` (507029d1e, merges cleanly; the merge touches only `tools/bink_names.py`, `tools/opus_tags.py`, `tools/world_names.py`). Windows 11 Pro 26H2 (26300.9457), CPython 3.13.15, no game files: | test file | `main` 507029d1e | `main` + #128 | |---|---|---| | `python -I tests/test_world_names.py` | 31 run, **1 failure** (`test_an_unreadable_subtree_does_not_replace_the_dictionary`) | 31 run, OK | | `python -I tests/test_bink_names.py` | 36 run, **1 failure** (`test_unreadable_mount_directory_preserves_the_report`) | 36 run, OK | | `python -I tests/test_opus_tags.py` | 28 run, **1 failure** (`test_cli_reports_incomplete_directory_discovery`) | 28 run, OK | These are the three Windows-only failures reported today in the coordination issue (#14, the `PermissionError` repr finding): the tools print `str(exc)`, whose quoted filename doubles the backslashes on Windows, so the assertion on the plain path fails. With this PR's plain-path message all three pass and nothing else in those files changes result. AI-assisted: yes (Claude Code).
OguzSoykan commented 2026-11-25 20:14:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OguzSoykan on 2026-11-25T20:14:24Z.


Verified on native Windows at head 82bdc54ff: test_bink_names.py, test_opus_tags.py and test_world_names.py fail on main and pass here. The test-side alternative #1425 also passes; only one direction should land. #1792 touches the same three tools.

Native Windows 10 Pro 19045, CPython 3.12, py -3.12 -I, checkout under a non-ASCII profile path (C:\Users\Oğuz\..., TEMP is the 8.3 alias C:\Users\OUZ~1\...). No game files.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7173379856 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7173379856). Originally posted by [OguzSoykan](https://github.com/OguzSoykan) on 2026-11-25T20:14:24Z. --- Verified on native Windows at head `82bdc54ff`: `test_bink_names.py`, `test_opus_tags.py` and `test_world_names.py` fail on `main` and pass here. The test-side alternative #1425 also passes; only one direction should land. #1792 touches the same three tools. Native Windows 10 Pro 19045, CPython 3.12, `py -3.12 -I`, checkout under a non-ASCII profile path (`C:\Users\Oğuz\...`, TEMP is the 8.3 alias `C:\Users\OUZ~1\...`). No game files. AI-assisted (Claude Code).
wavehs commented 2026-11-26 18:20:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:20:15Z.


Verified on main bd6ba97ab (macOS 27.2.1 arm64, Python 3.15.2). The diff applies cleanly and the three test files pass: test_bink_names, test_opus_tags, test_world_names all OK.

The Windows spelling does not occur naturally on macOS, so I drove each tool's OSError path with a synthetic backslash filename (OSError(2, "No such file or directory", r"C:\Users\runneradmin\AppData\Local\Temp\x.txt")) and captured stderr.

Before (unmodified main):

bink_names:  error: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt'
opus_tags:   error: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt'
world_names: ERROR: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt'

(quoted path, every separator doubled — exactly what a Windows test cannot match against the plain str(path).)

After:

bink_names:  error: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory
opus_tags:   error: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory
world_names: ERROR: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory

error.filename or <the argument> also keeps a message when the exception carries no filename, and error.strerror or error still shows something for an OSError built without one. Looks right; this is the product-side fix, which is the one to take.

AI-assisted (verification only).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200339654 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7200339654). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-26T18:20:15Z. --- Verified on `main` `bd6ba97ab` (macOS 27.2.1 arm64, Python 3.15.2). The diff applies cleanly and the three test files pass: `test_bink_names`, `test_opus_tags`, `test_world_names` all `OK`. The Windows spelling does not occur naturally on macOS, so I drove each tool's `OSError` path with a synthetic backslash filename (`OSError(2, "No such file or directory", r"C:\Users\runneradmin\AppData\Local\Temp\x.txt")`) and captured stderr. **Before** (unmodified main): ``` bink_names: error: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt' opus_tags: error: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt' world_names: ERROR: [Errno 2] No such file or directory: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\x.txt' ``` (quoted path, every separator doubled — exactly what a Windows test cannot match against the plain `str(path)`.) **After**: ``` bink_names: error: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory opus_tags: error: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory world_names: ERROR: C:\Users\runneradmin\AppData\Local\Temp\x.txt: No such file or directory ``` `error.filename or <the argument>` also keeps a message when the exception carries no filename, and `error.strerror or error` still shows something for an `OSError` built without one. Looks right; this is the product-side fix, which is the one to take. AI-assisted (verification only).
wavehs commented 2026-11-26 18:29:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:29:12Z.


A stronger reproduction, on macOS, of the exact Windows failure: point TMPDIR at a folder whose name contains a backslash and run the three files on unmodified main. The tools print the PermissionError filename through {e} (repr'd, every separator doubled), and the test's assertIn(str(path), stderr) sees the plain spelling:

test_bink_names.py  FAIL test_unreadable_mount_directory_preserves_the_report
  .../back\slash-tmp/.../mount/blocked not found in
  "bink_names: error: [Errno 13] permission denied: '...back\\\\slash-tmp...'"
test_opus_tags.py   FAIL test_cli_reports_incomplete_directory_discovery
  .../back\slash-tmp/.../opus/blocked not found in
  "opus_tags: error: [Errno 13] Permission denied: '...back\\\\slash-tmp...'"
test_world_names.py FAIL test_an_unreadable_subtree_does_not_replace_the_dictionary
  .../back\slash-tmp/.../manifests/blocked not found in
  "ERROR: [Errno 13] Permission denied: '...back\\\\slash-tmp...'"

With this PR applied, the same three files under the same TMPDIR are OK (Ran 36, Ran 28, Ran 31 tests). That is the same assertion the Windows check job makes, so this is the Windows red reproduced independently of a Windows runner.

(For anyone reusing the trick: TMPDIR backslashes turn CMake-argument tests red too, because CMake unescapes \s; those are not Windows failures. The three files above fail for the repr reason, which is the one this PR fixes.)

AI-assisted (verification only).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200517088 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7200517088). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-26T18:29:12Z. --- A stronger reproduction, on macOS, of the exact Windows failure: point `TMPDIR` at a folder whose name contains a backslash and run the three files on unmodified `main`. The tools print the `PermissionError` filename through `{e}` (repr'd, every separator doubled), and the test's `assertIn(str(path), stderr)` sees the plain spelling: ``` test_bink_names.py FAIL test_unreadable_mount_directory_preserves_the_report .../back\slash-tmp/.../mount/blocked not found in "bink_names: error: [Errno 13] permission denied: '...back\\\\slash-tmp...'" test_opus_tags.py FAIL test_cli_reports_incomplete_directory_discovery .../back\slash-tmp/.../opus/blocked not found in "opus_tags: error: [Errno 13] Permission denied: '...back\\\\slash-tmp...'" test_world_names.py FAIL test_an_unreadable_subtree_does_not_replace_the_dictionary .../back\slash-tmp/.../manifests/blocked not found in "ERROR: [Errno 13] Permission denied: '...back\\\\slash-tmp...'" ``` With this PR applied, the same three files under the same `TMPDIR` are `OK` (`Ran 36`, `Ran 28`, `Ran 31` tests). That is the same assertion the Windows `check` job makes, so this is the Windows red reproduced independently of a Windows runner. (For anyone reusing the trick: `TMPDIR` backslashes turn CMake-argument tests red too, because CMake unescapes `\s`; those are not Windows failures. The three files above fail for the repr reason, which is the one this PR fixes.) AI-assisted (verification only).
wavehs commented 2026-11-26 18:45:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:45:11Z.


This draft has a live, rebased duplicate: #1792 (Ch1mpleo, claimed as OLD-9861) carries the same old-pr/9861 change onto current main, non-draft and with the three files' tests run. I applied both diffs to main f107ae044: they differ only in blob hashes and line offsets, and both fix the three backslash-TMPDIR failures identically.

Nothing wrong with this branch — it just no longer needs to be merged on its own. Close it once #1792 lands (or let #1792 close in its favour if this draft is preferred, though the takeover copy is the ready one).

AI-assisted (review only).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7200812186 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7200812186). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-26T18:45:11Z. --- This draft has a live, rebased duplicate: **#1792** (Ch1mpleo, claimed as OLD-9861) carries the same `old-pr/9861` change onto current main, non-draft and with the three files' tests run. I applied both diffs to `main` `f107ae044`: they differ only in blob hashes and line offsets, and both fix the three backslash-`TMPDIR` failures identically. Nothing wrong with this branch — it just no longer needs to be merged on its own. Close it once #1792 lands (or let #1792 close in its favour if this draft is preferred, though the takeover copy is the ready one). AI-assisted (review only).
Andretuta commented 2026-11-27 04:01:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-27T04:01:31Z.


Closing carried-over draft: superseded by live rebased PR #1792 (OLD-9861).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7209457589 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/128#issuecomment-7209457589). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-27T04:01:31Z. --- Closing carried-over draft: superseded by live rebased PR #1792 (OLD-9861).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!128
No description provided.