tests: sgpr census folding-volume case survives Windows realpath case (TEST-WIN-SWEEP) #368
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!368
Loading…
Reference in a new issue
No description provided.
Delete branch "win-realpath-case-census"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: TEST-WIN-SWEEP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982)
What and why
python -m pytest tests/test_user_sgpr_census.pyfails on Windows intest_json_report_refuses_to_overwrite_index[folding-volume-case]:Expected 'mock' to have been called once. Called 0 times.The case writesindex.jsonand passesINDEX.JSONas--jsonto simulate a case-folding volume, patching_resolved_keyandos.path.samefileso only the_same_resolved_nameprobe can catch the collision. On Windowsos.path.realpathreturns an existing file's name as it is stored, soINDEX.JSONresolves 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
realpathwithos.path.abspath, astests/test_wave64_graphics_scan.pyandtests/test_psin_names.pyalready 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.realpathnever changed the case there, andtmp_pathgives both names one parent, soabspathyields the same pair as before.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. n/a: no translator ruleIndependent Windows integration check of 608a24a1cd7cdabb7ac4bf839a99272fa2496fb0. Windows 11 build 26100, Python 3.12, pytest 9.2.0.
This verifies the test correction with either version of same_report_path. CPU-only, synthetic files. AI-assisted verification.
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.pyfailstest_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).
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).