diff --git a/AGENTS.md b/AGENTS.md index 16e326253..61c9280b9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -298,8 +298,9 @@ with no product behavior change, preserve the raw failing result, establish the why the prior classification was unsupported. The correction must move the case atomically between the translation and driver/device inventories; it must never leave the case in both or neither. -The current conformance runner is scoped to the x86 macOS / Linux Vulkan pathway and the macos-15 -rail. It is mandatory for guest-visible changes that can affect that pathway, including shared +The current conformance runner is scoped to the x86 macOS / Linux Vulkan pathway. `RAIL` selects +the guest rail; each rail carries its own debt inventory, and a result on one rail is a measurement +of that rail's driver only. It is mandatory for guest-visible changes that can affect that pathway, including shared decode, contract, runtime, memory, synchronization, rendering, or Vulkan execution. It does not prove another pathway or rail; validate those separately when they are affected. @@ -348,8 +349,8 @@ State exactly what was verified. One workload, host, pathway, and rail proves on execution, presentation, and Metal/Vulkan policy. - `crates/reims-vgpu/src/observe/`: typed failure and census emission. - `crates/reims-vgpu-wire`: derived wire views; its own `AGENTS.md` also applies. -- `conformance/`: native-oracle Metal cases, macos-15 guest runner, and separate translation and - driver debt inventories. It preserves established compatibility; it does not define API truth. +- `conformance/`: native-oracle Metal cases, a rail-selected guest runner, and separate per-rail + translation and driver debt inventories. It preserves established compatibility; it does not define API truth. - `vm/`: snapshot-revert boot scripts and rail selection. - `bugs/`: gitignored handoff packages for translator defects. @@ -490,7 +491,7 @@ native oracle first. The tracked native baseline must contain every case exactly applicable case must pass before guest output can establish a device defect. For every guest-visible behavior change capable of affecting x86 macOS / Linux Vulkan, run the -complete macos-15 battery on both the identified control and candidate. Preserve both output +complete battery on the named rail for both the identified control and candidate. Preserve both output directories and manifests. Score both against the same native baseline and compare their raw per-case transitions using the ratchet in step 9. Focused modes are for establishing and repeating one repair; they do not replace the complete battery. diff --git a/conformance/README.md b/conformance/README.md index 25afbd373..50eac7d68 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -24,8 +24,8 @@ verdict rather than diffing hundreds of lines by eye: ```sh conformance/verdict.py --native baselines/native-apple-m4-macos15.txt \ --guest /tmp/conf-out/conformance.txt \ - --translation-errors expectations/translation-errors.txt \ - --driver-errors expectations/driver-errors.txt + --translation-errors expectations/macos-13/translation-errors.txt \ + --driver-errors expectations/macos-13/driver-errors.txt ``` It is stricter than the eye in two directions the eye is bad at. A case that @@ -49,9 +49,18 @@ is green natively. ## Failure ownership is part of the verdict -`expectations/translation-errors.txt` and `expectations/driver-errors.txt` are -separate inventories. One case name goes on each line; `#` starts the required -diagnosis. A name in both files is `DUPLICATE-CLASSIFICATION` and fails scoring. +`expectations//translation-errors.txt` and +`expectations//driver-errors.txt` are separate inventories. One case name +goes on each line; `#` starts the required diagnosis. A name in both files is +`DUPLICATE-CLASSIFICATION` and fails scoring. + +**They are per rail, and a rail is a driver.** `macos-13` and `macos-15` are two +different guest drivers running the same battery, so a case one of them fails +says nothing about the other, and neither does a case one of them passes. An +entry established on one rail may not be copied to another to make a sweep +green; it has to be re-established there, against that rail's own control. A +rail with no inventory directory is refused by the runner rather than scored +against a neighbour's debt. A translation entry names its gitignored `bugs/` handoff package, containing the AIR reproducer and translator evidence. A driver entry names the violated Metal @@ -100,7 +109,7 @@ conformance/ Support.swift the library, pipelines, readback, helpers cases/*.swift the case bodies, one file per rail or family baselines/ native runs, one per oracle host - expectations/ separate translation and driver inventories + expectations// separate translation and driver inventories, per rail verdict.py scores a guest run against the native one run-native.sh build and run on the oracle run-guest.sh boot a rail and run the same source in the guest @@ -137,10 +146,9 @@ fail log beside the results: conformance/run-guest.sh /tmp/conf-out ``` -The guest runner is pinned to the macos-15 rail. Environment passes through, so -an ablation arm is +`RAIL` selects the guest rail and defaults to `macos-13`. Environment passes +through, so an ablation arm is `REIMS_VGPU_GUEST_IMPORT=off conformance/run-guest.sh /tmp/conf-off`. -Any other `RAIL` value is rejected. For a fast, shaderless gate of the integer-clear contract, use `CONFORMANCE_MODE=integer-clear`. Use `CONFORMANCE_MODE=topology` for the diff --git a/conformance/expectations/macos-13/driver-errors.txt b/conformance/expectations/macos-13/driver-errors.txt new file mode 100644 index 000000000..a5382bb23 --- /dev/null +++ b/conformance/expectations/macos-13/driver-errors.txt @@ -0,0 +1,9 @@ +# Guest failures owned outside shader translation, on the macos-13 rail. +# +# One case name per line, followed by a comment naming the violated API +# relation and the driver owner. An unexplained mismatch does not belong here: +# establish its owner first. Remove an entry when the scorer says FIXED-DRIVER. +# +# This inventory is this rail's alone. A guest rail is a guest driver, so a +# failure established on another rail says nothing about this one and may not +# be copied across. diff --git a/conformance/expectations/macos-13/translation-errors.txt b/conformance/expectations/macos-13/translation-errors.txt new file mode 100644 index 000000000..0691024bb --- /dev/null +++ b/conformance/expectations/macos-13/translation-errors.txt @@ -0,0 +1,10 @@ +# Guest failures owned by shader translation, on the macos-13 rail. +# +# One case name per line, followed by a comment naming the gitignored +# `bugs//` handoff package that reproduces it. An unexplained mismatch +# does not belong here: establish its owner first. Remove an entry when the +# scorer says FIXED-TRANSLATION. +# +# This inventory is this rail's alone. A guest rail is a guest driver, so a +# failure established on another rail says nothing about this one and may not +# be copied across. diff --git a/conformance/expectations/driver-errors.txt b/conformance/expectations/macos-15/driver-errors.txt similarity index 100% rename from conformance/expectations/driver-errors.txt rename to conformance/expectations/macos-15/driver-errors.txt diff --git a/conformance/expectations/translation-errors.txt b/conformance/expectations/macos-15/translation-errors.txt similarity index 100% rename from conformance/expectations/translation-errors.txt rename to conformance/expectations/macos-15/translation-errors.txt diff --git a/conformance/run-guest.sh b/conformance/run-guest.sh index 3df4b1bb2..869cfa6df 100755 --- a/conformance/run-guest.sh +++ b/conformance/run-guest.sh @@ -4,8 +4,10 @@ # run-guest.sh # # The same source the oracle runs, on the paravirtual device. `run-native.sh` -# builds the x86_64 artifact that this runner sends to the fixed rail. The same -# source and build identity therefore feed both oracle and guest results. +# builds the x86_64 artifact that this runner sends to the rail. The same source +# and build identity therefore feed both oracle and guest results. +# +# `RAIL` selects the guest rail and defaults to macos-13. # # Environment passes through, so an arm is `REIMS_VGPU_X=y run-guest.sh ...`. set -uo pipefail @@ -13,11 +15,19 @@ export LC_ALL=C OUT="${1:?usage: run-guest.sh }" HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO="$(cd "$HERE/.." && pwd)" -if [ "${RAIL:-macos-15}" != "macos-15" ]; then - echo "conformance: this suite is pinned to rail macos-15" >&2 +# A guest rail is a guest driver, so the failures a rail owns are that rail's +# alone. Each rail therefore carries its own debt inventory, and a rail with no +# inventory is refused rather than silently scored against another rail's debt. +RAIL="${RAIL:-macos-13}" +EXPECT="$HERE/expectations/$RAIL" +if [ ! -d "$REPO/vm/disks/rails/$RAIL" ]; then + echo "conformance: no such rail: $RAIL (see vm/boot-x86.sh --list-rails)" >&2 + exit 2 +fi +if [ ! -r "$EXPECT/driver-errors.txt" ] || [ ! -r "$EXPECT/translation-errors.txt" ]; then + echo "conformance: rail $RAIL has no expectation inventory at $EXPECT" >&2 exit 2 fi -RAIL="macos-15" RUN_KIND="${RUN_KIND:-candidate}" case "$RUN_KIND" in baseline|candidate) ;; *) echo "conformance: RUN_KIND must be baseline or candidate" >&2; exit 2 ;; @@ -78,8 +88,8 @@ MANIFEST="$OUT/manifest.txt" echo "harness_status_end" echo "suite_inputs_begin" find "$HERE/suite" -type f -print0 | sort -z | xargs -0 sha256sum - sha256sum "$HERE/verdict.py" "$HERE/expectations/translation-errors.txt" \ - "$HERE/expectations/driver-errors.txt" + sha256sum "$HERE/verdict.py" "$EXPECT/translation-errors.txt" \ + "$EXPECT/driver-errors.txt" [ ! -x "$BIN" ] || sha256sum "$BIN" echo "suite_inputs_end" echo "qemu_source_repo=$QEMU_SOURCE_REPO" @@ -149,9 +159,9 @@ for _ in $(seq 1 60); do sleep 5 done -# Run the exact x86_64 artifact produced beside the oracle result. The fixed -# macOS-15 rail has no developer tools, and probing its `swiftc` shim opens the -# installer rather than proving a compiler exists. +# Run the exact x86_64 artifact produced beside the oracle result. A rail guest +# has no developer tools, and probing its `swiftc` shim opens the installer +# rather than proving a compiler exists. timeout 60 scp -o BatchMode=yes -q "$BIN" macos-vm:/tmp/conformance || { echo "could not copy the battery into the guest"; exit 1; } ssh -o BatchMode=yes macos-vm 'shasum -a 256 /tmp/conformance' \ @@ -195,8 +205,8 @@ env | grep -q '^REIMS_VGPU_' && ADVISORY=(--claims-advisory) echo "--- verdict ---" python3 "$HERE/verdict.py" --native "$NATIVE" --guest "$OUT/conformance.txt" \ - --translation-errors "$HERE/expectations/translation-errors.txt" \ - --driver-errors "$HERE/expectations/driver-errors.txt" --device "$OUT/device.log" \ + --translation-errors "$EXPECT/translation-errors.txt" \ + --driver-errors "$EXPECT/driver-errors.txt" --device "$OUT/device.log" \ "${ADVISORY[@]}" --quiet | tee "$OUT/verdict.txt" vrc="${PIPESTATUS[0]}" pkill -f 'qemu-system-x86_6[4].*reims-vgpu' 2>/dev/null