Parent: https://github.com/aien-dev/aienix/issues/4 Prerequisites/interfaces: SSD artifact/read adapter #629, Omega versioned GPU slots #533. Develop initial state machine against fakes while those land.
Scope
Implement the host-side cache policy and correctness state machine, not GPU pointers or NVMe device semantics. This is separate from persisted attention KV. Integrate with the existing Qwen3-MoE loader/generator using a feature flag; existing fully resident route remains default until qualification.
Required model
- Stable expert identity (checkpoint digest, layer, expert, gate/up vs down) mapped to slot + generation; states ABSENT -> FETCHING -> VERIFIED -> COPYING -> READY -> IN_USE -> EVICTABLE, errors explicit.
- Independent accounting for OS/RM safety headroom, non-expert weights, model KV cache (including configured max context), scratch/staging, hot expert slots; reject oversubscription rather than assuming all 120 GB can store experts.
- Per-request lock/pin lifecycle so selected top-k experts remain resident through the actual GPU read fence. No eviction if a live request or prefill batch still references a slot.
- Deterministic capacity, simple initial cache policy (e.g. LRU), counters (hit/miss, evictions, bytes in flight, wait time), and bounded backpressure. Prefer no extra resident copy of the same FP8 expert.
- Exactly correct expert fallback on every miss (wait for the right expert or fail explicitly). Never substitute a predictor's guess, drop an expert, or silently lower precision.
Acceptance
- Fake-store/fake-GPU deterministic tests for cache pressure, repeated/layer-crossing identities, simultaneous readers, ABA slot reuse, pinned exhaustion, failure recovery and correct eviction order.
- Memory ledger conservatively matches actual allocation reports with explicit safe headroom and stable high-water mark at varied cache sizes.
- No change to ordinary fully resident behavior when disabled. No live Spark benchmark claim until measured.
Agent boundary
Host/cache files only; coordinate an agreed narrow trait/FFI contract with #533, not a parallel Omega executor.