[PR #548] [MERGED] TEST-NATIVE-FOLDER-FAILURES: cover Windows short-path lookup failures #594

Closed
opened 2026-11-26 20:18:24 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/548
Author: @RedMiS7
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: codex/test-native-folder-failures


📝 Commits (1)

  • 9be0932 TEST-NATIVE-FOLDER-FAILURES: cover Windows short-path lookup failures

📊 Changes

1 file changed (+53 additions, -0 deletions)

View changed files

📝 tests/test_native_tool_paths.py (+53 -0)

📄 Description

Claimed in the coordination issue as: TEST-NATIVE-FOLDER-FAILURES (claim)

Depends on: #483 (the existing UTF-8-code-page test failure on this Windows host; its fix is not copied into this PR)

What and why

Add four Windows-only tests in NativeFolderLookup to exercise five controlled outcomes of GetShortPathNameW:

  • A zero return must reject even usable text left in the output buffer.
  • A return equal to the buffer capacity must be rejected.
  • A return greater than the buffer capacity must be rejected.
  • A returned short path outside the explicitly selected ASCII code page must be rejected.
  • A successful ASCII short path must be returned unchanged as a positive control.

The API is mocked, so these tests do not create directories or depend on a volume keeping 8.3 short names. The existing code-page tests are untouched, and there are no runtime changes.

Tested

Windows 11 build 26200, CPython 3.10.11 and Anaconda Python 3.13.9; CPU only, no game files.

  • python -I tests/test_native_tool_paths.py NativeFolderLookup: 4 tests passed, no skips.
  • py -3.13 -I tests/test_native_tool_paths.py NativeFolderLookup: 4 tests passed, no skips.
  • In-memory mutation checks detected all five deliberate regressions: accepting zero, accepting an exactly full buffer, ignoring the upper bound, ignoring the code page, and rejecting every lookup. No mutated runtime code is committed.
  • py -3.13 -I tests/test_native_tool_paths.py: 12 tests, 8 passed, 1 failed, 3 skipped. The failure is the original NativeFolder.test_a_folder_outside_the_code_page_gets_its_short_name_or_none, also reproduced before this change on the same base. The three skips need spirv-as and spirv-val.
  • With #483's three test-only edits applied in memory: 13 tests, 10 passed, 3 skipped, no failures. Those edits are not in this branch.
  • py -3.13 -I scripts/check_no_game_data.py tests/test_native_tool_paths.py and git diff --check: passed.
  • py -3.13 -I scripts/run_semantic_tests.py tests/semantic: 465 files, 6105 tests, 2 files failed in 289 s with 12 jobs. Both test_sopc_validation and test_unary_f16_validation report missing spirv-as / spirv-val on PATH. This PR does not change the translator or any semantic-suite file.

GPUs tested: n/a (mocked Windows API and CPU tests only)

AI-assisted: yes (OpenAI Codex)

Checklist

  • Based on current main at d42773d07; GitHub reports Able to merge.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • No new translator rule (contract-table change not applicable).

Draft while #483 remains open and the environment limitations above remain recorded.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/548 **Author:** [@RedMiS7](https://github.com/RedMiS7) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `codex/test-native-folder-failures` --- ### 📝 Commits (1) - [`9be0932`](https://github.com/ubiquitarianism/leonida/commit/9be0932042e1af23abc1e4837f8a0b3552ea74bb) TEST-NATIVE-FOLDER-FAILURES: cover Windows short-path lookup failures ### 📊 Changes **1 file changed** (+53 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_native_tool_paths.py` (+53 -0) </details> ### 📄 Description Claimed in the coordination issue as: TEST-NATIVE-FOLDER-FAILURES ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7124805803)) Depends on: #483 (the existing UTF-8-code-page test failure on this Windows host; its fix is not copied into this PR) ### What and why Add four Windows-only tests in `NativeFolderLookup` to exercise five controlled outcomes of `GetShortPathNameW`: - A zero return must reject even usable text left in the output buffer. - A return equal to the buffer capacity must be rejected. - A return greater than the buffer capacity must be rejected. - A returned short path outside the explicitly selected ASCII code page must be rejected. - A successful ASCII short path must be returned unchanged as a positive control. The API is mocked, so these tests do not create directories or depend on a volume keeping 8.3 short names. The existing code-page tests are untouched, and there are no runtime changes. ### Tested Windows 11 build 26200, CPython 3.10.11 and Anaconda Python 3.13.9; CPU only, no game files. - `python -I tests/test_native_tool_paths.py NativeFolderLookup`: 4 tests passed, no skips. - `py -3.13 -I tests/test_native_tool_paths.py NativeFolderLookup`: 4 tests passed, no skips. - In-memory mutation checks detected all five deliberate regressions: accepting zero, accepting an exactly full buffer, ignoring the upper bound, ignoring the code page, and rejecting every lookup. No mutated runtime code is committed. - `py -3.13 -I tests/test_native_tool_paths.py`: 12 tests, 8 passed, 1 failed, 3 skipped. The failure is the original `NativeFolder.test_a_folder_outside_the_code_page_gets_its_short_name_or_none`, also reproduced before this change on the same base. The three skips need `spirv-as` and `spirv-val`. - With #483's three test-only edits applied in memory: 13 tests, 10 passed, 3 skipped, no failures. Those edits are not in this branch. - `py -3.13 -I scripts/check_no_game_data.py tests/test_native_tool_paths.py` and `git diff --check`: passed. - `py -3.13 -I scripts/run_semantic_tests.py tests/semantic`: 465 files, 6105 tests, 2 files failed in 289 s with 12 jobs. Both `test_sopc_validation` and `test_unary_f16_validation` report missing `spirv-as` / `spirv-val` on PATH. This PR does not change the translator or any semantic-suite file. GPUs tested: n/a (mocked Windows API and CPU tests only) AI-assisted: yes (OpenAI Codex) ### Checklist - [x] Based on current `main` at `d42773d07`; GitHub reports Able to merge. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [x] No new translator rule (contract-table change not applicable). Draft while #483 remains open and the environment limitations above remain recorded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:24 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#594
No description provided.