tests, docs: optional per-file fragments for test registration, checks and experiment notes #2655

Manually merged
github merged 6 commits from gh-pr/2655/head into gh-pr/2655/base 2026-11-27 01:11:33 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-26 00:41 UTC · original
tedin7:tests-checks-fragments → main · +272 −7 · 13 files · 6 commits · merged 2026-11-26 06:06 UTC

Part of #1149

What this unblocks: fewer merge conflicts. 46 of 92 open PRs conflict with main; the three shared files cause most of it: CMakeLists.txt (26 PRs), docs/experiments.md (23 PRs) and .github/workflows/windows.yml (12 PRs). 14 PRs conflict only in these files.

This only ADDS optional places. Nothing existing moves, so no open PR gets a new conflict.

  • CMakeLists.txt: one block (before the slow-test costs) that includes every tests/cmake/*.cmake, sorted, with CONFIGURE_DEPENDS. See tests/cmake/README.md.
  • docs/experiments/: new notes go in docs/experiments/<topic>.md; docs/experiments.md keeps the older ones. tests/docs_links_check.py already checks every tracked Markdown file, so the new folder is covered.
  • windows.yml + tools/run_checks_parallel.py: new option --from-dir DIR and helpers read_check_files / merge_checks. The python-linux step reads tests/checks/python-linux/*.txt; the pixel-binary step reads tests/checks/pixel-binary/*.txt (script plus arguments per line). The brief's windows/linux split does not match the file: the Windows jobs run CTest, so CMake fragments cover them. A missing directory, a script that does not exist, bad quoting or a duplicate command listed in the files fails loudly. A command also present in the inline list runs once.
  • The new reader test tests/run_checks_fragments_check.py is itself registered through tests/checks/python-linux/run_checks_fragments.txt.
  • AGENTS.md, CONTRIBUTING.md and docs/non-windows-hosts.md name the new places.

This is a repo-layout choice and needs a maintainer decision (see the comment below). Nothing existing moves.

Win2025 (exact head 9b51402f): x2w_pipe.py win2025 2655 --py-checks tests/run_checks_fragments_check.py --keep-release -> run_checks_fragments_check ok, rc=0 (see the updated receipt comment). The PR adds no CMake add_test.

Verification (Linux):

  • python3 -B tests/run_checks_fragments_check.py -> run_checks_fragments_check ok
  • python3 -B tests/run_checks_parallel_check.py -> run_checks_parallel_check: ok
  • python3 -B tests/run_checks_parallel_cli_check.py -> 7 tests, OK
  • python3 -B tests/docs_links_check.py -> Checked 23 Markdown files and 515 links.; with a broken link added to docs/experiments/README.md it fails on docs/experiments/README.md:11, so the folder is scanned.
  • Check lists: inline entries before and after are the same (pixel-binary 107, python-linux 169). The pixel-binary step body run with the new runner calls resolves 107 checks (no file adds one). --from-dir tests/checks/python-linux -> all 1 checks passed.
  • git diff --check clean.
  • CMake: a full cmake --preset configure is not possible on Linux (it stops at find_program(DXC_EXECUTABLE), line 1646, before the new block). So the exact block lines were copied into a small project with the same add_test wrapper header: ctest -N -> 1 test; with a throwaway tests/cmake/zz_probe.cmake -> 2 tests; file removed and reconfigured -> 1 test. The glob and CONFIGURE_DEPENDS work.

Stage-2 is needed: this touches CI and CMake, so it needs a Win2025 WARP dev and release run (full configure, ctest -N count identical to main).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 00:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655) `tedin7:tests-checks-fragments` → `main` · +272 −7 · 13 files · 6 commits · merged 2026-11-26 06:06 UTC Part of #1149 What this unblocks: fewer merge conflicts. 46 of 92 open PRs conflict with `main`; the three shared files cause most of it: `CMakeLists.txt` (26 PRs), `docs/experiments.md` (23 PRs) and `.github/workflows/windows.yml` (12 PRs). 14 PRs conflict only in these files. This only ADDS optional places. Nothing existing moves, so no open PR gets a new conflict. - `CMakeLists.txt`: one block (before the slow-test costs) that includes every `tests/cmake/*.cmake`, sorted, with `CONFIGURE_DEPENDS`. See `tests/cmake/README.md`. - `docs/experiments/`: new notes go in `docs/experiments/<topic>.md`; `docs/experiments.md` keeps the older ones. `tests/docs_links_check.py` already checks every tracked Markdown file, so the new folder is covered. - `windows.yml` + `tools/run_checks_parallel.py`: new option `--from-dir DIR` and helpers `read_check_files` / `merge_checks`. The `python-linux` step reads `tests/checks/python-linux/*.txt`; the `pixel-binary` step reads `tests/checks/pixel-binary/*.txt` (script plus arguments per line). The brief's windows/linux split does not match the file: the Windows jobs run CTest, so CMake fragments cover them. A missing directory, a script that does not exist, bad quoting or a duplicate command listed in the files fails loudly. A command also present in the inline list runs once. - The new reader test `tests/run_checks_fragments_check.py` is itself registered through `tests/checks/python-linux/run_checks_fragments.txt`. - AGENTS.md, CONTRIBUTING.md and docs/non-windows-hosts.md name the new places. This is a repo-layout choice and needs a maintainer decision (see the comment below). Nothing existing moves. Win2025 (exact head 9b51402f): `x2w_pipe.py win2025 2655 --py-checks tests/run_checks_fragments_check.py --keep-release` -> `run_checks_fragments_check ok`, rc=0 (see the updated receipt comment). The PR adds no CMake `add_test`. Verification (Linux): - `python3 -B tests/run_checks_fragments_check.py` -> `run_checks_fragments_check ok` - `python3 -B tests/run_checks_parallel_check.py` -> `run_checks_parallel_check: ok` - `python3 -B tests/run_checks_parallel_cli_check.py` -> 7 tests, OK - `python3 -B tests/docs_links_check.py` -> `Checked 23 Markdown files and 515 links.`; with a broken link added to `docs/experiments/README.md` it fails on `docs/experiments/README.md:11`, so the folder is scanned. - Check lists: inline entries before and after are the same (pixel-binary 107, python-linux 169). The pixel-binary step body run with the new runner calls resolves 107 checks (no file adds one). `--from-dir tests/checks/python-linux` -> `all 1 checks passed`. - `git diff --check` clean. - CMake: a full `cmake --preset` configure is not possible on Linux (it stops at `find_program(DXC_EXECUTABLE)`, line 1646, before the new block). So the exact block lines were copied into a small project with the same `add_test` wrapper header: `ctest -N` -> 1 test; with a throwaway `tests/cmake/zz_probe.cmake` -> 2 tests; file removed and reconfigured -> 1 test. The glob and `CONFIGURE_DEPENDS` work. Stage-2 is needed: this touches CI and CMake, so it needs a Win2025 WARP dev and release run (full configure, `ctest -N` count identical to `main`). AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:11:31 +00:00
github manually merged commit 9b51402f9d into gh-pr/2655/base 2026-11-27 01:11:33 +00:00
Author
Owner

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

@⁠R0Y00 @⁠MasterDomino: do you want this layout? It adds optional per-file places (tests/cmake/*.cmake, tests/checks/<job>/*.txt, docs/experiments/<topic>.md) so new tests, checks and notes stop editing the same lines of CMakeLists.txt, windows.yml and docs/experiments.md. Nothing existing moves, so no open PR gets a new conflict. If you prefer another shape (or none), say so and I will change or close it. It stays Draft until a Win2025 run and your answer.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 00:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#issuecomment-7179013134) @⁠R0Y00 @⁠MasterDomino: do you want this layout? It adds optional per-file places (`tests/cmake/*.cmake`, `tests/checks/<job>/*.txt`, `docs/experiments/<topic>.md`) so new tests, checks and notes stop editing the same lines of `CMakeLists.txt`, `windows.yml` and `docs/experiments.md`. Nothing existing moves, so no open PR gets a new conflict. If you prefer another shape (or none), say so and I will change or close it. It stays Draft until a Win2025 run and your answer. AI-assisted; commands listed were executed locally.
Author
Owner

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

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

  • Windows Python checks: tests/run_checks_parallel_check.py ok (1.4s), tests/run_checks_fragments_check.py ok (2.2s), tests/docs_links_check.py ok (1.6s)
  • Wall: 20.1s
**@⁠tedin7** on GitHub · 2026-11-26 04:08 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#issuecomment-7182329060) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `019e1c053bc4b7e74cadd88597f97ce7d0a84d58`: - **Windows Python checks**: `tests/run_checks_parallel_check.py` ok (`1.4s`), `tests/run_checks_fragments_check.py` ok (`2.2s`), `tests/docs_links_check.py` ok (`1.6s`) - Wall: `20.1s`
Author
Owner

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

@⁠R0Y00 @⁠MasterDomino: #2655 is now Ready for review.

What changed since the question above: the listed-check splitter keeps Windows backslashes (it failed on Win2025 before), and main is merged in. Head 019e1c05.

Verification:

  • python3 tests/run_checks_fragments_check.py ok
  • Independent pre-review: PASS on this head
  • CI on 019e1c05: Linux checks, gfx1013 fixtures and Windows build all pass
  • Win2025 WARP dev + release PASS on 019e1c053bc4b7e74cadd88597f97ce7d0a84d58, with run_checks_parallel_check.py, run_checks_fragments_check.py and docs_links_check.py (receipt in the comment above)

If you prefer another layout, say so and I will change it.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:08 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#issuecomment-7182329423) @⁠R0Y00 @⁠MasterDomino: #2655 is now Ready for review. What changed since the question above: the listed-check splitter keeps Windows backslashes (it failed on Win2025 before), and main is merged in. Head `019e1c05`. Verification: - `python3 tests/run_checks_fragments_check.py` ok - Independent pre-review: PASS on this head - CI on `019e1c05`: Linux checks, gfx1013 fixtures and Windows build all pass - Win2025 WARP dev + release PASS on `019e1c053bc4b7e74cadd88597f97ce7d0a84d58`, with `run_checks_parallel_check.py`, `run_checks_fragments_check.py` and `docs_links_check.py` (receipt in the comment above) If you prefer another layout, say so and I will change it. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:08 UTC · original · edited 2026-11-26 04:19 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T04:19:04.820702Z 019e1c0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:08 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#issuecomment-7182331566) · edited 2026-11-26 04:19 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"019e1c053bc4b7e74cadd88597f97ce7d0a84d58","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T04:19:04.820702Z">2026-11-26T04:19:04.820702Z</relative-time> | `019e1c0` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:19 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 019e1c053b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#pullrequestreview-6068493156) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `019e1c053b` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:19 UTC · original

P2 Badge Preserve quoted option values in Windows commands

For a local Windows run, a fragment argument such as --llvm="C:\Program Files\LLVM\libLLVM.dll" is split at the space and retains literal quote characters, because non-POSIX shlex does not group quoted segments inside a token. This affects existing argument consumers: tests/compute_mimg_float_store_check.py --help documents --llvm LIBLLVM, but run_one() passes the malformed tokens directly to Python, so its parser rejects the extra argument instead of receiving one library path. Use tokenization that handles quoted segments within words while retaining Windows backslashes, and cover this case in the regression test.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#discussion_r4703841899) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Preserve quoted option values in Windows commands** For a local Windows run, a fragment argument such as `--llvm="C:\Program Files\LLVM\libLLVM.dll"` is split at the space and retains literal quote characters, because non-POSIX `shlex` does not group quoted segments inside a token. This affects existing argument consumers: `tests/compute_mimg_float_store_check.py --help` documents `--llvm LIBLLVM`, but `run_one()` passes the malformed tokens directly to Python, so its parser rejects the extra argument instead of receiving one library path. Use tokenization that handles quoted segments within words while retaining Windows backslashes, and cover this case in the regression test. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:19 UTC · original

P2 Badge Quote temporary script paths in the generated manifests

When TMPDIR or TEMP points to an existing directory containing spaces, these manifests contain an unquoted absolute script path. read_check_files() consequently treats only the path's first portion as the script name and rejects it before any fixture command runs. I reproduced this by running the new check with a space-containing TMPDIR: it fails at the first success assertion with script path does not exist. The newly registered check therefore produces a false suite failure on those host configurations. Quote the script paths in all generated manifests, including the failure and duplicate cases.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#discussion_r4703841904) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Quote temporary script paths in the generated manifests** When `TMPDIR` or `TEMP` points to an existing directory containing spaces, these manifests contain an unquoted absolute script path. `read_check_files()` consequently treats only the path's first portion as the script name and rejects it before any fixture command runs. I reproduced this by running the new check with a space-containing `TMPDIR`: it fails at the first success assertion with `script path does not exist`. The newly registered check therefore produces a false suite failure on those host configurations. Quote the script paths in all generated manifests, including the failure and duplicate cases. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

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

Confirmed and fixed in 9b51402f. On Windows, split_command now uses a small tokenizer: quotes group text inside a word (so --llvm="C:\Program Files\LLVM\x.dll" is one argument without quote characters) and backslashes are kept. POSIX still uses shlex.split. tests/run_checks_fragments_check.py covers both cases. It fails on the old code and passes now.

Commands run: python3 -B tests/run_checks_fragments_check.py; python3 tools/run_checks_parallel.py -j 4 tests/run_checks_fragments_check.py; git diff --check.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#discussion_r4703923201) Confirmed and fixed in 9b51402f. On Windows, `split_command` now uses a small tokenizer: quotes group text inside a word (so `--llvm="C:\Program Files\LLVM\x.dll"` is one argument without quote characters) and backslashes are kept. POSIX still uses `shlex.split`. `tests/run_checks_fragments_check.py` covers both cases. It fails on the old code and passes now. Commands run: `python3 -B tests/run_checks_fragments_check.py`; `python3 tools/run_checks_parallel.py -j 4 tests/run_checks_fragments_check.py`; `git diff --check`. AI-assisted; commands listed were executed locally.
Author
Owner

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

Confirmed and fixed in 9b51402f. Every script path in the generated manifests (success, failure, missing, duplicate and two-file cases) is now quoted. The check also runs in a temp directory whose name contains a space, so it fails if a path is left unquoted. It fails without the quoting and passes now.

Commands run: python3 -B tests/run_checks_fragments_check.py; python3 tools/run_checks_parallel.py -j 4 tests/run_checks_fragments_check.py; git diff --check.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#discussion_r4703923353) Confirmed and fixed in 9b51402f. Every script path in the generated manifests (success, failure, missing, duplicate and two-file cases) is now quoted. The check also runs in a temp directory whose name contains a space, so it fails if a path is left unquoted. It fails without the quoting and passes now. Commands run: `python3 -B tests/run_checks_fragments_check.py`; `python3 tools/run_checks_parallel.py -j 4 tests/run_checks_fragments_check.py`; `git diff --check`. AI-assisted; commands listed were executed locally.
Author
Owner

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

Updated Win2025 receipt: the earlier one built the targets but did not run this PR's tests. This one runs them by name.

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

  • Command: x2w_pipe.py win2025 2655 --py-checks tests/run_checks_fragments_check.py --keep-release (default slot pool)
  • The PR adds no CMake add_test. Its only check is the one listed in tests/checks/python-linux/run_checks_fragments.txt, so it is run by name.
  • Windows Python checks: tests/run_checks_fragments_check.py ok (rc=0, 1.5s)
  • No C++ build or ctest is involved (the CMake change is a fragment glob include only), so dev and release run the same Python check.
  • Wall: 11.8s

@⁠MasterDomino ready for review/merge on this head.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 05:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#issuecomment-7183753250) Updated Win2025 receipt: the earlier one built the targets but did not run this PR's tests. This one runs them by name. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `9b51402f9d0c5a3a6ec98dbb5210f6e863b0aba1`: - Command: `x2w_pipe.py win2025 2655 --py-checks tests/run_checks_fragments_check.py --keep-release` (default slot pool) - The PR adds no CMake `add_test`. Its only check is the one listed in `tests/checks/python-linux/run_checks_fragments.txt`, so it is run by name. - **Windows Python checks**: `tests/run_checks_fragments_check.py` ok (`rc=0`, `1.5s`) - No C++ build or ctest is involved (the CMake change is a fragment glob include only), so dev and release run the same Python check. - Wall: `11.8s` @⁠MasterDomino ready for review/merge on this head. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-26 06:04 UTC · original · approved these changes

Reviewed the additive registration and unchanged inline lists. On Windows with main 5f27d8cf combined, the fragment parser, existing parallel runner, docs and bidi checks passed. An inline/listed duplicate ran once via the CLI. A temporary CMake fragment registered a test through an ordinary release configure, and CTest listed and ran it. The temporary probe was removed.

**@⁠R0Y00** on GitHub · 2026-11-26 06:04 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2655#pullrequestreview-6069273274) · **approved these changes** Reviewed the additive registration and unchanged inline lists. On Windows with main 5f27d8cf combined, the fragment parser, existing parallel runner, docs and bidi checks passed. An inline/listed duplicate ran once via the CLI. A temporary CMake fragment registered a test through an ordinary release configure, and CTest listed and ran it. The temporary probe was removed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.