interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / tools / verified_examples / README.md

188 lines · 11342 bytes Raw Blame History Rendered
1# Verified program examples (DRA-122)
2
3Seeded Omega admission, deterministic JSONL provenance, and an optional continuation-text export.
4There is one admission rule: **the actual program must verify again now**. An old verified flag is
5never evidence. No model is called, no model is trained, no GPU is opened, and nothing is published
6by this tool.
7
8## Dependencies and build
9
10Use the approved kernel-memory-capped omega-mv referee revision, `15760b5009f00485ce51669c84d0126ed19fa479`.
11Its `seed/out/omc`, SHA-256 `a5613368f427aacd73ebeee16d46f8b3203405711d4de5b860d0cbee11ce4533`,
12compiles this tool. The admitted compiler and benchmark task-set pins are the `vxsha` and `vxtasks`
13texts in `examples.om`; a different run pin is refused. Changing a pin is a source change requiring
14the full gate, not a command-line override.
15
16`OMEGA` below is a fresh checkout of that revision. Run the driver's self-test once to build its
17`chat` edge and create fixtures. All fake-model output is **TEST DATA**, never release data.
18The tool also recognizes `model_requested fake`, a `TEST` metadata line, and a `TEST_DATA` marker.
19
20```sh
21OMC="$OMEGA/seed/out/omc"
22sh "$OMEGA/bench/inference_cost/driver.sh" --self-test
23mkdir -p build/verified_examples
24{
25 printf 'om2\n'
26 cat "$OMEGA/om/tls/sha2.om" "$OMEGA/seed/json/json.om"
27 sed 's/^fn main to int$/fn vxmodelmain to int/' tools/verified_examples/examples.om
28 cat tools/verified_examples/sources.om
29} > build/verified_examples/all.om
30"$OMC" < build/verified_examples/all.om > build/verified_examples/examples
31chmod +x build/verified_examples/examples
32```
33
34The SHA-2 implementation and UTF-8 state machine are reused from the pinned Omega source. Candidate
35extraction reuses its `chat resp`, including the exact fenced-code rule. Admission calls its existing
36`driver.sh --verify-candidate` interface: the same assembly, hidden inputs, byte comparison, mandatory
37bubblewrap isolation, readiness checks and deadlines as the scoreboard. Compiler failures are never
38run. The driver is an existing **shell migration dependency**, not Omega. Its namespace/mount,
39process-tree and descriptor-supervisor Omega successor is not yet written. We do not duplicate it.
40The small `sh -c` extraction invocation only binds stdin and fd 3 for the existing chat executable;
41it makes no admission or serialization decisions.
42
43The driver documents the exercised host dependencies: bubblewrap 0.9.0, coreutils timeout 9.4,
44Bash 5.2.21 and the selected C/Python/Rust compiler/runtime oracles. Omega passes through PATH and
45binds OMC explicitly to the compiler whose bytes it hashed; no other environment is inherited.
46Read-only Git archive/diff is used only for the harness source snapshot. Existing host build scripts
47remain migration debt; no new shell implementation is introduced here.
48
49## Build a real dataset (one command)
50
51Set RUN to one directory announced in the scoreboard's RUNS.txt, OUT to a **new absent** directory,
52and OMEGA to the pinned checkout. All paths must be absolute.
53
54```sh
55build/verified_examples/examples prep "$RUN" "$OMEGA/bench/inference_cost" \
56 "$OMC" "$OMEGA/build/inference_cost/bin/chat" "$OUT" release
57```
58
59Without `prep`, use the same command with that word removed to omit `stories.txt`. Use final argument
60`test` only for **TEST DATA**. A marked directory is refused in release mode, even if every program
61would pass. A failed invocation has no valid manifest; never publish partial files. Output is local,
62mode 0700/0600, not an external publication.
63
64Input is the driver's `attempts.txt` **wire version 2** and its per-attempt request.wire, response.json
65and candidate.LANG. Every listed attempt is reconsidered, including ones formerly marked failed.
66No decision depends on compiled_rc or verified_flag. The program re-extracted from response.json must
67hash-identically to candidate.LANG; changing the candidate after the run is a refusal, even if the
68replacement is correct. Verification executes the private extracted snapshot, not the mutable input.
69An unverified program is omitted and counted as rejected. The run's compiler and task-set digests
70must equal the tool pins; the current benchmark contents are independently checked with the driver's
71single `--task-set-sha256` implementation before admission.
72
73Records preserve input attempt order, use fixed field order, JSON-escape UTF-8 and have no timestamps,
74absolute paths, timing fields or nondeterministic compiler diagnostics. Program bytes and each sent
75message are retained. Fields are task, language, arm, attempt, source, messages, program,
76omc_sha256, task_set_sha256, referee_output_sha256 and test_data. The referee digest hashes the newly
77observed hidden-input stdout, not the old eval directory or its verdict. `examples.jsonl` is the only
78JSONL output; `manifest.json` has record/rejection counts, counts per language, JSONL SHA-256, pins,
79TEST DATA status and the licence position. Referee artifacts live beside these files for replay.
80
81For model runs the licence position is: **model-written code, verified, from Drake's own runs**.
82Verification establishes tested behavior, not authorship, copyright ownership or rights in copied
83third-party material. The tool does not relicense code or publish the dataset automatically.
84
85### Existing trainer connection: continuation text, not instruction training
86
87The trainer's existing `native/omegallm/data.om` `cmdprep` reads UTF-8 documents separated by
88`<|endoftext|>`, not JSONL. Reuse research found no attempt-to-dataset converter in aien-train,
89omega-mv, spark-rsi-mv or the handoffs search. `prep` exports exactly this existing format:
90
91```text
92Task:
93<the pinned task statement>
94
95Program:
96<the verified program, unchanged>
97<|endoftext|>
98```
99
100There is one document per admitted record, in the same order. A program containing the reserved
101separator is refused for this export rather than silently creating extra documents. The manifest
102also names the stories SHA-256. The JSONL is provenance; stories.txt is **plain continuation text**
103for the current trainer. Instruction-format training waits on **DRA-123**.
104
105```sh
106ollm prep "$OUT/stories.txt" train.bin held.bin
107```
108
109This only prepares existing token files. It is not a training command and needs no GPU.
110
111## Second sources
112
113```sh
114build/verified_examples/examples references "$OMEGA/bench/inference_cost" \
115 "$OMC" "$OMEGA/build/inference_cost/bin/chat" "$OUT" release
116build/verified_examples/examples harness "$HARNESS" "$HARNESS_OMC" \
117 "$OMEGA/build/inference_cost/bin/chat" "$OUT" release
118```
119
120References: all four languages in the pinned benchmark's 20 task directories, each passed through
121the same current referee. Source is `reference-solutions`; the task statement is `referee_contract`.
122No invented sent conversation is supplied (`messages` is empty).
123
124Harness: a clean checkout of omega-harness `958d7f2e4efa5f476ec9c3953cf6d65122636054` and its own PIN's
125compiler. The whole existing examples/gate.sh must pass first. Only its compile-success, actually
126executed examples are imported, including expected traps with their explicit .expect contract;
127compile-refusal examples are not training programs. The source is `harness-examples`. The task-set
128digest is SHA-256 of `git archive --format=tar HEAD`; the referee digest binds the fresh complete gate
129transcript. Source licences are retained, not replaced by a model-code claim. These are separately
130named datasets, not model output, TEST DATA, or evidence of learned capability.
131
132## Acceptance gate
133
134The gate is Omega too. It builds nine broken tool variants: stale verdict trusted, candidate binding
135removed, compiler-pin mismatch admitted, task-set mismatch admitted, TEST DATA admitted to release,
136trainer delimiter refusal removed, and an artificial 32-bit attempt-number cap restored, decimal overflow admission, and an unapproved referee artifact admitted. Every variant must fail its corresponding admission test.
137It also replays the full positive TEST DATA workload twice, compares JSONL/manifest/stories hashes,
138requires 80 positive records, runs the existing ollm prep unchanged, verifies a stale program is absent
139from both JSONL and stories, and exercises both second sources.
140
141Supply a CPU-only ollm built by its existing tests/omegallm/build.sh with its own pinned compiler.
142Neither this tool's new compiler pin nor the harness pin overrides the trainer's old pin.
143
144```sh
145{
146 sed 's/^fn main to int$/fn vssourcemain to int/' build/verified_examples/all.om
147 cat tools/verified_examples/gate.om
148} > build/verified_examples/gate-all.om
149"$OMC" < build/verified_examples/gate-all.om > build/verified_examples/gate
150chmod +x build/verified_examples/gate
151build/verified_examples/gate "$PWD/build/verified_examples/examples" "$OMEGA" \
152 "$HARNESS" "$HARNESS_OMC" "$TRAINER" "$OMEGA/build/inference_cost/selftest" \
153 "$PWD/build/verified_examples/all.om" "$ABSENT_GATE_WORK"
154```
155
156Success ends `EXAMPLES-GATE PASS mutants=9 records=80`. Use a fresh clone and new work/output paths.
157The protocol's existing fixed-width argument packet and Linux PATH_MAX remain real boundaries;
158record payloads, hashing and output stream without a new dataset-size cap. The reused chat JSON
159parser retains its documented per-response bound; an over-bound response is refused, never truncated.
160
161Private Cortex requests are **inventory only**, never inputs to this tool. Do not export their text.
162Only aggregate kinds/check requirements belong in the private lane report; recall cannot establish
163a total count when it supplies no count/filter interface. Before any external publication, scan added
164source lines and dataset bytes for secrets, home paths, usernames and private-repository names.
165
166Numeric guard oracle (Wolfram Language, exact, unitless integers):
167`{2^64-1, Quotient[2^64-1,10], Mod[2^64-1,10], 2^32, 2^32-1}` returned
168`{18446744073709551615,1844674407370955161,5,4294967296,4294967295}`. The gate
169admits the full uint64 maximum and rejects a decimal value that would otherwise wrap to a valid
170attempt identity; its overflow-removal mutant must fail.
171
172## Kernel memory-ceiling admission
173
174Before invoking even the referee digest mode, the converter hashes driver.sh itself and compares
175it with the compiled `vxdriverpin`. A driver without the approved kernel-enforced process-tree
176ceiling, or any other unapproved driver bytes, is refused with **exit 20**. Matching task data and
177compiler pins alone are not enough. There is no command-line override or uncapped fallback. The
178new guard's removal mutant uses a harmless comment-mutated copy of the **capped** driver, its
179unchanged task files and the same pinned compiler; it never runs an old unbounded driver.
180
181The exercised host dependency is systemd-run from systemd 255 (255.4-1ubuntu8.17), using cgroup v2
182(`cgroup2fs`). This is an explicit containment dependency, not an Omega implementation. Its Omega
183successor is the not-yet-written namespace/mount, process-tree, descriptor and cgroup supervisor.
184
185The capped referee requires its cgroup scope to read back the requested MemoryMax and zero swap
186before any candidate. Failure to apply it is NOT_RUN (driver exit 3, converter exit 16). A candidate
187killed within the ceiling is unverified and excluded. Kernel telemetry added beside the sandbox
188readiness records does not change the stdout comparison or the deterministic dataset bytes.