shader: harden directory, symlink, and output path guards in probe_root_devices with CLI suite #2889

Manually merged
github merged 2 commits from github-bot/gh-2889 into gh-pr/2889/base 2026-11-28 09:18:48 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-11-26 16:37 UTC · original
Ammmae0x:shader/probe-root-devices-cli → main · +601 −3 · 3 files · 2 commits · merged 2026-11-28 09:11 UTC

Change

Harden upfront directory, file, and output-path guards in tools/probe_root_devices.py, and add a standalone CLI, path-guard, atomic-replace, and temp-copy mutation suite (tests/probe_root_devices_cli_check.py, registered via tests/cmake/shader_probe_root_devices_cli.cmake).

  • Upfront validation in main(argv=None): rejects non-directory --bin, missing/non-file control .cso shaders, non-directory build path, file dest.parent, directory dest, missing/non-file six-apis.json inventory, and missing/non-file PE images with a clear one-line message and clean exit 1.
  • The gain over main is clearer error messages and, for a directory at dest or a file at dest.parent, failing before the probe runs instead of after it. main already exits 1 with a one-line probe_root_devices: … message and no traceback on the missing --bin, control .cso, inventory and image OSError paths.
  • The three symlink/alias refusals from the earlier head are removed: dest may be a symlink or hardlink to six-apis.json, and dest.parent may be a directory symlink. temporary.replace(dest) renames over the directory entry, so it never writes through a link and the inventory is untouched; the suite now has positive controls proving all three restored layouts.
  • Preserves dest.resolve().is_relative_to(args.build.resolve()) (parser.error, exit 2) ahead of args.build.is_dir() and atomic NamedTemporaryFile + replace with temp unlink cleanup on failure.

Verification

Commit: 583c8976 (Linux, python3 -B with a local venv providing pefile; sys.getwindowsversion shimmed, as in the reviewers' Linux runs):

  • python3 -B tests/probe_root_devices_cli_check.py -v -> 8/8 tests OK (atomic JSON write & 0 leftover temps, upfront --bin/control .cso/build/inventory/image guards + real missing root_device_probe.exe clean exit 1, dest dir/file-parent/inside-build guards, restored symlink/hardlink dest and symlinked dest.parent layouts, guards failing before the guarded read/measure, os.replace failure preserving prior bytes & 0 temps, Py3.14-safe argparse, and 5 temp-copy mutations).
  • python3 -B tests/probe_root_devices_check.py -> 11/11 tests OK (untouched).
  • python3 -B tests/form_coverage_check.py -> passed (exit 0).
  • python3 -B tests/docs_links_check.py -> passed (29 Markdown files, 545 links, exit 0).
  • python3 -B tests/bidi_controls_check.py -> passed (2048 files, exit 0).
  • Empirical spot-mutation audit: disabling args.build.is_dir(), dest.parent.is_file(), inventory is_file(), and image is_file() one by one each caused tests/probe_root_devices_cli_check.py to fail (exit 1); re-adding the dest.is_symlink() guard also failed the suite. All 5 killed; source restored cleanly (git status shows only the two intended files).
  • Windows CTest / Build and test on Windows was not run here (Linux host, no Windows toolchain); it still needs a Windows run.

Evidence and follow-up

All fixtures are synthetic in-memory PE32+ / DXBC / RTS0 blobs and mocked subprocess.run probe outputs inside TemporaryDirectory; zero external or game files are used.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-11-26 16:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2889) `Ammmae0x:shader/probe-root-devices-cli` → `main` · +601 −3 · 3 files · 2 commits · merged 2026-11-28 09:11 UTC ## Change Harden upfront directory, file, and output-path guards in `tools/probe_root_devices.py`, and add a standalone CLI, path-guard, atomic-replace, and temp-copy mutation suite (`tests/probe_root_devices_cli_check.py`, registered via `tests/cmake/shader_probe_root_devices_cli.cmake`). - Upfront validation in `main(argv=None)`: rejects non-directory `--bin`, missing/non-file control `.cso` shaders, non-directory `build` path, file `dest.parent`, directory `dest`, missing/non-file `six-apis.json` inventory, and missing/non-file PE images with a clear one-line message and clean exit `1`. - The gain over `main` is clearer error messages and, for a directory at `dest` or a file at `dest.parent`, failing before the probe runs instead of after it. `main` already exits `1` with a one-line `probe_root_devices: …` message and no traceback on the missing `--bin`, control `.cso`, inventory and image `OSError` paths. - The three symlink/alias refusals from the earlier head are removed: `dest` may be a symlink or hardlink to `six-apis.json`, and `dest.parent` may be a directory symlink. `temporary.replace(dest)` renames over the directory entry, so it never writes through a link and the inventory is untouched; the suite now has positive controls proving all three restored layouts. - Preserves `dest.resolve().is_relative_to(args.build.resolve())` (`parser.error`, exit `2`) ahead of `args.build.is_dir()` and atomic `NamedTemporaryFile` + `replace` with temp unlink cleanup on failure. ## Verification Commit: `583c8976` (Linux, `python3 -B` with a local venv providing `pefile`; `sys.getwindowsversion` shimmed, as in the reviewers' Linux runs): - `python3 -B tests/probe_root_devices_cli_check.py -v` -> 8/8 tests OK (atomic JSON write & 0 leftover temps, upfront `--bin`/control `.cso`/`build`/inventory/image guards + real missing `root_device_probe.exe` clean exit `1`, `dest` dir/file-parent/inside-build guards, restored symlink/hardlink `dest` and symlinked `dest.parent` layouts, guards failing before the guarded read/measure, `os.replace` failure preserving prior bytes & 0 temps, Py3.14-safe argparse, and 5 temp-copy mutations). - `python3 -B tests/probe_root_devices_check.py` -> 11/11 tests OK (untouched). - `python3 -B tests/form_coverage_check.py` -> passed (exit 0). - `python3 -B tests/docs_links_check.py` -> passed (29 Markdown files, 545 links, exit 0). - `python3 -B tests/bidi_controls_check.py` -> passed (2048 files, exit 0). - Empirical spot-mutation audit: disabling `args.build.is_dir()`, `dest.parent.is_file()`, inventory `is_file()`, and image `is_file()` one by one each caused `tests/probe_root_devices_cli_check.py` to fail (exit 1); re-adding the `dest.is_symlink()` guard also failed the suite. All 5 killed; source restored cleanly (`git status` shows only the two intended files). - Windows CTest / `Build and test on Windows` was not run here (Linux host, no Windows toolchain); it still needs a Windows run. ## Evidence and follow-up All fixtures are synthetic in-memory PE32+ / DXBC / `RTS0` blobs and mocked `subprocess.run` probe outputs inside `TemporaryDirectory`; zero external or game files are used. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:28:00 +00:00
Author
Owner

@⁠pigalot on GitHub · 2026-11-27 19:56 UTC · original · requested changes

I reviewed 31df1f3c merged into main 454fc0ed (tree f086be93, clean merge).

What I ran.

  • out\pe-env\Scripts\python.exe -B tests\probe_root_devices_cli_check.py: 6/6 OK.
  • tests\probe_root_devices_check.py: OK.
  • git diff --check is clean.

What the guards change compared with main. I ran the new suite against main's tools/probe_root_devices.py. All 6 tests fail, but only on message text and on the mutation lines being absent. main already exits 1 with a one-line probe_root_devices: … message and no traceback in each of these cases:

  • a missing or non-directory --bin;
  • a missing control .cso or inventory;
  • a missing build image.

Each of these already raises an OSError that the existing except catches. So for those cases the gain is clearer wording. For a directory at dest or a file at dest.parent, the gain is also failing before the probe runs instead of after it. Both are fine.

Three of the guards refuse cases that work correctly on main. I used the suite's own _create_fixture and _run_main and ran each case on both versions:

case main PR
dest hardlinked to six-apis.json exit 0; new report written; inventory bytes unchanged exit 1, Output path must not alias inventory
dest a symlink to six-apis.json exit 0; link replaced by the report; inventory unchanged exit 1, Output path must not be a symlink
out/calls a directory symlink to another folder exit 0; report written in the target folder exit 1, Output directory must not be a symlink

temporary.replace(dest) renames over the directory entry; it doesn't write through it. So a link at dest can't clobber the inventory, and the hardlink test's "without overwriting inventory" holds on main too. The parent-symlink refusal is a real regression: an out/ or out/calls linked to another drive stops working.

Requested change. Drop the dest.is_symlink(), alias (resolve / samefile) and dest.parent.is_symlink() refusals, together with their tests and mutations. Alternatively, explain what failure they prevent that the atomic replace doesn't already. Please also reword the body: these cases already exit 1 without a traceback on main.

Comparison script (scratch, uses the PR's test helpers)
import sys
from pathlib import Path
from tempfile import TemporaryDirectory
sys.path.insert(0, "tests"); sys.path.insert(0, "tools")
import probe_root_devices_cli_check as t
mod = t._load_temp_module(Path(sys.argv[1]), "prd_under_test")  # main's or the PR's tool
case = t.ProbeRootDevicesCliTests()
for kind in ("hardlink", "symlink"):
    with TemporaryDirectory() as tmp:
        repo, calls, build_dir, bin_dir = case._create_fixture(Path(tmp))
        dest = calls / "root-devices-warp.json"; inv = calls / "six-apis.json"
        before = inv.read_bytes()
        dest.hardlink_to(inv) if kind == "hardlink" else dest.symlink_to(inv)
        code, out, err = t._run_main(mod, [str(build_dir), "--warp-only", "--bin", str(bin_dir)], repo)
        print(kind, code, inv.read_bytes() == before, err.strip())

The out/calls case moves calls to a sibling folder and links it back with symlink_to(..., target_is_directory=True) before the same call.

Verdict: request changes on 31df1f3c.

Environment: Windows 11 25H2 build 26200.9974; Python 3.12.10 (out\pe-env); symlinks created with Developer Mode on.
CI: all required checks pass on 31df1f3c. There are no reviews or threads.

This reply was AI-assisted.

**@⁠pigalot** on GitHub · 2026-11-27 19:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2889#pullrequestreview-6092832887) · **requested changes** I reviewed `31df1f3c` merged into `main` `454fc0ed` (tree `f086be93`, clean merge). **What I ran.** - `out\pe-env\Scripts\python.exe -B tests\probe_root_devices_cli_check.py`: 6/6 OK. - `tests\probe_root_devices_check.py`: OK. - `git diff --check` is clean. **What the guards change compared with `main`.** I ran the new suite against `main`'s `tools/probe_root_devices.py`. All 6 tests fail, but only on message text and on the mutation lines being absent. `main` already exits 1 with a one-line `probe_root_devices: …` message and no traceback in each of these cases: - a missing or non-directory `--bin`; - a missing control `.cso` or inventory; - a missing build image. Each of these already raises an `OSError` that the existing `except` catches. So for those cases the gain is clearer wording. For a directory at `dest` or a file at `dest.parent`, the gain is also failing before the probe runs instead of after it. Both are fine. **Three of the guards refuse cases that work correctly on `main`.** I used the suite's own `_create_fixture` and `_run_main` and ran each case on both versions: | case | `main` | PR | |---|---|---| | `dest` hardlinked to `six-apis.json` | exit 0; new report written; inventory bytes unchanged | exit 1, `Output path must not alias inventory` | | `dest` a symlink to `six-apis.json` | exit 0; link replaced by the report; inventory unchanged | exit 1, `Output path must not be a symlink` | | `out/calls` a directory symlink to another folder | exit 0; report written in the target folder | exit 1, `Output directory must not be a symlink` | `temporary.replace(dest)` renames over the directory entry; it doesn't write through it. So a link at `dest` can't clobber the inventory, and the hardlink test's "without overwriting inventory" holds on `main` too. The parent-symlink refusal is a real regression: an `out/` or `out/calls` linked to another drive stops working. **Requested change.** Drop the `dest.is_symlink()`, alias (`resolve` / `samefile`) and `dest.parent.is_symlink()` refusals, together with their tests and mutations. Alternatively, explain what failure they prevent that the atomic replace doesn't already. Please also reword the body: these cases already exit 1 without a traceback on `main`. <details><summary>Comparison script (scratch, uses the PR's test helpers)</summary> ```python import sys from pathlib import Path from tempfile import TemporaryDirectory sys.path.insert(0, "tests"); sys.path.insert(0, "tools") import probe_root_devices_cli_check as t mod = t._load_temp_module(Path(sys.argv[1]), "prd_under_test") # main's or the PR's tool case = t.ProbeRootDevicesCliTests() for kind in ("hardlink", "symlink"): with TemporaryDirectory() as tmp: repo, calls, build_dir, bin_dir = case._create_fixture(Path(tmp)) dest = calls / "root-devices-warp.json"; inv = calls / "six-apis.json" before = inv.read_bytes() dest.hardlink_to(inv) if kind == "hardlink" else dest.symlink_to(inv) code, out, err = t._run_main(mod, [str(build_dir), "--warp-only", "--bin", str(bin_dir)], repo) print(kind, code, inv.read_bytes() == before, err.strip()) ``` The `out/calls` case moves `calls` to a sibling folder and links it back with `symlink_to(..., target_is_directory=True)` before the same call. </details> **Verdict:** request changes on `31df1f3c`. Environment: Windows 11 25H2 build 26200.9974; Python 3.12.10 (`out\pe-env`); symlinks created with Developer Mode on. CI: all required checks pass on `31df1f3c`. There are no reviews or threads. This reply was AI-assisted.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-28 07:32 UTC · original

Thanks for the guard work and the CLI suite. I rechecked head 31df1f3c merged into current main (clean merge; Linux, Python 3.13, sys.getwindowsversion shimmed). The change request on this same commit is still open, so here is what's left to fix.

Must fix

  1. Three of the new refusals break layouts that work on main. I ran the earlier review's comparison script (it uses the suite's own _create_fixture/_run_main) against both copies of tools/probe_root_devices.py:
    • dest hardlinked to six-apis.json: main exit 0, report written, inventory unchanged. PR exit 1, Output path must not alias inventory.
    • dest a symlink to six-apis.json: main exit 0, the link is replaced by the report. PR exit 1, Output path must not be a symlink.
    • out/calls a directory symlink: main exit 0, report written. PR exit 1, Output directory must not be a symlink.
      temporary.replace(dest) renames over the directory entry, so main never writes through a link. Please drop the dest.is_symlink(), alias (resolve/samefile) and dest.parent.is_symlink() checks along with their tests and mutations, or show a failure that the atomic replace doesn't already prevent.

Should fix
2. If the parent check stays, it's inconsistent. With out itself a directory symlink, the PR exits 0 and writes the report, but out/calls is refused. is_symlink() only looks at the last path component.
3. Of the six new guards the suite doesn't mutate, four are pinned only by their message text. Deleting the args.build.is_dir(), dest.parent.is_file(), inventory is_file() or image is_file() check one at a time and running python -B tests/probe_root_devices_cli_check.py still gives exit 1. The test goes red only on wording, e.g. 'Build directory is not a directory' not found in 'probe_root_devices: Build image is missing or not a file: ...'.
4. The body says these cases now exit 1 "(zero tracebacks)", but main already does that. With a directory at dest, and with compute_tables.cso missing, main exits 1 with a one-line message and no traceback. Please describe the gain as clearer messages and, for a directory at dest or a file at dest.parent, failing before the probes.

This comment was AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-28 07:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2889#issuecomment-7236005839) Thanks for the guard work and the CLI suite. I rechecked head `31df1f3c` merged into current `main` (clean merge; Linux, Python 3.13, `sys.getwindowsversion` shimmed). The change request on this same commit is still open, so here is what's left to fix. **Must fix** 1. Three of the new refusals break layouts that work on `main`. I ran the earlier review's comparison script (it uses the suite's own `_create_fixture`/`_run_main`) against both copies of `tools/probe_root_devices.py`: - `dest` hardlinked to `six-apis.json`: `main` exit 0, report written, inventory unchanged. PR exit 1, `Output path must not alias inventory`. - `dest` a symlink to `six-apis.json`: `main` exit 0, the link is replaced by the report. PR exit 1, `Output path must not be a symlink`. - `out/calls` a directory symlink: `main` exit 0, report written. PR exit 1, `Output directory must not be a symlink`. `temporary.replace(dest)` renames over the directory entry, so `main` never writes through a link. Please drop the `dest.is_symlink()`, alias (`resolve`/`samefile`) and `dest.parent.is_symlink()` checks along with their tests and mutations, or show a failure that the atomic replace doesn't already prevent. **Should fix** 2. If the parent check stays, it's inconsistent. With `out` itself a directory symlink, the PR exits 0 and writes the report, but `out/calls` is refused. `is_symlink()` only looks at the last path component. 3. Of the six new guards the suite doesn't mutate, four are pinned only by their message text. Deleting the `args.build.is_dir()`, `dest.parent.is_file()`, inventory `is_file()` or image `is_file()` check one at a time and running `python -B tests/probe_root_devices_cli_check.py` still gives exit 1. The test goes red only on wording, e.g. `'Build directory is not a directory' not found in 'probe_root_devices: Build image is missing or not a file: ...'`. 4. The body says these cases now exit 1 "(zero tracebacks)", but `main` already does that. With a directory at `dest`, and with `compute_tables.cso` missing, `main` exits 1 with a one-line message and no traceback. Please describe the gain as clearer messages and, for a directory at `dest` or a file at `dest.parent`, failing before the probes. This comment was AI-assisted.
Author
Owner

@⁠Ammmae0x on GitHub · 2026-11-28 08:07 UTC · original

Addressed in 583c8976 (pigalot / JohnConnorNPC, current head):

  • Dropped the three regressive guards and their tests/mutations: dest.is_symlink(), dest.parent.is_symlink(), and the hardlink/alias (resolve/samefile) refusal. Added positive controls proving the restored main behaviour: hardlinked dest, symlinked dest, and symlinked dest.parent all exit 0 with the report written and the inventory unchanged, via the atomic temporary.replace(dest).
  • Remaining guards (M1–M4) are now pinned by behaviour, not wording alone: a new test_guards_fail_before_reading_or_measuring asserts each guard fails before the guarded read/measure is attempted (build guard also wins over a missing inventory by ordering). The message assertions remain as the CLI contract.
  • Body corrected: the gain is clearer messages and earlier pre-probe failure for directory-dest/file-parent cases; main already exited 1 with a one-line message and no traceback on those OSError paths.

Verification (Linux, python3 -B with a venv providing pefile, sys.getwindowsversion shimmed): tests/probe_root_devices_cli_check.py -v 8/8 OK; tests/probe_root_devices_check.py 11/11 OK; form_coverage_check.py, docs_links_check.py and bidi_controls_check.py all exit 0. Spot-mutation audit: disabling args.build.is_dir(), dest.parent.is_file(), inventory is_file(), and image is_file() one by one each failed the suite (exit 1), and re-adding the dest.is_symlink() guard also failed it — all 5 killed, source restored cleanly. Windows CTest was not run here (Linux host); it still needs a Windows run.

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-11-28 08:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2889#issuecomment-7236374469) Addressed in `583c8976` (pigalot / JohnConnorNPC, current head): - Dropped the three regressive guards and their tests/mutations: `dest.is_symlink()`, `dest.parent.is_symlink()`, and the hardlink/alias (`resolve`/`samefile`) refusal. Added positive controls proving the restored `main` behaviour: hardlinked `dest`, symlinked `dest`, and symlinked `dest.parent` all exit 0 with the report written and the inventory unchanged, via the atomic `temporary.replace(dest)`. - Remaining guards (M1–M4) are now pinned by behaviour, not wording alone: a new `test_guards_fail_before_reading_or_measuring` asserts each guard fails before the guarded read/measure is attempted (build guard also wins over a missing inventory by ordering). The message assertions remain as the CLI contract. - Body corrected: the gain is clearer messages and earlier pre-probe failure for directory-`dest`/file-parent cases; `main` already exited 1 with a one-line message and no traceback on those `OSError` paths. Verification (Linux, `python3 -B` with a venv providing `pefile`, `sys.getwindowsversion` shimmed): `tests/probe_root_devices_cli_check.py -v` 8/8 OK; `tests/probe_root_devices_check.py` 11/11 OK; `form_coverage_check.py`, `docs_links_check.py` and `bidi_controls_check.py` all exit 0. Spot-mutation audit: disabling `args.build.is_dir()`, `dest.parent.is_file()`, inventory `is_file()`, and image `is_file()` one by one each failed the suite (exit 1), and re-adding the `dest.is_symlink()` guard also failed it — all 5 killed, source restored cleanly. Windows CTest was not run here (Linux host); it still needs a Windows run. AI-assisted.
github-bot changed target branch from main to gh-pr/2889/base 2026-11-28 09:18:47 +00:00
github manually merged commit 583c897606 into gh-pr/2889/base 2026-11-28 09:18:48 +00:00
Author
Owner

@⁠pigalot on GitHub · 2026-11-28 09:11 UTC · original · approved these changes

Retested 583c8976 integrated over main 3f780716 (tree f75aa158). The merge is clean and git diff --check is clean.

My earlier findings on 31df1f3c. All three are addressed. 583c8976 removes the dest.is_symlink(), dest.parent.is_symlink() and inventory-alias (resolve/samefile) refusals. The remaining guards are the ones I didn't object to: --bin/build directory, control .cso, inventory and image files, a directory at dest, and a file at dest.parent. test_atomic_replace_allows_symlink_and_hardlink_dest covers the three layouts from my table: a hardlinked dest, a symlinked dest, and a symlinked out/calls. Each exits 0, writes the report and leaves six-apis.json byte-identical. This ran for real on Windows here, and symlink creation worked, so nothing was skipped.

What I ran. I ran ctest --test-dir out/build/<preset> --no-tests=error -R 'probe_root_devices' in dev and release. shader_probe_root_devices_cli_check (8 tests) and probe_root_devices_check (11 tests) pass in both.

Control and mutants. Each changes tools/probe_root_devices.py, then runs tests/probe_root_devices_cli_check.py:

Change Result
tool back to main (control) killed: dest_dir_file_parent…, fast_temp_copy_mutations and others
re-add the dest.is_symlink() refusal killed: atomic_replace_allows_symlink_and_hardlink_dest
re-add the inventory alias refusal killed: same test
re-add the parent-symlink refusal killed: same test
drop the dest.is_dir() guard killed
drop the dest.parent.is_file() guard killed
drop the --bin is_dir() guard killed
drop the control .cso is_file() guard killed
drop the image is_file() guard killed
drop the build is_dir() guard killed
drop the inventory is_file() guard killed

Restored afterwards; the worktree matches the trial merge.

Non-blocking. The comment at the top of tests/cmake/shader_probe_root_devices_cli.cmake still says "upfront path/symlink/hardlink guard". The suite now checks that symlinks and hardlinks are allowed.

Verdict: approve on 583c8976. This supersedes my changes-requested review on 31df1f3c.

Environment: Windows 11 25H2 build 26200.9974; out/pe-env Python 3.12.10.
CI: Build and test on Windows passes on 583c8976.

This reply was AI-assisted.

**@⁠pigalot** on GitHub · 2026-11-28 09:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2889#pullrequestreview-6096909459) · **approved these changes** Retested `583c8976` integrated over `main` `3f780716` (tree `f75aa158`). The merge is clean and `git diff --check` is clean. **My earlier findings on `31df1f3c`.** All three are addressed. `583c8976` removes the `dest.is_symlink()`, `dest.parent.is_symlink()` and inventory-alias (`resolve`/`samefile`) refusals. The remaining guards are the ones I didn't object to: `--bin`/build directory, control `.cso`, inventory and image files, a directory at `dest`, and a file at `dest.parent`. `test_atomic_replace_allows_symlink_and_hardlink_dest` covers the three layouts from my table: a hardlinked `dest`, a symlinked `dest`, and a symlinked `out/calls`. Each exits 0, writes the report and leaves `six-apis.json` byte-identical. This ran for real on Windows here, and symlink creation worked, so nothing was skipped. **What I ran.** I ran `ctest --test-dir out/build/<preset> --no-tests=error -R 'probe_root_devices'` in `dev` and `release`. `shader_probe_root_devices_cli_check` (8 tests) and `probe_root_devices_check` (11 tests) pass in both. **Control and mutants.** Each changes `tools/probe_root_devices.py`, then runs `tests/probe_root_devices_cli_check.py`: | Change | Result | |---|---| | tool back to `main` (control) | killed: `dest_dir_file_parent…`, `fast_temp_copy_mutations` and others | | re-add the `dest.is_symlink()` refusal | killed: `atomic_replace_allows_symlink_and_hardlink_dest` | | re-add the inventory alias refusal | killed: same test | | re-add the parent-symlink refusal | killed: same test | | drop the `dest.is_dir()` guard | killed | | drop the `dest.parent.is_file()` guard | killed | | drop the `--bin` `is_dir()` guard | killed | | drop the control `.cso` `is_file()` guard | killed | | drop the image `is_file()` guard | killed | | drop the build `is_dir()` guard | killed | | drop the inventory `is_file()` guard | killed | Restored afterwards; the worktree matches the trial merge. **Non-blocking.** The comment at the top of `tests/cmake/shader_probe_root_devices_cli.cmake` still says "upfront path/symlink/hardlink guard". The suite now checks that symlinks and hardlinks are *allowed*. **Verdict:** approve on `583c8976`. This supersedes my changes-requested review on `31df1f3c`. Environment: Windows 11 25H2 build 26200.9974; `out/pe-env` Python 3.12.10. CI: `Build and test on Windows` passes on `583c8976`. This reply was AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.