Skip to content

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

Merged
R0Y00 merged 7 commits into
R0Y00:mainfrom
Ammmae0x:tests/compute-builder-gate-unit
Dec 2, 2026
Merged

R0Y00 merged 7 commits into
R0Y00:mainfrom
Ammmae0x:tests/compute-builder-gate-unit

Conversation

@Ammmae0x

@Ammmae0x Ammmae0x commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

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 #3866 / #3870 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.

…ntrols

Remove the duplicate compute_builder_gate_unit suite (PR R0Y00#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 R0Y00#1149.
@Ammmae0x Ammmae0x changed the title tests: cover BuilderGateState tracking, capacity latch, and decisions tests: add toggle, missing_at, and 6 mutation controls to startup_compute_builder_gate Dec 2, 2026
@Ammmae0x
Ammmae0x marked this pull request as ready for review December 2, 2026 16:44

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed e36f069. 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 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revalidated 3212666 after GitHub Update branch brought #3883 into the baseline. The files changed by this PR are unchanged from e36f069. 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 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revalidated 9e508ad after GitHub Update branch brought #3885 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
R0Y00 enabled auto-merge (squash) December 2, 2026 20:09
@R0Y00
R0Y00 merged commit 82ac451 into R0Y00:main Dec 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants