test(saves): cover newest-first directory order in the late-link case #2888

Open
github-sync wants to merge 1 commit from github/pr/2888 into main
Owner

@mooki000 opened this pull request on GitHub · 2026-11-12 18:32 UTC · original

What this is for: keep the late-link regression from #2832 effective on both creation-order and newest-first directory listings, as its author asked for on that pull request (the review found the same weak spot).

What changed

In the case "a link to an entry that moves too", half of the 36 absolute links are now made before save/ exists and half after. Every existing assertion and every link stays; no product code changes.

How it was tested

Arch Linux, GCC 16.2.1 and Clang 23.1.3. The new test against the product source from before #2832 (76101111) and against main (3723fd0b), 30 runs a cell, passes/failures:

Product source + new test btrfs GCC btrfs Clang tmpfs GCC tmpfs Clang
Before #2832 0/30 0/30 0/30 0/30
Current-main base 30/0 30/0 30/0 30/0
  • Listed unsorted, btrfs (creation order) and tmpfs (newest first) each put 18 of the added links before save and 18 after it. With #2832's own test the old code failed only on btrfs; now it fails on both.
  • This does not guarantee a late link for arbitrary hashed/name order; a name-hash model can still put every link before save. The added names retain broader coverage, not a guarantee.
  • The project's workflow, run on my fork before opening this: tests/test_linux_saves_move.py passes on Ubuntu and is skipped cleanly on Windows as before; the run is red only in two tests that are red on main itself today (test_readme_menu_rows.py, fixed by #2857; test_wb_shadow_remake.py on Windows, fixed by #2868).
  • Complete game-free suite here: 500 passed, 2 failed, 20 skipped. The two: test_readme_menu_rows.py (main's, as above) and the updater digest check (a .NET reference pack this PC lacks).

Not measured: ext4/xfs or other real filesystem orders; Windows, where this check skips; a real game's first-start migration or real saves.

Refs #2832.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]

> [@mooki000](https://github.com/mooki000) opened this pull request on GitHub · 2026-11-12 18:32 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2888) **What this is for:** keep the late-link regression from #2832 effective on both creation-order and newest-first directory listings, as its author asked for on that pull request (the review found the same weak spot). ## What changed In the case "a link to an entry that moves too", half of the 36 absolute links are now made before `save/` exists and half after. Every existing assertion and every link stays; no product code changes. ## How it was tested Arch Linux, GCC 16.2.1 and Clang 23.1.3. The new test against the product source from before #2832 (`76101111`) and against main (`3723fd0b`), 30 runs a cell, passes/failures: | Product source + new test | btrfs GCC | btrfs Clang | tmpfs GCC | tmpfs Clang | |---|---:|---:|---:|---:| | Before #2832 | 0/30 | 0/30 | 0/30 | 0/30 | | Current-main base | 30/0 | 30/0 | 30/0 | 30/0 | - Listed unsorted, btrfs (creation order) and tmpfs (newest first) each put 18 of the added links before `save` and 18 after it. With #2832's own test the old code failed only on btrfs; now it fails on both. - This does not guarantee a late link for arbitrary hashed/name order; a name-hash model can still put every link before save. The added names retain broader coverage, not a guarantee. - The project's workflow, run on my fork before opening this: `tests/test_linux_saves_move.py` passes on Ubuntu and is skipped cleanly on Windows as before; [the run](https://github.com/mooki000/Hookshot/actions/runs/43276384898) is red only in two tests that are red on main itself today (`test_readme_menu_rows.py`, fixed by #2857; `test_wb_shadow_remake.py` on Windows, fixed by #2868). - Complete game-free suite here: 500 passed, 2 failed, 20 skipped. The two: `test_readme_menu_rows.py` (main's, as above) and the updater digest check (a .NET reference pack this PC lacks). **Not measured:** ext4/xfs or other real filesystem orders; Windows, where this check skips; a real game's first-start migration or real saves. Refs #2832. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <[email protected]> <!-- github-sync:item:2888 -->
Make half the absolute links before save/ is created and half after.
Both creation-order and newest-first directory listings now visit a link
after its target has moved. Keep every existing link assertion.

Refs #2832

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Commenting is not possible because the repository is archived.
No description provided.