Skip to content

feat(tools): check configure seeds without writing - #13299

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
StoneDC:b42/seed-check
Oct 30, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
StoneDC:b42/seed-check

Conversation

@StoneDC

@StoneDC StoneDC commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What

Adds a read-only command that checks an unfiltered configure seed against the check results in its source CMakeCache.txt. Exact bytes match returns 0, missing/stale seed returns 1, and invalid/unreadable input returns 2. It does not create directories or rewrite stale files.

Implementation basis: Uses the existing configure_seed.checks and quote helpers and the same sorted default serialization. The fixture fixes the expected seed bytes independently, checks retained mtimes/content, stale and absent destinations, malformed UTF-8 and an empty check set. #12770 previews seed text; this command checks an existing seed and does not require that PR.

Known limits: Only the default unfiltered seed is checked. Seeds generated with include/exclude filters or manually reformatted text can report stale. A match does not establish that the cached configure results are appropriate for another compiler, host or ABI.

Source/schema: tools/check_configure_seed.py tools/configure_seed.py

Exact topic head 0e20f51dc74a8ab2d26179a96bb79d3c92519114 is one independent commit on main 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9. The current-main repository overlap checker against 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9 reported no confirmed overlap. It could not finish comparisons for these older PRs already conflicting with main: #674, #1835, #3786, #5021, #7642, #9539, #10897, #12862. Their shared-file diffs were reviewed separately. 7 scoped file changes projected onto main and then combined with this topic without a new conflict; 1 peer file changes already conflict with main and are not claimed automatically mergeable. They do not provide this command or test matrix. Registration uses a separate target/name and there is no landing-order dependency. Changes to shared registration before landing need a refreshed merge/test check. Depends on: none. The twenty current topic heads are also merged into tested integration cedab5157a32822332671c90812c6780d05157e8.

Tested

Topic head: 0e20f51dc74a8ab2d26179a96bb79d3c92519114. Combined integration: cedab5157a32822332671c90812c6780d05157e8, based on main 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9. Ubuntu/WSL GCC 15.2, CMake 4.2.3, Python 3.14.4; Windows MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3.

python tools/tests/test_check_configure_seed.py: 2 tests passed on each platform, no skips. A mutation in the actual new tool was rejected by the fixture. The command also checked a seed generated from the real full-build CMakeCache.txt without changing its mtime.

Registered CTest tools_seed_check passed on Linux and Windows as part of the filtered twenty-topic run: ctest --test-dir <build> -R <20-topic-pattern> -j 8 -V --output-on-failure, 20/20 passed on each platform, zero skips. cmake --build <linux-full-build> --parallel 8: complete default Linux product build passed. Windows used the full configuration and built the sixteen affected libc test targets plus relinker with --parallel 8; a complete default Windows build is not claimed. Conventions, whitespace, script registration and the public-header declaration/umbrella audit passed. No PS5, title or GPU validation run is claimed. macOS, WASM execution and hosted full-build CI are not reported as passed.

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

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The seed checker compares an existing unfiltered seed with deterministic CMake-cache serialization and leaves both inputs untouched.

What I ran

  • Reviewed head 0e20f51dc74a8ab2d26179a96bb79d3c92519114 against current main 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48.
  • Merge preview was clean: tree 77b18f589ed4645495122f91afe01005283c5df3.
  • Environment: Debian Linux, Python 3.11.2. The focused unit test ran in an isolated detached worktree at the PR head. I did not build or configure AnyPS5.
  • Commands:
git merge-tree --write-tree 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48 0e20f51dc74a8ab2d26179a96bb79d3c92519114
git diff --check 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48...0e20f51dc74a8ab2d26179a96bb79d3c92519114
python3 tools/check_conventions.py --base 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48 --head refs/remotes/upstream/pr-13299 --title 'feat(tools): check configure seeds without writing' --body /tmp/pr-13299-body.md
python3 -m unittest tools.tests.test_check_configure_seed
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13299

Results

Check Result
Current-main merge preview Pass; clean tree 77b18f589ed4645495122f91afe01005283c5df3.
Diff whitespace check Pass; no output.
Conventions and PR template Pass; All conventions checks passed.
Focused Python tests Pass; 2 tests.
Precheck Syntax, unit tests, Python test registration, conventions, diff check, and live mergeability passed. The test-quality heuristic could not run because tools/pr_test_quality.py is absent from the isolated PR snapshot. Its base snapshot was 42d009f; current main is 58d5af7, so I repeated current-base merge, diff, and conventions checks.
Hosted checks Conventions, eligibility, and intake pass. Labels and platform jobs were pending; Linux product was skipped by workflow policy.
Unedited focused-test output
..
----------------------------------------------------------------------
Ran 2 tests in 0.212s

OK

Findings

Blocking

None found in the reviewed head.

Non-blocking

The author reports an additional mutation control and a real-cache check; I did not independently reproduce those. The checker only validates the default unfiltered seed, as documented.

Sources

Not verified

I did not configure/build CMake or run CTest; I ran the Python unit test directly. Hosted platform jobs still pending were not treated as passed.

@github-actions

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 3786 CMakeLists.txt
PR 5021 CMakeLists.txt
PR 7642 CMakeLists.txt
PR 9539 CMakeLists.txt
PR 10897 CMakeLists.txt
PR 12862 CMakeLists.txt

@adriadam10 adriadam10 self-assigned this Oct 30, 2026
@adriadam10
adriadam10 merged commit 6a3afa4 into boykopovar:main Oct 30, 2026
13 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the tool against configure_seed.py on main (same checks/quote, same sorted serialization and UTF-8/\n bytes), ran test_check_configure_seed.py (exact, stale, missing destination without creating directories, invalid cache, empty seed) and confirmed tools_seed_check is registered in ctest; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants