Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
About Files History Releases Proposed changes Issues For developers
fix(om-bench): preserve stage failures and validate complete gate reports
merged 0fcb9837f3adef35 #987 · opened 2026-10-31 03:02 UTC · closed 2026-11-02 01:07 UTC · merged 2026-11-02 01:07 UTC
Imported from GitHub aien-dev/omega-mv#987, by drakestapleton
Base 1db941627f637312ce60e49872dcdd18b49a54b7 · Head 411c0596876b8a83da650124e4147205a9ba3073
Merged on GitHub as 19b8340dbae70888c49fcc98299be928831bfd26 ; reachable from main c7acd2607139eedfabeac16b6042cefe8ede431f (observed 2026-11-18T16:35:42Z)
drakestapleton wrote on 2026-10-31 03:02 UTC
Evidence 2026-10-31 (Bench987, merge of main 1db941627f637312ce60e49872dcdd18b49a54b7 )
Head 411c0596876b8a83da650124e4147205a9ba3073 . Real merge of origin/main (no rebase, no force push). Conflicts: root .crumb (took main, regenerated with pinned crumb d0f0b95 , follow-up commit for the post-commit stamp) and CONTRIBUTORS.md (union, deduped). No research/om-bench conflict. MEASURED on the Spark (aarch64), CPUs 6-9,15-19 at nice 19:
sh research/om-bench/controls/run-controls.sh --host-only: exit 0, PASS synthetic host controls: 45.
Same controls with main's run-arms.sh swapped in: exit 1, AssertionError: shell gen rc=0: exit=0 (simulated generation exit 17 masked as 0).
sh -n on run-arms.sh and controls/run-controls.sh: exit 0 / 0.
Python AST parse of bench/ombench.py: exit 0, PASS.
Pinned crumb d0f0b95 verify .: OK: 184 crumbs current; validate .: exit 0, 184 crumbs.
BASE=origin/main tests/gates/run.sh evidence-immutable: exit 0, evidence/: additions only.
tests/gates/run.sh zero-disk-secrets: exit 0, Zero plaintext .env files verified.
git diff --check (tree and origin/main...HEAD): exit 0.
Evidence (synthetic host-only)
Tested head: bd77148a412be4405d22d3365fc8309921052b22 , tree 8e62a9cb07441369dce88c368e6cb69230d54b36 . Fetched remote head and reran host controls plus pinned crumb verification before opening.
Base: main 613765d2b75383212c50520ff7a7295bff01f1bb (#985). Linux x86_64; no seeded compiler execution, model calls, candidate execution, scored tasks, sealed data or hardware.
sh research/om-bench/controls/run-controls.sh --host-only: PASS synthetic host controls: 45.
The same host regression against the base runner fails: simulated generation exit 17 was masked as driver exit 0.
sh -n research/om-bench/run-arms.sh and sh -n research/om-bench/controls/run-controls.sh: exit 0.
Python AST parse of bench/ombench.py: PASS.
Pinned crumb tool (crumb.lock = d0f0b95d344b4c6628c3d868346932fd247ce168 ) verify .: OK: 184 crumbs current; validate .: 184 crumbs.
BASE=origin/main tests/gates/run.sh evidence-immutable: exit 0, evidence/: additions only.
tests/gates/run.sh zero-disk-secrets: exit 0, zero plaintext .env files.
git diff --check: exit 0.
Independent read-only review reran the synthetic controls and inspected report coverage, outcome precedence and stale-artifact refusal.
Change
Refs #653, follow-up to #985 / #845. OmegaEval remains the benchmark owner; coordination is in #653.
Propagate gen, judge, gatelist, crosscheck and summary failures instead of continuing to a normal aggregate; preserve actual child statuses.
Preserve gate's documented candidate outcomes (0 PASS, 1 deterministic FAIL, 2 NOT_RUN, 3 INVALID), rather than dropping failed candidates from the experiment. Reject process failures and incomplete reports; require exact case coverage, unique verdicts, matching footer counts/outcome, no compiler-identity mismatch, and cross-judge agreement.
Standalone Omega summaries recheck the gate report. Existing summary files are preserved and refused, not silently overwritten or left looking current after a failed retry.
Read the unchanged public reference card from its actual parent directory.
Add synthetic --host-only controls to the existing control harness, not another evaluator. Keep the existing actual gate status in a separate .status file rather than appending after the terminal gate report.
Frozen contract, task/split manifests, reference-card contents, compiler pins, gate.om, thresholds and historical evidence are unchanged. No .om, frozen C, trusted gate or CI-policy changes.
Limits
The original candidate-execution controls, native compiler gates and scored runs are NOT_RUN. These host checks establish driver failure propagation and report validation only, not benchmark results or hardware qualification. Hosted CI is advisory and will be tracked on this exact PR head. No merge or approval is requested from an agent.
Fetch it
A git bundle of the pull request's head, 9384 bytes.
curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/0fcb9837f3adef35 .bundle -o 0fcb9837f3adef35 .bundle
git fetch 0fcb9837f3adef35 .bundle refs/pull/987/head
Raw bundle · Diff
Provenance
This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:
github-import 1
aien-dev/omega-mv
987
411c0596876b8a83da650124e4147205a9ba3073
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":987,"url":"https://github.com/aien-dev/omega-mv/pull/987","export_sha256":"7319147b350ad908bf0b731068ec3be7b8dee848041dc862f71455e8e4680140 ","imported_utc":"2026-11-18T16:35:42Z"}
Changes
diff --git a/.crumb b/.crumb
index 39a2131d9 ..b308764d5 100644
--- a/.crumb
+++ b/.crumb
@@ -48,7 +48,7 @@
},
{
"digest": "00a168ce33f2d6478487effe177276c7013627b49d077fd8c111905f68f32b1b ",
- "last_commit": "d3763c7f2 ",
+ "last_commit": "1db941627 ",
"name": "docs",
"purpose": "Directory docs. Purpose not yet described by a human."
},
@@ -66,19 +66,19 @@
},
{
"digest": "622d98bd2dfcae7f3a0caab34e583cb63659a500afb4eb31264e839ce2529dc3 ",
- "last_commit": "e1968fe5e ",
+ "last_commit": "1db941627 ",
"name": "native",
"purpose": "Handwritten .om units of omega-mv that are not part of the seed ladder: the ORIG-4 shadow adviso"
},
{
"digest": "ef71e3b8758de407b6644ae4d069c6eecea07849c57b7de1ce67ce03386ff2e8 ",
- "last_commit": "e1968fe5e ",
+ "last_commit": "1db941627 ",
"name": "neuralese",
"purpose": "Bounded untrusted representation envelopes and explicit checked Omega decoding; learned extensio"
},
{
- "digest": "c73d74e9c743c8b541ec2418e815095d748e2e15d0b89857d683dbd5b76b3bf9 ",
- "last_commit": "613765d2b ",
+ "digest": "16bd56102894984869d56d0ee92a56ccc51adf6d28ce2be40c39b3b35a3dd0c1 ",
+ "last_commit": "bd77148a4 ",
"name": "research",
"purpose": "Directory research. Purpose not yet described by a human."
},
@@ -90,13 +90,13 @@
},
{
"digest": "7d8a7c8029dba378d0c59047ad32885348baf084b3ad9dbc06921b6bb490659e ",
- "last_commit": "e1968fe5e ",
+ "last_commit": "1db941627 ",
"name": "src",
"purpose": "Directory src. Purpose not yet described by a human."
},
{
"digest": "4e7251847298392c2e24591e45747e2b214c48f66a636063fbd7b3ab32a55a6d ",
- "last_commit": "a370a673e ",
+ "last_commit": "d94617177 ",
"name": "tests",
"purpose": "Directory tests. Purpose not yet described by a human."
},
@@ -107,15 +107,15 @@
"purpose": "Directory tools. Purpose not yet described by a human."
}
],
- "children_root": "sha256:4b14d5958f47b6630055cf4a2246a89549620f97b64495ebf50844cac8cae2f9 ",
- "compiled_at": "2026-10-31T04:29:18Z",
+ "children_root": "sha256:f86ef665ef822a17e65e5938b268fbbeb94ce0591d649d00ae0f8b0a4fd29652 ",
+ "compiled_at": "2026-10-31T05:21:52Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:dc10325615480d6d9d4f190dd04139cdf3b7d9e4feb0c756998ea7f7469a9e33 ",
+ "digest": "sha256:57731990dcfcd2d5544a58d0a0e6529c0fbbb0ac0faf612bbdfcf508d2001442 ",
"evidence_files": 14989,
"evidence_root": "sha256:324e080e7c8c3f9118b579e9a9045a3dc4c1f4e774c128d577635bda41dbd059 ",
"files": 23182,
- "generated_at_commit": "6aadea5b1b2d91ae91d6db636e96bc2b6df6c393 ",
- "source_tree": "sha256:d5f0a03955477b0190f5982d62aac726c0e6df2e3b560f0f6b573b6066408c8b "
+ "generated_at_commit": "bbd486fb64eb7630d7c55b6b5cc38625c16861f8 ",
+ "source_tree": "sha256:f1642c96deb1a15a9aab7cd1e3b5bd00881a14cc3a7c5fc6b300dbab5681aadb "
},
"owner_lane": "",
"provenance": {
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 522977f8d ..e60e0aaec 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -87,5 +87,7 @@ Update this table in the same commit as the work it credits.
| Grok 4.7 | Cost-model refusal of unsupported semantic operation IDs before prediction or learning, with a clamp-restoring mutant (Refs #704) |
| Grok 4.7 | AES-GCM-SIV (RFC 8452) in `om/tls/gcmsiv.om`, the #639 keystream-reuse detector (27 checks, six mutants including a one-line AES-GCM mode swap), and the `seed/host/check.sh` hook whose no-op tamper exits nonzero. Host exercised; not hardware qualified. |
| Claude Opus 5.5 | Ported the #671 packed-list hostile-ingress campaign (from 9a2b6a5 ) to main as an OM-2 conductor gate in `seed/host/check.sh`: 60 runtime packet, boundary and truncation cases, with size, count and exact-length mutant compilers each detected, and the record-length mutant documented as undetectable by exit status |
+
+| Codex (Adam) | Made the existing om-bench host driver propagate stage failures, require complete matching gate reports before summaries, preserve prior aggregates on refusal, and load its unchanged public reference card from the correct path. Synthetic host-only controls; no scored tasks or hardware execution. |
| Claude Opus 5.5 | Added the host CPU words `cpufence` (DSB SY / MFENCE) and `cpurelax` (YIELD / PAUSE) to omc (#939) as keyword ids 199/200 (first 178/179, renumbered because open PRs #878/#890 claimed 178..180 first), with the `seed/host/cpufence.sh` fixture, refusal checks and a nop-fence mutant; reseeded the compiler and regenerated the pinned units, moved every gate and parity `OMC_PIN`, and re-pinned GEN-1 (revision 2) for the new OMEGESE section. |
| Claude Opus 5.5 | Merged #946 (cpufence 199/200) into the #970 execpure branch: reseeded omc to 7a8b84fc at 512 functions with execpure 198, moved every active pin, regenerated the pinned units, took main's packed-list ingress and #608 trace segment over the PR copies (dropping the superseded segment-gate.om from gate669), and ported the #856 getppid check from the deleted seed/host/gate.sh into seed/host/gate.om with a getpid negative control. Made the #671 hostile source campaign (gate669 mode 3) pass again: tok_num and ir_lead scan words and leading blanks in nested 999999-pass loops instead of trapping 4, the function-count fixture avoids the f32/f64 type keywords and follows the 4096-function cap. |
diff --git a/research/.crumb b/research/.crumb
index 5a1192db7 ..97bce7168 100644
--- a/research/.crumb
+++ b/research/.crumb
@@ -22,32 +22,32 @@
"children": [
{
"digest": "59d4ea65a193fbac1696fdd89626b42d310f40cf8319fa62912976014d863ed0 ",
- "last_commit": "450bbefd4 ",
+ "last_commit": "6d7b8838 ",
"name": "atemporal",
"purpose": "AT-0 Clock-Free Universe research program: relational (Page-Wootters) quantum models with no ext"
},
{
"digest": "87db1defc5aade980a964c2be7856312f9fd5ef77e40b9d8690d51232b3e14e5 ",
- "last_commit": "d863780eb ",
+ "last_commit": "6d7b8838 ",
"name": "dirac-oracle",
"purpose": "Directory research/dirac-oracle. Purpose not yet described by a human."
},
{
- "digest": "973ae926903a77a8e8deb166aed41fdd40e37a5ae1f9872eb2811bfe33b49590 ",
- "last_commit": "ca05a32b3 ",
+ "digest": "a3ada58b1856d7ba0f6a1f79ef44e8bfd37d5a378aa2de2a9f74082e8fa23443 ",
+ "last_commit": "613765d2 ",
"name": "om-bench",
"purpose": "om-bench (#653): frozen measurement contract, family-disjoint task splits, oracles, controls and"
}
],
- "children_root": "sha256:2dba2cba139eec405acf7a78c21077a968dfb76c86352db859892728b0152a74 ",
- "compiled_at": "2026-10-30T16:37:58Z",
+ "children_root": "sha256:1d78520928ae7f1f2758b79102bf73663e64582b2a75bf51779802fbd2b936b9 ",
+ "compiled_at": "2026-10-31T02:57:25Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:c73d74e9c743c8b541ec2418e815095d748e2e15d0b89857d683dbd5b76b3bf9 ",
+ "digest": "sha256:16bd56102894984869d56d0ee92a56ccc51adf6d28ce2be40c39b3b35a3dd0c1 ",
"evidence_files": 4,
"evidence_root": "sha256:1e8ed614a4d48ad6a9bb360f300dcf68e23a26797d587ac15485a168254f70dd ",
"files": 1624,
- "generated_at_commit": "ca05a32b32f11426444db6e691df8c7e40f3701a ",
- "source_tree": "sha256:68e9d0c074e400c9a926ab9c556eb0ce7df34b2b5cd75ffe6793c8ddb013f23d "
+ "generated_at_commit": "613765d2b75383212c50520ff7a7295bff01f1bb ",
+ "source_tree": "sha256:d1bba3b43e05564e72b2d98bff7e6d2348cf3b1d899f46ff0a7249a6977a6019 "
},
"owner_lane": "",
"provenance": {
diff --git a/research/om-bench/.crumb b/research/om-bench/.crumb
index 47953dbcd ..007dd6275 100644
--- a/research/om-bench/.crumb
+++ b/research/om-bench/.crumb
@@ -3,14 +3,14 @@
"generated": {
"children": [],
"children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ",
- "compiled_at": "2026-10-30T16:37:58Z",
+ "compiled_at": "2026-10-31T02:57:25Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:973ae926903a77a8e8deb166aed41fdd40e37a5ae1f9872eb2811bfe33b49590 ",
+ "digest": "sha256:a3ada58b1856d7ba0f6a1f79ef44e8bfd37d5a378aa2de2a9f74082e8fa23443 ",
"evidence_files": 4,
"evidence_root": "sha256:1e8ed614a4d48ad6a9bb360f300dcf68e23a26797d587ac15485a168254f70dd ",
"files": 1086,
- "generated_at_commit": "ca05a32b32f11426444db6e691df8c7e40f3701a ",
- "source_tree": "sha256:03d401a5a7ee6e5e80817fff2decd0cefdbe47d2bc3063083bd4bc33082d2062 "
+ "generated_at_commit": "613765d2b75383212c50520ff7a7295bff01f1bb ",
+ "source_tree": "sha256:9114e065995cdf18469808445d30fae62157d45a651e0f0310231c3bf7257c64 "
}
},
"layer": "research/om-bench",
diff --git a/research/om-bench/bench/ombench.py b/research/om-bench/bench/ombench.py
index 98847a69a ..dcf598a8c 100755
--- a/research/om-bench/bench/ombench.py
+++ b/research/om-bench/bench/ombench.py
@@ -123,7 +123,7 @@ LANG = {
def system_prompt(lang):
if lang == "om":
- card = open(os.path.join(HERE, "REFERENCE-CARD.md")).read()
+ card = open(os.path.join(HERE, "..", "REFERENCE-CARD.md")).read()
return ("You write complete Omega programs. Follow this reference card exactly.\n\n" + card)
return f"You write complete {LANG[lang][0]} programs."
@@ -496,20 +496,50 @@ def gatelist(rundir, split):
def crosscheck(rundir, split, gate_log):
verdict = {}
- for ln in open(gate_log, errors="replace"):
+ log = open(gate_log, errors="replace").read()
+ # A crash or setup failure can leave no verdicts, or only a passing prefix.
+ # Candidate FAIL/NOT_RUN/INVALID outcomes remain visible, not process success.
+ final = re.search(r"^OM2GATE (PASS|FAIL|INVALID|NOT_RUN) cases=(\d+) pass=(\d+) fail=(\d+) invalid=(\d+) not_run=(\d+)\n?\Z", log, re.M)
+ if final is None or "MISMATCH: every case is NOT_RUN" in log:
+ print("INVALID incomplete gate report or compiler identity mismatch")
+ return 1
+ for ln in log.splitlines():
m = re.match(r"VERDICT (\S+) (PASS|FAIL|INVALID|NOT_RUN)\b", ln)
if m:
+ if m.group(1) in verdict:
+ print("INVALID duplicate gate verdict")
+ return 1
verdict[m.group(1)] = m.group(2)
+ reported = tuple(int(n) for n in final.groups()[1:])
+ actual = (len(verdict), *(sum(v == kind for v in verdict.values())
+ for kind in ("PASS", "FAIL", "INVALID", "NOT_RUN")))
+ if reported != actual or not verdict:
+ print("INVALID gate report counts do not match verdicts")
+ return 1
+ outcome = ("INVALID" if actual[3] else "FAIL" if actual[2] else
+ "NOT_RUN" if actual[4] else "PASS")
+ if final.group(1) != outcome:
+ print("INVALID gate outcome does not match verdicts")
+ return 1
rows = [json.loads(l) for l in open(os.path.join(rundir, f"verdicts-{split}.jsonl"))]
agree = disagree = 0
bad = []
+ expected = set()
for r in rows:
if r["code_sha256"] is None:
+ name = f"{r['tid']}.nocode"
+ expected.add(name)
+ if verdict.get(name) == "NOT_RUN":
+ agree += 1
+ else:
+ disagree += 1
+ bad.append((name, "expected-no-code-NOT_RUN", verdict.get(name)))
continue
task = load_task(split, r["tid"])
byn = {c["n"]: c["status"] for c in r["cases"]}
for c in task["cases"]:
name = f"{r['tid']}.{c['n']:02d}"
+ expected.add(name)
g = verdict.get(name)
if g is None:
bad.append((name, "missing-in-gate", byn.get(c["n"])))
@@ -524,14 +554,22 @@ def crosscheck(rundir, split, gate_log):
else:
disagree += 1
bad.append((name, g, byn.get(c["n"])))
+ if set(verdict) - expected:
+ print("INVALID unexpected gate verdicts")
+ return 1
print(f"crosscheck agree={agree} disagree={disagree}")
for b_ in bad[:20]:
print("DISAGREE", *b_)
- sys.exit(1 if disagree else 0)
+ return 1 if disagree else 0
def summary(rundir, split, arm):
"""Publishable aggregate: sealed task and family names only as keyed opaque ids (benchlib.opaque)."""
+ if os.path.exists(os.path.join(rundir, f"summary-{split}.json")):
+ sys.exit("REFUSED existing summary; preserve it and use a new run directory")
+ if arm_lang(arm) == "om":
+ if crosscheck(rundir, split, os.path.join(rundir, "gate.log")):
+ sys.exit("INVALID Omega gate crosscheck; summary not written")
sys.path.insert(0, HERE)
from benchlib import opaque
merge = {}
@@ -605,7 +643,7 @@ def main():
elif a.cmd == "gatelist":
gatelist(a.run, a.split)
elif a.cmd == "crosscheck":
- crosscheck(a.run, a.split, a.gate_log)
+ sys.exit(crosscheck(a.run, a.split, a.gate_log))
elif a.cmd == "summary":
summary(a.run, a.split, a.arm)
else:
diff --git a/research/om-bench/controls/run-controls.sh b/research/om-bench/controls/run-controls.sh
index f158ae4e4 ..f4dafb062 100755
--- a/research/om-bench/controls/run-controls.sh
+++ b/research/om-bench/controls/run-controls.sh
@@ -6,6 +6,101 @@ set -u
HERE=$(cd "$(dirname "$0")" && pwd)
BENCH=$HERE/../bench
REPO=${OMB_REPO:-$(cd "$HERE/../../.." && pwd)}
+# Host-only driver regressions use synthetic subprocesses and in-memory tasks.
+# They never compile or execute a candidate, call a model, or read sealed data.
+# Usage: run-controls.sh --host-only (no Spark/compiler required)
+if [ "${1:-}" = "--host-only" ]; then
+ PYTHONDONTWRITEBYTECODE=1 python3 - "$REPO" <<'PY_HOST_CONTROLS'
+import contextlib, importlib.util, io, json, os, pathlib, subprocess, sys, tempfile
+ROOT = pathlib.Path(sys.argv[1]).resolve()
+SCRIPT = ROOT / 'research/om-bench/run-arms.sh'
+MOD = ROOT / 'research/om-bench/bench/ombench.py'
+checks = 0
+
+def check(ok, name):
+ global checks
+ assert ok, name
+ checks += 1
+ print('PASS', name)
+
+# Exercise actual shell script with fake python3 and gate, never candidate/compiler execution.
+with tempfile.TemporaryDirectory() as tmp:
+ t = pathlib.Path(tmp); bin = t/'bin'; bin.mkdir(); run=t/'run'; run.mkdir()
+ (bin/'python3').write_text('''#!/bin/sh
+stage=$2
+echo "$stage" >> "$TRACE"
+if [ "$stage" = "$FAIL_STAGE" ]; then exit 17; fi
+exit 0
+'''); (bin/'python3').chmod(0o755)
+ (run/'gate').write_text('''#!/bin/sh
+echo gate >> "$TRACE"
+echo "OM2GATE FAIL cases=1 pass=0 fail=1 invalid=0 not_run=0"
+exit "$GATE_RC"
+'''); (run/'gate').chmod(0o755)
+ for stage, gate_rc, want_rc, want_trace in [
+ ('gen',0,17,['gen']),('judge',0,17,['gen','judge']),
+ ('gatelist',0,17,['gen','judge','gatelist']),
+ ('',91,91,['gen','judge','gatelist','gate']),
+ ('crosscheck',0,17,['gen','judge','gatelist','gate','crosscheck']),
+ ('summary',0,17,['gen','judge','gatelist','gate','crosscheck','summary']),
+ *[('',rc,0,['gen','judge','gatelist','gate','crosscheck','summary']) for rc in (0,1,2,3)],
+ ]:
+ trace=t/'trace'; trace.write_text('')
+ env=dict(os.environ, PATH=str(bin)+':'+os.environ['PATH'], TRACE=str(trace),FAIL_STAGE=stage,GATE_RC=str(gate_rc),OMB_REPO=str(t))
+ r=subprocess.run(['sh',str(SCRIPT),str(run),'dev','a'],env=env,capture_output=True,text=True)
+ check(r.returncode==want_rc and trace.read_text().splitlines()==want_trace, f'shell {stage or "completed gate"} rc={gate_rc}: exit={r.returncode}')
+ if want_rc:
+ check(f'rc={want_rc}' in (run/'a-dev/status.txt').read_text(), 'child failure logged')
+ (run/'a-dev/summary-dev.json').write_text('prior summary')
+ trace.write_text('')
+ r=subprocess.run(['sh',str(SCRIPT),str(run),'dev','a'],env=env,capture_output=True,text=True)
+ check(r.returncode==1 and trace.read_text()=='' and (run/'a-dev/summary-dev.json').read_text()=='prior summary','runner refuses stale summary without touching it')
+ trace.write_text(''); env.update(FAIL_STAGE='',GATE_RC='91')
+ r=subprocess.run(['sh',str(SCRIPT),str(run),'dev','fpy'],env=env,capture_output=True,text=True)
+ check(r.returncode==0 and trace.read_text().splitlines()==['gen','judge','summary'], 'foreign arm does not cross-judge')
+
+# Import functions only, with sealed path pointed to an empty temporary directory.
+with tempfile.TemporaryDirectory() as tmp:
+ t=pathlib.Path(tmp); os.environ['OMB_SEALED']=str(t/'no-sealed-data')
+ spec=importlib.util.spec_from_file_location('ombench', MOD); mod=importlib.util.module_from_spec(spec); spec.loader.exec_module(mod)
+ check(mod.system_prompt('om').endswith((ROOT/'research/om-bench/REFERENCE-CARD.md').read_text()), 'Omega prompt loads unchanged public card')
+ check(mod.system_prompt('py')=='You write complete Python 3 programs.', 'foreign prompt unchanged')
+ mod.task_dirs=lambda split: (str(t),['ctl-synthetic'])
+ mod.load_task=lambda split,tid: {'tid':tid,'family':'ctl-synthetic','cases':[{'n':0}]}
+ row={'tid':'ctl-synthetic','family':'ctl-synthetic','code_sha256':'synthetic','class':'pass','cases':[{'n':0,'status':'pass'}]}
+ vp=t/'verdicts-dev.jsonl'; log=t/'gate.log'
+ def report(body, cls='pass', status='pass', code='synthetic'):
+ row.update({'class':cls,'cases':[{'n':0,'status':status}],'code_sha256':code});vp.write_text(json.dumps(row)+'\n');log.write_text(body)
+ good='VERDICT ctl-synthetic.00 PASS\nOM2GATE PASS cases=1 pass=1 fail=0 invalid=0 not_run=0\n'
+ def cross():
+ with contextlib.redirect_stdout(io.StringIO()): return mod.crosscheck(str(t),'dev',str(log))
+ report(good);check(cross()==0,'completed matching gate accepted')
+ report('VERDICT ctl-synthetic.00 FAIL\nOM2GATE FAIL cases=1 pass=0 fail=1 invalid=0 not_run=0\n','wrong_output','wrong_output');check(cross()==0,'wrong candidate remains failure in denominator')
+ report('VERDICT ctl-synthetic.nocode NOT_RUN\nOM2GATE NOT_RUN cases=1 pass=0 fail=0 invalid=0 not_run=1\n','no_code','',None);check(cross()==0,'no-code result retained')
+ report('VERDICT ctl-synthetic.00 INVALID\nOM2GATE INVALID cases=1 pass=0 fail=0 invalid=1 not_run=0\n','runtime_mechanical','timeout');check(cross()==0,'candidate timeout remains mechanical outcome')
+ for body in ['',good.replace('OM2GATE PASS','OM2GATE FAIL'),good.replace('cases=1','cases=2'),good.replace('pass=1','pass=0'),good.replace('VERDICT ctl-synthetic.00 PASS\n','VERDICT ctl-synthetic.00 PASS\nVERDICT ctl-synthetic.00 PASS\n'),good.split('OM2GATE')[0],good.replace('PASS\n','FAIL\n',1),good+'garbage\n','IDENTITY MISMATCH: every case is NOT_RUN\n'+good]:
+ report(body);check(cross()!=0,'incomplete/disagreeing/mismatched gate rejected')
+ try:
+ with contextlib.redirect_stdout(io.StringIO()): mod.summary(str(t),'dev','a')
+ except SystemExit: pass
+ else: raise AssertionError('summary accepted invalid gate')
+ check(not (t/'summary-dev.json').exists(),'standalone summary refuses invalid gate')
+ report('OM2GATE NOT_RUN cases=1 pass=0 fail=0 invalid=0 not_run=1\n','no_code','',None)
+ check(cross()!=0, 'all-no-code missing verdict refused')
+ report(good)
+ with contextlib.redirect_stdout(io.StringIO()): mod.summary(str(t),'dev','a')
+ check(json.loads((t/'summary-dev.json').read_text())['totals']['classes']=={'pass':1},'valid summary still works')
+ prior=(t/'summary-dev.json').read_bytes()
+ report('')
+ try:
+ mod.summary(str(t),'dev','a')
+ except SystemExit: pass
+ else: raise AssertionError('summary overwrote existing artifact')
+ check((t/'summary-dev.json').read_bytes()==prior,'summary preserves existing artifact on refusal')
+print('PASS synthetic host controls:',checks)
+PY_HOST_CONTROLS
+ exit $?
+fi
OMC=$REPO/seed/out/omc
SHA=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f
OUT=$1
@@ -60,7 +155,7 @@ expect "$R" ctl-fibo-nocode no_code
"$OMC" < "$REPO/seed/qualification/om2/gate.om" > "$OUT/gate" && chmod +x "$OUT/gate" || bad "gate build"
python3 "$BENCH/ombench.py" gatelist --run "$R" --split ctl > /dev/null
(cd "$REPO" && "$OUT/gate" "$OMC" "$SHA" "$R/gate-ctl.cases" "$OUT/gate-scratch" > "$OUT/gate-ctl.log" 2>&1)
-echo "gate rc=$?" >> "$OUT/gate-ctl.log"
+echo "gate rc=$?" > "$OUT/gate-ctl.status"
grep -q '^OM2GATE ' "$OUT/gate-ctl.log" && ok "gate final line present" || bad "gate final line missing"
python3 "$BENCH/ombench.py" crosscheck --run "$R" --split ctl --gate-log "$OUT/gate-ctl.log" > "$OUT/crosscheck.txt" 2>&1
rc=$?
diff --git a/research/om-bench/run-arms.sh b/research/om-bench/run-arms.sh
index c1425bea4 ..245ce8b02 100755
--- a/research/om-bench/run-arms.sh
+++ b/research/om-bench/run-arms.sh
@@ -5,13 +5,23 @@
# summary-SPLIT.json, status.txt}. gen skips a task that already has gen.json, so a run interrupted by a host
# fault resumes without regenerating; such a resume is recorded in status.txt by the operator, never silent.
# Run on the Spark, pinned with taskset by the caller; not in CI.
-set -u
+set -eu
HERE=$(cd "$(dirname "$0")" && pwd)
BENCH=$HERE/bench
REPO=${OMB_REPO:-$(cd "$HERE/../.." && pwd)}
OMC=$REPO/seed/out/omc
SHA=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f
ROOT=$1; SPLIT=$2; shift 2
+# Log the actual child status before failing closed. Candidate gate outcomes 1..3
+# are not process failures; crosscheck validates the completed gate report.
+check_stage() {
+ stage=$1; rc=$2
+ echo "$stage rc=$rc $(date -u +%FT%TZ)" >> "$S"
+ if [ "$rc" -ne 0 ]; then
+ cat "$S"
+ exit "$rc"
+ fi
+}
mkdir -p "$ROOT"
GATE=$ROOT/gate
if [ ! -x "$GATE" ]; then
@@ -21,23 +31,36 @@ for ARM in "$@"; do
R=$ROOT/$ARM-$SPLIT
mkdir -p "$R"
S=$R/status.txt
+ if [ -e "$R/summary-$SPLIT.json" ]; then
+ echo "REFUSED existing summary-$SPLIT.json; preserve it and use a new run directory" >> "$S"
+ cat "$S"
+ exit 1
+ fi
echo "start $(date -u +%FT%TZ) arm=$ARM split=$SPLIT omc=$SHA" >> "$S"
- python3 "$BENCH/ombench.py" gen --arm "$ARM" --split "$SPLIT" --run "$R"
- echo "gen rc=$? $(date -u +%FT%TZ)" >> "$S"
- python3 "$BENCH/ombench.py" judge --run "$R" --split "$SPLIT" --arm "$ARM" > "$R/judge.txt" 2>&1
- echo "judge rc=$? $(tail -1 "$R/judge.txt")" >> "$S"
+ rc=0
+ python3 "$BENCH/ombench.py" gen --arm "$ARM" --split "$SPLIT" --run "$R" || rc=$?
+ check_stage gen "$rc"
+ rc=0
+ python3 "$BENCH/ombench.py" judge --run "$R" --split "$SPLIT" --arm "$ARM" > "$R/judge.txt" 2>&1 || rc=$?
+ check_stage judge "$rc"
case $ARM in
a|b|aeq)
- python3 "$BENCH/ombench.py" gatelist --run "$R" --split "$SPLIT" > /dev/null
+ rc=0
+ python3 "$BENCH/ombench.py" gatelist --run "$R" --split "$SPLIT" > /dev/null || rc=$?
+ check_stage gatelist "$rc"
rm -rf "$R/gate-scratch"
- (cd "$REPO" && "$GATE" "$OMC" "$SHA" "$R/gate-$SPLIT.cases" "$R/gate-scratch" > "$R/gate.log" 2>&1)
- echo "gate rc=$? $(grep '^OM2GATE ' "$R/gate.log" | tail -1)" >> "$S"
+ rc=0
+ (cd "$REPO" && "$GATE" "$OMC" "$SHA" "$R/gate-$SPLIT.cases" "$R/gate-scratch" > "$R/gate.log" 2>&1) || rc=$?
+ echo "gate rc=$rc $(grep '^OM2GATE ' "$R/gate.log" | tail -1)" >> "$S"
+ case $rc in 0|1|2|3) ;; *) check_stage gate "$rc" ;; esac
rm -rf "$R/gate-scratch"
- python3 "$BENCH/ombench.py" crosscheck --run "$R" --split "$SPLIT" --gate-log "$R/gate.log" > "$R/crosscheck.txt" 2>&1
- echo "crosscheck rc=$? $(head -1 "$R/crosscheck.txt")" >> "$S"
+ rc=0
+ python3 "$BENCH/ombench.py" crosscheck --run "$R" --split "$SPLIT" --gate-log "$R/gate.log" > "$R/crosscheck.txt" 2>&1 || rc=$?
+ check_stage crosscheck "$rc"
;;
esac
- python3 "$BENCH/ombench.py" summary --run "$R" --split "$SPLIT" --arm "$ARM" > /dev/null
- echo "summary rc=$? end $(date -u +%FT%TZ)" >> "$S"
+ rc=0
+ python3 "$BENCH/ombench.py" summary --run "$R" --split "$SPLIT" --arm "$ARM" > /dev/null || rc=$?
+ check_stage summary "$rc"
cat "$S"
done