aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / om / golden / README.md
| 1 | # Golden-token harness (Core #853, DRA-52) |
| 2 | |
| 3 | Records the greedy token ids an aien-serve-http engine produces for a fixed prompt set, and compares |
| 4 | two such records token by token. Every judgment is made in `golden.om`; `record.sh` sequences and |
| 5 | curl moves bytes. Formats: [SCHEMA.md](SCHEMA.md). |
| 6 | |
| 7 | | File | Role | |
| 8 | |---|---| |
| 9 | | `golden.om` | `req` writes request bodies, `rec` turns engine replies into a record, `cmp` compares two records | |
| 10 | | `fake.om` | TEST ONLY: HTTP responder on a random 127.0.0.1 port serving canned replies; never an engine | |
| 11 | | `build.sh` | Builds a `.om` with the pinned omc (omega-mv `bf54b19f`, sha256 `62775d2a...3712b`); exit 3 NOT_RUN otherwise | |
| 12 | | `record.sh` | Sequencer: build, `golden req`, one curl POST per prompt, `golden rec`, no-clobber link to `--out` | |
| 13 | | `check.sh` | Host arms with synthetic fixtures, the fake responder and guard mutants | |
| 14 | | `fixtures/` | Hand-written records labelled `SYNTHETIC` (`synthetic/not-a-model`, revision of zeros) and a 2-prompt set | |
| 15 | |
| 16 | Reference records are not committed. A reference is only meaningful when recorded on an independent |
| 17 | machine with a known engine sha256 and model revision. |
| 18 | |
| 19 | ## Record |
| 20 | |
| 21 | ```sh |
| 22 | OMC=/path/to/omega-mv/seed/out/omc bash om/golden/record.sh \ |
| 23 | --url http://127.0.0.1:PORT --prompts prompts.json \ |
| 24 | --model-repo ORG/NAME --model-rev <40 hex> --max-tokens 256 \ |
| 25 | --engine-sha256 "$(sha256sum /path/to/aien-serve-http | cut -c1-64)" \ |
| 26 | --host-id "$(hostname -s)" --label REAL --out ref.json [--header-file auth.hdr] |
| 27 | ``` |
| 28 | |
| 29 | `--label REAL` is for engine replies only; a run against a test responder must say `FAKE`. |
| 30 | Exit: 0 written, 2 usage or existing `--out`, 3 compiler not pinned, 4 prompt/file refusal, |
| 31 | 5 engine reply refused (error, no `usage.aien_token_ids`, not greedy), 6 transport. |
| 32 | |
| 33 | ## Compare |
| 34 | |
| 35 | ```sh |
| 36 | golden cmp ref.json cand.json |
| 37 | ``` |
| 38 | |
| 39 | Exit 0 every prompt matches, 1 a token differs (`DIVERGE <id> index=<K> ref=<X> cand=<Y>`), |
| 40 | 3 not comparable (label, engine sha256, model repo or revision, sampling, max_tokens, prompts sha256 |
| 41 | or prompt ids differ), 4 file or schema refusal, 2 usage. |
| 42 | |
| 43 | ## Check |
| 44 | |
| 45 | ```sh |
| 46 | OMC=/path/to/omega-mv/seed/out/omc bash om/golden/check.sh |
| 47 | ``` |
| 48 | |
| 49 | 27 arms: 9 comparator arms on the synthetic fixtures (match, 1-token divergence with its index, |
| 50 | engine and model-revision header mismatch, early end, malformed JSON, non-greedy record, unknown |
| 51 | key, usage), 15 recorder arms against `fake.om` (ids from `usage.aien_token_ids`, FAKE label, |
| 52 | prompts sha256, UTC window, request bodies byte-equal to `golden req`, header file sent, re-record |
| 53 | divergence, sampled reply, missing ids, HTTP 500, existing output) and 3 guard mutants of |
| 54 | `golden.om` (header check disabled, divergence index off by one, sampled replies accepted), each of |
| 55 | which must fail its arm. |
| 56 | |
| 57 | NOT_RUN: a real reference recorded from the served model on an independent machine. |
| 58 | |
| 59 | The aien-serve-http engine this harness was written for served the retired 35B. The own Omega LLM's |
| 60 | GB10 gate, with its own decoders, record format and negative control, is in [ollm/](ollm/README.md). |