#1588

crosslane_fuzz: `--wave 32 --modes emulate` is a usage error, not an empty run

Openbobcatchriswants to merge intofrom

Follow-up to #1452, claimed in the coordination issue: claim.

What and why

--modes emulate exists to run a wave64 program as two 32-lane halves. With --wave 32 the selection therefore contains no program that emulate can run, and the tool ended like this:

$ python -I tools/crosslane_fuzz.py --wave 32 --modes emulate --programs 2
summary:
$ echo $?
0

summary: with nothing under it, exit 0 — indistinguishable from a clean pass, and the summary line is the only place the program count appears. It is the same false pass #1452 fixed for --programs 0, reached through a combination of two valid flags instead of a count.

The refusal sits with the existing --oracle validation, after the --self-test early return (so a self-test still works with any flags) and before the missing-harness check, so it is reported as a usage error whatever the state of the build:

     if not backends or any(t not in ("translator", "hw") for t in backends):
         ap.error("--oracle takes translator, hw or translator,hw")
+    if args.wave == "32" and "emulate" in args.modes:
+        ap.error("--modes emulate needs wave64 programs: with --wave 32 nothing runs (use --wave 64 or both)")

--wave 32 --modes native, --wave 64|both --modes emulate|native|both and the defaults (--wave both, --modes native,emulate) are unchanged.

Tested

CPU only, no GPU, no game data; Windows 11, CPython 3.12.13.

  • python -m pytest tests/test_crosslane_fuzz.py -q -> 37 passed, 1 skipped (35 before this PR).
  • Direct: --wave 32 --modes emulate --programs 2 -> crosslane_fuzz.py: error: --modes emulate needs wave64 programs: with --wave 32 nothing runs (use --wave 64 or both), exit 2, no stdout; and with --exe no-such-build/vk_compute_test it still reports the usage error, not the missing-harness line.
  • Unchanged: --wave 64 --modes emulate --self-test and --wave both --modes emulate --self-test -> self-test OK, exit 0.
  • Negative control with only tools/crosslane_fuzz.py reverted to main (99f99890) and the new tests kept -> 1 failed, 36 passed, 1 skipped: the refusal test fails, the wave64/both test passes on both sides as it should.
  • python -m compileall -q tools tests -> clean.

Not covered: a real --wave 64 --modes emulate comparison run, which needs a Vulkan GPU.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (N/A, tool CLI only.)