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 / omegallm / wgate

34af117 wsp DRA-187: pure-Omega GPU gate runner wgate (replaces gates.py) Drake Stapleton committed 2026-11-07
..
README.md6681
wgate.om77553

README.md

wgate

wgate.om runs the round40 retention gates for DRA-187 (lane wsp) in seeded Omega. It replaces the Python glue evidence/OMEGALLM/wsp-dra187-20261107/gates.py, which imported round41 lib.py, repair.py, checker.py and check_behavior.py.

Scope

wgate covers only the 7 retention and latency gates of PREREG section 7: latency, copies, screen, dev_jobs, regression, story_w256 and retention.

Numerical validity (every weight finite, |w| <= 1e6, f32 against f64 agreement) and the byte-identical revert are separate checks. They belong to wprobe and wpatch. wgate does not cover them.

wgate reproduces the gates.py verdicts only on the inputs it reads. Any other input shape (non-ASCII model text, JSON shapes the round40 files do not use, nesting past the Python recursion limit) is refused with a nonzero exit. It does not guess.

Build

wgate is composed after tools/omegallm/wdrive/wbuild.om. That file supplies the path, argv, stdout, environment and sha256 helpers (wd*), and its main is renamed wbmain. Build from the worktree root with the pinned compiler (omega-mv e5b32567, omc sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f):

OMC=$HOME/work/wsp/omega-mv/seed/out/omc CORE=0 taskset -c 0 \
  wbuild OUT/wgate tools/omegallm/wdrive/wbuild.om@wbmain tools/omegallm/wgate/wgate.om

wbuild is the wdrive bootstrap binary. It prints BUILD_OK <binary sha256> ... source_sha256 ....

Commands

wgate run CANDIDATE.ck OUTDIR
wgate replay probe|first|jobs DATA.json RECORDED.json OUTDIR [STRIDE]
wgate replaylog probe|first|jobs DATA.json RECORDED.json LOGDIR LABEL OUTDIR [STRIDE]
wgate dryrun probe|jobs CK OUTDIR LABEL DATA.json
  • run is the gates.py main loop. It refuses with exit 3 before creating anything when SPARK_WINDOW is missing or empty.
    • It checks the base checkpoint sha256 and samples on the GPU binary.
    • It writes OUTDIR/gates.txt (candidate, candidate_sha256, start, window, aux, then gate NAME VALUE PASS|FAIL WINDOW UTC and end UTC VERDICT) and OUTDIR/commands.txt.
    • A rerun on the same OUTDIR resumes. It skips gates already decided and stops at the first failed gate.
    • The last line is exactly GATES_PASS or GATES_NOT_ALL_PASS.
  • replay scores recorded model answers without sampling and compares every row with the recorded file.
    • Kinds: probe is checker.check_answer probes, first is repair.check_answer (the screen gate), and jobs is the multi-turn tool jobs of check_behavior.
    • STRIDE selects every Nth data row, as probes(..., stride).
    • Output lines: MISMATCH row=R [turn=T] field=F, then REPLAY mode=KIND rows=N pass=P recorded_pass=Q mismatches=M.
    • Per-row results go to OUTDIR/results/replay.txt.
  • replaylog does the same from a batch-sample log directory instead of the recorded raw outputs.
  • dryrun prints the encode, sample and geval argv that run would execute, plus the batch-0 bytes and sha256. It executes nothing and writes nothing (NOT_RUN).

Relative paths are resolved lexically against PWD (exit 2 when PWD is absent). Symlinks are not resolved.

Exit codes

CodeMeaning
0run: every task finished or stopped at a failed gate; replay: no mismatch
1replay mismatch
2usage
3refused: no SPARK_WINDOW
4base checkpoint sha256 mismatch
5OUTDIR belongs to another candidate
10window budget reached
61arena or table full
70host failure
71file operation failed
72text decode or encode error (non-ASCII model text)
73native command exit status not 0
74native command timeout
75sampler answer count mismatch
76compile or test timeout inside compile_test
77JSON nesting past the Python recursion limit
78geval output unparsable
79unsupported JSON shape
80data or recorded file is not JSON
81no recorded answer for a turn

Replay evidence (MEASURED, 2026-11-07, core 0, binary sha256 edbb7ae16db47ab9ca9febdec8e0b4a2c7fd678f24921a2a15896e64f1ed8a6b)

R40 = ~/handoffs/tool-omega-20261104/round40, R41 = ~/handoffs/tool-omega-20261104/round41.

CheckDataRecordedrowspassrecordedmismatches
screen gateR40/data/localization-screen.jsonR41/blend/results/blend-s1000-a250-action-screen.json8880 PASS
screen gatesameblend-s1000-a500-action-screen.json8770 PASS
screen gatesameblend-s2000-a250-action-screen.json8880 PASS
screen gatesameblend-s2000-a500-action-screen.json8770 PASS
regressionR40/data/regression.jsonR40/step600-regression.json6856856850 PASS
copiesR40/data/copy-final.jsonR40/step600-copy.json6464640 PASS
regression-screen checker (STRIDE 10)R40/data/regression.jsonR40/step600-screen.json6969690 PASS
dev_jobsR40/data/dev-jobs.jsonR40/step600-dev-jobs.json8484840 PASS
retentionR40/data/retention-jobs.jsonR40/step600-retention-jobs.json8478478470 PASS

step600-screen.json is the regression-screen checker (regression.json at stride 10). It is not the screen gate. The screen gate is localization-screen.json scored with repair.check_answer.

Negative controls (all exit 1):

  • screen row 0 raw_output set to garbage gives MISMATCH row=0 field=pass and pass 7 of recorded 8.
  • regression row 3 raw_output set to garbage gives 3 mismatches (pass, compile_rc, run_rc).
  • dev_jobs row 5 recorded pass set to false gives MISMATCH row=5 turn=0 field=pass.

env -u SPARK_WINDOW wgate run X OUT exits 3 and creates nothing.

NOT_RUN: live sampling, GPU geval scoring and latency timing (the run path). They need a GPU window.

ORACLE

jq is used only as an ORACLE, outside wgate. It built the negative-control copies (one field changed) and it reads round41/commands.jsonl to compare the dry-run argv with the recorded round41 argv. wgate itself has no jq, Python, shell or C dependency.

Known differences and risks

  • Results are plain text (results/LABEL.txt), not the JSON that gates.py wrote.
  • gates.py never created OUT/build. wgate creates it.
  • Children run with an empty environment and inherit open descriptors. Process polling has 200 us latency.
  • Python exceptions in the original are mirrored as the nonzero exits above, not as tracebacks.
  • Loops are bounded by omc limits (at most 999999 per loop level). Arena 16 MiB, JSON nodes 2097152.
  • wgate depends on the in-progress wdrive library wbuild.om.