ruvector/crates/rvm/tests/README.md
Reuven a929fde654 feat(rvm): RVM — Coherence-Native Microhypervisor for the Agentic Age
Complete implementation of the RVM microhypervisor:

13 Rust crates (all #![no_std], #![forbid(unsafe_code)]):
- rvm-types: Foundation types (64-byte WitnessRecord, ~40 ActionKind variants)
- rvm-hal: AArch64 EL2 HAL (stage-2 page tables, PL011 UART, GICv2, timer)
- rvm-cap: Capability system (P1/P2 proof verification, derivation trees)
- rvm-witness: Witness logging (FNV-1a hash chain, ring buffer, replay)
- rvm-proof: Proof engine (3-tier, constant-time P2 evaluation)
- rvm-partition: Partition model (lifecycle, split/merge, IPC, device leases)
- rvm-sched: Scheduler (2-signal priority, SMP coordinator, switch hot path)
- rvm-memory: Memory tiers (buddy allocator, 4-tier, RLE compression)
- rvm-coherence: Coherence engine (Stoer-Wagner mincut, adaptive frequency)
- rvm-boot: Bare-metal boot (7-phase measured, EL2 entry, linker script)
- rvm-wasm: Agent runtime (7-state lifecycle, migration, quotas)
- rvm-security: Security gate (validation, attestation, DMA budget)
- rvm-kernel: Integration kernel (boot/tick/create/destroy)

602 tests, 0 failures, 0 clippy warnings.
21 criterion benchmarks (all ADR targets exceeded).
9 ADRs (132-140), 15 design constraints (DC-1 through DC-15).
11 security findings addressed.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-04 12:10:19 -04:00

1.2 KiB

rvm-tests

Cross-crate integration tests for the RVM microhypervisor.

This crate exercises the public APIs of all 13 RVM subsystem crates in combination. It is not published and exists solely for cargo test validation of the workspace.

What is Tested

  • PartitionId round-trip and VMID extraction
  • CoherenceScore clamping and threshold checks
  • WitnessHash zero detection
  • WitnessRecord size assertion (must be exactly 64 bytes)
  • CapToken rights checking (single and combined rights)
  • GuestPhysAddr / PhysAddr page alignment helpers
  • BootTracker sequential phase completion and out-of-order rejection
  • WasmModuleInfo header validation (magic, version, truncated input)
  • GateRequest security enforcement (type match and mismatch)
  • WitnessLog append and length tracking
  • WitnessEmitter record construction with action kind and actor
  • EmaFilter initial sample pass-through and EMA computation
  • PartitionManager create and lookup
  • rvm-kernel version and crate count constants
  • ActionKind subsystem discriminant
  • fnv1a_64 determinism

Running

cargo test -p rvm-tests

Workspace Dependencies

All 13 RVM crates (rvm-types through rvm-kernel).