Skip to content

feat(tools): emit patch advisor decisions as JSON - #12769

Merged
oneandonlydean merged 15 commits into
boykopovar:mainfrom
StoneDC:b40/patch-advisor-json
Nov 12, 2026
Merged

oneandonlydean merged 15 commits into
boykopovar:mainfrom
StoneDC:b40/patch-advisor-json

Conversation

@StoneDC

@StoneDC StoneDC commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Add optional suggest_patches.py --json with final decision status, per-entry verification output/summary, targets, validated metadata and the recommended entry number. Preserve text output and verification policy. Reject non-finite input numbers before they enter reports, and serialize with allow_nan=False.

Integrate current main now that #12340 and #12787 are merged. Keep both RecursionError handlers, path/symlink error handling, current metadata validation and the complete JSON/native integration regressions. Remove the obsolete open prerequisite from the checklist; the merged #12787 head remains an ancestor. Schema-version/conversion-option additions are outside this change.

Tested

Exact tested head: fa07033d2427f9a69174d0864a5edbf39fbfebfc, including main ac94ac850371e12cde7048c3db59135e19a869c3.

Windows 11 / MinGW GCC 15.2 / CMake 4.3.1 / Python 3.14.3 and 3.12.14; WSL Ubuntu 26.04 / GCC 15.2 / CMake 4.2.3 / Python 3.14.4 and 3.12.16. Real CMake/Ninja Release configurations use ANYPS5_RELINKER_ONLY=ON, BUILD_TESTING=ON and each selected interpreter.

  • ctest --test-dir BUILD -R '^(patch_advisor.*|validate_patch_catalog|test_script_registration)$' -V --output-on-failure --no-tests=error: all 6 registered groups pass in each of the four configurations; 62 unittest methods per configuration. Slowest selected group: 1.43 s. No CTest group is skipped.
  • Windows retains five existing unittest filesystem/symlink skips (four advisor, one validator); Linux has none. All six CTest groups, including both real native integrations, execute on both platforms.
  • The real relinker target builds on Windows and Linux. Both registered native advisor integrations run against that newly built executable in every Python configuration. Source inspection confirms the finite-number rejection, allow_nan=False, both RecursionError catches and main path validation are retained.
  • Current-main conventions with the complete template, whitespace checks, Python 3.9 grammar and registered production-script checks pass.

No full system-library build, new ARM64 runtime, local macOS runtime, PS5/title run or GPU validation is claimed. Hosted results for the new head are reported separately after publication; earlier-head checks are not substituted.

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

@oneandonlydean oneandonlydean self-assigned this Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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 6149 core/relinker/CMakeLists.txt
PR 10792 core/relinker/CMakeLists.txt
PR 10861 core/relinker/CMakeLists.txt
PR 11628 core/relinker/CMakeLists.txt
PR 11661 core/relinker/CMakeLists.txt
PR 11689 core/relinker/CMakeLists.txt
PR 11698 core/relinker/CMakeLists.txt
PR 12678 core/relinker/CMakeLists.txt
PR 13486 core/relinker/CMakeLists.txt
PR 15642 core/relinker/CMakeLists.txt
PR 15896 core/relinker/CMakeLists.txt
PR 17451 core/relinker/CMakeLists.txt
PR 17473 core/relinker/CMakeLists.txt

@rooklz rooklz 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.

Checked on macOS arm64 at a0e63ff (merge-tree against main ba5b533 is clean; conventions and git diff --check pass).

  • test_patch_advisor_json 2/2 and test_suggest_patches OK on Homebrew Python 3.12, 3.13 and 3.15. Both new tests fail against main's suggest_patches.py because main has no --json, as expected.
  • Relinker-only build: the full ctest run passes 486/486. patch_advisor_json_integration passes in 0.20 s against a real macOS relinker, so the integration fixture also works on a third host.

Test gap. I made 15 single-line mutants of the JSON reporting in main(). Only 3 are caught by the unit test (list status, entry number, default record status), and the integration test adds exit_code. These 11 pass both tests:
reason dropped (hash mismatch / validate_entry error / timeout), duplicate-id demotion leaving the record verified, no recommended_entry, no_match → rejected, relinker-error status → rejected, top-level error dropped, verification.stdout/stderr emptied, metadata dropped, patch → None.

The test below pins every record kind with one 6-entry catalog (verified, stale hash, invalid metadata, two duplicate ids, timeout) and adds the three failure statuses. It kills all 15 mutants, passes on this head with 3.12, 3.13 and 3.15, and fails on main. Each run takes a few ms:

diff --git a/tools/tests/test_patch_advisor_json.py b/tools/tests/test_patch_advisor_json.py
index 76173a8717..c0cf18f2bc 100644
--- a/tools/tests/test_patch_advisor_json.py
+++ b/tools/tests/test_patch_advisor_json.py
@@ -43,6 +43,43 @@ class PatchAdvisorJsonTests(unittest.TestCase):
             self.assertEqual(self.advise("--json"), 2)
         self.assertEqual(json.loads(output.getvalue())["status"], "error")
 
+    def run_json(self, *extra, **run):
+        output = io.StringIO()
+        with patch.object(suggest_patches.subprocess, "run", **run), contextlib.redirect_stdout(output):
+            code = self.advise("--json", *extra)
+        return code, json.loads(output.getvalue())
+
+    def test_json_records_every_decision(self):
+        verified = subprocess.CompletedProcess([], 0, VERIFIED, "warn")
+        self.entry["id"] = "fix"
+        other = dict(self.entry, id="other")
+        stale = dict(self.entry, targets={"Media/Modules/module.prx": "0" * 64})
+        invalid = dict(self.entry, category="unknown")
+        self.write_index([self.entry, stale, invalid, other, other, dict(self.entry, id="slow")])
+        code, data = self.run_json(side_effect=[verified, verified, verified, subprocess.TimeoutExpired([], 7)])
+        self.assertEqual(code, 0)
+        self.assertEqual(data["status"], "recommended")
+        self.assertEqual(data["recommended_entry"], 1)
+        first, second, third, fourth, fifth, sixth = data["entries"]
+        self.assertEqual(first, {"number": 1, "patch": "patch.toml", "status": "verified",
+                                 "targets": self.entry["targets"], "metadata": {"id": "fix"},
+                                 "verification": {"exit_code": 0, "summary": [1, 1, 0, 0],
+                                                  "stdout": VERIFIED, "stderr": "warn"}})
+        self.assertEqual((second["status"], second["reason"].startswith("Media/Modules/module.prx")), ("rejected", True))
+        self.assertEqual((third["status"], third["reason"]), ("rejected", "invalid category"))
+        for record in (fourth, fifth):
+            self.assertEqual((record["status"], record["reason"]), ("rejected", "duplicate verified id 'other'"))
+        self.assertEqual((sixth["status"], sixth["reason"]), ("rejected", "verification_timeout"))
+
+    def test_json_failure_statuses(self):
+        self.write_index([dict(self.entry, contentVersion="02.000.000")])
+        self.assertEqual(self.run_json(), (1, {"status": "no_match", "entries": []}))
+        self.write_index()
+        code, data = self.run_json(return_value=subprocess.CompletedProcess([], 2, "", "FAIL: invalid patch"))
+        self.assertEqual((code, data["status"], data["error"]), (2, "error", "relinker errors occurred"))
+        self.param.write_text("[]")
+        self.assertEqual(self.run_json(), (2, {"status": "error", "entries": [], "error": "param.json must be an object"}))
+
 
 if __name__ == "__main__":
     unittest.main()

Non-blocking.

  • When the relinker rejects an entry (exit 1 with a mismatch, exit 2, or "did not confirm every patch"), the record is rejected with no reason. Readers have to parse verification to tell these apart from the other rejections. reason values are also mixed: verification_timeout is a code, while every other reason is free text. Picking one style now would keep the JSON contract simple.
  • Argparse errors (for example a missing --catalog) still exit 2 with no JSON on stdout. That is probably fine, but the help text could say so.
  • The overlap bot's #12787 conflict is real: both PRs edit the top-level except in the same block. Whichever lands second needs to add RecursionError next to the new finish(2, "error", error).

(AI-assisted review)

@WhiteAssassins

Copy link
Copy Markdown
Contributor

One suggestion for a future web or GUI consumer: could the JSON include a schema version (for example, schemaVersion: 1) and the conversion options for each verified entry as an argument array?

The text mode already prints --patches and the relevant --skip-sce-module, --sce-module-path, --module-dir, and --executable options. The JSON records currently omit those options, so a consumer would have to reconstruct them from the advisor invocation and the catalog path. An argument array would avoid parsing shell-quoted text and keep the verification and conversion settings aligned.

This could also be a follow-up if you want to keep this PR focused on reporting decisions.

@WhiteAssassins WhiteAssassins 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 head ec81a35. The optional JSON path preserves text behavior and exit statuses, records per-entry verification decisions, and has unit and native relinker integration coverage. Hosted relinker checks pass. The schema-version and conversion-argument suggestion can be handled in a follow-up.

@malekaifa malekaifa 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.

Blocking JSON-validity edge on exact head ec81a35.

Python's json.loads accepts NaN/Infinity by default. A matching catalog entry whose raw patch field is NaN reaches the per-entry rejection path, but the report record captures entry.get("patch") before validation; json.dumps then emits that raw float as the non-standard token NaN.

Repro: use a catalog index entry with titleId TEST00001, contentVersion 01.000.000, patch: NaN, and a syntactically valid targets object; provide valid param/input/relinker files and run with --json. The tool exits 1 with stdout equivalent to:

{"entries":[{"number":1,"patch":NaN,"reason":"invalid relative path: nan","status":"rejected"}],"status":"rejected"}

Python's permissive parser accepts that output, but a strict JSON parser rejects NaN, so a malformed catalog can make the machine-readable mode stop being JSON while the tool reports a handled rejection. I reproduced the same behavior on stacked #12911.

Please reject non-finite constants on JSON input (for example via parse_constant raising ValueError) or otherwise ensure only validated/JSON-safe values are reflected, and add a strict-output regression. The ordinary valid-JSON paths and text behavior otherwise look unaffected.

@StoneDC

StoneDC commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on the review fixes at head be1fa52be7d8d6db53d3244a2ae5f4bc0b581482.

Addressed the strict-JSON review: advisor catalog/parameter input now rejects NaN, Infinity, -Infinity and floating-point overflow before raw fields can enter the report. Serialization also disallows non-finite values. Errors return status 2 with standard JSON. The shared reader opts into strict numeric parsing for the advisor, preserving other callers' existing validation policy. #12787 remains integrated.

Validation at this exact head: built the native relinker on Windows/Linux and passed all four patch-advisor CTest groups, including both native integrations, 37 existing unit tests and 5 JSON tests. Windows has two existing filesystem skips; Linux has none. The new method covers 10 invalid-number input cases and strictly parses stdout; it fails against the pre-fix production code. Temporary integrations with #12911 (6 JSON + 37 unit tests and native JSON integration) and #12875 (2 JSON + 15 validator tests) also pass on both OSes. Those peer branches are not embedded in this PR.

Hosted-check snapshot checked on 2026-10-30 for this head: 5 passed, 3 pending, 4 skipped; no failures. Current checks. Pending and skipped checks are not counted as passes.

The PR description contains the detailed validation scope and limitations. Please re-review the updated head when convenient.

AI-assisted: yes.

@malekaifa malekaifa 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.

Re-reviewed exact head be1fa52. The strict-JSON blocker from my previous review is fixed: the focused JSON suite passes on Windows Python 3.12 and WSL Python 3.12.3, non-finite catalog/parameter numbers are rejected before verification, and allow_nan=False protects serialization. I found no remaining defect in that fix itself. The remaining blocker is integration order with the older approved #12340 through this PR's prerequisite #12787. Exact current-head merge checks: #12787 + #12769 is clean; #12340 + #12787 conflicts in tools/suggest_patches.py; #12340 + #12769 also conflicts in tools/suggest_patches.py. #12787's body already acknowledges the #12340 conflict, but there is no resolved landing order yet. Please coordinate and record the stack order before merge; the lowest-risk sequence is #12340 first, then rebase/resolve #12787 keeping both symlink-loop and RecursionError handling, then rebase #12769 onto that integrated result (and #12911 after it). Once the overlap is resolved/restacked, I can re-check the exact integrated head; the JSON-validity issue itself is resolved.

@StoneDC

StoneDC commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@malekaifa I have resolved and tested the combined stack at bfc6e964822fb3d087921f1d56e3eacb32f761be on main 1a217758a55c09e817366fa4411daac854eeb3f9.

Proposed landing order: #12340 → #12787 → #12769 → #12911. Both #12340 and #12787 are now explicit prerequisites in this PR's checklist.

@rooklz @xXPBSXx could you confirm this order and restack #12787 after #12340? The tested prerequisite resolution keeps validate_entry(catalog, entry) from #12340 and RecursionError in both error handlers from #12787. This PR incorporates that resolved prerequisite tree and preserves all of their regression methods. The external prerequisite branch still needs its author's corresponding update; I am not claiming agreement or that it has already been restacked.

Validation on Windows/MinGW and Linux:

  • Resolved prerequisites: 40 advisor + 15 validator tests pass. Windows has four existing filesystem skips in the advisor suite and one validator skip; Linux has none.
  • Built the real relinker; all four advisor CTest groups pass, including both native integrations, 40 unit tests and 6 JSON tests. The new JSON case tests catalog/module-directory RuntimeError and Windows error 1921 before verifier execution. Actual Linux symlink regressions run as well.
  • Reverting directory resolution or dropping the two RecursionError catches makes the targeted current regressions fail on both platforms.
  • @WhiteAssassins the temporary combination with feat(tools): version patch advisor JSON conversion options #12911 at c9bca05ec8b594292c8034040b50055c9254fce3 is clean: 7 JSON tests, 40 unit tests and the real native JSON integration pass on both OSes. Please keep that follow-up after this integrated head.

The final main refresh, conventions, whitespace, script registration and test-retention checks pass. The prior non-finite JSON fix remains covered. The PR description records exact commits, commands and scope.

Hosted-check snapshot at 2026-10-30T01:09:09+00:00 (UTC): 2 pending; no failures. Current checks. New-head CI and prerequisite-author confirmation remain pending; previous-head CI is not substituted for them. Please re-check this exact integrated head once the stack order is confirmed.

AI-assisted: yes.

@StoneDC

StoneDC commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

CI follow-up for unchanged integrated head bfc6e964822fb3d087921f1d56e3eacb32f761be at 2026-10-30T11:24:45+00:00 (UTC): all 8 executed checks now pass, with 4 skipped jobs and no pending/failing checks.

  • Build matrix: Ubuntu, Windows, both macOS relinker variants, ASan and eligibility pass.
  • Conventions and the labels check pass.
  • Full product and specialized jobs were skipped; they are not claimed as tested.

This completes the hosted-CI result that was pending in my previous repair comment. The proposed #12340 → #12787 → #12769 → #12911 order still awaits prerequisite-author coordination; green CI does not establish that agreement. No source changes in this follow-up.

AI-assisted: yes.

@WhiteAssassins

Copy link
Copy Markdown
Contributor

Any updates?

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Status: #12769 is in review and lands in the stack order @StoneDC set out, after #12340 and #12787. #12787 still needs a restack onto current main before that chain can move. Separately, all merges are paused right now while we fix a test failure on main; we'll pick the stack up again once main is green.

@StoneDC

StoneDC commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@WhiteAssassins @oneandonlydean Status checked at 2026-11-01T17:59:27.100922+00:00 UTC:

The next external action is the #12787 restack; the stack can then be refreshed/verified in that order. This PR is not being presented as independently ready to land. The description now records this status.

Current-head checks. AI-assisted: yes.

@StoneDC

StoneDC commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

CI status update: the newer main Build for 4569fe654a97dbcc07d9e76dd22a6099f3408ab5 is successful, including both Linux and Windows jobs. The earlier queued-main result recorded above is historical. This CI result alone is not a maintainer announcement that the merge pause has been lifted.

The remaining stack action is unchanged: #12340 -> #12787 -> #12769 -> #12911, with public #12787 still at 668f600596bc210a0b54c72a516c6e58971ea59c pending its author restack. This PR remains at bfc6e964822fb3d087921f1d56e3eacb32f761be; its current checks are complete with 8 passed, 4 skipped and no failures. The description now reflects this status. No source change or new local runtime-test result is claimed.

AI-assisted: yes.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@StoneDC

StoneDC commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Updated to 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595 on recorded main b28bb772177768f99874ca38f6252cd0139acf2a to resolve the new shared-handler merge conflict. #12340 is now merged, and the author-restacked #12787 f4bbd890d8d4e8e005fb31317dd9146242e932b2 is an exact ancestor. The resolution retains the catalog/path handling, both RecursionError catches and the JSON rejection record/emit path. The advisor source and three associated test fixtures are byte-identical to the previous published head; no assertion or timeout was changed.

Fresh Windows/MinGW and Linux validation builds the real relinker and passes all 4 registered advisor CTest groups on each OS, including both native integrations, 40 advisor unit tests and 6 JSON tests. There are no skipped CTest groups; Windows retains four existing filesystem/symlink unittest skips, Linux none. The 15 validator tests also pass (one existing Windows unittest skip). Both behavior controls catch removal of the exception catches / directory-error conversion on each OS.

The clean temporary composition c7c5e8a6d2648c2cbdf04059cb8abcf4b9df0297 with public #12911 d9597870a3605d1180269f27507922abf1dcbba3 passes its 40 advisor + 7 JSON tests and real-relinker JSON integration on both platforms. That follower was not added to this branch or pushed to its author. Conventions with the full updated template, whitespace, exact prerequisite ancestry and fixture-retention checks pass. This is focused relinker/tool validation, not a full product/PS5/macOS/GPU run.

The description now declares Depends on: #12787. The remaining order is #12787 -> #12769 -> #12911; the prerequisite restack has been published and only its merge remains external. Please re-review this exact integrated head. The account has READ permission upstream, so a maintainer/reviewer must perform any formal re-request required by the review queue. New-head CI is pending until it completes: checks.

Fresh repository overlap checking identifies #12911 as the intended downstream reporting change, covered by the clean composition above. It could not automatically compare four older peers sharing core/relinker/CMakeLists.txt. Manual review of their exact file patches finds separate macOS fixture, ADX, syscall-route/code-scanning and bit-permutation registrations, with no advisor implementation or duplicate test registration. File-only projections for #10861 and #12678 merge cleanly onto both recorded main and this candidate; #5021 and #7531 already conflict with main and are not claimed fully mergeable. These checks do not add a landing-order dependency beyond #12787.

AI-assisted: yes.

GitHub now reports this exact head mergeable. The existing needs rebase label is awaiting the repository conflict-label workflow refresh; this account has READ permission and cannot remove an upstream label manually.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi malekaifa,

Your review of be1fa52be7 on 30 Oct left one blocker: record a landing order and resolve the overlap with #12340 before the integrated head can be re-checked. Since then:

Could you re-check the integrated head when you have time? Thank you.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@StoneDC

StoneDC commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Hosted CI completion for unchanged head 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595: 8 executed checks passed, 5 jobs skipped, no pending/failing check. The Linux relinker, Windows relinker, macOS x86_64 relinker, other macOS relinker configuration and relinker ASan all pass; conventions also passes. The full Linux/Windows system-library jobs and write-watch, edge-watch and register-context jobs were skipped in this run, so they are not claimed tested. GitHub reports the head mergeable and the stale needs rebase label has been cleared. This follow-up records CI results only; it changes no source and claims no new local runtime run.

The maintainer has already asked for re-review of this integrated head; this adds the final CI links for that review. The remaining landing order is still #12787 -> #12769 -> #12911, with #12787 open at f4bbd890d8d4e8e005fb31317dd9146242e932b2. No new code change was requested in that reply. The description now contains the completed CI result. AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 16aae8b merged onto main 1e65852 · tested 2026-11-03 22:37 UTC · 17 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,069 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 6 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,080 of 3,818 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (523 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.6 s, ⚠️ public_headers 80.7 s, ⚠️ agc_driver_depth_clear_hle 33.6 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
Failing on main too (4, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
Passed on retry (2, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output: Timeout in the parallel run; also passed only on retry in 37 other runs in the last 7 days
vulkan_validation_gate_integration: Failed in the parallel run; also passed only on retry in 3 other runs in the last 7 days
Validation IDs already present on main (4 IDs in 445 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (445 tests): agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, agc_driver_bindless_images, and 437 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (6)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@malekaifa

malekaifa commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Rechecked the integrated head 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595 against base b28bb772177768f99874ca38f6252cd0139acf2a.

I found no remaining source blocker on this exact head. The remaining GitHub review state is historical (CHANGES_REQUESTED on be1fa52be7), so a fresh review on 16aae8b62d is still needed before the PR can advance.

@JJenkx

JJenkx commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 16aae8b62d, merged onto main 990481cdbf (8a82cfc8be, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • patch_advisor_json, patch_advisor_json_integration pass in 3 of 3 runs, none skipped.

AI-assisted: yes.

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Windows check of head 16aae8b62d, merged onto main 1b3ccf750a (clean merge, built together with other open PRs that touch different files).

Setup: Windows 11 x64, WinLibs GCC 15.2.0 (r7), Ninja, Release, -DANYPS5_RELINKER_ONLY=ON, BUILD_TESTING=ON, Python 3.15.

  • Tests chosen with tools/select_tests.py explain from this PR's test files: patch_advisor_json, patch_advisor_json_integration, patch_advisor_unit.
  • All of them pass in 3 of 3 runs.
  • Negative control: with this PR's code reverted to main (files it adds removed) and rebuilt, patch_advisor_json, patch_advisor_json_integration, patch_advisor_unit fail in 2 of 2 runs, so the tests detect the change.

AI-assisted: yes.

@malekaifa

Copy link
Copy Markdown
Contributor

Thanks @JJenkx and @gabichuuuuu for the Windows results. I rechecked unchanged head 16aae8b62d6b5740a2948bc5d6b4e720a2ff4595: on Windows/Python 3.12.10, the advisor unit suite ran 40 tests successfully (4 filesystem skips), and all 6 JSON tests passed. The strict non-finite-number rejection and allow_nan=False remain intact, along with both RecursionError handlers. Current #12787 head f4bbd890d8 is an ancestor of this head, so the prerequisite resolution is present. My earlier source concern remains addressed; the formal changes-requested reviews are on older commits. I did not rerun the native relinker integration test or change a review decision in this pass.

@oneandonlydean
oneandonlydean dismissed stale reviews from malekaifa and malekaifa November 10, 2026 19:20

Addressed: the reviewer rechecked head 16aae8b on 2026-11-10 (issuecomment on this PR, 19:07Z) and wrote that the earlier source concern remains addressed; this request is on older commit ec81a35.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 10, 2026
@ycbuzi

ycbuzi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Tested 16aae8b62d merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows 11 on ARM64 (GitHub-hosted runner), relinker-only build, WinLibs GCC 15.2.0: 98% tests passed, 15 tests failed out of 862; 98% tests passed, 15 tests failed out of 862. 16 of the failing tests fail on main too. run
  • Windows Server 2022 (GitHub-hosted runner), relinker-only build, WinLibs GCC 15.2.0: 100% tests passed, 0 tests failed out of 862; 100% tests passed, 0 tests failed out of 862. run

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@StoneDC

StoneDC commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated to fa07033d2427f9a69174d0864a5edbf39fbfebfc with main ac94ac850371e12cde7048c3db59135e19a869c3.

Integrated current main after #12787 merged, and removed the obsolete prerequisite from the PR body. The strict-number/serialization safeguards, both RecursionError handlers and path/symlink validation remain intact. Both real-relinker advisor integration tests were rebuilt and rerun on Windows and Linux.

I also checked the uploaded artifacts behind the new external Windows report: across both ARM repeats, all 16 distinct failing names in this PR are included in the 17-name main baseline set; the Windows Server 2022 PR runs have no failures. Those historical ARM runs are not claimed passing, and no additional PR-only ARM failure was found in that comparison. Contributor run.

Exact-head validation: Python 3.12 and 3.14 on Windows and Linux, 6/6 focused registered CTest groups passed in all four configurations, 62 unittest methods per configuration, slowest group 1.43 s. Windows retains five existing unittest filesystem/symlink skips (four advisor, one validator); Linux has none. All six CTest groups, including both real native integrations, execute on both platforms. Current-main conventions, whitespace, Python 3.9 grammar and script registration pass.

Final hosted results for this exact updated head are recorded below. This PR has now merged.

AI-assisted: yes.

Final hosted CI completion (verified 2026-11-13) for fa07033d2427f9a69174d0864a5edbf39fbfebfc: 7 executed checks passed, 6 jobs skipped, no pending or failing check.

Skipped jobs (not counted as passes): register-context, linux, pipe-write, edge-watch, write-watch, windows.

The verified head was merged at 2026-11-12T19:30:06Z. This completion update changes no source and claims no new local runtime test.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 12, 2026

@malekaifa malekaifa 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.

Re-reviewed exact head fa07033 after the prerequisite stack was resolved. #12340 and #12787 are both merged, current main is integrated, and this PR is now CLEAN with the prerequisite overlap removed from the diff while retaining the strict-number, RecursionError, and path/symlink handling. Local Windows Python 3.12 validation passed test_patch_advisor_json.py (6/6) and test_suggest_patches.py (40 tests, 4 existing filesystem skips); git diff --check is clean. Hosted checks have no failures. Approved.

@oneandonlydean
oneandonlydean merged commit 7a48c1e into boykopovar:main Nov 12, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants