aien-architecture-mv
Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.
Brought by drakestapleton
aien-architecture-mv / evidence / QUANTUM_EFFICIENCY / 2026-10-22 / systems-audit.md
| 1 | # L582 — systems / AIEN_0 efficiency audit |
| 2 | |
| 3 | **Verdict:** useful systems opportunities exist, but this read-only pass establishes mechanisms and experiment plans, not measured speedups. The key design distinction is exact state reuse versus approximate search ordering. AIEN_0 must never replace Omega verification. |
| 4 | |
| 5 | ## Pins and scope |
| 6 | |
| 7 | - **Aienux:** `aien-dev/aienux` `main@18e276590424593647cd7c39c6d16c2f9f8d6027` (read through Spark `origin/main`). |
| 8 | - **aien-train:** `aien-dev/aien-train` `main@ed8b6ea2562efdda7913234ca8f34b443714a987`; remote `aien0/m20` resolved to the same SHA. The assigned `~/workspace/aien-train-aien0` worktree was absent; canonical main has no tracked AIEN_0 implementation. L303 remains open. |
| 9 | - **Omega:** `aien-dev/omega-mv` fresh `ls-remote` main pin `a8ffd2b912c84197d08f963b05f9c7d8b30a3f8a`. I did not have a fresh checkout at that pin, so current-main Omega details below are limited to the assigned L303 brief / earlier source copy and are not asserted as fresh code verification. |
| 10 | - Reused the 2026-10-21 efficiency review. Its figures are explicitly marked as derived, prior-branch, or unmeasured where applicable. |
| 11 | |
| 12 | ## Findings |
| 13 | |
| 14 | 1. **Repeated Store validation / hashing — reuse an already validated object result.** Aienux `native/kernel/svc/store_boot.c:269-274` performs an unkeyed `st_open` before keyed `ss_open`; the recovery keyslot path calls `ss_keyslot_bootstrap` at `:485`. The prior G4-os-1 review traces both-slot object validation plus sealed verification and another keyslot pass. A single pass/cache may remove redundant reads, but only if content identity and validation scope are unchanged; authentication checks must not be elided. The previous 5x ordinary / 7x keyslot figures are structural pass-count estimates, **not** measured boot gains. **Cheapest test:** count `dev_read` calls and bytes hashed on a populated QEMU image; then time separately. No assigned owner found; route before changes. |
| 15 | |
| 16 | 2. **Store extent I/O is serialized as 4 KiB calls.** At this Aienux pin, `native/store/store_engine.c:71-105` reads unit-by-unit; `:330-343` writes unit-by-unit. Prior G4-os-2 says the depth-32/direct-DMA driver is in L199's branch, while Store still submits a synchronous unit at a time. Batch contiguous extents without changing padding, hash, error-order or crash behavior. Prior QEMU driver numbers (1,021.5 vs 7,877.4 MB/s, QD1/QD31) are not Store-layer or Spark SSD results. **Cheapest test:** QEMU command-count and crash-gate replay on a copied Store image. L199 owns the driver; Store-layer owner unassigned. |
| 17 | |
| 18 | 3. **X25519 field arithmetic has a large operation-count mismatch.** At Aienux main, `native/net/x25519.c:42-54` uses 16×16 limb products (256 inner products per field multiply); prior G4-os-6 identifies a five-limb implementation in Ed25519. Reuse/port could reduce arithmetic count by 10.24×, but does **not** imply that speedup. Arithmetic must remain exact modulo the same field, with constant-time behavior and RFC 7748 edge cases intact. **Cheapest test:** host differential against RFC 7748 vectors plus boundary/random inputs; then receipt-backed Spark handshake timing. No owner listed in G4-os-6. |
| 19 | |
| 20 | 4. **Ed25519 verify computes two scalar multiplications independently.** `native/sig/ed25519.c:248-263,545-548` shows a fixed 256-step loop used for `[S]B` and `[k]A`. A joint public-input double-scalar loop can share doublings; the prior 2.29× is group-operation-count arithmetic, not wall time. Exact result and canonical rejection behavior are required; signing remains on its constant-time secret-scalar path. **Cheapest test:** RFC 8032 positives/negatives and randomized differential host tests, then receipt-backed verify timing. No owner listed in G4-os-7. |
| 21 | |
| 22 | 5. **Quotient search / equivalence pruning is already represented in Omega; measure before adding e-graphs or a second memoizer.** The older Omega source copy has state hashing in `src/crumbline/cl_search.c:82,249,290`; the L303 brief says the M23 corpus already records `ST_PRUNE_EQUIV`, exposes a dedup setting, and has byte-replay gates. Treat exact-equivalence classes as one state and rank their representatives. Do not confuse exact equivalence pruning with a learned ranking heuristic. **Cheapest test:** frozen tasks, dedup on/off; count equivalence prunes, verifier calls, solved tasks and cost to first solution. No corpus run was done here. L303 owns AIEN_0/M23; L049 owns plan-reuse campaign. Omega line claims await exact-pin checkout. |
| 23 | |
| 24 | 6. **AIEN_0's defined target is a compact synthesis-policy ranker, but no canonical implementation or advantage result is verified.** L303 specifies decision-time features, trace corpus, comparison of pairwise ranking/imitation/value, then held-out evaluation at equal verifier budget against current/random/cheapest-first order. Canonical `aien-train` main remains pre-alpha (`README.md:3-7`) and its `aien0/m20` remote points at the same commit; the assigned worktree was absent. This is an **approximate** ordering policy: finite-budget solve rate/regret can change, while exact correctness remains with Omega's verifier. **Cheapest next step:** parent recovers the existing owner handoff/worktree and inspects it; then run non-timed fixed-budget counts before any model or hardware run. L303 stays open; no duplicate worker or model run. |
| 25 | |
| 26 | 7. **Optimizer state compression / update cadence is not yet an AIEN_0 result.** Prior G5-physics-train-6/7 and L304 use an illustrative fused AdamW layout (28 B/parameter/step; BF16 states reduce bytes 1.4×). Changing update cadence changes the optimization trajectory; low-precision moments are lossy. Those numbers cannot be transferred to AIEN_0 without its actual parameter count, batch, tensor shapes and bandwidth. First compare an exact FP32 reference update with fused execution; only then evaluate low-precision states on held-out ranking quality. No training code exists in canonical main, so timing and quality impact are unknown. L304/L279 and L294 retain ownership. |
| 27 | |
| 28 | ## Limits / actions not taken |
| 29 | |
| 30 | Read-only only: no edits to repositories, builds, corpus generation, benchmarks, model loads, process changes, or ledger closure. No Interplane/protocol, CI-agent-control, CUDApp, inference-kernel, literature, or Wolfram work was done in this systems/AIEN_0 slice. See `systems-findings.json` for the full structured evidence, ownership and experiment fields. |