Skip to content

fix(tools): prevent configure seeds from overwriting their cache - #8085

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
vittoriosalvadore:codex/fix-configure-seed-input-alias
Oct 20, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
vittoriosalvadore:codex/fix-configure-seed-input-alias

Conversation

@vittoriosalvadore

@vittoriosalvadore vittoriosalvadore commented Oct 19, 2026 •

Copy link
Copy Markdown

What

Passing the input CMakeCache.txt as the seed output currently replaces the full cache with generated statements and exits successfully. Reject identical paths, normalized aliases, symbolic links and hard links before reading, filtering or writing, with an argparse error that preserves the cache. Distinct output files retain their existing behavior, including include/exclude filtering.

Rebased onto main at 1ed63f63c26f56a007238f1696c94f48ae4d6be7, which includes the UTF-8 BOM parsing fix from #7997. Split the compiler-backed tests into groups to respect the 30-second per-test limit. Register all four concrete test classes: 3 integration checks, 7 path checks, 3 round-trip checks and 1 BOM parsing check. The BOM check has its own configure_seed_parsing CTest entry, addressing the review finding that class-based selection would otherwise leave it unexecuted.

Tested

Ubuntu 26.04.1 x86-64 in a temporary WSL2 environment, GCC 15.2.0, CMake 4.2.3, Ninja 1.13.2 and Python 3.14.4. Configured the real project with -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release and built all its default targets.

Scope: local validation is a native Linux relinker-only build plus the focused tests above. The complete CTest suite, full system-library/application builds, Windows/macOS local tests, game/title and GPU execution were not run. GitHub Actions checks for this updated head are verified after the push; older head results are not presented as results for this one.

GitHub Actions on the updated head: relinker workflow passed Linux, Windows, macOS ARM64, macOS x86_64 and ASAN; conventions passed. All four configure_seed entries actually ran on each platform and stayed below 30 seconds:

CI platform configure_seed paths round_trips parsing
Linux 1.09 s 0.64 s 2.09 s 0.08 s
Windows 4.10 s 1.14 s 8.10 s 0.11 s
macOS ARM64 4.29 s 0.81 s 10.66 s 0.11 s
macOS x86_64 8.75 s 1.63 s 11.65 s 0.24 s

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 674 CMakeLists.txt
PR 1835 CMakeLists.txt
PR 5021 CMakeLists.txt
PR 6044 CMakeLists.txt
PR 6879 CMakeLists.txt
PR 6946 CMakeLists.txt
PR 6947 CMakeLists.txt
PR 7201 CMakeLists.txt
PR 7332 CMakeLists.txt
PR 7523 CMakeLists.txt
PR 7642 CMakeLists.txt

@github-actions github-actions Bot added the build label Oct 19, 2026
@vittoriosalvadore
vittoriosalvadore force-pushed the codex/fix-configure-seed-input-alias branch from 5c6464b to e10fa87 Compare October 20, 2026 02:09
@oneandonlydean oneandonlydean self-assigned this Oct 20, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@vittoriosalvadore thanks, the guard works (same path, normalized alias, symlink and hard link are all refused and the cache is left alone). One problem from the rebase base: since this branch was cut, main added ChecksParsingTests (test_checks_reads_cache_with_utf8_bom, from #7997) to tools/tests/test_configure_seed.py. The three new registrations select tests by class name, so after the merge that class is in none of them and CTest stops running it (the groups cover 13 of the file's 14 tests). Could you rebase on main and register ChecksParsingTests too, either as its own add_test or inside one of the three groups?

@vittoriosalvadore
vittoriosalvadore force-pushed the codex/fix-configure-seed-input-alias branch from e10fa87 to d96a010 Compare October 20, 2026 06:06
@vittoriosalvadore

vittoriosalvadore commented Oct 20, 2026 •

Copy link
Copy Markdown
Author

@oneandonlydean Thank you for the review. Rebased on main and registered ChecksParsingTests in #8085. All 48 focused local tests pass with zero skips; the relinker CI checks also pass.

@oneandonlydean
oneandonlydean merged commit 98db779 into boykopovar:main Oct 20, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants