tests: add toggle, missing_at, and 6 mutation controls to startup_compute_builder_gate #3873

Manually merged
github merged 7 commits from github-bot/gh-3871 into gh-pr/3871/base 2026-12-02 20:15:55 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-12-02 16:23 UTC · original
Ammmae0x:tests/compute-builder-gate-unit → main · +680 −0 · 5 files · 7 commits · merged 2026-12-02 20:12 UTC

Refs #1149.

Rework per review: the duplicate compute_builder_gate_unit suite is removed in full (all 5 files gone) and the existing tests/startup_compute_builder_gate_check.cpp fixture carries the mutation controls instead, following the PR #3868 / #3872 rework pattern. Zero edits to CMakeLists.txt or src/; the branch diff vs origin/main is 5 files, +680/-0. Merged with origin/main (beac8b20).

Only non-overlapping additions

tests/startup_compute_builder_gate_check.cpp gains 26 cases (106 -> 132); every earlier assertion is untouched:

  • module names: mixed-slash path (C:\Games/Sub\XboxBvhBuilder.dll) and UNC path (\\server\share\XboxBvhBuilder.dll) match, too-short name (bvh.dll) rejected, default-constructed std::wstring_view has no basename;
  • repeated toggle: note_pipeline real -> missing drops with_pso() (else --with_pso_;) and the set refuses again, back to real restores it and allows again; repeated note_pso on an already-real pipeline leaves with_pso() unchanged;
  • missing_at on a partial set: a missing entry yields its pointer, a real entry yields nullptr, index == tracked and a runtime-derived out-of-range index yield nullptr; after note_pso the filled entry stops being reported;
  • builder_gate_reason exact strings for all 4 decisions plus the "unknown" default for an invalid cast value.

tests/cmake/startup_compute_builder_gate.cmake keeps all existing targets/tests intact and adds the 6 WILL_FAIL TRUE controls, each building the same fixture .cpp against a configure-time mutated header copy (BEFORE PRIVATE, cxx_std_17, configure FATAL_ERROR if an anchor is missing, TIMEOUT 60) and running the whole fixture with no arguments — the fixture exits 1 loudly on any FAIL line, so no --case filter is needed.

New files: tests/startup_compute_builder_gate_meta_check.py (mirrors the 6 CMake controls 1:1, g++ + cl support), tests/checks/python-linux/startup_compute_builder_gate.txt, docs/experiments/startup-compute-builder-gate-mutation-controls.md.

Note: the note is named startup-compute-builder-gate-mutation-controls.md because docs/experiments/startup-compute-builder-gate.md already exists on main (#2920, the runtime gate experiment note).

Spec mismatch flagged, not followed silently

is_compute_builder_module(nullptr) cannot be added as specified: the parameter is a std::wstring_view, whose pointer constructor is nonnull, so passing nullptr is undefined behaviour — g++ -std=c++17 -O2 -Werror rejects the call with -Werror=nonnull (verified on this host), and at runtime it would read through a null pointer in wcslen. The fixture pins the closest well-defined equivalent instead (default-constructed empty view -> false); the empty path was already covered.

Linux verification (this host, g++ 13.3.0)

./out/pe-env/bin/python -B tests/startup_compute_builder_gate_meta_check.py
PASS: startup_compute_builder_gate: 132 cases, 6/6 mutations killed (g++)
./out/pe-env/bin/python -B tests/form_coverage_check.py
form coverage checks passed
./out/pe-env/bin/python -B tests/docs_links_check.py
Checked 251 Markdown files and 954 links.
./out/pe-env/bin/python -B tests/bidi_controls_check.py
Checked 2988 tracked source, script and build/CI files: no bidirectional controls.

Scratch CMake + CTest (^startup_compute_builder_gate): 7/7 (startup_compute_builder_gate + 6 WILL_FAIL controls). git diff --check clean; git merge-tree against origin/main exits 0. Full Python Linux suite not run locally; GitHub Actions runs it on push. No mingw/MSVC on this host, so no Windows compile check; WIN-VERIFY is the arbiter.

Windows Verification (e36f0693)

  • Clean git merge-tree --write-tree upstream/main HEAD and git diff --check.
  • MSVC dev: cmake --preset dev, ctest --preset dev --no-tests=error -R '^startup_compute_builder_gate(_.*_mut)?$' --output-on-failure passed 7/7 (0.83s); full family ctest --preset dev --no-tests=error -R '^startup_compute_builder_gate' --output-on-failure (including _runtime and _request_warp) passed 9/9 (4.26s); direct startup_compute_builder_gate_check.exe printed startup_compute_builder_gate: 132 case(s), 0 failure(s).
  • MSVC release: cmake --preset release, ctest --preset release --no-tests=error -R '^startup_compute_builder_gate(_.*_mut)?$' --output-on-failure passed 7/7 (0.70s).
  • Native cl meta check: python -B tests/startup_compute_builder_gate_meta_check.py printed PASS: startup_compute_builder_gate: 132 cases, 6/6 mutations killed (cl).
  • Repo static checks on Windows: tests/docs_links_check.py (251 files, 954 links) and tests/bidi_controls_check.py (2988 files) passed.

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-12-02 16:23 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3871) `Ammmae0x:tests/compute-builder-gate-unit` → `main` · +680 −0 · 5 files · 7 commits · merged 2026-12-02 20:12 UTC Refs #1149. Rework per review: the duplicate `compute_builder_gate_unit` suite is removed in full (all 5 files gone) and the existing `tests/startup_compute_builder_gate_check.cpp` fixture carries the mutation controls instead, following the PR #3868 / #3872 rework pattern. Zero edits to `CMakeLists.txt` or `src/`; the branch diff vs `origin/main` is 5 files, +680/-0. Merged with `origin/main` (`beac8b20`). ## Only non-overlapping additions `tests/startup_compute_builder_gate_check.cpp` gains 26 cases (106 -> 132); every earlier assertion is untouched: - module names: mixed-slash path (`C:\Games/Sub\XboxBvhBuilder.dll`) and UNC path (`\\server\share\XboxBvhBuilder.dll`) match, too-short name (`bvh.dll`) rejected, default-constructed `std::wstring_view` has no basename; - repeated toggle: `note_pipeline` real -> missing drops `with_pso()` (`else --with_pso_;`) and the set refuses again, back to real restores it and allows again; repeated `note_pso` on an already-real pipeline leaves `with_pso()` unchanged; - `missing_at` on a partial set: a missing entry yields its pointer, a real entry yields `nullptr`, index `== tracked` and a runtime-derived out-of-range index yield `nullptr`; after `note_pso` the filled entry stops being reported; - `builder_gate_reason` exact strings for all 4 decisions plus the `"unknown"` default for an invalid cast value. `tests/cmake/startup_compute_builder_gate.cmake` keeps all existing targets/tests intact and adds the 6 `WILL_FAIL TRUE` controls, each building the same fixture `.cpp` against a configure-time mutated header copy (`BEFORE PRIVATE`, `cxx_std_17`, configure `FATAL_ERROR` if an anchor is missing, `TIMEOUT 60`) and running the whole fixture with no arguments — the fixture exits 1 loudly on any `FAIL` line, so no `--case` filter is needed. New files: `tests/startup_compute_builder_gate_meta_check.py` (mirrors the 6 CMake controls 1:1, `g++` + `cl` support), `tests/checks/python-linux/startup_compute_builder_gate.txt`, `docs/experiments/startup-compute-builder-gate-mutation-controls.md`. Note: the note is named `startup-compute-builder-gate-mutation-controls.md` because `docs/experiments/startup-compute-builder-gate.md` already exists on `main` (#2920, the runtime gate experiment note). ## Spec mismatch flagged, not followed silently `is_compute_builder_module(nullptr)` cannot be added as specified: the parameter is a `std::wstring_view`, whose pointer constructor is nonnull, so passing `nullptr` is undefined behaviour — `g++ -std=c++17 -O2 -Werror` rejects the call with `-Werror=nonnull` (verified on this host), and at runtime it would read through a null pointer in `wcslen`. The fixture pins the closest well-defined equivalent instead (default-constructed empty view -> false); the empty path was already covered. ## Linux verification (this host, g++ 13.3.0) ```text ./out/pe-env/bin/python -B tests/startup_compute_builder_gate_meta_check.py PASS: startup_compute_builder_gate: 132 cases, 6/6 mutations killed (g++) ./out/pe-env/bin/python -B tests/form_coverage_check.py form coverage checks passed ./out/pe-env/bin/python -B tests/docs_links_check.py Checked 251 Markdown files and 954 links. ./out/pe-env/bin/python -B tests/bidi_controls_check.py Checked 2988 tracked source, script and build/CI files: no bidirectional controls. ``` Scratch CMake + CTest (`^startup_compute_builder_gate`): 7/7 (`startup_compute_builder_gate` + 6 `WILL_FAIL` controls). `git diff --check` clean; `git merge-tree` against `origin/main` exits 0. Full Python Linux suite not run locally; GitHub Actions runs it on push. No mingw/MSVC on this host, so no Windows compile check; WIN-VERIFY is the arbiter. ## Windows Verification (`e36f0693`) - Clean `git merge-tree --write-tree upstream/main HEAD` and `git diff --check`. - MSVC `dev`: `cmake --preset dev`, `ctest --preset dev --no-tests=error -R '^startup_compute_builder_gate(_.*_mut)?$' --output-on-failure` passed `7/7` (`0.83s`); full family `ctest --preset dev --no-tests=error -R '^startup_compute_builder_gate' --output-on-failure` (including `_runtime` and `_request_warp`) passed `9/9` (`4.26s`); direct `startup_compute_builder_gate_check.exe` printed `startup_compute_builder_gate: 132 case(s), 0 failure(s)`. - MSVC `release`: `cmake --preset release`, `ctest --preset release --no-tests=error -R '^startup_compute_builder_gate(_.*_mut)?$' --output-on-failure` passed `7/7` (`0.70s`). - Native `cl` meta check: `python -B tests/startup_compute_builder_gate_meta_check.py` printed `PASS: startup_compute_builder_gate: 132 cases, 6/6 mutations killed (cl)`. - Repo static checks on Windows: `tests/docs_links_check.py` (251 files, 954 links) and `tests/bidi_controls_check.py` (2988 files) passed. AI-assisted. <!-- WIN-VERIFY: passed | sha=e36f069312063e6e545c88271228557d28292996 | ctest=^startup_compute_builder_gate | dev=9/9 | release=7/7 | cl_meta=132cases_6of6 -->
Refs #1149
Remove the duplicate compute_builder_gate_unit suite (PR #3871
review): the startup_compute_builder_gate fixture already
covers the module matching, disabled gate, allow/refuse
decisions, note_pso fill, repeated creation, note_failed
latch and capacity latch, and its assertions already catch
four of the six mutations. The fixture gains only the
non-overlapping pins: mixed-slash and UNC module paths,
the too-short name, the repeated real toggle moving
with_pso both ways, the note_pso no-op on an already-real
pipeline, the missing_at walk on a partial set, and the
exact builder_gate_reason strings. Six WILL_FAIL TRUE
controls build the same fixture against a mutated header
copy. Refs #1149.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 17:04:45 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 17:16 UTC · original · approved these changes

Reviewed e36f0693. The toggle, missing-index and decision assertions extend the existing fixture. No production source changed. Independent Windows/MSVC Debug ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure passed 9/9, including six mutation tests, the existing runtime fixture and the WARP request case.

**@⁠R0Y00** on GitHub · 2026-12-02 17:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3871#pullrequestreview-6155672582) · **approved these changes** Reviewed e36f0693. The toggle, missing-index and decision assertions extend the existing fixture. No production source changed. Independent Windows/MSVC Debug `ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure` passed 9/9, including six mutation tests, the existing runtime fixture and the WARP request case.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 19:39 UTC · original · approved these changes

Revalidated 32126662 after GitHub Update branch brought #3885 into the baseline. The files changed by this PR are unchanged from e36f0693. Independent Windows/MSVC Debug ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure passed 9/9, including six mutation controls, the runtime fixture and WARP request publication. The hosted checks still need to finish on this revision.

**@⁠R0Y00** on GitHub · 2026-12-02 19:39 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3871#pullrequestreview-6157617823) · **approved these changes** Revalidated 32126662 after GitHub Update branch brought #3885 into the baseline. The files changed by this PR are unchanged from e36f0693. Independent Windows/MSVC Debug `ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure` passed 9/9, including six mutation controls, the runtime fixture and WARP request publication. The hosted checks still need to finish on this revision.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 20:05 UTC · original · approved these changes

Revalidated 9e508ada after GitHub Update branch brought #3887 into this PR. The owned files are unchanged. Independent Windows/MSVC Debug ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure passed 9/9, including the six mutation tests, runtime fixture and WARP request publication. The export catalog check passed all 476 checks including all six mutations.

**@⁠R0Y00** on GitHub · 2026-12-02 20:05 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3871#pullrequestreview-6158037206) · **approved these changes** Revalidated 9e508ada after GitHub Update branch brought #3887 into this PR. The owned files are unchanged. Independent Windows/MSVC Debug `ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_builder_gate' --output-on-failure` passed 9/9, including the six mutation tests, runtime fixture and WARP request publication. The export catalog check passed all 476 checks including all six mutations.
github-bot changed target branch from main to gh-pr/3871/base 2026-12-02 20:15:53 +00:00
github manually merged commit 9e508ada0a into gh-pr/3871/base 2026-12-02 20:15:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.