fix(tools): validate sampler output before printing reports #13813

Merged
dr-hoseyn merged 2 commits from upstream-pr/13813 into main 2026-11-01 01:08:53 +00:00
dr-hoseyn commented 2026-10-31 07:42:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by dr-hoseyn on 2026-10-31T07:42:30Z.


What

Reject --out on address-only sampler captures before symbolization and report printing. Previously the CLI emitted a complete report to stdout before exiting with a usage error. Preserve the existing error message and module-file protection.

Tested

37 symbolizer tests run on Windows: 36 pass, one existing filesystem test skips. The strengthened existing address-output regression fails on main because stdout contains a report and passes after the fix; the module input remains unchanged. Conventions and whitespace checks pass. No C++ build, title/GPU, Linux or macOS run.

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:5095651768 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13813). Originally posted by [dr-hoseyn](https://github.com/dr-hoseyn) on 2026-10-31T07:42:30Z. --- ### What Reject --out on address-only sampler captures before symbolization and report printing. Previously the CLI emitted a complete report to stdout before exiting with a usage error. Preserve the existing error message and module-file protection. ### Tested 37 symbolizer tests run on Windows: 36 pass, one existing filesystem test skips. The strengthened existing address-output regression fails on main because stdout contains a report and passes after the fix; the module input remains unchanged. Conventions and whitespace checks pass. No C++ build, title/GPU, Linux or macOS run. <!-- 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. --> ### 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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 07:51:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T07:51:23Z.

Review: APPROVED


Reviewed — looks good

The CLI now rejects --out for address-only input before printing a report, and the regression test verifies stdout stays empty without modifying the module input.

What I ran

Reviewed head 79ba86d6fdb7dafd38889958d6ff9730b7af6dad against base 828ac0b2ae74aac181ba128fb59b08a1534f2041; the PR merges cleanly. Environment: Linux x86_64, kernel 6.1.0-54-amd64, Python 3.11.2.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13813

Results

Check Result
Diff and conventions Passed.
Python syntax Passed.
tools.tests.test_symbolize_samples 37 tests passed, 2 skipped.
Python test registration Passed: 230 test scripts are registered.
Merge preview Clean against base 828ac0b2ae74aac181ba128fb59b08a1534f2041.
Hosted CI Conventions, intake, labels, eligibility, relinker Linux/Windows, and ASan pass; macOS relinker jobs are queued. Product Linux/Windows and specialized jobs are skipped.
Test-quality helper Could not run in the isolated precheck checkout because the workspace-only helper is absent there; this does not affect the PR checks above.
Unedited output from the precheck
................................s...s
----------------------------------------------------------------------
Ran 37 tests in 1.127s

OK (skipped=2)

230 test script(s), each run by an add_test or a workflow

Negative control

Assertion Change to code under test Did the new test fail?
Address-only sample input with --out produces no report and preserves module input Ran the new test against base 828ac0b2ae74aac181ba128fb59b08a1534f2041 Yes. It failed by assertion because the old implementation printed the report before returning the usage error.

Findings

Blocking

None found.

Non-blocking

None.

Sources

Not verified

No C++ build, title/GPU, Linux/macOS/Windows product run was performed in this review. Two Python tests were skipped by the suite; the macOS relinker CI jobs were queued at the last snapshot.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5721877009 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13813#pullrequestreview-5721877009). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T07:51:23Z. **Review:** APPROVED --- # Reviewed — looks good The CLI now rejects `--out` for address-only input before printing a report, and the regression test verifies stdout stays empty without modifying the module input. ## What I ran Reviewed head `79ba86d6fdb7dafd38889958d6ff9730b7af6dad` against base `828ac0b2ae74aac181ba128fb59b08a1534f2041`; the PR merges cleanly. Environment: Linux x86_64, kernel 6.1.0-54-amd64, Python 3.11.2. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13813 ``` ## Results | Check | Result | |---|---| | Diff and conventions | Passed. | | Python syntax | Passed. | | `tools.tests.test_symbolize_samples` | 37 tests passed, 2 skipped. | | Python test registration | Passed: 230 test scripts are registered. | | Merge preview | Clean against base `828ac0b2ae74aac181ba128fb59b08a1534f2041`. | | Hosted CI | Conventions, intake, labels, eligibility, relinker Linux/Windows, and ASan pass; macOS relinker jobs are queued. Product Linux/Windows and specialized jobs are skipped. | | Test-quality helper | Could not run in the isolated precheck checkout because the workspace-only helper is absent there; this does not affect the PR checks above. | <details> <summary>Unedited output from the precheck</summary> ```text ................................s...s ---------------------------------------------------------------------- Ran 37 tests in 1.127s OK (skipped=2) 230 test script(s), each run by an add_test or a workflow ``` </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Address-only sample input with `--out` produces no report and preserves module input | Ran the new test against base `828ac0b2ae74aac181ba128fb59b08a1534f2041` | Yes. It failed by assertion because the old implementation printed the report before returning the usage error. | ## Findings ### Blocking None found. ### Non-blocking None. ## Sources - [Output validation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/79ba86d6fdb7dafd38889958d6ff9730b7af6dad/tools/symbolize_samples.py) - [Regression test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/79ba86d6fdb7dafd38889958d6ff9730b7af6dad/tools/tests/test_symbolize_samples.py) ## Not verified No C++ build, title/GPU, Linux/macOS/Windows product run was performed in this review. Two Python tests were skipped by the suite; the macOS relinker CI jobs were queued at the last snapshot.
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!13813
No description provided.