fix(ci): include both paths for renamed test inputs #27690

Open
mcarkade wants to merge 1 commit from upstream-pr/27690 into main
mcarkade commented 2026-11-27 00:56:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mcarkade on 2026-11-27T00:56:41Z.


What

A restored test graph still refers to the old path after an input moves. The Linux and Windows selectors now pass --no-renames to Git so the changed-path list contains both paths and can match the cached input. This follows up on the review of #27468. Review finding

Tested

  • Ran both workflow selection steps through Bash in WSL with a real Git rename and a valid older cache key. On main, each wrote only new/input.txt. With the fix, both wrote old/input.txt and new/input.txt.
  • All 18 tests in test_build_eligibility.py passed on Windows. Conventions and git diff --check 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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

Summary by CodeRabbit

  • Bug Fixes
    • Updated Linux and Windows test selection to recognize renamed files as separate old and new paths, improving which tests are selected after file renames.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5519329357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27690). Originally posted by [mcarkade](https://github.com/mcarkade) on 2026-11-27T00:56:41Z. --- ### What A restored test graph still refers to the old path after an input moves. The Linux and Windows selectors now pass `--no-renames` to Git so the changed-path list contains both paths and can match the cached input. This follows up on the review of #27468. [Review finding](https://github.com/boykopovar/AnyPS5/pull/27468#discussion_r4709399805) ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Ran both workflow selection steps through Bash in WSL with a real Git rename and a valid older cache key. On `main`, each wrote only `new/input.txt`. With the fix, both wrote `old/input.txt` and `new/input.txt`. - All 18 tests in `test_build_eligibility.py` passed on Windows. Conventions and `git diff --check` passed. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Updated Linux and Windows test selection to recognize renamed files as separate old and new paths, improving which tests are selected after file renames. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Plyxen commented 2026-11-27 01:00:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-27T01:00:55Z.

Review: APPROVED


Checked head ebcf823b5e applied to main f8a67ff6a6 on Windows 11 (Git for Windows, Python 3.13):

  • python -m unittest tools/tests/test_build_eligibility.py: 18 tests pass. With main's build.yml, test_both_selectors_diff_from_the_matched_cache_key fails, as expected for the string check.
  • In a scratch repository with one commit that moves old/input.txt to new/input.txt, git diff --name-only -z <base> HEAD -- lists only new/input.txt, and with --no-renames it lists both paths.
  • select in tools/select_tests.py only uses the paths for set and prefix matches, so a path that no longer exists in the tree is fine.

The third git diff --name-only in the Windows job (host-only test linking) still detects renames. That is fine there, since it only needs the files that exist at HEAD.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6082131154 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27690#pullrequestreview-6082131154). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-11-27T01:00:55Z. **Review:** APPROVED --- Checked head `ebcf823b5e` applied to `main` `f8a67ff6a6` on Windows 11 (Git for Windows, Python 3.13): - `python -m unittest tools/tests/test_build_eligibility.py`: 18 tests pass. With `main`'s `build.yml`, `test_both_selectors_diff_from_the_matched_cache_key` fails, as expected for the string check. - In a scratch repository with one commit that moves `old/input.txt` to `new/input.txt`, `git diff --name-only -z <base> HEAD --` lists only `new/input.txt`, and with `--no-renames` it lists both paths. - `select` in `tools/select_tests.py` only uses the paths for set and prefix matches, so a path that no longer exists in the tree is fine. The third `git diff --name-only` in the Windows job (host-only test linking) still detects renames. That is fine there, since it only needs the files that exist at `HEAD`. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-27 01:29:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T01:29:44Z.

Review: APPROVED


Reviewed — looks good

The change updates both test selectors to report both paths for renamed inputs, and the changed test checks that behavior in both workflow sections.

What I ran

Reviewed head ebcf823b5e1a08cd5ed7d9e1985f2c163541d1cf. I did not run commands or tests. Read description.md, commits.md, manifest.json, diff.patch, .github/workflows/build.yml (lines 680–725 and 895–935), and tools/tests/test_build_eligibility.py (all 277 lines). Both changed files were included in the review folder; no changed files were excluded.

Results

Check Result Note
Diff and changed source review passed Both selectors add --no-renames; test asserts both occurrences.
Tests not run Author reports tests and workflow checks; not independently verified.

Findings

Blocking

None.

Non-blocking

None.

Not verified

The reported WSL rename scenario, Windows test run, conventions check, and git diff --check were not run independently.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6082285107 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27690#pullrequestreview-6082285107). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-27T01:29:44Z. **Review:** APPROVED --- # Reviewed — looks good The change updates both test selectors to report both paths for renamed inputs, and the changed test checks that behavior in both workflow sections. ## What I ran Reviewed head `ebcf823b5e1a08cd5ed7d9e1985f2c163541d1cf`. I did not run commands or tests. Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `.github/workflows/build.yml` (lines 680–725 and 895–935), and `tools/tests/test_build_eligibility.py` (all 277 lines). Both changed files were included in the review folder; no changed files were excluded. ## Results | Check | Result | Note | |---|---|---| | Diff and changed source review | passed | Both selectors add `--no-renames`; test asserts both occurrences. | | Tests | not run | Author reports tests and workflow checks; not independently verified. | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The reported WSL rename scenario, Windows test run, conventions check, and `git diff --check` were not run independently. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 07:26:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T07:26:23Z.

Review: COMMENTED


Checked both changed-input selectors. Using --no-renames makes a move emit the old and new paths, and -z preserves paths with spaces. The focused eligibility suite passed five tests with one skip. This covers the selector command and workflow wiring.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6165348356 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27690#pullrequestreview-6165348356). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T07:26:23Z. **Review:** COMMENTED --- Checked both changed-input selectors. Using `--no-renames` makes a move emit the old and new paths, and `-z` preserves paths with spaces. The focused eligibility suite passed five tests with one skip. This covers the selector command and workflow wiring. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/27690:upstream-pr/27690'
git switch 'upstream-pr/27690'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/27690'
git switch 'upstream-pr/27690'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/27690'
git switch 'upstream-pr/27690'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/27690'
git switch 'main'
git merge --squash 'upstream-pr/27690'
git switch 'main'
git merge --ff-only 'upstream-pr/27690'
git switch 'main'
git merge 'upstream-pr/27690'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!27690
No description provided.