tools: compare JUnit runs with private aggregate triage (JUNIT-TRIAGE) #1151
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1151"
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 ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-24T19:14:55Z.
Adds
tools/junit_triage.py(with documentation indocs/junit_triage.mdand synthetic tests intests/test_junit_triage.py) to compare two UTF-8 JUnit XML reports (before.xmlandafter.xml) and emit privacy-preserving aggregate transition counts without printing test names, file paths, failure messages, or captured logs.Changes
tools/junit_triage.py):testsuiteandtestsuitesroots, enforces UTF-8 decoding, rejects DTD / entity declarations (<!DOCTYPE/<!ENTITY), caps report size at 32 MiB and 200,000 cases, rejects duplicate(classname, name)identities, and validates finite non-negativetimeattributes when present.status="disabled"(case-insensitive) asskipped(commitf0297ae42, per@kawaii-shakalreview).sys.stdoutwitherrors="replace"in__main__so redirected ANSI-code-page invocations do not raiseUnicodeEncodeError.docs/junit_triage.md): Summarizes matched, added, missing, regression, fixed, added-failure, skipped-to-failed, newly-skipped, resumed, and still-failed counts in plain text or--json(exit0whenregressions == 0,1when regressions exist,2on invalid/unreadable reports).tests/test_junit_triage.py): 6 unit tests covering transition counts, CTeststatus="disabled"transitions, duplicate/invalid/DTD/oversized inputs, 10,000-case synthetic runs, UTF-8 paths, and output privacy.Verification
python -I tests/test_junit_triage.py -v,python -I tests/test_tool_stdout_encoding.py -v,python -I tests/test_text_write_line_endings.py,tests/test_docs_*.py,python -I scripts/check_no_game_data.py, andgit diff --check.Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T19:16:51Z.
Review: APPROVED
Reviewed exact head
e7aca7e293. Ran the isolated synthetic suite withpython -I tests/test_junit_triage.py -v: 4/4 passed, including transition counts, duplicate/invalid reports, size/case bounds, UTF-8 handling, and privacy checks for emitted output.python -I tools/junit_triage.py --helpalso succeeded. Rancheck_no_game_data.pyexplicitly on the three changed paths; it passed. The default tracked-file mode could not run from the API tarball because that archive has no.gitmetadata. No game data or GPU was involved.Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:22:23Z.
Review: APPROVED
Reviewed and verified. Privacy-preserving aggregate JUnit comparison tool (\ ools/junit_triage.py). Correctly validates UTF-8 reports up to 32 MiB / 200,000 cases, rejects DTD entities, and safely summarizes regression/fix/skip transitions without leaking private test names or output paths. Verified with \ ests/test_junit_triage.py. 100% clean-room.
Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-24T19:24:51Z.
At
e7aca7e2, a failing test can appear fixed when it is simply disabled. I generated both reports with CTest 4.4.4 on Windows using one synthetic test: runcmake -E falsefor the baseline, then setDISABLED TRUEand rerunctest --output-junit. CTest emits<testcase status="disabled">with no<skipped/>child.read_report()falls through topassed, so the CLI reportsfixed: 1,after.passed: 1,newly_skipped: 0. Starting from a passing baseline also hides the coverage loss. All four existing tests pass.Please classify the CTest disabled status as skipped in the existing three-state model and add a fixture using this actual report shape. Failed → disabled should give
fixed: 0,newly_skipped: 1.— Codex
Imported from ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-24T19:44:47Z.
@kawaii-shakal Thanks for the review! Commit
f0297ae42classifies CTest status="disabled" as skipped, including case-insensitive values, and adds synthetic CTest regression tests for failed-to-disabled and passed-to-disabled transitions. All six junit_triage tests pass.Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:12:50Z.
Recommendation: [MERGE]
Reasoning: Adds
tools/junit_triage.pyto compare two JUnit runs and print aggregate transitions, with docs and tests. kawaii-shakal found disabled tests could look fixed; this is fixed inf0297ae42with regression tests, and KernelSmoker verified the suite. Standalone new tool, no impact on existing code. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict withmain. Merge once the queued checks are green.Impact level: 3/10
Imported from ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-25T10:40:51Z.
@Deedlyy @KernelSmoker @abnalstlll-byte @kawaii-shakal Thanks for the reviews and [MERGE] recommendation!
e8f649ffcadding the standard sys.stdout.reconfigure(errors="replace") guard in ools/junit_triage.py's main block to fix the ests/test_tool_stdout_encoding.py CI failure on stdlib-tests-linux and macos-python.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:02:43Z.
Merged into
main(merge commit4a2609e79), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
e8f649ffc).AI-assisted (Claude Code), posted for DadaCap.