feat(tools): emit sanitizer triage as JSON #12872
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12872"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by StoneDC on 2026-10-29T13:24:43Z.
What
Add
sanitizer_report.py --jsonwith sorted per-test names, original outcomes, known-failure reasons, captured sanitizer reports, unexpected flags and known tests that were not run. Preserve the existing failure policy and Markdown summary append behavior.Addresses the contract coverage review in the existing fixture: pin passed/skipped/failed outcomes and every per-test unexpected flag, both before and after the failing test is recognized by the known-failure policy. The review follow-up changes only tests; it does not alter the correct production mapping.
Tested
Exact tested head
4d3e4e578f04ed74e3330f85d9bd37e77c670607on current mainbb04a4f1ea0175e9e4f149f0359a764d62ff3296. Windows / MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3; Ubuntu/WSL / GCC 15.2, CMake 4.2.3, Python 3.14.4. Python-only checks do not claim a C++ build.ctest --test-dir <build> -R "^(sanitizer_report|tools_sanitizer_json)$" --parallel 2 -V: both groups pass on each platform, executing 2 JSON tests and 27 existing sanitizer tests. Windows has two existing platform skips in the old suite; Linux has none. No CTest groups skip.On each OS, separately mutate the real production tool to report every outcome as passed or every unexpected flag as false, retaining these current tests. Both mutants fail value assertions; neither survives the strengthened fixture. The production source is unchanged by these temporary controls. No product build, title execution, sanitizer-instrumented product run or GPU test was performed.
Current-main conventions with this complete description, whitespace, script registration and Python 3.9 grammar checks pass. Actual unittest discovery retains every test from the previously published head, with no duplicate classes or methods in changed files. Linux source archives are initialized as local Git snapshots for checks that require a file index/current revision. No test timeout was raised. New hosted CI starts after publication; previous-head passes are not substituted for the updated head.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-29T14:35:41Z.
Review: COMMENTED
Reviewed exact head
0237a2273ae961d9daa3744f9bb3339846ed4347. The production JSON mapping looks consistent with the existing sanitizer policy, and it composes cleanly with live #12437: an exact merge-tree preserves both--jsonandRuntimeErrorhandling for summary-path symlink loops.Local validation is green: on Windows Python 3.12 the new JSON suite passes 2/2 and the existing sanitizer suite passes 27 tests with 2 platform skips; WSL Python 3.12 passes 2/2 + 27/27.
I did find a focused contract-test gap before approval. The PR advertises each test's original
outcomeand per-testunexpectedflag, but neither field is asserted bytest_sanitizer_json.py. I mutation-checked the exact head:"outcome": found[name]with"outcome": "passed"-> both JSON tests still pass;"unexpected": found[name] == "failed" and name not in knownwith"unexpected": False-> both JSON tests still pass.The implementation itself is correct; this is test coverage for two public machine-readable fields. Please pin them in the existing fixture (for example, assert
okay=passed,skip=skipped,界=failed, and界.unexpectedtrue before the known-failure run / false in the known-failure run). That should kill both mutants without expanding the production diff.Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-30T00:54:29Z.
Review: APPROVED
Re-reviewed exact head
4d3e4e578fafter the contract-test follow-up. Production sanitizer_report.py is byte-identical to the head I reviewed previously; only test_sanitizer_json.py changed. The updated JSON suite passes on Windows Python 3.12 (2/2) and WSL Python 3.12.3 (2/2). The two mutants from my prior review are now killed: forcing every outcome to passed fails the outcome assertions, and forcing every unexpected flag to false fails the unexpected assertion. Current-main merge-tree is clean, the live #12437 symlink-loop RuntimeError follow-up composes cleanly with this head, git diff --check is clean, and the hosted Build on this exact head is fully green across Windows, Ubuntu, both macOS relinker lanes and ASan. The requested coverage gap is resolved; no blocking issue found.