feat(tools): export symbolized sample reports as JSON #12499

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

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


What

Adds --json reports using the same counts as text output, with top lists and sorted module identity status. --out still writes collapsed stacks. Includes #12498's opt-in strict-window validation; JSON identity lookups use the parser's lowercase keys while display names retain their original spelling.

#13197 merged at 2026-10-31T03:32:43Z; its exact merged head d5cb07d3c8f92a288e4d171af704a019d15db0b2 and recorded main de824c2919ca65086c6324a1e0388866a7327eea are ancestors. This head includes updated #12498 2c9c09f4aa27df3b80fb2f03ff55c08451931221. Remaining order: #12498 -> #12499. Stacking through the refreshed prerequisite retains both json and os imports and avoids the import-block conflict against main.

Tested

Published head f8dab396ca32a6a8a3d1595e859a23500cac6339, based on recorded main de824c2919ca65086c6324a1e0388866a7327eea. Production script and test file are byte-identical to the previous published head cb974d114ad7eb0ee905093b8606df584994f4c5. 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, 47 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 6d3be57e51de82630d983796d01c8583920ed6e3 and published head have identical complete tree 65ea2aecd499f4b5481a6c20a10383b272c700ec; 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 --json sampler counts and module identity status while retaining text output and collapsed-stack --out behavior.

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 a4e51e429445f6baea641adcc5c3704de9bd24dc; recorded main 9f748f4d8e36ce3714f3b95f3386316e110a9b22; previous published head 7406721e044976c3fd4b6c242f2279365aed3989. 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 / 42 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: #12498
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5053522201 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499). Originally posted by [StoneDC](https://github.com/StoneDC) on 2026-10-28T15:55:36Z. --- ### What Adds `--json` reports using the same counts as text output, with top lists and sorted module identity status. `--out` still writes collapsed stacks. Includes #12498's opt-in strict-window validation; JSON identity lookups use the parser's lowercase keys while display names retain their original spelling. #13197 merged at 2026-10-31T03:32:43Z; its exact merged head `d5cb07d3c8f92a288e4d171af704a019d15db0b2` and recorded main `de824c2919ca65086c6324a1e0388866a7327eea` are ancestors. This head includes updated #12498 `2c9c09f4aa27df3b80fb2f03ff55c08451931221`. Remaining order: #12498 -> #12499. Stacking through the refreshed prerequisite retains both json and os imports and avoids the import-block conflict against main. ### 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 `f8dab396ca32a6a8a3d1595e859a23500cac6339`, based on recorded main `de824c2919ca65086c6324a1e0388866a7327eea`. Production script and test file are byte-identical to the previous published head `cb974d114ad7eb0ee905093b8606df584994f4c5`. 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, 47 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 `6d3be57e51de82630d983796d01c8583920ed6e3` and published head have identical complete tree `65ea2aecd499f4b5481a6c20a10383b272c700ec`; 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 --json sampler counts and module identity status while retaining text output and collapsed-stack --out behavior. 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 `a4e51e429445f6baea641adcc5c3704de9bd24dc`; recorded main `9f748f4d8e36ce3714f3b95f3386316e110a9b22`; previous published head `7406721e044976c3fd4b6c242f2279365aed3989`. 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 / 42 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 --> #12498 - [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:05 +00:00 (Migrated from github.com)

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

Review: COMMENTED


I reviewed head dc76abdaf171 and ran the focused symbolize_samples CTest locally on Linux/Python 3.11; it passed (1/1). Conventions and script registration passed. The JSON path reuses sample_counts, self_counts, and the existing module candidate map, preserving default text output and --out collapsed-stack output. The new tests compare counts/symbols against text, exercise thread filtering and --unverified, and preserve raw addresses for an accepted PE with no symbols. Hosted Ubuntu/Windows relinker, ASan, conventions, intake, labels, and eligibility passed; both macOS relinker jobs remain pending. I found no blocker in this scoped review; this comment is not approval of the remaining platform matrix.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5685837525 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5685837525). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T16:08:05Z. **Review:** COMMENTED --- I reviewed head `dc76abdaf171` and ran the focused `symbolize_samples` CTest locally on Linux/Python 3.11; it passed (1/1). Conventions and script registration passed. The JSON path reuses `sample_counts`, `self_counts`, and the existing module candidate map, preserving default text output and `--out` collapsed-stack output. The new tests compare counts/symbols against text, exercise thread filtering and `--unverified`, and preserve raw addresses for an accepted PE with no symbols. Hosted Ubuntu/Windows relinker, ASan, conventions, intake, labels, and eligibility passed; both macOS relinker jobs remain pending. I found no blocker in this scoped review; this comment is not approval of the remaining platform matrix.
rooklz commented 2026-10-28 17:31:39 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed head dc76abdaf171 on macOS 26.2 arm64. This is the first macOS run; the body lists none.

Results

  • python -m unittest tools.tests.test_symbolize_samples: 33 OK on Python 3.9.6 (system), 3.13 and 3.14.
  • Red control: with tools/symbolize_samples.py from main 470a562903 and the PR tests, exactly the 3 new tests fail.
  • check_conventions --base upstream/main clean, check_test_registration --scripts 212, git merge-tree against 470a562903 clean.

Mutants of json_report (each run against the full module):

  • Killed: self/inclusive swapped, reverse module sort, identity_matches = candidate_accepted, identity_recorded = candidate_accepted, extra stdout line after the JSON.
  • Equivalent: symbolizer.headers in place of samples.headers (same dict object).
  • Survive: self ignores --top, inclusive ignores --top, unsorted modules, and identity_matches = identity_recorded. In the third case, a recorded size/timestamp that does not match the PE still reports true. No current fixture has a record that disagrees with the PE.

The code itself is correct. The JSON contract just isn't pinned in these four places. Here is a test-only diff (14 lines) that kills all four. With it the module gives 34 OK on 3.9.6/3.13/3.14, and the main red control goes to 4 failures:

@@ -534,6 +534,20 @@ class SymbolizeSamplesTests(unittest.TestCase):
         self.assertEqual(report["self"], [{"symbol": "empty.prx+0x1011", "count": 2}])
         self.assertEqual(report["modules"], [{"name": "empty.prx", "candidate_accepted": True, "identity_recorded": True, "identity_matches": True}])
 
+    def test_json_honours_top_sorts_modules_and_reports_identity_mismatch(self):
+        import json
+        samples = self.root / "mismatch.txt"
+        samples.write_text(f"# module libSceAgcDriver.prx {SIZE_OF_IMAGE:#x} {TIMESTAMP + 1:#x}\nz.dll+0x10;libSceAgcDriver.prx+0x1011 5\na.dll+0x20 3\n", encoding="utf-8")
+        result = subprocess.run([sys.executable, symbolize_samples.__file__, str(samples), "--libs", str(self.libs), "--json", "--top", "1"], capture_output=True, text=True, timeout=5)
+        self.assertEqual(result.returncode, 0, result.stderr)
+        report = json.loads(result.stdout)
+        self.assertEqual(report["self"], [{"symbol": "libSceAgcDriver.prx+0x1011", "count": 5}])
+        self.assertEqual(len(report["inclusive"]), 1)
+        self.assertEqual(report["modules"], [
+            {"name": "a.dll", "candidate_accepted": False, "identity_recorded": False, "identity_matches": False},
+            {"name": "libSceAgcDriver.prx", "candidate_accepted": False, "identity_recorded": True, "identity_matches": False},
+            {"name": "z.dll", "candidate_accepted": False, "identity_recorded": False, "identity_matches": False}])
+
 
 class CandidateModuleTests(unittest.TestCase):
     def setUp(self):

Merge order (non-blocking): your #12498 (sampler subtraction windows, head 9c03facb2f) conflicts with this head in both tools/symbolize_samples.py (around L307-308) and the test file (L485). Whichever merges second needs a rebase.

No blocker. Approving. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5686980562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5686980562). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-28T17:31:39Z. **Review:** APPROVED --- Reviewed head `dc76abdaf171` on macOS 26.2 arm64. This is the first macOS run; the body lists none. **Results** - `python -m unittest tools.tests.test_symbolize_samples`: 33 OK on Python 3.9.6 (system), 3.13 and 3.14. - Red control: with `tools/symbolize_samples.py` from main 470a562903 and the PR tests, exactly the 3 new tests fail. - `check_conventions --base upstream/main` clean, `check_test_registration --scripts` 212, `git merge-tree` against 470a562903 clean. **Mutants of `json_report`** (each run against the full module): - Killed: self/inclusive swapped, reverse module sort, `identity_matches = candidate_accepted`, `identity_recorded = candidate_accepted`, extra stdout line after the JSON. - Equivalent: `symbolizer.headers` in place of `samples.headers` (same dict object). - **Survive:** `self` ignores `--top`, `inclusive` ignores `--top`, unsorted `modules`, and `identity_matches = identity_recorded`. In the third case, a recorded size/timestamp that does not match the PE still reports `true`. No current fixture has a record that disagrees with the PE. The code itself is correct. The JSON contract just isn't pinned in these four places. Here is a test-only diff (14 lines) that kills all four. With it the module gives 34 OK on 3.9.6/3.13/3.14, and the main red control goes to 4 failures: ```diff @@ -534,6 +534,20 @@ class SymbolizeSamplesTests(unittest.TestCase): self.assertEqual(report["self"], [{"symbol": "empty.prx+0x1011", "count": 2}]) self.assertEqual(report["modules"], [{"name": "empty.prx", "candidate_accepted": True, "identity_recorded": True, "identity_matches": True}]) + def test_json_honours_top_sorts_modules_and_reports_identity_mismatch(self): + import json + samples = self.root / "mismatch.txt" + samples.write_text(f"# module libSceAgcDriver.prx {SIZE_OF_IMAGE:#x} {TIMESTAMP + 1:#x}\nz.dll+0x10;libSceAgcDriver.prx+0x1011 5\na.dll+0x20 3\n", encoding="utf-8") + result = subprocess.run([sys.executable, symbolize_samples.__file__, str(samples), "--libs", str(self.libs), "--json", "--top", "1"], capture_output=True, text=True, timeout=5) + self.assertEqual(result.returncode, 0, result.stderr) + report = json.loads(result.stdout) + self.assertEqual(report["self"], [{"symbol": "libSceAgcDriver.prx+0x1011", "count": 5}]) + self.assertEqual(len(report["inclusive"]), 1) + self.assertEqual(report["modules"], [ + {"name": "a.dll", "candidate_accepted": False, "identity_recorded": False, "identity_matches": False}, + {"name": "libSceAgcDriver.prx", "candidate_accepted": False, "identity_recorded": True, "identity_matches": False}, + {"name": "z.dll", "candidate_accepted": False, "identity_recorded": False, "identity_matches": False}]) + class CandidateModuleTests(unittest.TestCase): def setUp(self): ``` **Merge order (non-blocking):** your #12498 (sampler subtraction windows, head 9c03facb2f) conflicts with this head in both `tools/symbolize_samples.py` (around L307-308) and the test file (L485). Whichever merges second needs a rebase. No blocker. Approving. AI-assisted: yes.
THEMANnt commented 2026-10-29 06:46:42 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed 47bebadbe30e31fe94d449c49ce6430a79709f6a against 46e54cf1f73dcabda5573619e55bd99534776a8d. JSON symbolization reuses the same self/inclusive aggregation as text output and reports candidate acceptance separately from recorded/matching module identity. Collapsed-stack --out behavior is retained; strict window validation remains opt-in. No actionable finding in this scoped review.

Windows/Python 3.11 validation: head 33 passed, 3 skipped; baseline 27 passed, 3 skipped. Fixture JSON/text counts, identity states and window-validation cases pass. Old-code controls include unsupported new options and absent helper APIs; they are not all independent bug reproductions. Platform alias/permission cases are skipped; no live sampler capture was made.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693855987 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5693855987). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T06:46:42Z. **Review:** APPROVED --- Reviewed `47bebadbe30e31fe94d449c49ce6430a79709f6a` against `46e54cf1f73dcabda5573619e55bd99534776a8d`. JSON symbolization reuses the same self/inclusive aggregation as text output and reports candidate acceptance separately from recorded/matching module identity. Collapsed-stack --out behavior is retained; strict window validation remains opt-in. No actionable finding in this scoped review. Windows/Python 3.11 validation: head 33 passed, 3 skipped; baseline 27 passed, 3 skipped. Fixture JSON/text counts, identity states and window-validation cases pass. Old-code controls include unsupported new options and absent helper APIs; they are not all independent bug reproductions. Platform alias/permission cases are skipped; no live sampler capture was made.
MarcZX10 commented 2026-10-30 06:37:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T06:37:49Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

On head d04458600f1cc0f6359b21d9feabd0d2efcd2fc3, the new error boundary still leaks a RuntimeError for symlink-loop paths, and the related open fix has no declared landing order.

What I ran

  • Exact PR head: d04458600f1cc0f6359b21d9feabd0d2efcd2fc3; recorded base: 4c7d275bef89d309313d16bc2bc05d37a1b50be2; current main: 47cdccde40bca36c1203ec498d9ff47f23bc6537.
  • Merge preview: clean, tree 1f48be6a1bf05f50a745dee6e301a12b828d5bcf.
  • Environment: Linux x86_64, Python 3.11.2, Git 2.39.5.
  • I extracted the changed Python files from the exact PR ref to a temporary directory and ran the suite and a symlink-loop reproduction. Commands/checks:
git merge-tree --write-tree refs/remotes/upstream/main refs/pr/12499
git diff --check refs/remotes/upstream/main...refs/pr/12499
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/pr/12499
python3 tools/check_main_sync.py --base refs/remotes/upstream/main --head refs/pr/12499
From a temporary extraction of tools/ from refs/pr/12499:
python3 -m unittest tools.tests.test_symbolize_samples
python3 tools/symbolize_samples.py samples.txt --libs libs --out loop-a
The sample input is valid; loop-a and loop-b are symlinks to each other.
gh pr checks 12499 --repo boykopovar/AnyPS5

Results

Check Result
Merge preview and diff check Clean merge; git diff --check exited 0 with no output.
Conventions Passed.
Main sync 7 commits ahead and 1,193 behind; merge is clean. The main-only changed paths are outside this PR's two files.
Focused Python suite 37 tests passed, 2 skipped.
Symlink-loop reproduction Failed as a CLI error-handling check: exit 1 with an uncaught RuntimeError traceback for an --out symlink loop.
Hosted checks Conventions, eligibility, labels, and relinker lanes pass; product and specialized jobs are skipped. The author separately reports the Python suite passing on Windows and Linux; those runs are not mine.
Unedited check output
1f48be6a1bf05f50a745dee6e301a12b828d5bcf
All conventions checks passed.
refs/pr/12499 is 7 ahead and 1193 behind refs/remotes/upstream/main (merge base 4c7d275be)
merge: clean
................................s...s
----------------------------------------------------------------------
Ran 37 tests in 1.582s

OK (skipped=2)
exit: 1
stdout: ''
stderr:
Traceback (most recent call last):
  File "/usr/lib/python3.11/pathlib.py", line 1004, in resolve
    p.stat()
  File "/usr/lib/python3.11/pathlib.py", line 1014, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 40] Too many levels of symbolic links: '/tmp/anyps5-pr12499-repro-ciz4qp20/case/loop-a'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 414, in <module>
    sys.exit(main())
             ^^^^^^
  File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 351, in main
    return symbolize(parser, args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 362, in symbolize
    if source.resolve() == output.resolve() or (source.exists() and output.exists() and source.samefile(output)):
                           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/pathlib.py", line 1006, in resolve
    check_eloop(e)
  File "/usr/lib/python3.11/pathlib.py", line 991, in check_eloop
    raise RuntimeError("Symlink loop from %r" % e.filename)
RuntimeError: Symlink loop from '/tmp/anyps5-pr12499-repro-ciz4qp20/case/loop-a'
labels	pass	8s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629363/job/123329394474
relinker (macos-latest, clang++)	pass	3m38s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395816
relinker (macos-latest, clang++, x86_64)	pass	6m35s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395797
relinker (ubuntu-latest, g++)	pass	4m5s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395780
relinker (windows-latest, g++)	pass	8m37s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395774
relinker-asan	pass	2m9s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395739
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398126
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398426
windows	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329397512
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398013
conventions	pass	13s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629421/job/123329312893
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329308542

Findings

Blocking

  1. An output symlink loop escapes the new CLI error boundary. The wrapper catches OSError and ValueError, but on Python 3.11 Path.resolve() raises RuntimeError for a loop. I reproduced this on the exact head using --out pointing to a two-link cycle: the command exits 1 with a traceback rather than the documented usage-error path. Handle this exception or use a loop-safe path comparison, and add a regression for looped output, sample, and --since paths. Open PR #13197 contains a related os.path.realpath change and those regression cases; coordinate the implementation rather than duplicating work.

  2. The overlapping changes have no declared order. The PR overlap comment lists #13197 touching tools/symbolize_samples.py; #12499's checklist still says Depends on: none. The #13197 description says it should land second with an import-line port, but its checklist also says none. The repository asks overlapping PR authors to agree on an order and declare it. Please confirm the order with that author and update the appropriate checklist line.

Sources

Not verified

I did not run Python tests on Windows or macOS. The author-reported cross-platform test results were not independently reproduced. Product and specialized hosted jobs are skipped; no build was needed for this Python change.

To get this to a good state

Return symlink-loop input paths through the normal usage-error path without a traceback, add regressions for all three path arguments, and record the agreed #13197 landing order. I will rerun the suite and source checks on the exact new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708881055 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5708881055). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T06:37:49Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested On head `d04458600f1cc0f6359b21d9feabd0d2efcd2fc3`, the new error boundary still leaks a `RuntimeError` for symlink-loop paths, and the related open fix has no declared landing order. ## What I ran - Exact PR head: `d04458600f1cc0f6359b21d9feabd0d2efcd2fc3`; recorded base: `4c7d275bef89d309313d16bc2bc05d37a1b50be2`; current `main`: `47cdccde40bca36c1203ec498d9ff47f23bc6537`. - Merge preview: clean, tree `1f48be6a1bf05f50a745dee6e301a12b828d5bcf`. - Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. - I extracted the changed Python files from the exact PR ref to a temporary directory and ran the suite and a symlink-loop reproduction. Commands/checks: ```sh git merge-tree --write-tree refs/remotes/upstream/main refs/pr/12499 git diff --check refs/remotes/upstream/main...refs/pr/12499 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/pr/12499 python3 tools/check_main_sync.py --base refs/remotes/upstream/main --head refs/pr/12499 From a temporary extraction of tools/ from refs/pr/12499: python3 -m unittest tools.tests.test_symbolize_samples python3 tools/symbolize_samples.py samples.txt --libs libs --out loop-a The sample input is valid; loop-a and loop-b are symlinks to each other. gh pr checks 12499 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Merge preview and diff check | Clean merge; `git diff --check` exited 0 with no output. | | Conventions | Passed. | | Main sync | 7 commits ahead and 1,193 behind; merge is clean. The main-only changed paths are outside this PR's two files. | | Focused Python suite | 37 tests passed, 2 skipped. | | Symlink-loop reproduction | Failed as a CLI error-handling check: exit 1 with an uncaught `RuntimeError` traceback for an `--out` symlink loop. | | Hosted checks | Conventions, eligibility, labels, and relinker lanes pass; product and specialized jobs are skipped. The author separately reports the Python suite passing on Windows and Linux; those runs are not mine. | <details> <summary>Unedited check output</summary> ```text 1f48be6a1bf05f50a745dee6e301a12b828d5bcf All conventions checks passed. refs/pr/12499 is 7 ahead and 1193 behind refs/remotes/upstream/main (merge base 4c7d275be) merge: clean ................................s...s ---------------------------------------------------------------------- Ran 37 tests in 1.582s OK (skipped=2) exit: 1 stdout: '' stderr: Traceback (most recent call last): File "/usr/lib/python3.11/pathlib.py", line 1004, in resolve p.stat() File "/usr/lib/python3.11/pathlib.py", line 1014, in stat return os.stat(self, follow_symlinks=follow_symlinks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 40] Too many levels of symbolic links: '/tmp/anyps5-pr12499-repro-ciz4qp20/case/loop-a' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 414, in <module> sys.exit(main()) ^^^^^^ File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 351, in main return symbolize(parser, args) ^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/anyps5-pr12499-repro-ciz4qp20/tools/symbolize_samples.py", line 362, in symbolize if source.resolve() == output.resolve() or (source.exists() and output.exists() and source.samefile(output)): ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/pathlib.py", line 1006, in resolve check_eloop(e) File "/usr/lib/python3.11/pathlib.py", line 991, in check_eloop raise RuntimeError("Symlink loop from %r" % e.filename) RuntimeError: Symlink loop from '/tmp/anyps5-pr12499-repro-ciz4qp20/case/loop-a' ``` ```text labels pass 8s https://github.com/boykopovar/AnyPS5/actions/runs/40838629363/job/123329394474 relinker (macos-latest, clang++) pass 3m38s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395816 relinker (macos-latest, clang++, x86_64) pass 6m35s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395797 relinker (ubuntu-latest, g++) pass 4m5s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395780 relinker (windows-latest, g++) pass 8m37s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395774 relinker-asan pass 2m9s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329395739 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398126 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398426 windows skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329397512 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329398013 conventions pass 13s https://github.com/boykopovar/AnyPS5/actions/runs/40838629421/job/123329312893 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/40838629240/job/123329308542 ``` </details> ## Findings ### Blocking 1. **An output symlink loop escapes the new CLI error boundary.** The wrapper catches `OSError` and `ValueError`, but on Python 3.11 `Path.resolve()` raises `RuntimeError` for a loop. I reproduced this on the exact head using `--out` pointing to a two-link cycle: the command exits 1 with a traceback rather than the documented usage-error path. Handle this exception or use a loop-safe path comparison, and add a regression for looped output, sample, and `--since` paths. Open PR #13197 contains a related `os.path.realpath` change and those regression cases; coordinate the implementation rather than duplicating work. 2. **The overlapping changes have no declared order.** The PR overlap comment lists #13197 touching `tools/symbolize_samples.py`; #12499's checklist still says `Depends on: none`. The #13197 description says it should land second with an import-line port, but its checklist also says `none`. The repository asks overlapping PR authors to agree on an order and declare it. Please confirm the order with that author and update the appropriate checklist line. ## Sources - [Current error boundary and `Path.resolve()` call at head `d04458600f1cc0f6359b21d9feabd0d2efcd2fc3`](https://github.com/boykopovar/AnyPS5/blob/d04458600f1cc0f6359b21d9feabd0d2efcd2fc3/tools/symbolize_samples.py#L345-L365) - [Related symlink-loop fix and tests at #13197 head `93244d6c0e50d8d4aee77e06418c716736afec3f`](https://github.com/boykopovar/AnyPS5/blob/93244d6c0e50d8d4aee77e06418c716736afec3f/tools/tests/test_symbolize_samples.py#L455-L477) - [Author-reported Windows/Linux Python tests on this head](https://github.com/boykopovar/AnyPS5/pull/12499#issuecomment-6502964748) - [Automated overlap comment naming #13197](https://github.com/boykopovar/AnyPS5/pull/12499#issuecomment-6516519745) - [Repository overlap-order rule at current `main` `47cdccde40bca36c1203ec498d9ff47f23bc6537`](https://github.com/boykopovar/AnyPS5/blob/47cdccde40bca36c1203ec498d9ff47f23bc6537/CONTRIBUTING.md#L67-L68) ## Not verified I did not run Python tests on Windows or macOS. The author-reported cross-platform test results were not independently reproduced. Product and specialized hosted jobs are skipped; no build was needed for this Python change. ## To get this to a good state Return symlink-loop input paths through the normal usage-error path without a traceback, add regressions for all three path arguments, and record the agreed #13197 landing order. I will rerun the suite and source checks on the exact new head.
MarcZX10 commented 2026-10-30 07:53:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T07:53:11Z.

Review: APPROVED


Reviewed — looks good

At exact head 76b1c846a1ebb7c3c24552a54d483e938be73981, the symlink-loop fix, regression tests, and declared dependency order are in place; the focused Python suite passes.

What I ran

Reviewed the PR against current main f7f03daf52f11191174b1be089a56e268390a707; the merge preview was clean (67bbb3f21608513df57e1a23c249027c7d45a6ad). Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. Ran the tests from a detached worktree at the exact PR head.

git diff --check refs/remotes/upstream/main...refs/review/upstream-12499
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/review/upstream-12499
python3 -m pytest tools/tests/test_symbolize_samples.py -q
git merge-tree --write-tree refs/remotes/upstream/main refs/review/upstream-12499

Results

Check Result
git diff --check Pass; no output.
Repository conventions Pass.
Focused Python tests 38 passed, 2 skipped.
Merge preview with current main Clean; tree 67bbb3f21608513df57e1a23c249027c7d45a6ad.
Dependency ancestry and pairwise previews #13197 → #12498 → #12499 is present in the current commit ancestry; both pairwise previews are clean.
Hosted checks Ubuntu relinker, ASan, conventions, labels, and eligibility pass; Windows and macOS relinker jobs are pending. Product and specialized jobs are skipped.
Unedited local output
$ git diff --check refs/remotes/upstream/main...refs/review/upstream-12499
(no output; exit status 0)

$ python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/review/upstream-12499
All conventions checks passed.

$ python3 -m pytest tools/tests/test_symbolize_samples.py -q
.............................s...s......                                 [100%]
38 passed, 2 skipped in 2.23s

$ git merge-tree --write-tree refs/remotes/upstream/main refs/review/upstream-12499
67bbb3f21608513df57e1a23c249027c7d45a6ad

Findings

Blocking

None found in the reviewed update.

Non-blocking

None.

Sources

Not verified

I did not run the Python suite on Windows or macOS. The hosted Windows/macOS relinker jobs are still pending; they do not exercise the changed Python tool.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5709494026 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5709494026). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T07:53:11Z. **Review:** APPROVED --- # Reviewed — looks good At exact head `76b1c846a1ebb7c3c24552a54d483e938be73981`, the symlink-loop fix, regression tests, and declared dependency order are in place; the focused Python suite passes. ## What I ran Reviewed the PR against current `main` `f7f03daf52f11191174b1be089a56e268390a707`; the merge preview was clean (`67bbb3f21608513df57e1a23c249027c7d45a6ad`). Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. Ran the tests from a detached worktree at the exact PR head. ```sh git diff --check refs/remotes/upstream/main...refs/review/upstream-12499 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/review/upstream-12499 python3 -m pytest tools/tests/test_symbolize_samples.py -q git merge-tree --write-tree refs/remotes/upstream/main refs/review/upstream-12499 ``` ## Results | Check | Result | |---|---| | `git diff --check` | Pass; no output. | | Repository conventions | Pass. | | Focused Python tests | 38 passed, 2 skipped. | | Merge preview with current `main` | Clean; tree `67bbb3f21608513df57e1a23c249027c7d45a6ad`. | | Dependency ancestry and pairwise previews | #13197 → #12498 → #12499 is present in the current commit ancestry; both pairwise previews are clean. | | Hosted checks | Ubuntu relinker, ASan, conventions, labels, and eligibility pass; Windows and macOS relinker jobs are pending. Product and specialized jobs are skipped. | <details> <summary>Unedited local output</summary> ```text $ git diff --check refs/remotes/upstream/main...refs/review/upstream-12499 (no output; exit status 0) $ python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/review/upstream-12499 All conventions checks passed. $ python3 -m pytest tools/tests/test_symbolize_samples.py -q .............................s...s...... [100%] 38 passed, 2 skipped in 2.23s $ git merge-tree --write-tree refs/remotes/upstream/main refs/review/upstream-12499 67bbb3f21608513df57e1a23c249027c7d45a6ad ``` </details> ## Findings ### Blocking None found in the reviewed update. ### Non-blocking None. ## Sources - [`symbolize_samples.py` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/76b1c846a1ebb7c3c24552a54d483e938be73981/tools/symbolize_samples.py#L360-L390) uses loop-safe `os.path.realpath` comparisons for source/output paths. - [Regression tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/76b1c846a1ebb7c3c24552a54d483e938be73981/tools/tests/test_symbolize_samples.py). ## Not verified I did not run the Python suite on Windows or macOS. The hosted Windows/macOS relinker jobs are still pending; they do not exercise the changed Python tool.
jotitadev commented 2026-10-30 22:58:50 +00:00 (Migrated from github.com)

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

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 a4e51e4294, 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: 5 failures, 3 of 3 runs. The same test passes on the head alone and on main alone.

  • The 2 strict-window failures inherited from #12498 (see my note there): validate_window() looks up # module records with the frame's case.
  • The JSON tests: test_json_and_text_share_counts_for_real_pe_symbols_and_unknown_modules, test_json_honours_top_sorts_modules_and_reports_identity_mismatch, and the --json --require-matching-window subtest of test_json_loop_errors_preserve_files_with_matching_window. In the first two, identity_recorded and identity_matches come out False for modules that do have a matching record.

Cause: #13419 (98a587adbe, merged as 82debeeae0 today, after this head). read_headers() now stores the module names in lowercase. The modules entries of the JSON report still use name in samples.headers and samples.headers.get(name). To confirm: the PR merged onto 82debeeae0^1 passes, and onto 82debeeae0 it fails.

Fix (verified): the #12498 change plus the same lookup in the JSON report. With both on the merge, the file passes 3 of 3 runs (45 tests).

-            "modules": [{"name": name, "candidate_accepted": module is not None, "identity_recorded": name in samples.headers,
-                         "identity_matches": module is not None and samples.headers.get(name) == (module.size, module.timestamp)}
+            "modules": [{"name": name, "candidate_accepted": module is not None, "identity_recorded": name.lower() in samples.headers,
+                         "identity_matches": module is not None and samples.headers.get(name.lower()) == (module.size, module.timestamp)}

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719575883 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5719575883). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T22:58:50Z. **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 `a4e51e4294`, 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:** 5 failures, 3 of 3 runs. The same test passes on the head alone and on `main` alone. - The 2 strict-window failures inherited from #12498 (see my note there): `validate_window()` looks up `# module` records with the frame's case. - The JSON tests: `test_json_and_text_share_counts_for_real_pe_symbols_and_unknown_modules`, `test_json_honours_top_sorts_modules_and_reports_identity_mismatch`, and the `--json --require-matching-window` subtest of `test_json_loop_errors_preserve_files_with_matching_window`. In the first two, `identity_recorded` and `identity_matches` come out `False` for modules that do have a matching record. **Cause:** #13419 (`98a587adbe`, merged as `82debeeae0` today, after this head). `read_headers()` now stores the module names in lowercase. The `modules` entries of the JSON report still use `name in samples.headers` and `samples.headers.get(name)`. To confirm: the PR merged onto `82debeeae0^1` passes, and onto `82debeeae0` it fails. **Fix (verified):** the #12498 change plus the same lookup in the JSON report. With both on the merge, the file passes 3 of 3 runs (45 tests). ```diff - "modules": [{"name": name, "candidate_accepted": module is not None, "identity_recorded": name in samples.headers, - "identity_matches": module is not None and samples.headers.get(name) == (module.size, module.timestamp)} + "modules": [{"name": name, "candidate_accepted": module is not None, "identity_recorded": name.lower() in samples.headers, + "identity_matches": module is not None and samples.headers.get(name.lower()) == (module.size, module.timestamp)} ``` Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-31 01:33:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T01:33:02Z.

Review: APPROVED


Re-checked — new head, looks good

At head cb974d114ad7eb0ee905093b8606df584994f4c5, strict-window and JSON module identity now use the parser's lowercased header keys, and the new cases pass with targeted controls distinguishing the previous implementation.

What I ran

Reviewed exact head cb974d114ad7eb0ee905093b8606df584994f4c5 against PR base bff0289787c98570491c8f175179c8a5651c8017. The live merge preview against current main 0a63de777bdff1babae0ae3e30790ba11039c2a1 was clean. Environment: Linux 6.1.0-54-amd64 x86_64, Python 3.11.2; no project build was run.

python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 12499

The precheck ran py_compile, the registered Python test module, test registration, diff/conventions checks, and the live stack check against this exact head.

Results

Check Result
tools.tests.test_symbolize_samples Passed: 47 tests, 2 skipped.
Python syntax Passed.
Test registration Passed: 230 test scripts are registered by an add_test or workflow.
Diff and conventions Passed.
Stack/current-main preview Passed; all declared dependencies are ancestors and previews are clean.
Hosted checks Ubuntu and Windows relinker jobs, relinker-asan, eligibility, and conventions passed. macOS relinker jobs and labels were pending at the last check; Linux product and specialized jobs were skipped.
Helper checks The isolated head lacks tools/pr_test_quality.py, so that heuristic did not run. The precheck's default negative-control attempt used current main, which lacks the declared stack; I instead used the previously approved PR head as the control below.
Unedited output excerpts
..........................................s...s
----------------------------------------------------------------------
Ran 47 tests in 1.674s

OK (skipped=2)
230 test script(s), each run by an add_test or a workflow
Target branch tip: `0a63de777bdff1babae0ae3e30790ba11039c2a1`
All heads unchanged: **True**
Dependency order: #13197 → #12498 → #12499
- PR #13197: **clean** against current base
- PR #12498: **clean** against current base
- PR #12499: **clean** against current base
Conclusion: checks failed

The aggregate precheck conclusion reflects the unavailable test-quality helper and its current-main negative-control setup; the exact-head Python suite, syntax, registration, conventions, and merge checks above passed.

Negative control

Assertion Change to code under test Result
Mixed-case module records are accepted in strict-window comparison and reported accurately in JSON Replaced the implementation with prior approved head a4e51e429445f6baea641adcc5c3704de9bd24dc, kept the new test file, and ran the two new case-insensitive tests Failed in four mixed-case subcases as expected; the old code rejected the strict-window records and reported JSON identity as absent.

The separate symlink-loop regression already passes on that prior head; it predates this update and is not counted as a negative control for the current changes.

Findings

Blocking

None found in the updated diff or checks.

Non-blocking

macOS relinker checks and the labels job were still pending when checked. I did not run a project build.

Sources

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720376283 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12499#pullrequestreview-5720376283). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T01:33:02Z. **Review:** APPROVED --- # Re-checked — new head, looks good At head `cb974d114ad7eb0ee905093b8606df584994f4c5`, strict-window and JSON module identity now use the parser's lowercased header keys, and the new cases pass with targeted controls distinguishing the previous implementation. ## What I ran Reviewed exact head `cb974d114ad7eb0ee905093b8606df584994f4c5` against PR base `bff0289787c98570491c8f175179c8a5651c8017`. The live merge preview against current `main` `0a63de777bdff1babae0ae3e30790ba11039c2a1` was clean. Environment: Linux 6.1.0-54-amd64 x86_64, Python 3.11.2; no project build was run. ```sh python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 12499 ``` The precheck ran `py_compile`, the registered Python test module, test registration, diff/conventions checks, and the live stack check against this exact head. ## Results | Check | Result | |---|---| | `tools.tests.test_symbolize_samples` | Passed: 47 tests, 2 skipped. | | Python syntax | Passed. | | Test registration | Passed: 230 test scripts are registered by an `add_test` or workflow. | | Diff and conventions | Passed. | | Stack/current-main preview | Passed; all declared dependencies are ancestors and previews are clean. | | Hosted checks | Ubuntu and Windows relinker jobs, relinker-asan, eligibility, and conventions passed. macOS relinker jobs and labels were pending at the last check; Linux product and specialized jobs were skipped. | | Helper checks | The isolated head lacks `tools/pr_test_quality.py`, so that heuristic did not run. The precheck's default negative-control attempt used current `main`, which lacks the declared stack; I instead used the previously approved PR head as the control below. | <details> <summary>Unedited output excerpts</summary> ```text ..........................................s...s ---------------------------------------------------------------------- Ran 47 tests in 1.674s OK (skipped=2) ``` ```text 230 test script(s), each run by an add_test or a workflow ``` ```text Target branch tip: `0a63de777bdff1babae0ae3e30790ba11039c2a1` All heads unchanged: **True** Dependency order: #13197 → #12498 → #12499 - PR #13197: **clean** against current base - PR #12498: **clean** against current base - PR #12499: **clean** against current base ``` ```text Conclusion: checks failed ``` The aggregate precheck conclusion reflects the unavailable test-quality helper and its current-main negative-control setup; the exact-head Python suite, syntax, registration, conventions, and merge checks above passed. </details> ## Negative control | Assertion | Change to code under test | Result | |---|---|---| | Mixed-case module records are accepted in strict-window comparison and reported accurately in JSON | Replaced the implementation with prior approved head `a4e51e429445f6baea641adcc5c3704de9bd24dc`, kept the new test file, and ran the two new case-insensitive tests | Failed in four mixed-case subcases as expected; the old code rejected the strict-window records and reported JSON identity as absent. | The separate symlink-loop regression already passes on that prior head; it predates this update and is not counted as a negative control for the current changes. ## Findings ### Blocking None found in the updated diff or checks. ### Non-blocking macOS relinker checks and the labels job were still pending when checked. I did not run a project build. ## Sources - [Header records are normalized to lowercase at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/cb974d114ad7eb0ee905093b8606df584994f4c5/tools/symbolize_samples.py#L233-L239) - [Strict-window module identity lookup at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/cb974d114ad7eb0ee905093b8606df584994f4c5/tools/symbolize_samples.py#L290-L300) - [JSON identity lookup at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/cb974d114ad7eb0ee905093b8606df584994f4c5/tools/symbolize_samples.py#L346-L353) - [Regression tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/cb974d114ad7eb0ee905093b8606df584994f4c5/tools/tests/test_symbolize_samples.py)
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!12499
No description provided.