tests: first_look paths use the long temp name when it is not ASCII (TEST-FIRST-LOOK-NON-ASCII) #2092

Merged
leonida/mandy
OguzSoykan merged 1 commit from test/first-look-non-ascii into main 2026-11-28 19:30:06 +00:00

Pull request successfully merged and closed

OguzSoykan commented 2026-11-25 20:02:33 +00:00

Claimed in the coordination issue as: TEST-FIRST-LOOK-NON-ASCII (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7173090712)

What and why

tests/test_first_look_paths.py fails on native Windows when the user name is not ASCII. tempfile returns the 8.3 alias of the profile folder (C:\Users\OUZ~1\... for a user named Oğuz), and Windows PowerShell 5.1 refuses to Set-Location -LiteralPath into the short alias of a folder whose long name is not ASCII:

Set-Location : An object at the specified path C:\Users\OUZ~1 does not exist.
...
C:\Users\Oğuz\AppData\Local\Temp\tmp...\fixture[1].exe not found

On the same machine Set-Location -LiteralPath C:\PROGRA~1 works, and Test-Path -LiteralPath C:\Users\OUZ~1 returns True. Only the non-ASCII short alias fails, so the location never changes and first_look.ps1 cannot find the relative fixture[1].exe.

The fix is test-only. When the long name of the temporary folder is not ASCII, the test uses that long name. An ASCII short alias, such as CI's RUNNER~1, is kept, so the check that the dry run gets the canonical (resolve()d) path is still exercised there. Nothing changes on hosts whose temporary folder is already ASCII.

Tested

Windows 10 Pro 19045, Windows PowerShell 5.1, CPython 3.12, user profile C:\Users\Oğuz (TEMP = C:\Users\OUZ~1\AppData\Local\Temp):

  • py -3.12 -I tests/test_first_look_paths.py: FAILED (failures=1) on main, OK with this change.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

Claimed in the coordination issue as: TEST-FIRST-LOOK-NON-ASCII (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7173090712) ### What and why `tests/test_first_look_paths.py` fails on native Windows when the user name is not ASCII. `tempfile` returns the 8.3 alias of the profile folder (`C:\Users\OUZ~1\...` for a user named Oğuz), and Windows PowerShell 5.1 refuses to `Set-Location -LiteralPath` into the short alias of a folder whose long name is not ASCII: ``` Set-Location : An object at the specified path C:\Users\OUZ~1 does not exist. ... C:\Users\Oğuz\AppData\Local\Temp\tmp...\fixture[1].exe not found ``` On the same machine `Set-Location -LiteralPath C:\PROGRA~1` works, and `Test-Path -LiteralPath C:\Users\OUZ~1` returns `True`. Only the non-ASCII short alias fails, so the location never changes and `first_look.ps1` cannot find the relative `fixture[1].exe`. The fix is test-only. When the long name of the temporary folder is not ASCII, the test uses that long name. An ASCII short alias, such as CI's `RUNNER~1`, is kept, so the check that the dry run gets the canonical (`resolve()`d) path is still exercised there. Nothing changes on hosts whose temporary folder is already ASCII. ### Tested Windows 10 Pro 19045, Windows PowerShell 5.1, CPython 3.12, user profile `C:\Users\Oğuz` (TEMP = `C:\Users\OUZ~1\AppData\Local\Temp`): - `py -3.12 -I tests/test_first_look_paths.py`: `FAILED (failures=1)` on `main`, `OK` with this change. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DeadlyChirp commented 2026-11-26 10:00:48 +00:00

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_first_look_paths.py: 1 passed.

(AI-assisted test run; output checked by hand.)

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_first_look_paths.py`: 1 passed. (AI-assisted test run; output checked by hand.)
MoonEyes commented 2026-11-28 19:30:04 +00:00

Red/green: No red test; this tests-only PR's tests/test_first_look_paths.py passes on main and with the PR natively on Windows (skipped on GitHub Actions Linux).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

Red/green: No red test; this tests-only PR's tests/test_first_look_paths.py passes on main and with the PR natively on Windows (skipped on GitHub Actions Linux). Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
OreoFR commented 2026-11-28 21:59:52 +00:00

Verified by OreoFR

  • Base: main 4a54aedcb + PR head d838d7fe9
  • Test: python -I tests/test_first_look_paths.py
  • Red on main: 1 OK
  • Green with the PR: 1 OK
  • Verdict: NO RED (test-only PR; the user name here is ASCII, the non-ASCII branch is not exercised)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

**Verified by OreoFR** - Base: main `4a54aedcb` + PR head `d838d7fe9` - Test: `python -I tests/test_first_look_paths.py` - Red on main: 1 OK - Green with the PR: 1 OK - Verdict: NO RED (test-only PR; the user name here is ASCII, the non-ASCII branch is not exercised) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No description provided.