Files
reims-vgpu/scripts
Anees IqbalandClaude Opus 5 cfa735e72c 🔥 Forty scanners tested how the source was spelled, and none could see the guest lose work
Removes every test, script and gate that read this repository's own source as
text and asserted on what it found, and states the ban in AGENTS.md so the
class does not grow back.

Touches no pathway: nothing here changes what the device decodes, executes or
presents on arm64 or x86, Metal or Vulkan.

WHAT WENT

  39 grep-lint test files plus the shared tests/source_scan/ helper (14,366
  lines), and 8 source-grep script directories (1,897 lines): dead-state,
  scattered-bound, scattered-struct, silent-arms, abi-pins, stale-doc-names,
  constant-fields, test-isolation.

  crates/reims-vgpu/tests/ is now seven behavioural files. The scanners had
  grown past the behavioural suite in size while proving only that a push sat
  near a len() comparison; one of them had been wrong by 40% on this tree
  because `use ops::{texture_view as w_view}` never puts the family name after
  the token `ops::`, and it reported that clean sweep in output identical to a
  correct one.

  qemu_shims_agree.rs went with them. An earlier reading in this session called
  it the C-header comparison and it is not: it greps vendor/qemu shim *sources*
  for call shapes. The header comparison is qemu::abi::header_define and its
  #[cfg(test)] tests over include_str!, which are untouched and remain the one
  sanctioned exception, because Rust cannot #include that header and the two
  spellings have no other comparison.

CONST ASSERTIONS

  Deleted the one tautology: MTL_BUFFER_LAYOUT_STRIDE_DYNAMIC is declared
  `= u64::MAX` and was then asserted equal to u64::MAX.

  backend/metal/abi.rs held ten asserts pinning hand-copied constants to
  contract:: originals. The copies now derive (`pub const X: u32 =
  contract::Y;`, widening the u16 pass-action ordinals at the declaration), so
  there is one definition and nothing left to drift. That file's doc claimed to
  mirror host/archive/.../reims_vgpu_backend.h, which is not in this tree and
  has no git history, and no C or Objective-C translation unit reads those
  structs; the doc now says so. The size_of/offset_of pins stay — the repr(C)
  layout is what the encode path and its hashes are written against.

  74 assertions remain, all relations between independently-derived values:
  bound-vs-bound, five masks tiling a word, external `metal` crate discriminants
  against our contract ordinals.

DOCS

  AGENTS.md gains "Do Not Validate By Grepping Source" and "Inline `const`
  Assertions" under Operating Principles. The instrument table drops from 21
  rows to 4. "Before A Broad Sweep" loses the three bound-scan rules, the
  MAX/CAP naming requirement and the mask and latched-record paragraphs — the
  five ways a bound costs guest work are kept as prose, pointed at making the
  invariant unrepresentable instead of hunting for sites.

  23 doc comments across 20 source files named a deleted test. Each keeps its
  invariant as prose and says plainly that nothing checks it now.

NO LONGER ENFORCED BY ANYTHING

  Deliberate, and recorded at each site:

    - host-pointer imports over guest RAM (guest_ram_isolation.rs)
    - the Vulkan 1.2 API floor
    - crate-wide decline-slug uniqueness
    - shims reaching ABI entry points only through the shared wrapper
    - wire structs holding only all-bytes-valid fields
    - Vulkan enum variants confined to translate/
    - the ICB bind bound still being called on the Metal arm

  The guest-RAM rule is the one with teeth: AGENTS.md now says a change touching
  extension selection, VkImportMemory* or Metal buffer creation must be read
  against that paragraph, and the reviewer is the only thing in front of it.

VERIFIED

  clippy -D warnings clean on all four arms: backend-vulkan,host-window;
  backend-metal --target aarch64-apple-darwin; backend-vulkan,host-window
  --target x86_64-unknown-linux-gnu; and reims-vgpu-wire --all-targets.

  cargo test --test-threads=1: reims-vgpu 1628 lib + 79 integration passed, 0
  failed (5 ignored are the gitignored wire fixtures); reims-vgpu-wire 144
  passed.

  scripts/feature-matrix: all arms PASS, warnings=0, lib=1628 all_targets=1713.

  cargo doc intra-doc pass: 95 unresolved-link warnings, all pre-existing —
  every one is outside a changed hunk, and they are the documented cosmetic
  class of bare names inside //! module docs.

NOT VERIFIED

  No VM boot on either pathway. Nothing here reaches runtime behaviour, so a
  boot would measure the unchanged device, but it was not run.

  The backend/metal/ test functions still cannot run on this Linux host; that
  gap is unchanged and now uncounted, since the scan that counted them is gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 13:30:43 +03:00
..