spark-rsi-mv
Native Rust recursive self-improvement engine with paired bootstrap evaluation and cryptographic ledger
Brought by drakestapleton
spark-rsi-mv / evidence / rsi-cut-2026-10-12 / REPORT.md
| 1 | # Qualification report: evidence-driven RSI cut (M1 + M2) |
| 2 | |
| 3 | Date: 2026-10-12. Revision under test: see `run-correct/environment.json` (branch |
| 4 | `feat/evidence-driven-rsi-cut`, integration PR aien-dev/spark-rsi#44). Host: NVIDIA DGX Spark |
| 5 | (GB10, 20 cores, 121 GiB), rustc 1.98.1. Plan: `docs/plans/2026-10-12-evidence-driven-rsi-cut.md`. |
| 6 | Ticket: #43. |
| 7 | |
| 8 | ## What was run |
| 9 | |
| 10 | Two real cycles of `examples/canary_qualification` against the fixture target |
| 11 | (`fixtures/canary-target`) with the operator-pinned workload (10 requests, 2000 ms deadline each, |
| 12 | `exact` nondeterminism): |
| 13 | |
| 14 | 1. `run-correct`: the fixture answers every request correctly. |
| 15 | 2. `run-wrong-answer`: the fixture answers request 3 wrongly. The plan requires that the real run |
| 16 | include at least one failing request; this run is that case. |
| 17 | |
| 18 | Each cycle went through the real pipeline: Observe, Propose (the unslop proposal from the README |
| 19 | em dash), BuildJail (bubblewrap, `cargo build --release --offline` of the fixture from the |
| 20 | evaluated tree), JudgeEvaluation (the in-process judge over the holdouts), then the |
| 21 | supervisor-driven canary: identity chain (patch digest, evaluated tree digest, staged executable |
| 22 | digest, generation id), executable re-hashed before launch, versioned authenticated readiness, |
| 23 | ten supervisor-issued requests measured on the supervisor's clock, a sealed observation log, a |
| 24 | ledger commitment block, quota admission, safety envelope, promotion gate. |
| 25 | |
| 26 | ## Results |
| 27 | |
| 28 | | | run-correct | run-wrong-answer | |
| 29 | |---|---|---| |
| 30 | | executable digest | `870722da2227135d0d53c1575a8f2ca5dcf41c630415d4dda389073af0f2341e` | same | |
| 31 | | workload digest | `d21ca53e23457bd1da84e0cc2115999208312eea03f30616a5c3d46e97e39bab` | same | |
| 32 | | observations recorded (qualifying) | 10 (10) | 3 (2) | |
| 33 | | first failure | none | req-003: WrongResult | |
| 34 | | early safety revert | no | yes, worker stopped after request 3 | |
| 35 | | sealed log digest | `656369180cb7b506457b03037cddd65005d66f2e73f21e7a07cb01123541306a` | `63cf4282a17e0b6ce3997a7fd0d7e306fce064be42c2995c9df0e575d1c3f05d` | |
| 36 | | ledger commitment block | `7a2bc9e5c69064930251c4b08680dbe52f70d4fc1f1bf599929fe7164133d738` | `46895b6b874f00a970821d42cdeb8de2ae319e9840764b2247c6a830aee9ce86` | |
| 37 | | quota admission | admitted, 10 of 10 | refused: WrongResult on req-003 | |
| 38 | | safety envelope | passed; recorded as a reference evaluation | not reached | |
| 39 | | promotion gate | refused: no pinned judge public key | not reached | |
| 40 | | durable generation | none | none | |
| 41 | | verdict against the mode's prediction | as predicted | as predicted | |
| 42 | |
| 43 | Both logs verify independently (`sealed-log.json`), both ledgers audit clean (`ledger-audit.json`), |
| 44 | and the commitment block precedes the quota decision in both ledgers (`ledger-blocks.json`). |
| 45 | |
| 46 | ## Evidence files, per run directory |
| 47 | |
| 48 | - `summary.md`: the decisions in one table, as printed by the run. |
| 49 | - `cycle-result.json`: the full `RsiCycleResult` including the `canary` summary. |
| 50 | - `workload.json` and `workload.sha256`: the pinned workload and its digest. |
| 51 | - `canary-adapter.toml`: the adapter manifest the target shipped. |
| 52 | - `observations.jsonl`: the sealed observation log exactly as written (header, observations, |
| 53 | rejections, seal). |
| 54 | - `sealed-log.json`: the log re-verified by `SealedObservationLog::load` after the run. |
| 55 | - `ledger-blocks.json` and `ledger-audit.json`: every ledger block of the cycle and the chain audit |
| 56 | with the signed checkpoint verified against the cycle's key. |
| 57 | - `stage-samples.jsonl`: the M1 stage samples the cycle recorded (first cycle of its workload key, |
| 58 | so the ranking that produced the proposal was structural). |
| 59 | - `config.json` and `environment.json`: the exact configuration, revision, toolchain and host. |
| 60 | |
| 61 | ## Adversarial CI |
| 62 | |
| 63 | All of the following run in `cargo test` and passed in the full CI-mirror gate |
| 64 | (`tests/gates/run.sh test`, exit 0) on this revision: |
| 65 | |
| 66 | - `tests/test_canary_execution.rs` (15 tests, real fixture process over a real socket): correct |
| 67 | run, wrong answer, fabricated self-report, duplicate results, replay on a new connection across |
| 68 | a restart, timeout, answer to the wrong request, premature promotion frames, wrong secret, old |
| 69 | protocol version, wrong generation, bare silent connection, crash and reopen without double |
| 70 | counting, a failure recorded before a restart, a mismatched executable digest, a workload that |
| 71 | does not match its pin. |
| 72 | - `tests/test_no_synthetic_trust_inputs.rs` daemon tests (5, real build jail): correct fixture |
| 73 | reaches the later gates, wrong answer is refused and rolled back, no adapter is refused before |
| 74 | any worker starts, mismatched or missing workload pin, exemption is explicit configuration and |
| 75 | never covers executable changes. |
| 76 | - `tests/test_m1_measurement.rs` (18) and `tests/test_canary_contract_golden.rs` (10 frozen |
| 77 | encodings), plus the supervisor, canary and measure unit tests. |
| 78 | |
| 79 | ## What this qualifies, and what it does not |
| 80 | |
| 81 | Qualified: the canary execution pipeline. Evidence reaches admission only when the supervisor |
| 82 | issued the request, measured the answer itself, matched it against the pinned workload, and sealed |
| 83 | it into a log bound to the exact executable it launched. Self-reports, duplicates, replays, wrong |
| 84 | outputs, timeouts, unauthenticated or wrong-generation connections, mismatched digests and |
| 85 | corrupted logs cannot qualify, and a single failed request reverts the candidate. |
| 86 | |
| 87 | Not qualified: |
| 88 | |
| 89 | - RSI's ability to improve itself. The target was a fixture, not spark-rsi. spark-rsi as the first |
| 90 | real adapter target is the next milestone. |
| 91 | - The safety envelope as a production evaluator. It evaluates through |
| 92 | `aien_probe::DeterministicReferenceBackend`; that is recorded in the ledger and the cycle |
| 93 | result, and replacing or qualifying that evaluator is a separate follow-on cut. |
| 94 | - Production latency reliability. Ten requests prove quota and replay protection, not tail |
| 95 | latency. |
| 96 | |
| 97 | ## Remaining production limitations |
| 98 | |
| 99 | 1. The promotion gate refuses every candidate in this cut: the in-process judge signs with the |
| 100 | daemon's own key and produces no version 2 binding, so no candidate becomes durable until the |
| 101 | separate judge is wired in (issue #35). This is fail closed by design, and it means the full |
| 102 | promotion path has not yet been exercised end to end. |
| 103 | 2. The safety envelope is a reference evaluation (above). |
| 104 | 3. The canary worker is not jailed. It runs as the daemon's user with an allowlisted environment |
| 105 | (`PATH`, `HOME`, `LANG`, `LC_ALL`, `TMPDIR`, `RUST_BACKTRACE`, `RSI_CANARY_*`, and a fresh |
| 106 | per-run `SUPERVISOR_SECRET`). |
| 107 | 4. Readiness listens on a same-user Unix socket. A stray same-user connection that stays silent |
| 108 | can consume the readiness deadline; the result is a failed canary, never a false pass. |
| 109 | 5. The build jail writes to the shared output root `/tmp/spark-rsi-target`; the executable is |
| 110 | copied into the staged generation and re-hashed, but a concurrent writer to that directory |
| 111 | between the build and the copy is not defended against. |
| 112 | 6. The qualification ran with the inference endpoint and the memory service unreachable, so the |
| 113 | proposal exercised was the unslop proposal; the model-generated proposal path was not |
| 114 | exercised. |
| 115 | 7. Measurement starts cold: the first cycles of a workload key rank structurally until three |
| 116 | compatible completed samples exist per stage. The soak runner reads the same samples but does |
| 117 | not record its own. |
| 118 | 8. The shared explain fixture was re-blessed; aienos must refresh its copy and pin |
| 119 | (aien-dev/aienos#337). |