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

Merged
RenzoWit35 merged 1 commit from upstream-pr/2805 into main 2026-11-26 11:08:11 +00:00
RenzoWit35 commented 2026-11-26 11:00:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-26T11:00:40Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6625192623 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2805). Originally posted by [RenzoWit35](https://github.com/RenzoWit35) on 2026-11-26T11:00:40Z. --- ## 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.
upstream-sync closed this pull request 2026-11-26 12:04:45 +00:00
tedin7 commented 2026-11-26 12:04:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:07:33Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6073054583 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2805#pullrequestreview-6073054583). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T11:07:33Z. **Review:** COMMENTED --- 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 commented 2026-11-26 12:04:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:07:59Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7190312636 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2805#issuecomment-7190312636). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T11:07:59Z. --- 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.
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
R0Y00/Xbox2Windows!2797
No description provided.