feat(tools): optionally validate sampler subtraction windows #12498

Merged
StoneDC merged 20 commits from upstream-pr/12498 into main 2026-11-10 09:57:58 +00:00
StoneDC commented 2026-10-28 15:55:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by StoneDC on 2026-10-28T15:55:24Z.


What

Adds opt-in --require-matching-window with --since: require module identity records in both captures and nondecreasing cumulative counters before changing --out. Default subtraction remains unchanged. Strict identity lookups use the parser's lowercase keys while diagnostics retain the original frame-module spelling. Module records cannot prove a common process.

#13197 merged at 2026-10-31T03:32:43Z; its exact merged head d5cb07d3c8f92a288e4d171af704a019d15db0b2 and recorded main de824c2919ca65086c6324a1e0388866a7327eea are ancestors. This PR now has no open prerequisite.

Tested

Published head 2c9c09f4aa27df3b80fb2f03ff55c08451931221, based on recorded main de824c2919ca65086c6324a1e0388866a7327eea. Production script and test file are byte-identical to the previous published head 4dfc8f21eb7f7a928f539ecb16fd08f852066d8b. No function, assertion or timeout changed in this integration update.

Windows Python 3.12.14/3.14.3 and Linux Python 3.12.16/3.14.4: the actual registered symbolize_samples CTest passes, 41 methods per configuration; four existing Windows filesystem/permission skips, zero Linux skips. With the new regression retained, removing only the strict-window/JSON lookup fix still fails its intended assertion on both OSes and interpreters. No setup/import failure is counted.

Actual test commit 05d2e4b43d9a61354ee9e10ebc44ed38fa123bcd and published head have identical complete tree 15ac7a2035f9f4d43250a88cae25126dfe25f8f6; only the final merge message/parent metadata was normalized afterward. Per-head conventions with the complete description, whitespace, prerequisite/main ancestry and unchanged-file checks pass. Fresh hosted checks remain pending until they finish; no new full product, PS5/title, local macOS or GPU test is claimed.

Earlier implementation rationale and validation (historical revisions)

What

Add opt-in --require-matching-window validation before subtracting cumulative sampler captures, retaining permissive behavior by default.

Refresh the prerequisite stack after #13197 was rebased again. Its current description now explicitly states #13197 → #12498 → #12499. Integrate its exact head df27b15bd6 and recorded main, retaining loop-safe path comparisons, both imports on the JSON follower, COFF validation and every original error/feature test. The described order is now aligned across the three PRs; no external branch is edited by this update.

Tested

Exact tested head f073e53274625f8a8ccb83d0c9ea10dc5d8ab688; recorded main 9f748f4d8e36ce3714f3b95f3386316e110a9b22; previous published head d9ac1b44ef6de8429c7ba29b7bf43d8e6f0587d6. Recorded main and the previous published head are ancestors. All current-main and previous unique test methods are retained; the documented #12488 context nesting and #12766 identical-shadow cleanup preserve the effective assertions.

Windows 11: Python 3.14.3 and 3.12.14, CMake 4.3.1 / MinGW GCC 15.2. Non-root Ubuntu 26.04 / WSL: Python 3.14.4 and isolated Python 3.12.16, CMake 4.2.3 / GCC 15.2. Linux runs exact source archives on its native filesystem; a temporary Git snapshot supplies the release tests' current-tree revision lookup.

For both interpreters on each OS, configure Ninja Release with BUILD_TESTING=ON and ANYPS5_RELINKER_ONLY=ON, then run ctest --test-dir <build> -R '^symbolize_samples$' -V and the CTest skip-policy audit. All four configurations pass.

Registered symbolize_samples: 1 CTest group / 37 Python methods pass per configuration. Windows has four existing filesystem/symlink skips; Linux has none. No CTest group skips. Existing real-loop, permissive/strict, JSON where applicable, file-preservation and COFF regressions remain unchanged. The exact live prerequisite is an ancestor; #12499 contains the complete refreshed #12498 head f073e53274625f8a8ccb83d0c9ea10dc5d8ab688.

Current-main conventions with this complete description, whitespace, Python 3.9 grammar, AST test-retention and production-script registration checks pass. No timeout was raised. These are interpreter/tool tests, not native product builds. No actual Python 3.9/3.11, local macOS, PS5/title/GPU or live sampler/browser run is claimed. New-head hosted CI starts after publication; old-head approvals/checks are not fresh results for this head.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5053519205 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12498). Originally posted by [StoneDC](https://github.com/StoneDC) on 2026-10-28T15:55:24Z. --- ### What Adds opt-in `--require-matching-window` with `--since`: require module identity records in both captures and nondecreasing cumulative counters before changing `--out`. Default subtraction remains unchanged. Strict identity lookups use the parser's lowercase keys while diagnostics retain the original frame-module spelling. Module records cannot prove a common process. #13197 merged at 2026-10-31T03:32:43Z; its exact merged head `d5cb07d3c8f92a288e4d171af704a019d15db0b2` and recorded main `de824c2919ca65086c6324a1e0388866a7327eea` are ancestors. This PR now has no open prerequisite. ### 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. --> Published head `2c9c09f4aa27df3b80fb2f03ff55c08451931221`, based on recorded main `de824c2919ca65086c6324a1e0388866a7327eea`. Production script and test file are byte-identical to the previous published head `4dfc8f21eb7f7a928f539ecb16fd08f852066d8b`. No function, assertion or timeout changed in this integration update. Windows Python 3.12.14/3.14.3 and Linux Python 3.12.16/3.14.4: the actual registered `symbolize_samples` CTest passes, 41 methods per configuration; four existing Windows filesystem/permission skips, zero Linux skips. With the new regression retained, removing only the strict-window/JSON lookup fix still fails its intended assertion on both OSes and interpreters. No setup/import failure is counted. Actual test commit `05d2e4b43d9a61354ee9e10ebc44ed38fa123bcd` and published head have identical complete tree `15ac7a2035f9f4d43250a88cae25126dfe25f8f6`; only the final merge message/parent metadata was normalized afterward. Per-head conventions with the complete description, whitespace, prerequisite/main ancestry and unchanged-file checks pass. Fresh hosted checks remain pending until they finish; no new full product, PS5/title, local macOS or GPU test is claimed. <details> <summary>Earlier implementation rationale and validation (historical revisions)</summary> ### What Add opt-in --require-matching-window validation before subtracting cumulative sampler captures, retaining permissive behavior by default. Refresh the prerequisite stack after #13197 was rebased again. Its current description now explicitly states #13197 → #12498 → #12499. Integrate its exact head df27b15bd64fcfac7606d1be42af7e09a3a6b2d3 and recorded main, retaining loop-safe path comparisons, both imports on the JSON follower, COFF validation and every original error/feature test. The described order is now aligned across the three PRs; no external branch is edited by this update. ### 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. --> Exact tested head `f073e53274625f8a8ccb83d0c9ea10dc5d8ab688`; recorded main `9f748f4d8e36ce3714f3b95f3386316e110a9b22`; previous published head `d9ac1b44ef6de8429c7ba29b7bf43d8e6f0587d6`. Recorded main and the previous published head are ancestors. All current-main and previous unique test methods are retained; the documented #12488 context nesting and #12766 identical-shadow cleanup preserve the effective assertions. Windows 11: Python 3.14.3 and 3.12.14, CMake 4.3.1 / MinGW GCC 15.2. Non-root Ubuntu 26.04 / WSL: Python 3.14.4 and isolated Python 3.12.16, CMake 4.2.3 / GCC 15.2. Linux runs exact source archives on its native filesystem; a temporary Git snapshot supplies the release tests' current-tree revision lookup. For both interpreters on each OS, configure Ninja Release with BUILD_TESTING=ON and ANYPS5_RELINKER_ONLY=ON, then run `ctest --test-dir <build> -R '^symbolize_samples$' -V` and the CTest skip-policy audit. All four configurations pass. Registered `symbolize_samples`: 1 CTest group / 37 Python methods pass per configuration. Windows has four existing filesystem/symlink skips; Linux has none. No CTest group skips. Existing real-loop, permissive/strict, JSON where applicable, file-preservation and COFF regressions remain unchanged. The exact live prerequisite is an ancestor; #12499 contains the complete refreshed #12498 head `f073e53274625f8a8ccb83d0c9ea10dc5d8ab688`. Current-main conventions with this complete description, whitespace, Python 3.9 grammar, AST test-retention and production-script registration checks pass. No timeout was raised. These are interpreter/tool tests, not native product builds. No actual Python 3.9/3.11, local macOS, PS5/title/GPU or live sampler/browser run is claimed. New-head hosted CI starts after publication; old-head approvals/checks are not fresh results for this head. </details> ### 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 --> none - [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
MarcZX10 commented 2026-10-28 16:08:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T16:08:35Z.

Review: COMMENTED


I reviewed head 9c03facb2f61 and ran the focused symbolize_samples CTest locally on Linux/Python 3.11; it passed (1/1). Conventions and script registration passed. The opt-in validation checks module identity metadata only for referenced modules and verifies nonnegative, nondecreasing counters in stacks, self, inclusive, and total categories before subtraction; default clipping behavior remains unchanged. The CLI regression confirms strict failures occur before replacing the requested output and that default subtraction remains permissive. Hosted Ubuntu/Windows relinker, ASan, conventions, intake, labels, and eligibility passed; the two macOS jobs remain pending. I found no blocker in this scoped review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5685844611 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12498#pullrequestreview-5685844611). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T16:08:35Z. **Review:** COMMENTED --- I reviewed head `9c03facb2f61` and ran the focused `symbolize_samples` CTest locally on Linux/Python 3.11; it passed (1/1). Conventions and script registration passed. The opt-in validation checks module identity metadata only for referenced modules and verifies nonnegative, nondecreasing counters in stacks, self, inclusive, and total categories before subtraction; default clipping behavior remains unchanged. The CLI regression confirms strict failures occur before replacing the requested output and that default subtraction remains permissive. Hosted Ubuntu/Windows relinker, ASan, conventions, intake, labels, and eligibility passed; the two macOS jobs remain pending. I found no blocker in this scoped review.
rooklz commented 2026-10-28 17:42:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-28T17:42:37Z.

Review: APPROVED


Reviewed head 9c03facb2f61. This is the first macOS run (macOS 26.2 arm64).

Results

  • python -B -m unittest tools.tests.test_symbolize_samples passes on Python 3.9.6 (system), 3.13.13 and 3.14.
  • With tools/symbolize_samples.py reverted to main 2199ee0d47 and the head tests kept, the run fails (RED) on exactly the two new tests: 4 subtest errors (validate_window missing) and 1 CLI failure.
  • check_conventions --base upstream/main passes. check_test_registration --scripts finds 212 scripts. merge-tree onto 2199ee0d47 is clean.

Mutants (14 total)

  • 8 are killed: drop earlier-header check, stack-frame modules not collected, identity compare off, decrease check off, total dropped from the category loop, raise instead of parser.error, needs --since guard dropped, validation skipped.
  • 3 are equivalent from the CLI. load() only accepts isdigit counts, so it never produces a negative counter, which covers both negative-count checks. An earlier-only stack key with a positive count already fails the decrease check, which covers "collect stack modules from later only".
  • 3 survive, and they contradict the documented contract:
    1. not in later.headers dropped. No test has the later capture missing the record that earlier has.
    2. modules seeded empty (self/inclusive rows ignored). Every fixture's referenced module also appears in a +0x stack frame, so a module referenced only by a module offset self inclusive row is never checked.
    3. after[key] < count changed to <=. No test passes validation with an equal counter, so this mutant rejects every unchanged counter and still passes.

The test-only diff below kills all three. With it, head passes on all 3 Pythons and main is still RED (4E + 1F).

diff --git a/tools/tests/test_symbolize_samples.py b/tools/tests/test_symbolize_samples.py
index 16230fa688..e78249d8dc 100644
--- a/tools/tests/test_symbolize_samples.py
+++ b/tools/tests/test_symbolize_samples.py
@@ -498,13 +498,16 @@ class SymbolizeSamplesTests(unittest.TestCase):
                 with self.assertRaisesRegex(ValueError, "counters decreased"):
                     symbolize_samples.validate_window(later, earlier)
                 self.assertFalse(getattr(symbolize_samples.window(later, earlier), category))
+                getattr(later, category)[key] = 5
+                symbolize_samples.validate_window(later, earlier)
 
     def test_strict_window_cli_is_opt_in_and_rejects_before_writing_output(self):
         record = f"# module libSceAgcDriver.prx {SIZE_OF_IMAGE:#x} {TIMESTAMP:#x}\n"
         later, earlier, output = self.root / "later.txt", self.root / "earlier.txt", self.root / "output.txt"
         later.write_text(record + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8")
         command = [sys.executable, symbolize_samples.__file__, str(later), "--libs", str(self.libs), "--out", str(output)]
-        for previous in (record.replace(f"{TIMESTAMP:#x}", "0x1"), ""):
+        for previous, current in ((record.replace(f"{TIMESTAMP:#x}", "0x1"), record), ("", record), (record, "")):
+            later.write_text(current + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8")
             earlier.write_text(previous + "libSceAgcDriver.prx+0x1011 4\n", encoding="utf-8")
             output.write_text("previous output", encoding="utf-8")
             strict = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5)
@@ -515,7 +518,12 @@ class SymbolizeSamplesTests(unittest.TestCase):
             default = subprocess.run(command + ["--since", str(earlier)], capture_output=True, text=True, timeout=5)
             self.assertEqual(default.returncode, 0, default.stderr)
             self.assertIn("3 samples", default.stdout)
+        later.write_text(record + "libSceAgcDriver.prx+0x1011 7\nlibOther.prx 0x20 1 1\n", encoding="utf-8")
         earlier.write_text(record + "libSceAgcDriver.prx+0x1011 4\n", encoding="utf-8")
+        unrecorded = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5)
+        self.assertEqual(unrecorded.returncode, 2, unrecorded.stderr)
+        self.assertIn("libOther.prx", unrecorded.stderr)
+        later.write_text(record + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8")
         matched = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5)
         self.assertEqual(matched.returncode, 0, matched.stderr)
         self.assertIn("3 samples", matched.stdout)

Merge order: this PR conflicts textually with #12499 (same author) in both files, since both append to main() and the test class. Whichever lands second needs a rebase. The logic of the two changes is independent.

No blocker. The diff is optional hardening.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5687126896 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12498#pullrequestreview-5687126896). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-28T17:42:37Z. **Review:** APPROVED --- Reviewed head `9c03facb2f61`. This is the first macOS run (macOS 26.2 arm64). **Results** - `python -B -m unittest tools.tests.test_symbolize_samples` passes on Python 3.9.6 (system), 3.13.13 and 3.14. - With `tools/symbolize_samples.py` reverted to main `2199ee0d47` and the head tests kept, the run fails (RED) on exactly the two new tests: 4 subtest errors (`validate_window` missing) and 1 CLI failure. - `check_conventions --base upstream/main` passes. `check_test_registration --scripts` finds 212 scripts. `merge-tree` onto `2199ee0d47` is clean. **Mutants (14 total)** - 8 are killed: drop earlier-header check, stack-frame modules not collected, identity compare off, decrease check off, `total` dropped from the category loop, `raise` instead of `parser.error`, `needs --since` guard dropped, validation skipped. - 3 are equivalent from the CLI. `load()` only accepts `isdigit` counts, so it never produces a negative counter, which covers both negative-count checks. An earlier-only stack key with a positive count already fails the decrease check, which covers "collect stack modules from later only". - 3 survive, and they contradict the documented contract: 1. **`not in later.headers` dropped.** No test has the *later* capture missing the record that *earlier* has. 2. **`modules` seeded empty (self/inclusive rows ignored).** Every fixture's referenced module also appears in a `+0x` stack frame, so a module referenced only by a `module offset self inclusive` row is never checked. 3. **`after[key] < count` changed to `<=`.** No test passes validation with an equal counter, so this mutant rejects every unchanged counter and still passes. The test-only diff below kills all three. With it, head passes on all 3 Pythons and main is still RED (4E + 1F). ```diff diff --git a/tools/tests/test_symbolize_samples.py b/tools/tests/test_symbolize_samples.py index 16230fa688..e78249d8dc 100644 --- a/tools/tests/test_symbolize_samples.py +++ b/tools/tests/test_symbolize_samples.py @@ -498,13 +498,16 @@ class SymbolizeSamplesTests(unittest.TestCase): with self.assertRaisesRegex(ValueError, "counters decreased"): symbolize_samples.validate_window(later, earlier) self.assertFalse(getattr(symbolize_samples.window(later, earlier), category)) + getattr(later, category)[key] = 5 + symbolize_samples.validate_window(later, earlier) def test_strict_window_cli_is_opt_in_and_rejects_before_writing_output(self): record = f"# module libSceAgcDriver.prx {SIZE_OF_IMAGE:#x} {TIMESTAMP:#x}\n" later, earlier, output = self.root / "later.txt", self.root / "earlier.txt", self.root / "output.txt" later.write_text(record + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8") command = [sys.executable, symbolize_samples.__file__, str(later), "--libs", str(self.libs), "--out", str(output)] - for previous in (record.replace(f"{TIMESTAMP:#x}", "0x1"), ""): + for previous, current in ((record.replace(f"{TIMESTAMP:#x}", "0x1"), record), ("", record), (record, "")): + later.write_text(current + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8") earlier.write_text(previous + "libSceAgcDriver.prx+0x1011 4\n", encoding="utf-8") output.write_text("previous output", encoding="utf-8") strict = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5) @@ -515,7 +518,12 @@ class SymbolizeSamplesTests(unittest.TestCase): default = subprocess.run(command + ["--since", str(earlier)], capture_output=True, text=True, timeout=5) self.assertEqual(default.returncode, 0, default.stderr) self.assertIn("3 samples", default.stdout) + later.write_text(record + "libSceAgcDriver.prx+0x1011 7\nlibOther.prx 0x20 1 1\n", encoding="utf-8") earlier.write_text(record + "libSceAgcDriver.prx+0x1011 4\n", encoding="utf-8") + unrecorded = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5) + self.assertEqual(unrecorded.returncode, 2, unrecorded.stderr) + self.assertIn("libOther.prx", unrecorded.stderr) + later.write_text(record + "libSceAgcDriver.prx+0x1011 7\n", encoding="utf-8") matched = subprocess.run(command + ["--since", str(earlier), "--require-matching-window"], capture_output=True, text=True, timeout=5) self.assertEqual(matched.returncode, 0, matched.stderr) self.assertIn("3 samples", matched.stdout) ``` **Merge order:** this PR conflicts textually with #12499 (same author) in both files, since both append to `main()` and the test class. Whichever lands second needs a rebase. The logic of the two changes is independent. No blocker. The diff is optional hardening. AI-assisted: yes
THEMANnt commented 2026-10-29 06:46:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T06:46:28Z.

Review: APPROVED


Reviewed a1e397ade4d9c225d815cd10721cfe464a5895b0 against 46e54cf1f73dcabda5573619e55bd99534776a8d. Matching-window validation is opt-in, requires --since, checks recorded module identity and nondecreasing cumulative counters before subtraction, and preserves the default subtraction behavior. No actionable finding in this scoped review.

Windows/Python 3.11 validation: head 29 passed, 3 skipped; baseline 27 passed, 3 skipped. The strict-window cases fail or are unsupported on old production and pass on the head. The CLI accurately states that matching records do not prove a common process. Platform alias/permission cases are skipped; no live sampler capture was made.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693854176 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12498#pullrequestreview-5693854176). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T06:46:28Z. **Review:** APPROVED --- Reviewed `a1e397ade4d9c225d815cd10721cfe464a5895b0` against `46e54cf1f73dcabda5573619e55bd99534776a8d`. Matching-window validation is opt-in, requires --since, checks recorded module identity and nondecreasing cumulative counters before subtraction, and preserves the default subtraction behavior. No actionable finding in this scoped review. Windows/Python 3.11 validation: head 29 passed, 3 skipped; baseline 27 passed, 3 skipped. The strict-window cases fail or are unsupported on old production and pass on the head. The CLI accurately states that matching records do not prove a common process. Platform alias/permission cases are skipped; no live sampler capture was made.
jotitadev commented 2026-10-30 22:58:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T22:58:49Z.

Review: COMMENTED


Merge-skew check against current main: symbolize_samples fails after a clean merge.

Setup: Linux x86_64 (i7-8700, Ubuntu 26.04, Python 3.14.4). Head f073e53274, merged with --no-ff onto main 9605300f29 (clean merge, local only). Ran python3 tools/tests/test_symbolize_samples.py and the relinker-only CTest suite.

Result: 2 failures, 3 of 3 runs. The same test passes on the head alone and on main alone.

  • test_strict_window_cli_is_opt_in_and_rejects_before_writing_output: --require-matching-window exits 2 with libSceAgcDriver.prx: matching-window validation needs module records in both captures.
  • test_loop_errors_preserve_files_with_matching_window (role='out'): same usage error, so simulated-loop never reaches stderr.

Cause: #13419 (98a587adbe, merged as 82debeeae0 today, after this head). read_headers() now lowercases the # module names. validate_window() in this PR still looks them up with the case from the frames (libSceAgcDriver.prx), so every module counts as missing. To confirm: the PR merged onto 82debeeae0^1 passes, and onto 82debeeae0 it fails.

Fix (verified): look up the lowercased name, as Symbolizer does after #13419. With this change on the merge, the file passes 3 of 3 runs (40 tests). The error message keeps the original name.

     for name in sorted(modules):
-        if name not in later.headers or name not in earlier.headers:
+        key = name.lower()
+        if key not in later.headers or key not in earlier.headers:
             raise ValueError(f"{name}: matching-window validation needs module records in both captures")
-        if later.headers[name] != earlier.headers[name]:
+        if later.headers[key] != earlier.headers[key]:
             raise ValueError(f"{name}: module identity differs between captures")

#13197 alone merges onto the same main and passes, so the break starts in this PR. #12499 carries the same code; I left a note there for its JSON lookups.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719575767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12498#pullrequestreview-5719575767). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T22:58:49Z. **Review:** COMMENTED --- Merge-skew check against current `main`: `symbolize_samples` fails after a clean merge. **Setup:** Linux x86_64 (i7-8700, Ubuntu 26.04, Python 3.14.4). Head `f073e53274`, merged with `--no-ff` onto `main` `9605300f29` (clean merge, local only). Ran `python3 tools/tests/test_symbolize_samples.py` and the relinker-only CTest suite. **Result:** 2 failures, 3 of 3 runs. The same test passes on the head alone and on `main` alone. - `test_strict_window_cli_is_opt_in_and_rejects_before_writing_output`: `--require-matching-window` exits 2 with `libSceAgcDriver.prx: matching-window validation needs module records in both captures`. - `test_loop_errors_preserve_files_with_matching_window` (`role='out'`): same usage error, so `simulated-loop` never reaches stderr. **Cause:** #13419 (`98a587adbe`, merged as `82debeeae0` today, after this head). `read_headers()` now lowercases the `# module` names. `validate_window()` in this PR still looks them up with the case from the frames (`libSceAgcDriver.prx`), so every module counts as missing. To confirm: the PR merged onto `82debeeae0^1` passes, and onto `82debeeae0` it fails. **Fix (verified):** look up the lowercased name, as `Symbolizer` does after #13419. With this change on the merge, the file passes 3 of 3 runs (40 tests). The error message keeps the original name. ```diff for name in sorted(modules): - if name not in later.headers or name not in earlier.headers: + key = name.lower() + if key not in later.headers or key not in earlier.headers: raise ValueError(f"{name}: matching-window validation needs module records in both captures") - if later.headers[name] != earlier.headers[name]: + if later.headers[key] != earlier.headers[key]: raise ValueError(f"{name}: module identity differs between captures") ``` #13197 alone merges onto the same `main` and passes, so the break starts in this PR. #12499 carries the same code; I left a note there for its JSON lookups. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
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!12498
No description provided.