tests: sgpr census folding-volume case survives Windows realpath case (TEST-WIN-SWEEP) #368

Manually merged
github merged 1 commit from gh-pr/368/head into gh-pr/368/base 2026-11-26 08:56:00 +00:00
Owner

@⁠ItsMrDubey on GitHub · 2026-11-24 03:57 UTC · original
ItsMrDubey:win-realpath-case-census → main · +7 −3 · 1 files · 1 commits · merged 2026-11-24 14:53 UTC

Claimed in the coordination issue as: TEST-WIN-SWEEP (#14)

What and why

python -m pytest tests/test_user_sgpr_census.py fails on Windows in test_json_report_refuses_to_overwrite_index[folding-volume-case]: Expected 'mock' to have been called once. Called 0 times. The case writes index.json and passes INDEX.JSON as --json to simulate a case-folding volume, patching _resolved_key and os.path.samefile so only the _same_resolved_name probe can catch the collision. On Windows os.path.realpath returns an existing file's name as it is stored, so INDEX.JSON resolves to ...\index.json, the two keys already match and the probe is never asked. The tool did refuse the overwrite (exit 2), only by the other route; the test was wrong, not the code.

The case now also patches realpath with os.path.abspath, as tests/test_wave64_graphics_scan.py and tests/test_psin_names.py already do for the same simulation, so the spelling reaches the probe on every OS.

Tested

Windows 11, Python 3.11.9 and 3.12.9:

  • py -3.12 -m pytest tests/test_user_sgpr_census.py: before 1 failed, 43 passed; after 44 passed. Same with Python 3.11.9.
  • python -I scripts/check_no_game_data.py tests/test_user_sgpr_census.py: clean.
  • Linux/macOS: realpath never changed the case there, and tmp_path gives both names one parent, so abspath yields the same pair as before.

AI-assisted: yes

Checklist

  • 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 rule
**@⁠ItsMrDubey** on GitHub · 2026-11-24 03:57 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/368) `ItsMrDubey:win-realpath-case-census` → `main` · +7 −3 · 1 files · 1 commits · merged 2026-11-24 14:53 UTC Claimed in the coordination issue as: TEST-WIN-SWEEP (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why `python -m pytest tests/test_user_sgpr_census.py` fails on Windows in `test_json_report_refuses_to_overwrite_index[folding-volume-case]`: `Expected 'mock' to have been called once. Called 0 times.` The case writes `index.json` and passes `INDEX.JSON` as `--json` to simulate a case-folding volume, patching `_resolved_key` and `os.path.samefile` so only the `_same_resolved_name` probe can catch the collision. On Windows `os.path.realpath` returns an existing file's name as it is stored, so `INDEX.JSON` resolves to `...\index.json`, the two keys already match and the probe is never asked. The tool did refuse the overwrite (exit 2), only by the other route; the test was wrong, not the code. The case now also patches `realpath` with `os.path.abspath`, as `tests/test_wave64_graphics_scan.py` and `tests/test_psin_names.py` already do for the same simulation, so the spelling reaches the probe on every OS. ### Tested Windows 11, Python 3.11.9 and 3.12.9: - `py -3.12 -m pytest tests/test_user_sgpr_census.py`: before 1 failed, 43 passed; after 44 passed. Same with Python 3.11.9. - `python -I scripts/check_no_game_data.py tests/test_user_sgpr_census.py`: clean. - Linux/macOS: `realpath` never changed the case there, and `tmp_path` gives both names one parent, so `abspath` yields the same pair as before. AI-assisted: yes ### Checklist - [x] 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 rule
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:55:58 +00:00
github manually merged commit 608a24a1cd into gh-pr/368/base 2026-11-26 08:56:00 +00:00
Author
Owner

@⁠sodove on GitHub · 2026-11-24 06:18 UTC · original

Independent Windows integration check of 608a24a1cd. Windows 11 build 26100, Python 3.12, pytest 9.2.0.

  • Current main 8f481cf had the reported assertion failure (43 passed, 1 failed). With this test commit applied to main, all 44 passed.
  • The same commit also applied cleanly to #490 at 448dae0f. All 44 SGPR census tests passed there, along with 10/10 real NTFS cases on synthetic files and 35/36 report-path tests (one APFS-only case skipped).

This verifies the test correction with either version of same_report_path. CPU-only, synthetic files. AI-assisted verification.

**@⁠sodove** on GitHub · 2026-11-24 06:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/368#issuecomment-7123795172) Independent Windows integration check of 608a24a1cd7cdabb7ac4bf839a99272fa2496fb0. Windows 11 build 26100, Python 3.12, pytest 9.2.0. - Current main 8f481cf had the reported assertion failure (43 passed, 1 failed). With this test commit applied to main, all 44 passed. - The same commit also applied cleanly to #490 at 448dae0f. All 44 SGPR census tests passed there, along with 10/10 real NTFS cases on synthetic files and 35/36 report-path tests (one APFS-only case skipped). This verifies the test correction with either version of same_report_path. CPU-only, synthetic files. AI-assisted verification.
Author
Owner

@⁠quartz-heron-58 on GitHub · 2026-11-24 08:28 UTC · original

Tested 608a24a1 (cherry-picked onto main 1c93c869) on native Windows 11 Home (build 26300), Python 3.12.10, pytest 9.2.0 (the pins in tests/requirements.txt, in a virtual environment): pass.

On main 1c93c869, python -m pytest tests/test_user_sgpr_census.py fails test_json_report_refuses_to_overwrite_index[folding-volume-case] here: the tool refuses the overwrite as it should, but the probe mock is called 0 times. With this commit the file gives 44 passed. No game files.

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

**@⁠quartz-heron-58** on GitHub · 2026-11-24 08:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/368#issuecomment-7126181737) Tested 608a24a1 (cherry-picked onto main 1c93c869) on native Windows 11 Home (build 26300), Python 3.12.10, pytest 9.2.0 (the pins in `tests/requirements.txt`, in a virtual environment): pass. On main 1c93c869, `python -m pytest tests/test_user_sgpr_census.py` fails `test_json_report_refuses_to_overwrite_index[folding-volume-case]` here: the tool refuses the overwrite as it should, but the probe mock is called 0 times. With this commit the file gives 44 passed. No game files. AI-assisted (Claude Code ran the tests and wrote this comment).
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 14:53 UTC · original

Merging.

Why merged: Fixes a Windows-only test failure: realpath case-folds INDEX.JSON there, so the sgpr-census folding-volume test now patches realpath. Independent Windows passes from sodove and quartz-heron-58, with no open requests.

Why it's good: Test-only change. tests/test_user_sgpr_census.py: 44 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 47c651174, where the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 566 passed / 5 skipped / 0 failed with this PR in. git merge-tree against current main 8f05e09e2: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

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

**@⁠QemmHD** on GitHub · 2026-11-24 14:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/368#issuecomment-7135129203) Merging. **Why merged:** Fixes a Windows-only test failure: realpath case-folds INDEX.JSON there, so the sgpr-census folding-volume test now patches realpath. Independent Windows passes from sodove and quartz-heron-58, with no open requests. **Why it's good:** Test-only change. tests/test_user_sgpr_census.py: 44 passed. Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 47c651174, where the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 566 passed / 5 skipped / 0 failed with this PR in. git merge-tree against current main 8f05e09e2: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.