tooling: pin failure reporting in run_checks_parallel_check #1820
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1827"
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 R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T19:18:46Z.
Change
tests/run_checks_parallel_check.pycovered the pass/fail split and output order oftools/run_checks_parallel.py, but its only failing fixture exits with 3 and writes to stdout. A check that fails the usual way (an uncaughtassert, exit 1, traceback on stderr) was not exercised, and nothing read the group headers, the::endgroup::lines, theFAILED:list beyond its first entry, the summary count or the-jclamp. A runner that reported an exit-1 script asok, or dropped its traceback, passed the check.Single-point mutants of the runner, applied one at a time and reverted:
stderr=subprocess.STDOUT(traceback leaves the group)exitwithout the code'ok' if code != 1FAILED:keeps only the first failing scriptprint("::endgroup::")len(args.scripts) - 1max_workers=args.jobs(no clamp of-j 0)return len(failed)instead ofreturn 1::endgroup::printed before the script outputcode > 1(exit 1 counted as a pass)-Bif failed:never takenThe new cases read:
fail.py(assert False, 'fail ran') that exits 1 and writes its traceback to stderr;run(bad, fail, good): exit status 1; the lineFAILED: <bad> <fail>in the given order; headers(exit 3,,(exit 1,and(ok,;bad ran,AssertionError: fail ranandgood raneach between its own header and the next::endgroup::; three::endgroup::lines;run(good, good)printsall 2 checks passed;-j 0runs one script and printsall 1 checks passed(the runner clamps it to one worker; without the clampThreadPoolExecutor(max_workers=0)raises);good.pyassertssys.flags.dont_write_bytecode, which the usage line promises (python -B <script>).Only the check file changes.
Verification
Based on
origin/main813045b3c1. Windows 11 Pro 26300.9974, Python 3.12.10.Each mutant in the table was applied by hand to
tools/run_checks_parallel.py, followed bypython -B tests/run_checks_parallel_check.py, then reverted. All twelve fail with the new check; on the unmodified runner it passes.Evidence and follow-up
The fixtures are three one-line Python scripts written to a temporary directory by the check itself. The
-Bassertion passes trivially whenPYTHONDONTWRITEBYTECODEis set in the environment; it then just does not detect M11. The tool is not changed.Checklist
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:31:36Z.
Review: COMMENTED
Reviewed at commit
9b5ec25bde3cf2d52f00d05b4f64d2812f6089e5(no P1/P2 defects found).Verification
git diff --check origin/main...HEAD: passpython -B tests/bidi_controls_check.py: pass (Checked 1320 tracked source, script and build/CI files: no bidirectional controls.)python -B tests/run_checks_parallel_check.py: pass (run_checks_parallel_check: ok)tests/run_checks_parallel_check.pyok (0.6s, pure-Python tooling check with no C++ build targets; Debug/Release/O2N/A)python -B tests/run_checks_parallel_check.pyon mutatedtools/run_checks_parallel.py, then restored cleanly):max(1, args.jobs)clamp inmain-> failed as expected on-j 0(rc=1)-Bflag fromrun_onesubprocess command -> failed as expected onsys.flags.dont_write_bytecodeassertion (rc=1)AI-assisted; commands listed were executed locally.