tooling: reject a script given twice on the run_checks_parallel command line #2805

Manually merged
github merged 1 commit from gh-pr/2805/head into gh-pr/2805/base 2026-11-27 01:24:00 +00:00
Owner

@⁠RenzoWit35 on GitHub · 2026-11-26 11:00 UTC · original
RenzoWit35:tooling/run-checks-duplicate-scripts → main · +13 −1 · 2 files · 1 commits · merged 2026-11-26 11:08 UTC

Change

read_check_files fails a command listed twice across tests/checks/*.txt, and tests/checks/README.md says a command listed twice fails the job. main built its checks from the command-line scripts without that test, so the same script given twice ran twice and the job passed.

main now raises duplicate command-line script: <path> for a repeated script. It is reported like the other errors from main: message on stderr, exit status 1, nothing runs. Scripts are compared as the exact strings given, which is the comparison read_check_files (tuple of the split command) and merge_checks already use; no path normalisation is added, so x.py and ./x.py remain two entries as they do today. A script on the command line that is also listed in --from-dir still runs once.

The only run_checks_parallel.py command line in .github/workflows/*.yml is the python-linux step (the pixel-binary job calls merge_checks and run_checks directly). It has 203 scripts and none is repeated, so CI stays valid.

tests/run_checks_parallel_check.py ran one script twice and expected two runs; it now uses two different scripts, and a new case asserts that a repeated script gives the one-line error, status 1 and no group output.

Verification

  • Before: python -B <origin/main runner> t.py t.py -> both runs, all 2 checks passed, exit 0.
  • After: python -B tools/run_checks_parallel.py t.py t.py -> duplicate command-line script: .../t.py, exit 1.
  • python -B tests/run_checks_parallel_check.py -> run_checks_parallel_check: ok.
  • python -B tests/run_checks_fragments_check.py -> run_checks_fragments_check ok.
  • Negative control: the new check copied to a scratch tree next to the origin/main runner fails with AssertionError at the twice.stdout.strip() == "duplicate command-line script: ..." line (the old runner ran good.py and printed its group).

Evidence and follow-up

Not changed: spelling differences such as x.py versus ./x.py are not detected, in the same way as for the listed files.

AI-assisted.

**@⁠RenzoWit35** on GitHub · 2026-11-26 11:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2805) `RenzoWit35:tooling/run-checks-duplicate-scripts` → `main` · +13 −1 · 2 files · 1 commits · merged 2026-11-26 11:08 UTC ## Change `read_check_files` fails a command listed twice across `tests/checks/*.txt`, and `tests/checks/README.md` says a command listed twice fails the job. `main` built its checks from the command-line scripts without that test, so the same script given twice ran twice and the job passed. `main` now raises `duplicate command-line script: <path>` for a repeated script. It is reported like the other errors from `main`: message on stderr, exit status 1, nothing runs. Scripts are compared as the exact strings given, which is the comparison `read_check_files` (tuple of the split command) and `merge_checks` already use; no path normalisation is added, so `x.py` and `./x.py` remain two entries as they do today. A script on the command line that is also listed in `--from-dir` still runs once. The only `run_checks_parallel.py` command line in `.github/workflows/*.yml` is the `python-linux` step (the pixel-binary job calls `merge_checks` and `run_checks` directly). It has 203 scripts and none is repeated, so CI stays valid. `tests/run_checks_parallel_check.py` ran one script twice and expected two runs; it now uses two different scripts, and a new case asserts that a repeated script gives the one-line error, status 1 and no group output. ## Verification - Before: `python -B <origin/main runner> t.py t.py` -> both runs, `all 2 checks passed`, exit 0. - After: `python -B tools/run_checks_parallel.py t.py t.py` -> `duplicate command-line script: .../t.py`, exit 1. - `python -B tests/run_checks_parallel_check.py` -> `run_checks_parallel_check: ok`. - `python -B tests/run_checks_fragments_check.py` -> `run_checks_fragments_check ok`. - Negative control: the new check copied to a scratch tree next to the `origin/main` runner fails with `AssertionError` at the `twice.stdout.strip() == "duplicate command-line script: ..."` line (the old runner ran `good.py` and printed its group). ## Evidence and follow-up Not changed: spelling differences such as `x.py` versus `./x.py` are not detected, in the same way as for the listed files. AI-assisted.
read_check_files fails a command listed twice across tests/checks/*.txt and
tests/checks/README.md says the job fails, but main built its checks from
the command-line scripts without that test, so the same script given twice
ran twice and the job passed.

main now raises "duplicate command-line script: <path>" for a repeated
script, reported like the other errors (message on stderr, exit status 1,
nothing runs). Scripts are compared as the exact strings given, the same
comparison read_check_files and merge_checks use. The only CI call, the
python-linux job (203 scripts), has no repeated script.

The existing check ran one script twice and expected two runs; it now uses
two different scripts and a new case covers the repeated one.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:23:58 +00:00
github manually merged commit a1c9cd0a5c into gh-pr/2805/base 2026-11-27 01:24:00 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 11:07 UTC · original · reviewed

Review of head a1c9cd0a.

Checked against origin/main (4 commits behind, no overlap with the two touched files):

  • tools/run_checks_parallel.py: the repeated-script check in main is correct. It raises inside the existing try, so it is reported like the other main errors (stderr, exit 1, nothing runs). It uses the same exact-string comparison as read_check_files and merge_checks.
  • tests/run_checks_parallel_check.py: the old case ran one script twice; it now uses two different scripts. The new case asserts the one-line error, status 1 and no group output.
  • No other open or merged PR covers this (searched "run_checks_parallel duplicate"). #2810 touches the same tool but a different slice (BOM in listings).

Commands run locally on this head:

  • python3 -B tests/run_checks_parallel_check.py -> ok
  • python3 tests/docs_links_check.py -> ok (27 files, 541 links)
  • python3 tests/bidi_controls_check.py -> ok
  • git diff --check origin/main...HEAD -> clean
  • Mutation 1 (duplicate check disabled): the check script fails (rc 1).
  • Mutation 2 (comparison slice made empty): the check script fails (rc 1).
  • CI on this head: Linux Python checks, Windows build/test and gfx1013 fixtures all pass.

No blockers.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 11:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2805#pullrequestreview-6073054583) · **reviewed** Review of head a1c9cd0a. Checked against origin/main (4 commits behind, no overlap with the two touched files): - `tools/run_checks_parallel.py`: the repeated-script check in `main` is correct. It raises inside the existing try, so it is reported like the other `main` errors (stderr, exit 1, nothing runs). It uses the same exact-string comparison as `read_check_files` and `merge_checks`. - `tests/run_checks_parallel_check.py`: the old case ran one script twice; it now uses two different scripts. The new case asserts the one-line error, status 1 and no group output. - No other open or merged PR covers this (searched "run_checks_parallel duplicate"). #2810 touches the same tool but a different slice (BOM in listings). Commands run locally on this head: - `python3 -B tests/run_checks_parallel_check.py` -> ok - `python3 tests/docs_links_check.py` -> ok (27 files, 541 links) - `python3 tests/bidi_controls_check.py` -> ok - `git diff --check origin/main...HEAD` -> clean - Mutation 1 (duplicate check disabled): the check script fails (rc 1). - Mutation 2 (comparison slice made empty): the check script fails (rc 1). - CI on this head: Linux Python checks, Windows build/test and gfx1013 fixtures all pass. No blockers. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 11:07 UTC · original

Win2025 WARP receipt for head a1c9cd0a (Python-only PR; real-GPU run not available, RunPod stopped).

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit a1c9cd0a5cc8d8df5962e58a11c32294e4652873:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset dev -R 'run_checks_parallel' --parallel 2 --no-tests=error --output-on-failure): 1/1 passed (1.80s: ci_run_checks_parallel_cli_check 1.65s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset release -R 'run_checks_parallel' --parallel 2 --no-tests=error --output-on-failure): 1/1 passed (2.24s: ci_run_checks_parallel_cli_check 2.03s)
  • Windows Python checks: tests/run_checks_parallel_check.py ok (1.2s)
  • Wall: 11.2s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 11:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2805#issuecomment-7190312636) Win2025 WARP receipt for head a1c9cd0a (Python-only PR; real-GPU run not available, RunPod stopped). Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `a1c9cd0a5cc8d8df5962e58a11c32294e4652873`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset dev -R 'run_checks_parallel' --parallel 2 --no-tests=error --output-on-failure`): **1/1 passed** (`1.80s`: `ci_run_checks_parallel_cli_check` `1.65s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset release -R 'run_checks_parallel' --parallel 2 --no-tests=error --output-on-failure`): **1/1 passed** (`2.24s`: `ci_run_checks_parallel_cli_check` `2.03s`) - **Windows Python checks**: `tests/run_checks_parallel_check.py` ok (`1.2s`) - Wall: `11.2s` AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.