feat(tools): recommend verified local game patches #8900
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8900"
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?
Imported from boykopovar/AnyPS5. Originally posted by WhiteAssassins on 2026-10-21T05:07:58Z.
What
Add an opt-in, offline advisor for user-supplied patch catalogs. It reads
titleIdandcontentVersionfrom an explicitparam.json, checks the SHA-256 of every target named by the patch, then asks the specified relinker to run--verify-patches. A repeatable--executableoption covers patches that target other executables of the title. It recommends a patch file only when the metadata and hashes match and the relinker confirms every patch. The tool neither downloads nor applies patches; the catalog and patch files stay outside this repository.This implements the offline advisor proposed in Ideas discussion #8893, building on the patch support in #6314. Please also review the discussion: it explains the motivation, community catalog proposal, and possible future web or GUI patch selection. Applying patches after conversion is only an idea for separate design work; this PR does not implement it. Feedback on whether discovery belongs in this repository and on the catalog format is welcome.
No game files or title-specific patch files are included in this PR.
Known limits
[[patch]]entries, but choosing or combining separate patch files needs a follow-up design.Tested
game_patches,patch_advisor_unit, andpatch_advisor_integrationpassed through CTest with a newly built relinker. The integration test exercises--relinker ./relinker, a valid synthetic ELF patch, a relinker byte mismatch, a hash mismatch, and a patch TOML with an escaped string that the relinker rejects. A valid second catalog entry is still recommended; a catalog with only the invalid entry exits 2.--executablepassed verification with the real relinker.PPSA0907601.011.000patch after the relinker verified the local unwrapped input and module. The title owner reports that the game fails to launch without the patch and launches and plays normally with it; gameplay was not part of the automated tests.python3 tools/check_conventions.py --base origin/main: passed.python3 tools/check_test_registration.py --scripts: passed; both advisor tests are registered with CTest for Python 3.11+.python3 tools/pr_overlap.py --branch feat/patch-advisor: no code overlap reported; comparisons involvingdocs/user/USAGE.mdwere inconclusive for several PRs.git diff --check: passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file (n/a: no unimplemented paths in this Python tool).mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:19:26Z.
I ran the exact PR head
04ec954284locally on Linux:python3 tools/tests/test_suggest_patches.pypassed all 5 tests;python3 tools/check_conventions.py --base upstream/mainpassed;git diff --checkpassed. This is synthetic/tooling validation only, not a title or GPU test.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:36:57Z.
I ran the PR revision test file on Linux with Python 3.11: all 5 patch-advisor tests pass. The CLI help also runs, and git diff --check against upstream/main passes. The suite mocks the relinker subprocess, so this verifies the catalog validation and recommendation flow, not an end-to-end relinker invocation or full project build.