feat(tools): version patch advisor JSON conversion options #12911

Merged
WhiteAssassins merged 20 commits from upstream-pr/12911 into main 2026-11-14 11:31:37 +00:00
WhiteAssassins commented 2026-10-29 14:06:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by WhiteAssassins on 2026-10-29T14:06:58Z.


What

Follow-up to #12769. Add schemaVersion: 1 to every advisor JSON result, including errors, so consumers can identify the output contract. Add conversion_options as an argument array only for verified entries. It contains the same --patches, module and executable options as the existing text output, without shell quoting. If duplicate verified IDs are rejected, their conversion options are removed as well.

This branch includes the corrected #12769 head 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595, including its strict-JSON regression. The focused follow-up is commit c9bca05ec8; compare this branch with that parent head for the four-file delta. The later merges retain the maintainer's main refresh and incorporate the corrected prerequisite without rewriting history. No patch is downloaded, combined or applied.

Tested

CachyOS Linux, Python 3.14.8 and 3.11: tools/tests/test_patch_advisor_json.py (7/7), tools/tests/test_suggest_patches.py (40/40), and core/relinker/relinker/tests/test_patch_advisor_json_integration.py <local relinker> pass with each Python version. The JSON tests include strict parsing of non-finite-number failures. The integration uses a previously built native relinker with a synthetic ELF; the relinker was not rebuilt for this PR. No PS5 title or GPU run is claimed.

python3 tools/check_conventions.py --base origin/main, python3 tools/check_test_registration.py --scripts and git diff --check origin/pr-12769..HEAD pass. git merge-tree --write-tree HEAD origin/main finds no conflict with current main 7feb37ee3e. The parent incorporates the already merged #12340 and the current #12787 head; #12911 remains dependent on #12769 landing first.

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: #12769
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5069496544 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12911). Originally posted by [WhiteAssassins](https://github.com/WhiteAssassins) on 2026-10-29T14:06:58Z. --- ### What Follow-up to #12769. Add `schemaVersion: 1` to every advisor JSON result, including errors, so consumers can identify the output contract. Add `conversion_options` as an argument array only for verified entries. It contains the same `--patches`, module and executable options as the existing text output, without shell quoting. If duplicate verified IDs are rejected, their conversion options are removed as well. This branch includes the corrected #12769 head `16aae8b62d6b5740a2948bc5d6b4e720a2ff4595`, including its strict-JSON regression. The focused follow-up is commit `c9bca05ec8`; compare this branch with that parent head for the four-file delta. The later merges retain the maintainer's main refresh and incorporate the corrected prerequisite without rewriting history. No patch is downloaded, combined or applied. ### 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. --> CachyOS Linux, Python 3.14.8 and 3.11: `tools/tests/test_patch_advisor_json.py` (7/7), `tools/tests/test_suggest_patches.py` (40/40), and `core/relinker/relinker/tests/test_patch_advisor_json_integration.py <local relinker>` pass with each Python version. The JSON tests include strict parsing of non-finite-number failures. The integration uses a previously built native relinker with a synthetic ELF; the relinker was not rebuilt for this PR. No PS5 title or GPU run is claimed. `python3 tools/check_conventions.py --base origin/main`, `python3 tools/check_test_registration.py --scripts` and `git diff --check origin/pr-12769..HEAD` pass. `git merge-tree --write-tree HEAD origin/main` finds no conflict with current main `7feb37ee3e`. The parent incorporates the already merged #12340 and the current #12787 head; #12911 remains dependent on #12769 landing first. ### 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) - [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: <!-- #PR, or none --> #12769 - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
malekaifa commented 2026-11-13 00:46:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-11-13T00:46:33Z.

Review: APPROVED


Rechecked exact head f37cce2a98 after #12769 merged. The branch is currently clean/mergeable, hosted checks are green, the focused JSON/advisor validation previously passed on this unchanged head, and the Windows/full-suite follow-up reports no new failures versus main. No remaining source blocker found.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5884381460 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12911#pullrequestreview-5884381460). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-11-13T00:46:33Z. **Review:** APPROVED --- Rechecked exact head f37cce2a982c60b846e8d146f475e6f702c7fe23 after #12769 merged. The branch is currently clean/mergeable, hosted checks are green, the focused JSON/advisor validation previously passed on this unchanged head, and the Windows/full-suite follow-up reports no new failures versus main. No remaining source blocker found.
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!12911
No description provided.