`spirv_val_bytes` wrote its input to `tmp/a2v_val.spv` and `air_to_sanitized_ll`
wrote `llvm-dis` output to `tmp/k.ll`. `tmp` is caller-supplied and callers do
share one: parallel tests, a sweep's worker threads, and separate processes
pointed at the same directory. A fixed name there is shared mutable state -- one
caller overwrites another's input and then deletes it, and the external tool
reports on a file that is not the one the caller asked about, or on no file at
all.
It surfaces as a validation failure in a module that is fine, which is a false
alarm the reader cannot tell from a real one. I hit it: `constructed_shapes_are_
valid_spirv` failed once, in a run where another `cargo test` process was
validating into the same fixed directory, and passed every time after.
One `scratch_file` names the file after the process and the call, so both callers
stop sharing rather than every caller having to remember to pass a private
directory. `cfg_testkit`'s deliberately fixed `m2v_cfg_testkit_val` is now safe as
written; the relooper and reloop-nest helpers already made per-process
directories.
New `concurrent_validations_sharing_one_scratch_directory_do_not_collide`: eight
threads validating one module into one directory, 16 times each. Verified as a
detector -- with the fixed name restored it fails on all three of three runs.
Verified: 2880 corpus sources byte-identical, reflection included, failure count
unchanged at 204.
Gate: fmt, clippy -D warnings, warnings-denied all-features rustdoc, cargo test
-p metal2vulkan (debug and release), cargo test -p metal2vulkan-validation.
Squash 147 commits (2026-08-20 through 2026-08-31) into one change on top
of the exact-kernel-grid work. Covers native lowering and pointer/layout
construction, AIR intrinsic and funnel-shift coverage, BDA address
preservation across aggregate calls, CFG structurization, function-constant
and visible-function specialization, the 30-second translation ceiling, the
authored-case corpus and linkage validation suite, and refreshed byte-exact
MoltenVK evidence.
The kernel-grid lowering in this tree supersedes the 324-line variant in
the parent commit; that file is reduced to its current 139-line form here.
Resulting tree is identical to 7174c7b. Prior history remains reachable at
tag pre-squash-backup and branch backup/pre-squash-7174c7b.
Claude-Session: https://claude.ai/code/session_01D1u4vU7Mr5QNWrnnRHC8iS
Carry parsed vector ABI alignment into pre-emitter memcpy and metadata sizing, make the runtime-array raw-word fast path sidecar-aware, and propagate nested or missing AIR mapping failures into typed evidence.\n\nVerified with full serial workspace tests, clippy, Rustdoc, the release reproducer, and a 500-row current-fingerprint translation audit with zero failures.
Preserve and parse the source datalayout, use allocation strides through aggregate byte walkers, and correctly map uchar vectors from AIR struct metadata. Record typed mapping outcomes so authoritative metadata cannot disappear silently.\n\nCover scalar families, custom vector alignment, raw and inline lowering, retry emission, metadata matching, and path-based translation.
Overhaul the validation workflow around sharded authored cases, dependency-exact observations, incremental indexed corpus audits, bounded parallel translation, and native Metal/Vulkan comparison.\n\nExpand native AIR lowering, reflection, linked-function specialization, resource and stage-interface support, and structural CFG/pointer repair across the harvested macOS 26 corpus. Add exact intrinsic inventory, distributed 16x16x16 matrix lowering, explicit opaque tensor linkage, and regression coverage for the newly supported feature classes.\n\nThe final corpus verification accounts for all 88,819 indexed AIR modules under the current product fingerprint: 65,355 translate and validate directly, 23,464 require exact authored linkage, and zero fail or remain unresolved.