interplane.Get Omega
Read in your language

spark-rsi-mv

Native Rust recursive self-improvement engine with paired bootstrap evaluation and cryptographic ledger

Brought by drakestapleton

branch main Branches Tags History

spark-rsi-mv / docs / reuse-eval / README.md

114 lines · 12878 bytes Raw Blame History Source

REUSE-1 evaluator: judge

om/reuse-eval/judge.om is the REUSE-1 judge for spark-rsi-mv #73, written in seeded .om. It works from the frozen contract (omega-mv d6edaad1, docs/reuse/REUSE-1.md, sha256 71a6da13...5deb), the evaluator formats, the candidate drive.om CLI and built binaries. It reads no candidate source.

Units and binary

Units are concatenated in this order, with no imports:

UnitFileOwner
sha256om/reuse-eval/sha256.ombyte copy of omega-mv main acb3f15c om/sha256/sha256.om, pinned in sha256.pin
refom/reuse-eval/ref.omEvalGen
stats, turing, receiptom/reuse-eval/{stats,turing,receipt}.omEvalStats
judgeom/reuse-eval/judge.omEvalJudge (prefix jd, JD, JW, JM)
mainom/reuse-eval/main.omEvalJudge

The single evaluator binary is sha256 ref stats turing receipt judge main. main sends stats, turing and receipt to the EvalStats entries and every other subcommand to jdmain.

Commands

Paths are relative to the current directory unless stated. Run every measured command as nice -n 10. The judge puts each arm on a CPU with /usr/bin/taskset -c CPU; the contract places the evaluator on CPU 18 and the arms on CPU 19. A CPU of - means no taskset (tests only).

judge run SPLIT OUT REPS SEED ARMS BASE ALLOW LIB MAN LIBP MANP CPU
judge tap SPLIT BASE TAPFILE SPLITARG CPU
judge calib CALIBSPLIT RUNDIR REPS OUTFILE
judge build DRIVE OMEGADIR OMC ALLOW CALIB OUTLIB ACQDIR LIBID REP [DRIVE OPTIONS AND EXP FILES...]
judge recheck MANSHAFILE PINHEX
judge controls DEV BASE DRIVE OMEGADIR OMC ALLOW NOG3 C4 OUT CPU

Exit codes: 0 ok, 2 usage, 3 judge error (the judge error N line on stderr names the step), 4 tap failure or a STOP control in controls.

Files written (EVAL-FORMATS)

All values are u64 little-endian words. R is 0-based, NN is the group number in 2 digits and A is the arm id.

Controls

The control workloads are derived from DEV. The ancestor is the first AGG BEGIN of DEV, and its first constant feeds the control program. The judge builds its own TRAIN-like experience with the tap arm of BASE: an ADD shape at wl 8 and an ADD shape at wl 16, each with 8 QUERYs. That gives a pair of shapes that differ only in wl, and wl-16 lane values of 256 and above. It authorizes that experience in a private copy of ALLOW and builds an honest wl-16 library, which serves as the reference for C3 and C6..C11. Every control workload is scored against ref.om (rfreq), never against candidate output. The ids are those of K7.

K7 idContractSub-casesDetected when
1C10 mutant:c1 with a wl-8 library, served wl 16; 1 the same plus unit:check=NOG30: route 5 on every QUERY (G3) or wrong answers (K10; the printed 5= and wrong= counts show which); 1: wrong answers
2C1b0 mutant:c1b; 1 plus NOG30: route 5, no wrong answer; 1: wrong answers
3C1c0 mutant:c1croute 5, no wrong answer
4C20 one byte of the magic; 1 one byte of the program digest (both copies re-authorized)drive exit 10
5C30 sample outputs swapped; 1 diagnostic costs (word 7) rotated across records0: drive exit 10; 1: gen-G.om and gen-G.elf byte-identical, manifest word 4 and words 56..183 equal (K13)
6C40 unit:delta=C4wrong answers
7C5per wl 8 and 16: full; delta with the library; idelta. Lanes 2^wl - 1 with MUL and SHL, values 2^wlreference values, status 3, no wrong answer
8C60 one ELF byte; 1 one manifest byte; 2 coherent replacement (new ELF, manifest and CURRENT consistent, MANSHA still the honest one)every QUERY route 5
9C70 REVOKED appended before start; 1 REVOKED appended before request 20: route 5 throughout; 1: method or delta routes before, route 5 on every later QUERY
10C8K = 1..9 crashafter:K over a copy of the honest generation P (K15)exit 97; CURRENT, gen-G.man and gen-G.elf are self-consistent and load with their own MANSHA; no wrong answer, and method or delta routes served
11C90 compiler SHA-256; 1 profile version (manifest, self-check, CURRENT and MANSHA rewritten coherently)route 5
12C100 manifest truncated to 777 bytes; 1 CURRENT truncated to 17 bytesroute 5
13C11SIGKILL after request 3, then a fresh armthe kill is observed (exit word 265); CURRENT and MANSHA are unchanged; the fresh arm answers with no wrong answer
14C12reported (outcome 2); scored by run with arms 5 and 6ablation

A control that cannot be set up (a failed build, a missing CURRENT) is recorded as 3 (not run), never as passed. controls exits 4 if any outcome is 0 or any served-tampered flag is set (STOP), exits 3 if a control was not run, and exits 0 otherwise.

Holdout: running FINAL once (contract 7.3)

  1. Evaluator freeze: commit and push this tree, together with evidence/REUSE-73/final-commitment.txt (SHA-256 of the secret).
  2. Candidate freeze: omega-mv commit with the TRAIN and CALIB library and its MANSHA.
  3. judge build rebuilds the TRAIN library from the admitted experience with the frozen drive, three times (REP 0..2), and judge recheck checks each result against the frozen MANSHA. A mismatch is BLOCKED, and the run stops there.
  4. The operator reveals the secret. FINAL seed = SHA-256(secret || candidate commit || evaluator commit).
  5. gen FINAL OUTDIR SEEDHEX, then once: nice -n 10 taskset -c 18 eval judge run FINALDIR RUNDIR 3 SEEDHEX 01234567 BASE ALLOW LIB MAN LIBP MANP 19.
  6. Run stats, turing and receipt on that run directory. A void run burns the seed, and any later run needs a new secret and a recorded reason.

Tests

From the repo root: OMC < tests/reuse-eval/run.om > run.elf, then run.elf OMC [PREFIX].

judge-arm.om is a fake arm built on ref.om. Its mode comes from the ARM word: full; wrong (r0 + 1); echo; badq; short; stall (sleeps 10.1 s); tap (writes R1EXP001 records); endbad (END answered q 1), endst (END status 3), endeof (no END answer), endexit (good END, exit 7). judge-drive.om is a fake drive. The fakes check only the judge's protocol, logs and fail-closed behaviour. They are not the candidate. judge-end.om also pins the arm order: for splitmix64 seed 0 over arms 01234567, the first two permutations are 2,5,0,3,4,6,1,7 and 3,7,0,5,6,2,1,4 (computed outside the judge from the standard splitmix64 constants).