diff --git a/.crumb b/.crumb index fb8a4717b..aa7cf1c97 100644 --- a/.crumb +++ b/.crumb @@ -47,8 +47,8 @@ "purpose": "Directory calibration. Purpose not yet described by a human." }, { - "digest": "7ef7796693f23ad68d9a5bcaaee0f635018f4371139a040ba202d4ce7083ede8", - "last_commit": "dd39bf71f", + "digest": "b79f172784017159ed1d078bbabc9ed47dfd32ccd782f3700393c067475e36db", + "last_commit": "5c159484b", "name": "docs", "purpose": "Directory docs. Purpose not yet described by a human." }, @@ -59,11 +59,17 @@ "purpose": "Directory doctrine. Purpose not yet described by a human." }, { - "digest": "8f0e5cb325040247440527f6b54b65cf72c47ff5adca75b4f32a1ddf2b2d6ade", - "last_commit": "1f320caad", + "digest": "b3962e76064f21cffac99f4ccf6152ab08e20971c86e764c96ac6e9cd741df82", + "last_commit": "c21fd0156", "name": "mk", "purpose": "Directory mk. Purpose not yet described by a human." }, + { + "digest": "0cf0eba142c8b72205e4a3f002c1899f3961b07e3188815460d8f09673c69b88", + "last_commit": "1d6277d75", + "name": "neuralese", + "purpose": "Bounded untrusted representation envelopes and explicit checked Omega decoding; learned extensio" + }, { "digest": "62b92244c52fa8af6f511012dee2967e98dff162cc1d8bf45d0b2f15cb0adc5f", "last_commit": "450bbefd4", @@ -71,39 +77,39 @@ "purpose": "Directory research. Purpose not yet described by a human." }, { - "digest": "f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986", - "last_commit": "d94a503f7", + "digest": "fb0896eda0ddbdbb472ae89c56f44fc72ff7c6674acfb4d6f4d3bf297f447999", + "last_commit": "7db65de7e", "name": "spec", "purpose": "Directory spec. Purpose not yet described by a human." }, { - "digest": "aaf5acb82fd4c720cd60c85fd6087f636c72a98e2f3740c9295dcfa525dc64d7", - "last_commit": "bf54b19fa", + "digest": "d3aa18b62e2757c0b483948d6c80bcda08e2f63bd1d742d68f284a80dc50d73d", + "last_commit": "19937695f", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, { - "digest": "5395ff8ff9afceebe8e453788f80a3064b831513cc4cb92fd55869115e06b874", - "last_commit": "dcccc0211", + "digest": "8a74c1c8217abe18d640974791f6a7c5edab662607bf3aa529d71911b2f860fd", + "last_commit": "88508c658", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, { - "digest": "308db0e6cf45c0a48f01f5f5f228450f191389de68006915b9ecf9c65b9a2e29", - "last_commit": "a50c3bd41", + "digest": "7a6ed3e1a9a2d14bbdd5d7fdd7080ef681db1f39a3ef306572c1a929a8913c54", + "last_commit": "52c9afc98", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:07bf1706dcffbad66c0353871ff67a6749055da03cee8d8ebdf9a4c91e36bddc", - "compiled_at": "2026-10-30T16:29:04Z", + "children_root": "sha256:7b797d02767ff11c808a296b0cd794d1a8d03fbd684cac9a564c85bad9a15355", + "compiled_at": "2026-10-30T17:39:14Z", "compiler": "crumb-compile/1", - "digest": "sha256:145642bc89d576e2614c2880b07804488e9369307a4d13f55cf04c7396f2e476", - "evidence_files": 12622, - "evidence_root": "sha256:b1a08e2ce56e6feada0d8a31f06fbd7adee57adc1c1ad8dec220293ee5d439f9", - "files": 17850, - "generated_at_commit": "30a54e64589db9b65d24ba595ef0a610ad35d341", - "source_tree": "sha256:7c95a05d1eae5990bd3f40252a6694204823fb08a90298b49a01c933fac8509e" + "digest": "sha256:d3576de6182da603df93427fdc47b4a7bbbfd982d397d9b887ca6735341450b8", + "evidence_files": 12658, + "evidence_root": "sha256:008dfab6e9e7931d7db3cdf4a7dcbb246e2818e9c507f1044e82a4b99bfdcadb", + "files": 18208, + "generated_at_commit": "89540a17ce3530d21986221f091f1b0c1ffd4dc2", + "source_tree": "sha256:4f6107bef123c22e5e221b02ccf7de360ecf3ea8059a6f91dc07fe3f99853747" }, "owner_lane": "", "provenance": { diff --git a/.well-known/funding-manifest-urls b/.well-known/funding-manifest-urls new file mode 100644 index 000000000..5f23116fe --- /dev/null +++ b/.well-known/funding-manifest-urls @@ -0,0 +1 @@ +https://www.aienos.com/funding.json diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d07ebcf59..2fd9f7ec8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,6 +5,10 @@ Every model below did real work. A model is listed only for work it did. The orc | Model | What it did | |---|---| +| Grok 4.7 | Merged current main (`62d1d0d66`) into #934. Conflicts were generated crumbs (`.crumb`, `spec/.crumb`, `src/.crumb`, `tests/.crumb`) and CONTRIBUTORS.md. The Makefile kept the test-costmodel mutant block and the test-dagsim block. Regenerated crumbs with the crumb.lock tool (`d0f0b95d`). | +| Grok 4.7 | Treated an unsupported or refused rx_cm_predict result as an unknown cell in the offline DAG evaluator, including when known is set. Merged #934's predict API to build that check. Host test and a mutant that drops it. | +| Grok 4.7 | Refused inverted buffer lifetimes in the imported offline DAG evaluator so a negative live-byte ledger cannot hide a capacity overflow (#705). Host fixtures and a mutant that drops the check. | +| Grok 4.7 | Merged current main (`6d482de0e`) into #854. The only conflict was the generated root `.crumb` (compile stamps and source-tree digest). Regenerated crumbs with the crumb.lock tool (`d0f0b95d`). | | Grok 4.7 | Merged current main (`089e5b053`) into #936. Conflicts were generated crumbs (`.crumb`, `tests/.crumb`); regenerated them with the crumb.lock tool (`d0f0b95d`). | | Grok 4.7 | Restored the offline DAG evaluator's forbidden-symbol guard from #590 (`3bd56731`): generation store, authority, world, and calls that map or run code. | | Grok 4.7 | Imported the offline DAG evaluator `tools/dagsim` verbatim from closed PR #590 (`3bd56731`) and wired a host `test-dagsim` target. Analytical fixture checks only. No validated cost claim. | @@ -21,6 +25,7 @@ Every model below did real work. A model is listed only for work it did. The orc | Codex (GPT-6 Astra) | Seeded executable contracts, loop-head invariants, release erasure, purity and runtime refusal controls | | Codex (GPT-6.1 Sol) | Corrected boolean bitwise typing in seeded OSC IR output, with C-referee regression cases | | Codex (GPT-6.1 Sol) | Seeded Omega OSC IR v1 to WebAssembly MVP backend, native differential gate, refusal and mutant controls | +| OpenAI GPT-6 Astra | Composed security SC1 contracts, ownership reconciliation, independent acceptance review integration and evidence matrix (#625/#673) | | Codex | Handwritten bounded PD0 stream primitive and binary consumer in Omega, native tests, and host-reference/source review (native execution NOT_RUN) | | Codex | Current .om front-page status and source-backed C migration inventory | | Codex | BUILD receipt cleanliness enforcement and optional diagnostic pointer regression fixes | @@ -35,7 +40,14 @@ Every model below did real work. A model is listed only for work it did. The orc | Claude Fable 5.1 | CodeQL high-severity fixes in the OM-2 oracles: 0600 image creation in offsetof.c, fixture-name allowlist and truncation check in sha_qual.c | | Claude Opus 5.5 | Omega 1.0 roadmap: source-pinned readiness audit of the seeded compiler, IR, WebAssembly and bridge paths, milestone acceptance gates, tracking issues #790-#800, OM-2 contract files brought to main byte-identical, and stale status text corrected | | Claude Opus 5.5 | Function-mode constants in the seeded compiler (`fnstore`): consts accepted without `fn main`, globals/texts/host words still error 9, gate16 byte-identity fixtures and old-compiler/mutant negative controls | +| Codex (GPT-6.1 Sol) | Neuralese supplement proposal, bounded native envelope/codebook decoder and existing Omega-conductor host refusal/mutant cases | +| Codex (GPT-6.1 Sol) | NL4 native numerical payload codec, canonical LTP0 consumer, independent receiver-matched pure execution boundary and host synthetic rejection/mutant qualification (#920) | | Codex (GPT-6.1 Sol) | Repaired qty float-domain classification and checked ingress, diagnostic categories and query/output streaming; permanent adversarial regression fixtures for the #909/#911 audit | +| Claude Opus 5.5 | OSC IR v7 memory oracle: independent decoder, validator and interpreter (`seed/wasm/v7/oracle.js`), separate hand-written fixture writer, hand-written expectations and a mutant-checked self-test | +| Claude Opus 5.5 | Effect-derived capability manifest (`seed/effects`, M1): host-word manifest, ELF syscall resolution that fails closed, seccomp cBPF output, probe-parity/strace/bwrap gate with negative controls and tool mutants | +| Claude Opus 5.5 | seed/agent: omagent, a nanobot-style coding agent in seeded Omega (agent loop, four permissioned tools, JSONL session memory, SSE streaming, CLI), its scripted-mock test referee with six mutants, and the paired startup/RSS benchmark against nanobot | +| Claude Opus 5.5 | Tenstorrent Tensix vecadd (`seed/tensix`): RV32IM asm2 table, hand-written kernel and start code, seeded Omega emitter `irrv32.om` (OSC IR v1 scalar unit -> RV32 elementwise kernel, byte-identical to asm2), hand-written edge disassembly, ttsim WH/BH and qemu interop-oracle gate with negative controls | +| Claude Opus 5.5 | AWS Trainium/Inferentia backend `seed/nki`: `irnki.om` OSC IR v1 to `nki.isa` vecadd/elementwise emitter, native-Omega reference lanes, NKI CPU simulator interop-oracle gate (trn1/trn2/trn3) with negative controls and refusals, pinned oracle setup | This table starts with the numeric work on this branch. Earlier work in this repository is not yet attributed here; add rows only for work that can be traced to a model. @@ -50,3 +62,6 @@ Update this table in the same commit as the work it credits. | Codex | Integrated FR-9 with compiler batch 3 and the latest quantity/diagnostic audit; preserved empty text and integer-bitcast behavior on x86 and kept seed bootstrap within its function budget by removing unused helpers and inlining one single-use helper. | | Codex | Fixed x86 quantity unary refusals and empty-text emission; added explicit per-target acceptance contracts, preserved historical failed experiments, and exercised missing diagnostic callers and stale-binding controls. | | Grok 4.7 | Merged current main (b3dca0f1) into #514. The only conflict was the generated root `.crumb`; regenerated crumbs with the crumb.lock tool (d0f0b95d). | +| Grok 4.7 | Merged current main (089e5b05) into #509. Conflicts were the generated root `.crumb` and `tests/.crumb`. Took main's copies and regenerated crumbs with the crumb.lock tool (d0f0b95d). | +| Grok 4.7 | Merged current main (62d1d0d) into #509. Conflicts were the generated root `.crumb` and `tests/.crumb`. Took main's copies and regenerated crumbs with the crumb.lock tool (d0f0b95d). | +| Grok 4.7 | Cost-model refusal of unsupported semantic operation IDs before prediction or learning, with a clamp-restoring mutant (Refs #704) | diff --git a/Makefile b/Makefile index 6b53cd124..d1352d4ad 100644 --- a/Makefile +++ b/Makefile @@ -1248,6 +1248,18 @@ $(RX_CM_UNIT): tests/runtime/rx_costmodel_unit.c $(RX_CM_OBJ) src/omega_om_units test-costmodel: $(RX_CM_UNIT) ./$(RX_CM_UNIT) + @set -eu; dir=$(OUT_DIR)/costmodel-mutant; rm -rf $$dir; mkdir -p $$dir; \ + sed "/CM704:refuse-unsupported-op/c\\ uint32_t op = f && f->op < RX_CM_OPS ? f->op : RX_CM_OPS - 1u; /* CM704:refuse-unsupported-op */" \ + src/runtime/rx_costmodel.c > $$dir/rx_costmodel.c; \ + if cmp -s src/runtime/rx_costmodel.c $$dir/rx_costmodel.c; then \ + echo "mutant restore-op-clamp: sed changed nothing"; exit 1; fi; \ + $(CC) $(CFLAGS) -c -o $$dir/rx_costmodel.o $$dir/rx_costmodel.c; \ + $(CC) $(CFLAGS) -o $$dir/unit tests/runtime/rx_costmodel_unit.c $$dir/rx_costmodel.o src/omega_om_units.c -lm; \ + rc=0; $$dir/unit refuse > $$dir/out.txt 2> $$dir/err.txt || rc=$$?; \ + if [ $$rc -eq 0 ] || ! grep -q unsupported-op-not-aliased-to-matvec $$dir/err.txt; then \ + echo "mutant restore-op-clamp was not killed by unsupported-op-not-aliased-to-matvec (exit $$rc)"; \ + cat $$dir/err.txt; exit 1; fi; \ + echo "mutant restore-op-clamp: killed by unsupported-op-not-aliased-to-matvec (exit $$rc)" # Offline resource-DAG evaluator, imported verbatim from closed PR #590 # (commit 3bd56731). Host arithmetic on the numbers written in the fixtures. @@ -1273,7 +1285,7 @@ $(DS_OBJ): tools/dagsim/dagsim.c tools/dagsim/dagsim.h src/runtime/rx_costmodel. rm -f $@; exit 1; fi $(DS_UNIT): tests/dagsim/dagsim_unit.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) | $(OUT_DIR) - $(CC) $(CFLAGS) -Itools/dagsim -o $@ tests/dagsim/dagsim_unit.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) -lm + $(CC) $(CFLAGS) -Itools/dagsim -o $@ tests/dagsim/dagsim_unit.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) -Wl,--wrap=rx_cm_predict -lm $(DS_CLI): tools/dagsim/dagsim_cli.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) | $(OUT_DIR) $(CC) $(CFLAGS) -Itools/dagsim -o $@ tools/dagsim/dagsim_cli.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) -lm @@ -1281,6 +1293,8 @@ $(DS_CLI): tools/dagsim/dagsim_cli.c $(DS_OBJ) $(RX_CM_OBJ) $(DS_SHA_SRC) | $(OU test-dagsim: $(DS_UNIT) $(DS_CLI) ./$(DS_UNIT) sh tests/dagsim/run_cli.sh $(DS_CLI) $(OUT_DIR)/dagsim-cli-out + sh tests/dagsim/mutant_lifetime.sh + sh tests/dagsim/mutant_predict.sh # AArch64 hosts: the gate. Real realizations, training, promotion through the # R9 barrier on the native authority, held-out workloads. @@ -2566,10 +2580,43 @@ $(GPU_L2_STALE_TEST): tests/gpu_l2_stale_test.c src/omega_gpu_fp8_api.h src/omeg GPU_DATTN_TEST = $(OUT_DIR)/gpu_decode_attn_test $(GPU_DATTN_TEST): tests/gpu_decode_attn_test.c tests/bw_warp_sim_k.h src/omega_gpu_decode_attn_api.h src/omega_blackwell_codegen_attn.h $(OUT_DIR)/libomega_gpu.a $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_decode_attn_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm -test-gpu-decode-attn: $(GPU_DATTN_TEST) +test-gpu-decode-attn: $(GPU_DATTN_TEST) test-gpu-decode-attn-maxpos $(GPU_DATTN_TEST) --host-only $(GPU_DATTN_TEST) --sim +# omega #535: the 128k position bound (OMEGA_GPU_DATTN_MAX_POS 131072) on a fake platform, no device. A sanitized copy +# of src/omega_gpu_decode_attn_api.c is linked ahead of the library, so cache writes, the RoPE fill and launch staging +# are ASan/UBSan checked against the fake's exact-size buffers. Each mutant breaks one bound in a copy of that file; +# the test must FAIL on it. +.PHONY: test-gpu-decode-attn-maxpos +GPU_DATTN_MAXPOS_TEST = $(OUT_DIR)/test_omega_gpu_decode_attn_maxpos +GPU_DATTN_MAXPOS_MUT = $(OUT_DIR)/dattn_maxpos_mut +GPU_DATTN_MAXPOS_SAN = -O1 -g -fsanitize=address,undefined -fno-sanitize-recover=all +$(GPU_DATTN_MAXPOS_TEST): tests/test_omega_gpu_decode_attn_maxpos.c src/omega_gpu_decode_attn_api.c src/omega_gpu_decode_attn_api.h src/omega_blackwell_codegen_attn.h $(OUT_DIR)/libomega_gpu.a + $(CC) $(filter-out -MMD -MP -O2,$(CFLAGS)) $(GPU_DATTN_MAXPOS_SAN) -o $@ tests/test_omega_gpu_decode_attn_maxpos.c \ + src/omega_gpu_decode_attn_api.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm +test-gpu-decode-attn-maxpos: $(GPU_DATTN_MAXPOS_TEST) + $(GPU_DATTN_MAXPOS_TEST) + @mkdir -p $(GPU_DATTN_MAXPOS_MUT) + @set -e; \ + tmut() { name=$$1; script=$$2; \ + sed -e "$$script" src/omega_gpu_decode_attn_api.c > $(GPU_DATTN_MAXPOS_MUT)/$$name.c; \ + if cmp -s src/omega_gpu_decode_attn_api.c $(GPU_DATTN_MAXPOS_MUT)/$$name.c; then echo "mutant $$name: pattern not found"; exit 1; fi; \ + $(CC) $(filter-out -MMD -MP -O2,$(CFLAGS)) $(GPU_DATTN_MAXPOS_SAN) -o $(GPU_DATTN_MAXPOS_MUT)/$$name \ + tests/test_omega_gpu_decode_attn_maxpos.c $(GPU_DATTN_MAXPOS_MUT)/$$name.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm; \ + if $(GPU_DATTN_MAXPOS_MUT)/$$name > $(GPU_DATTN_MAXPOS_MUT)/$$name.log 2>&1; then echo "mutant $$name SURVIVED"; exit 1; fi; \ + if ! grep -q '^FAIL ' $(GPU_DATTN_MAXPOS_MUT)/$$name.log; then \ + echo "mutant $$name: no FAIL case (did not run?)"; cat $(GPU_DATTN_MAXPOS_MUT)/$$name.log; exit 1; fi; \ + echo "mutant $$name killed"; }; \ + tmut cap-off-by-one 's/max_pos > OMEGA_GPU_DATTN_MAX_POS ||/max_pos >= OMEGA_GPU_DATTN_MAX_POS ||/'; \ + tmut cap-one-chunk-over 's/max_pos > OMEGA_GPU_DATTN_MAX_POS ||/max_pos > OMEGA_GPU_DATTN_MAX_POS + 256u ||/'; \ + tmut write-pos-bound 's/kv_head >= 4 || pos >= c->max_pos || count == 0/kv_head >= 4 || count == 0/'; \ + tmut write-count-bound 's/count > c->max_pos - pos ||/count > c->max_pos - pos + 1u ||/'; \ + tmut read-pos-bound 's/kv_head >= 4 || pos >= c->max_pos || !k/kv_head >= 4 || pos > c->max_pos || !k/'; \ + tmut step-pos-bound 's/layer >= c->layers || pos >= c->max_pos || (rec/layer >= c->layers || pos > c->max_pos || (rec/'; \ + tmut rope-table-short 's/(size_t)max_pos \* OMEGA_DATTN_ROPE_ROW_BYTES/(size_t)(max_pos - 8u) * OMEGA_DATTN_ROPE_ROW_BYTES/'; \ + echo "test-gpu-decode-attn-maxpos: 7 of 7 mutants killed" + # Qwen3.8-27B (omega-mv#544, 2026-10-18): decode attention head_dim 256, 24 q / 4 kv heads, partial RoPE by permutation # (omega_gpu_decode_attn256_api.h). test-gpu-decode-attn256 is host-only + simulator; the chip gate is # tools/run_gpu_decode_attn256_chip.sh. @@ -2660,6 +2707,20 @@ $(GPU_GPR_BOUNDARY_TEST): tests/gpu_gpr_boundary_test.c src/omega_blackwell_code test-gpu-gpr-boundary: $(GPU_GPR_BOUNDARY_TEST) $(GPU_GPR_BOUNDARY_TEST) +# omega-mv#554: static scoreboard hazard checker (RAW / WAR / WAW) over the encoded bytes of every kernel the generators +# build, after the launchers' patch steps. Host only: decoder vs encoder, the pre-#553 attend red receipt +# (tests/fixtures/bw_hazard), negative controls, then the sweep. test-bw-hazard-nvdisasm adds the decoder cross-check +# against nvdisasm (offline oracle, /usr/local/cuda/bin) on every distinct kernel: one nvdisasm call per kernel, over +# ten minutes on the Spark (2026-10-19: 2360 kernels, 1028064 instructions, 0 mismatched). +.PHONY: test-bw-hazard test-bw-hazard-nvdisasm +BW_HAZARD_TEST = $(OUT_DIR)/bw_hazard_test +$(BW_HAZARD_TEST): tests/bw_hazard_test.c src/omega_bw_hazard.c src/omega_bw_hazard.h $(OUT_DIR)/libomega_gpu.a + $(CC) $(CFLAGS) -o $@ tests/bw_hazard_test.c src/omega_bw_hazard.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm +test-bw-hazard: $(BW_HAZARD_TEST) + $(BW_HAZARD_TEST) +test-bw-hazard-nvdisasm: $(BW_HAZARD_TEST) + $(BW_HAZARD_TEST) --nvdisasm + # OWN-30B T3 (2026-10-13): HMMA arithmetic probe (host model self-checks; chip run under the GB10 lock). GPU_TC_PROBE_TEST = $(OUT_DIR)/gpu_tc_probe_test $(GPU_TC_PROBE_TEST): tests/gpu_tc_probe_test.c tests/bw_hmma_model.h src/omega_blackwell_codegen_tc.h $(OUT_DIR)/libomega_gpu.a @@ -2733,10 +2794,39 @@ test-gpu-isolation: $(GPU_ISOLATION_TEST) # host-only; the chip gate is tools/run_gpu_decode_graph_chip.sh under the GB10 lock. .PHONY: test-gpu-decode-graph GPU_DECODE_GRAPH_TEST = $(OUT_DIR)/gpu_decode_graph_test +GPU_DGRAPH_ABORT_TEST = $(OUT_DIR)/test_omega_gpu_decode_graph_abort $(GPU_DECODE_GRAPH_TEST): tests/gpu_decode_graph_test.c src/omega_gpu_decode_graph.h src/omega_gpu_cmdlist.h $(OUT_DIR)/libomega_gpu.a $(CC) $(CFLAGS) -ffp-contract=off -o $@ tests/gpu_decode_graph_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm -test-gpu-decode-graph: $(GPU_DECODE_GRAPH_TEST) +test-gpu-decode-graph: $(GPU_DECODE_GRAPH_TEST) $(GPU_DGRAPH_ABORT_TEST) test-gpu-decode-graph-abort-mutants ./$(GPU_DECODE_GRAPH_TEST) --host-only + ./$(GPU_DGRAPH_ABORT_TEST) + +# omega #518: lock and token-state recovery of the split API (failed begin_token, abort_token, end_token after a failed +# record, latched session) on a fake platform whose lock refuses a second acquisition. Host only, opens no device. +# Each mutant breaks one rule in a copy of omega_gpu_decode_graph.c linked ahead of the library; the test must FAIL on it. +.PHONY: test-gpu-decode-graph-abort-mutants +GPU_DGRAPH_MUT_DIR = $(OUT_DIR)/dgraph_mut +$(GPU_DGRAPH_ABORT_TEST): tests/test_omega_gpu_decode_graph_abort.c src/omega_gpu_decode_graph.h src/omega_gpu_platform.h $(OUT_DIR)/libomega_gpu.a + $(CC) $(CFLAGS) -o $@ tests/test_omega_gpu_decode_graph_abort.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm +test-gpu-decode-graph-abort-mutants: $(OUT_DIR)/libomega_gpu.a + @mkdir -p $(GPU_DGRAPH_MUT_DIR) + @set -e; killed=0; \ + dmut() { name=$$1; script=$$2; \ + sed -e "$$script" src/omega_gpu_decode_graph.c > $(GPU_DGRAPH_MUT_DIR)/$$name.c; \ + if cmp -s src/omega_gpu_decode_graph.c $(GPU_DGRAPH_MUT_DIR)/$$name.c; then echo "mutant $$name: pattern not found"; exit 1; fi; \ + $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -c -o $(GPU_DGRAPH_MUT_DIR)/$$name.o $(GPU_DGRAPH_MUT_DIR)/$$name.c; \ + $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -o $(GPU_DGRAPH_MUT_DIR)/$$name tests/test_omega_gpu_decode_graph_abort.c \ + $(GPU_DGRAPH_MUT_DIR)/$$name.o $(OUT_DIR)/libomega_gpu.a -lpthread -lm; \ + if ./$(GPU_DGRAPH_MUT_DIR)/$$name > $(GPU_DGRAPH_MUT_DIR)/$$name.log 2>&1; then echo "mutant $$name SURVIVED"; exit 1; fi; \ + nfail=$$(grep -c '^FAIL' $(GPU_DGRAPH_MUT_DIR)/$$name.log || true); \ + if [ "$$nfail" -eq 0 ]; then echo "mutant $$name: nonzero exit but no FAIL case (did not run?)"; cat $(GPU_DGRAPH_MUT_DIR)/$$name.log; exit 1; fi; \ + echo "mutant $$name killed: $$nfail case(s) failed"; killed=$$((killed+1)); }; \ + dmut begin-fail-keeps-lock 's| omega_gpu_session_unlock(); /\* begin_fail releases \*/| ;|'; \ + dmut begin-fail-stays-in-token 's| g->in_token = 0; g->failed = 1;| g->failed = 1;|'; \ + dmut oneshot-old-bad-args-only 's|if (brc != OMEGA_GPU_DGRAPH_OK) {|if (brc == OMEGA_GPU_DGRAPH_BAD_ARGS) {|'; \ + dmut abort-keeps-lock 's|g->n_stamp = 0; /\* no timeline for an abandoned token \*/|&\n return OMEGA_GPU_DGRAPH_OK;|'; \ + dmut abort-submits 's|^int omega_gpu_decode_graph_abort_token(OmegaGpuDecodeGraph \*g) {$$|&\n if (g \&\& g->in_token) return omega_gpu_decode_graph_end_token(g, NULL, NULL);|'; \ + echo "test-gpu-decode-graph-abort-mutants: $$killed of 5 mutants killed" # OWN-30B W-L2c (2026-10-14): per-launch fixed cost inside a command list (tests/gpu_launch_cost_test.c, chip only, GB10 lock). GPU_LAUNCH_COST_TEST = $(OUT_DIR)/gpu_launch_cost_test diff --git a/README.md b/README.md index 1cfed2960..d71357216 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Papers: [Omega](https://doi.org/10.5281/zenodo.23547810), [The Token Is the Inst - [Omega 1.0 roadmap: readiness audit, milestones and acceptance gates](docs/ROADMAP-1.0.md) - [Remaining C source/header inventory](docs/migration/C-TO-OM-INVENTORY.md) - [Experimental `.om` deterministic-stream successor](seed/physics0/README.md): source/host checks passed; native compilation and execution NOT_RUN. +- [Neuralese supplement](neuralese/README.md): PROPOSED model-bound representation design, with a bounded native `.om` envelope/codebook candidate and ordinary checked-source boundary. No learned reasoning or model experiment is claimed. - [Alpha model/platform qualification](https://github.com/aien-dev/aien-architecture-mv/issues/305) ### Why GitHub still shows C @@ -32,6 +33,7 @@ Research-grade, with a staged Alpha qualification programme in progress. An Alph - **Legacy OSC/C implementation on `main`:** OSC-0/1/2 and OSC-3 material describes the earlier implementation and unfinished migration, not the forward source-language path. The old Milestone 6 "self-host" result was a fixed-output self-copy check, not compilation ([historical note](docs/osc/OSC-1-SELF-HOST-STATEMENT.md)); do not confuse it with the later seeded compiler work. - **Reaction runtime:** the R1 to R16 qualification ladder passed on builds that predate the composition modules (omega#126), a historical result. Requalification at `3108fc2` recorded R15 FAIL (14 of 16 gates: G1, G15) and R16 FAIL (`evidence/REQUAL-3108fc2/`); the R16 receipt `22d7a79a` at `850fc54` is invalid as a current claim because its script was later found defective; none of R1 to R16 is requalified on the current candidate, and the ladder rerun is in progress. The R16 loop-site inventory was reconciled on the candidate tree (502 sites, 0 unclassified, 0 stale, PR #279); that is the inventory gate only, not R16. The current living build is IMPLEMENTED / NOT QUALIFIED until re-qualified. Composition, Capability Graph, Skill Router, J-Space and Cortex run on the host; the Fabric interface is a host-only loopback with no network; none of this is on silicon as a qualified system. - **Numerics (E1):** closed 2026-10-02 on the GB10 chip campaign (Gate 5 26/26 with 47 parity lines, reductions SUM/MAX/MIN/MEAN, nine transcendental ops over all 2^32 inputs each, 148 load/store kernels), consolidated receipt `evidence/E1-CLOSURE/e7851c69d34ac777a9436af16d0bdd5d69264c8528c62d562b600f5d89153061.json`; exclusions (natural-base EXP/LOG have no GB10 kernel) are listed in [E1_GAP_TABLE](docs/numeric/E1_GAP_TABLE.md). +- **Decode attention (OWN-30B):** one cache holds up to 131072 positions (128k context, `OMEGA_GPU_DATTN_MAX_POS`). On the GB10 chip, contexts 65536, 100000 and 131072 match the double reference exactly (`evidence/dattn-maxpos-128k-20261018/`); at those lengths the kernel streams K/V at about 57 GB/s, so long contexts are slower than the weights alone allow. - **Qwen3.8-27B kernels (GB10, 2026-10-18):** each one is checked on the chip against a double-precision reference with deliberately broken variants that must fail, and none is joined into a serving engine yet. FP8 matrix-vector and the tensor-core prefill GEMM now take k up to 32768, which covers the 27B down projection at k = 17408 (`evidence/fp8-k32768-20261018/`, omega#541). The Gated DeltaNet decode step (the recurrent layer used by 48 of the 64 layers) runs as one launch per layer and matches the reference to about 2e-7; it takes 125.7 us per layer, which moves its 6.29 MB of state at 50.1 GB/s against 273 GB/s nominal (`evidence/gdn-decode-20261018/`, omega#542). The DeltaNet prefill reads a whole prompt in three launches per layer and hands its state to the decode step, which carries on exactly; at 2048 tokens it takes 3.80 us per token per layer, and the recurrent scan in it does about 2.4 trillion operations a second, against a chip peak for that kind of math that has not been measured yet (`evidence/gdn-prefill-20261018/`, omega#543). The full-attention decode step for the other 16 layers (24 query heads over 4 key-value heads, 256 numbers per head, rotation on the first 64 only, done by reordering the numbers once at load) runs as one launch per layer, matches the reference at each tested context (1, 7, 256, 301, 1024, 4096, 8192, 32768 and 131072 tokens) with all five broken variants caught, and at 32768 tokens of context takes 2.10 ms per layer, streaming its 134 MB of cached keys and values at 63.8 GB/s against 273 GB/s nominal (`evidence/QWEN38-DATTN256-8bb4494e-20261018/`, omega#544). The prefill attention for those 16 layers reads a 2048-token chunk of a prompt in two launches per layer and leaves cache rows bit-equal to the ones the decode step would have written; it matches the reference at every tested point up to 129024 + 2048 tokens with all four broken variants caught, and a 2048-token chunk takes 10.0 ms per layer at the start of a prompt and 591 ms at the end of a 128k one, streaming cached keys and values at 230.6 GB/s against 273 GB/s nominal (`evidence/pattn256-chip-20261018T1517Z/`, omega#545). Getting it to run found a bug every kernel shared: the encoder wrote the integer add, one compare and the exit instruction with a fixed timing word, so the waits the code generator scheduled on them never reached the chip. The encoder now keeps them, `make test-bw-encode-control` checks every instruction type, and 18 of 19 kernel families pass their chip tests with the fix (the ternary family fails only its speed gates, which the old encoder fails the same way on the same load; `evidence/encoder-fix-sweep-20261018T1512Z/`). - **Hardware:** results on the DGX Spark GB10 are tied to the exact commit in each receipt. Host and emulator passes are never reported as hardware qualification. @@ -67,7 +69,9 @@ make PHYSICS_DIR=/nonexistent PHYSICS_LOCK_CHECK=0 test-numeric-cpu # E1 CP make PHYSICS_DIR=/nonexistent PHYSICS_LOCK_CHECK=0 test-realize ``` -The full omegatool build (`make`) links the `physics` repository at the commit in `physics.lock`. Some older milestone gate scripts rewrite their receipts in place, so do not run them on a clean checkout you mean to keep; prefer the `make test-*` targets above. Targets that touch the GB10 need the DGX Spark, run one at a time, and are never killed mid-run. The M19 clean-clone gate rebuilds the tree in a temporary directory and runs the milestone gates there; when that nested build or nested run fails, it now prints the tail of its own log to stderr, so a failure names its cause instead of reporting a bare FAIL. CI definitions in `.github/workflows/` list the suites that run on every push. +The full omegatool build (`make`) links the `physics` repository at the commit in `physics.lock`. Some older milestone gate scripts rewrite their receipts in place, so do not run them on a clean checkout you mean to keep; prefer the `make test-*` targets above. Some GPU suites build against physics but still open no device: `make test-gpu-decode-graph` checks the decode graph's glue kernels and, on a fake platform, that a failed or abandoned decode token always gives the GPU session lock back (shown on the fake only; the real-chip decode run is `tools/run_gpu_decode_graph_chip.sh`). Targets that touch the GB10 need the DGX Spark, run one at a time, and are never killed mid-run. The M19 clean-clone gate rebuilds the tree in a temporary directory and runs the milestone gates there; when that nested build or nested run fails, it now prints the tail of its own log to stderr, so a failure names its cause instead of reporting a bare FAIL. CI definitions in `.github/workflows/` list the suites that run on every push. + +`make test-bw-hazard` (host only, links `libomega_gpu.a`, so it needs the physics checkout like `make`) reads the encoded bytes of every GPU kernel the generators build and checks the scoreboard waits: a register written by a load must be waited on before it is read, and a register a queued load or store still reads must be waited on before it is overwritten (omega-mv#554). The simulators do not model these waits, so this is the host check that would have caught the omega-mv#545 chip fault. Known findings on older kernels are listed, with how each was confirmed, in `tests/bw_hazard_test.c`. ## Repository layout diff --git a/docs/.crumb b/docs/.crumb index 433100df5..f5707a0e8 100644 --- a/docs/.crumb +++ b/docs/.crumb @@ -124,14 +124,14 @@ } ], "children_root": "sha256:c81d43c0c392dfec2b6ed5b38ba95ea7c592782b283950e32b777e7b9cfd9d61", - "compiled_at": "2026-10-30T02:47:38Z", + "compiled_at": "2026-10-30T17:38:28Z", "compiler": "crumb-compile/1", - "digest": "sha256:7ef7796693f23ad68d9a5bcaaee0f635018f4371139a040ba202d4ce7083ede8", + "digest": "sha256:b79f172784017159ed1d078bbabc9ed47dfd32ccd782f3700393c067475e36db", "evidence_files": 34, "evidence_root": "sha256:589d8b3706e6d7a202ab20b278dac5fc5bafc973f1c2a867b2668aa7210b65cc", "files": 138, - "generated_at_commit": "e615e9ff47d03199514580f655d7670e61ab7e2f", - "source_tree": "sha256:ba44cf86b50127e2ec3824c2e913e032178628d69910a85ca9125cc1ed960bb5" + "generated_at_commit": "5c159484b40345f76ad15937305aac155a808bc8", + "source_tree": "sha256:9bc6cda14def66e0b216e2581227d2f98e12eb80ddadfcccd6bd5bf12138e46f" }, "owner_lane": "", "provenance": { diff --git a/docs/OMEGA.md b/docs/OMEGA.md index 5f6a44a06..f7adfc300 100644 --- a/docs/OMEGA.md +++ b/docs/OMEGA.md @@ -1,8 +1,8 @@ # What Omega is -**Omega is AIEN's language for all computing.** You write a program once. Omega's own tools check it and compile it straight to the machine code of the processor that runs it, GPU or CPU. No vendor compiler, toolkit or runtime library is involved anywhere. +**Omega is AIEN's language for all computing.** The aim: you write a program once, and Omega's own tools check it and compile it to the machine code of the processor that runs it, GPU or CPU, with no vendor compiler, toolkit or runtime library at build or run time. On the CPU the language does that today. On the GPU it does not yet: the GPU code AIEN runs is built by C calls into Omega's encoder (bar C1, section 3). -On the GPU, that makes Omega the replacement for CUDA. We call Omega's GPU stack **CUDA++**: everything CUDA gives you (sections 2 and 3), plus what CUDA does not give you, the motor (section 6). On the CPU, Omega replaces C and its toolchain. +On the GPU, the goal is a stack that does the jobs of CUDA's user-space software on the GB10. It is a research-stage toolchain and runtime, not a drop-in replacement for CUDA, and section 3 lists the bars it has not passed. We call Omega's GPU stack **CUDA++**: the jobs CUDA does (sections 2 and 3), plus what CUDA does not give you, the motor (section 6). On the CPU, Omega aims to replace C and its toolchain. **What CUDA++ is for: less computation, out of the big data centers.** The goal is not a faster way to rent a data center. It is to need less of one: do the same work with fewer bytes moved, fewer operations and fewer joules per answer, so it runs on a machine a person owns (a DGX Spark, a PC with one graphics card, a laptop) instead of a building full of them. Every CUDA++ result is reported as work per answer (bytes, operations and energy per word, against the machine's own ceiling), not only as speed. This file says how far each of those has got, and the checks that have to pass before we can claim each one. Status words: PASS (a receipt exists on the named commit), PARTIAL, MISSING. Ledger item L386 tracks the work; tracking issue omega-mv#593. @@ -15,7 +15,9 @@ On the GPU, that makes Omega the replacement for CUDA. We call Omega's GPU stack | **The GPU runtime** | Opens the device, allocates memory, launches kernels, records command lists and runs jobs. It does the job of CUDA's runtime and driver API (libcudart, libcuda). | `src/omega_gpu_session.h`, `omega_gpu_cmdlist.h`, `omega_gpu_engine.h`, `omega_gpu_platform.h` | | **The libraries** | Matrix multiply, matrix-vector (BF16, FP8, 4-bit, ternary), attention (decode and prefill), reductions, elementwise. They do the job of cuBLAS and cuDNN. | `src/omega_gpu_*_api.h` | -**Below Omega, and not part of it:** the driver. Omega reaches the GPU through the physics repository's driver client (`nvrm/nvrm.c`, `m16/m16_native.c`). The client talks to NVIDIA's open-source kernel module (`nvidia.ko`, `nvidia-uvm.ko`, version 580.173.02) and the module boots NVIDIA's signed GSP firmware. Replacing the kernel module with our own driver is a separate job, L332. The firmware stays NVIDIA's for a physical reason: the GPU checks its signature and will not boot anything else. +**Below Omega, and not part of it:** the driver. Omega reaches the GPU through the physics repository's driver client (`nvrm/nvrm.c`, `m16/m16_native.c`). The client talks to NVIDIA's open-source kernel module (`nvidia.ko`, `nvidia-uvm.ko`, version 580.173.02) and the module boots NVIDIA's signed GSP firmware. Aien builds and uses its own GB10 driver to replace that kernel module (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332); it is not hardware-qualified yet. GB10 facts we measure on the way (chip id, boot sequence) still go upstream to the Linux drivers Nova and nouveau as findings. The firmware stays NVIDIA's for a physical reason: the GPU checks its signature and will not boot anything else. + +**Prior art we build beside.** Omega's sm_121 encoder is one of several open ones. Mesa's NAK compiler emits SM120 code (MIT, checked against nvdisasm), cubit is an MIT SM120/SM121a assembler and disassembler, blackwell-isa publishes MIT sm121a encoding tables, and nvidia-sass-document collects SASS notes. tinygrad's NVKIface talks to the same open kernel module interface our driver client uses. We cross-check against them and credit them; `THIRD_PARTY.md` in aien-dev/CUDApp lists what we reuse. ## 2. CUDA, piece by piece @@ -26,22 +28,22 @@ On the GPU, that makes Omega the replacement for CUDA. We call Omega's GPU stack | CUDA C++ language | How you write a kernel | **The kernel builder (C calls).** Omegese and OSC do not compile to the GPU yet. | **BUILDING on branches, chip FAIL** (bar C1; section 3) | | nvcc, NVVM, PTX, ptxas | Compile the kernel to machine code | Omega's own sm_121 encoder and register allocator | PASS: every kernel Omega runs is encoded by it | | libcuda (driver API) | Talk to the kernel driver | physics `nvrm` client, ioctls straight to the open kernel module | PASS (`evidence/m16-blackwell-native-path-requalification-receipt.json` in physics) | -| libcudart (runtime API) | Device, memory, launch, streams | Omega GPU session, command lists, job engine | PARTIAL: second queue, events and recovery after a timeout are built (bars C4, C5, branches); chip runs pending | +| libcudart (runtime API) | Device, memory, launch, streams | Omega GPU session, command lists, job engine | PARTIAL: second queue, events and recovery after a timeout are built (bars C4, C5); C4 chip values PASS on a shared chip (`evidence/C4-STREAMS/04-chip-values-20261025-048e5f5.log`), C4 exclusive-window timing NOT RUN, C5 chip NO RESULT | | cuBLAS | Matrix multiply | Omega matmul, tensor-core GEMM, FP8 and BF16 APIs, any-shape GEMM (bar C3, branch) | PARTIAL: any-shape GEMM built, chip run pending | | cuDNN, FlashAttention | Attention and network layers | Omega decode and prefill attention | PARTIAL: model-shaped | -| CUB, Thrust | Reductions, scans, sorts | Omega frozen-order reductions (`evidence/E1-CLOSURE/`), general reductions and prefix sums up to 2^28 (bar C3, branch) | PARTIAL: scan built, chip run pending; no sort | +| CUB, Thrust | Reductions, scans, sorts | Omega frozen-order reductions (`evidence/E1-CLOSURE/`), general reductions and prefix sums up to 2^28 (bar C3) | PARTIAL: scan chip PASS (`evidence/C3-SCAN/03-chip-20261022-a7d6463b.log`, `04-chip-20261024-f16b56a58.log`); no sort | | cuFFT, cuRAND | FFT, random numbers | none | MISSING | -| cuobjdump, nvdisasm | Read machine code back | Omega's own sm_121 disassembler (`build/sm121dis`); `nvdisasm` stays only as the reference it is checked against | PASS on a branch (bar C6) | +| cuobjdump, nvdisasm | Read machine code back | Omega's own sm_121 disassembler (`build/sm121dis`); `nvdisasm` stays only as the reference it is checked against | PASS, receipts on main (bar C6, `evidence/C6-DISASM/`) | | Nsight | Measure | Omega's own ceiling probes (115.14 TFLOPS tensor-core peak, 195.1 GB/s reads; `evidence/OWN30B-T3-TC-PEAK-BW-5faa0f70-20261013T2236Z/`) | PARTIAL: probes exist, no single tool | | CUDA samples, docs | Your first kernel | none yet (`runtime/r2-hello`, `runtime/r1-api` are unmerged branches) | MISSING | -| `nvidia.ko`, `nvidia-uvm.ko` | Kernel driver | not Omega: AIEN's own GB10 driver, L332 | MISSING | +| `nvidia.ko`, `nvidia-uvm.ko` | Kernel driver | not Omega: AIEN's own GB10 driver (aien-dev/omega-gpu-driver, building on aienux#441, L332); findings go upstream to Nova and nouveau | MISSING | | GSP firmware | Runs inside the GPU | stays NVIDIA's (signature-checked by the chip) | not replaceable | ### What is already true, with a receipt -The 35B model AIEN serves on the Spark runs on Omega with no NVIDIA user-space software at all. On 2026-10-21 the live server (port 18091, `--engine omega`) had only `libc`, `libm`, `libgcc_s` and the loader mapped: zero CUDA libraries. It held `/dev/nvidia0`, `/dev/nvidiactl` and `/dev/nvidia-uvm` open, which is the open kernel module and nothing above it. Receipt: `evidence/WHAT-OMEGA-IS-20261021/live-serve-no-cuda.txt` (binary sha256, mapped libraries, `ldd`, driver version, the commands used). +The 35B model AIEN served on the Spark is Qwen3.6-35B-A3B, a mixture-of-experts with about 3B of its 35B parameters active per token. It is served by our own C GPU stack, built inside the Omega project: the physics driver client, Omega's sm_121 encoder and register allocator, and the GPU kernels and runtime, all written in C. The Omega language does not reach the GPU yet (bar C1, below). That stack used no NVIDIA user-space software at all. On 2026-10-21 the live server (port 18091, `--engine omega`) had only `libc`, `libm`, `libgcc_s` and the loader mapped: zero CUDA libraries. It held `/dev/nvidia0`, `/dev/nvidiactl` and `/dev/nvidia-uvm` open, which is the open kernel module and nothing above it. Receipt: `evidence/WHAT-OMEGA-IS-20261021/live-serve-no-cuda.txt` (binary sha256, mapped libraries, `ldd`, driver version, the commands used). -So this sentence is true today: **Omega runs AIEN's models on the GB10 with no CUDA software: no libcuda, no cuBLAS, no nvcc.** +So this sentence has a receipt (2026-10-21): **AIEN's 35B model is served on the GB10 by our own C GPU stack, built in the Omega project, with no CUDA software: no libcuda, no cuBLAS, no nvcc.** The kernels are built from C, not from the Omega language. This one is not true yet: **"Omega replaces CUDA."** The language does not reach the GPU, and the toolkit has gaps a stranger would hit on day one. @@ -49,35 +51,58 @@ This one is not true yet: **"Omega replaces CUDA."** The language does not reach We say it when every row is PASS, each with a receipt pushed on the exact commit. No row is waived. -| Bar | Done when | Status (2026-10-24) | +| Bar | Done when | Status (receipt paths checked 2026-10-27) | | --- | --- | --- | -| **C1. The language reaches the GPU.** | Kernels written in Omegese compile through the IR and checker2 to sm_121 machine code and run on the GB10: vector add, a tiled GEMM and one decode-attention kernel. Their output matches a host reference bit for bit (or within a tolerance stated before the run), checker2 accepts every one, and a deliberately broken kernel is refused. At least one kernel of the live 35B decode path is then replaced by its Omegese version with identical golden tokens. | **BUILDING, chip FAIL** (2026-10-24): the kernel form (vector add, the 35B gate, tiled GEMM, decode attention) and the build to sm_121 code live on omega `omegese/gpu` a99d711c and `omegese/gpu-front` d1ac019e, nothing on main. The chip runs of 2026-10-22 (receipts unpushed when the worker died, carried with the fix) FAIL: vector add with short inputs stored 896 wrong words and reported trap status 0 (want 3); the gate kernel 939 wrong words; the GEMM launch latched (marker wait timed out); attention not run. The live 35B kernel swap has not started. | -| **C2. A stranger can run a kernel.** | From an empty folder, only the README commands build and run hello-GPU on the GB10, and the zero-CUDA gate (`aien-sovereign-core scripts/zero-cuda-gate.sh`) passes on the binary. The runtime API is written down and versioned (`docs/runtime/API.md`, manifest check with negative controls). | PARTIAL (2026-10-24): zero-CUDA gate and its negative self-test PASS (omega `runtime/r2-hello` 0f44b52b, `evidence/RUNTIME-R2-HELLO/`); a fresh checkout of that branch built and ran hello-GPU on the GB10 on 2026-10-22, exit 0, twice (receipt unpushed, carried with the rebase). Missing: the versioned API (`docs/runtime/API.md` + manifest check with negative controls, omega `runtime/r1-api`, unmerged), the run from main's README URL, and both on main. | -| **C3. General libraries.** | Any-shape GEMM in BF16 and FP8, both layouts, at least 200 shapes from 1 to 8192, every shape correct against a host reference, speed given as a fraction of the measured tensor-core ceiling. Reductions and prefix sums over lengths 1 to 2^28, bit-exact against the frozen-order host reference. | PARTIAL (2026-10-24): any-shape GEMM (omega `c3/gemm`) and reductions and prefix sums (omega `c3/reduce-scan`, contained in `c3/gemm`) are bit-exact in the warp simulator against the chip-measured tensor-core and arithmetic models. Chip: scan PASS, 8,665 checks over every n to 2048, 2^k-1/2^k/2^k+1 to 2^28 and 64 random lengths, on 2026-10-22 against `c3/gemm` a7d6463b in 38 s (receipt unpushed, carried); the 208-shape GEMM run and its speed fraction NOT RUN. | -| **C4. Streams and events.** | Two independent queues of the same work finish in under 0.75 of the sum of their solo times; an event wait orders two dependent jobs, checked by data, on the chip. | PARTIAL, control not red (2026-10-24): second queue and event wait (omega `c4/streams`, carried inside `c5/isolation`) PASS on host and simulator. Chip values run 2026-10-22 (`c5/isolation` f792cd1d): every Y right with the wait, but the negative control WITHOUT the wait was also right, in both barrier modes. Until that control goes red the event proof is not a proof (the two channels may not run concurrently). Overlap timing NOT RUN. | -| **C5. Sharing and recovery.** | Two processes on one GPU both get correct results, or the second gets a named refusal and the first is unharmed. A kernel that never ends is timed out and a correct launch then succeeds in the same process. | PARTIAL (2026-10-24): recovery after a timeout without restarting the process (omega `c5/isolation`): host PASS, platform simulator 16/16 with both recover cases, 11 of 11 broken copies caught, Linux platform on a simulated driver 8/8. Chip: NO RESULT (the 2026-10-22 run died with its worker before printing). The never-ending-kernel run touches the live server's GPU and waits for its owner's OK. | -| **C6. No NVIDIA tool in the loop.** | Omega's own sm_121 disassembler agrees with `nvdisasm` on every library kernel in `src/`, and every check that called `nvdisasm` calls ours. | PASS on omega `c6/disasm` 19eebe0e (`evidence/C6-DISASM/`): all 331 library kernels, 59,152 words, 0 differ from nvdisasm; three red decoders fail as they must. Not yet on main. Open before the row is final: the code generator changed after that receipt (436bf1df5), so the 331-kernel check is re-run on the rebased head; the head-size-128 attention listing on the branch exits 1 (14 failed) and is unexplained; and the clause "nothing calls nvdisasm" gets a mechanical gate (a decoy `nvdisasm` on PATH that logs any call) in the same change. | +| **C1. The language reaches the GPU.** | Kernels written in Omegese compile through the IR and checker2 to sm_121 machine code and run on the GB10: vector add, a tiled GEMM and one decode-attention kernel. Their output matches a host reference bit for bit (or within a tolerance stated before the run), checker2 accepts every one, and a deliberately broken kernel is refused. At least one kernel of the live 35B decode path is then replaced by its Omegese version with identical golden tokens. | **BUILDING, chip FAIL** (2026-10-24): the kernel form (vector add, the 35B gate, tiled GEMM, decode attention) and the build to sm_121 code live on omega `omegese/gpu` a99d711c and `omegese/gpu-front` d1ac019e, nothing on main. The chip runs of 2026-10-22 FAIL (logs recovered 2026-10-27: `evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/`). The non-mutant run on d1ac019e (`chip-green-after-close-fix.log`, 645 checks, 5 failed): vector add stored 996 wrong words; with short inputs it stored 896 wrong words and reported trap status 0 (want 3); the gate kernel stored 939 wrong words; one ops_f op was wrong. That run printed no failure for GEMM or attention, which is not a PASS either. The latched GEMM launch (marker wait timed out) and "attention not run" are from the mutant run (`chip-red-after-close-fix.log`), where failing is expected. The live 35B kernel swap has not started. | +| **C2. A stranger can run a kernel.** | From an empty folder, only the README commands build and run hello-GPU on the GB10, and the zero-CUDA gate (`aien-sovereign-core scripts/zero-cuda-gate.sh`) passes on the binary. The runtime API is written down and versioned (`docs/runtime/API.md`, manifest check with negative controls). | PARTIAL (2026-10-24): zero-CUDA gate and its negative self-test PASS (omega `runtime/r2-hello` 0f44b52b, `evidence/RUNTIME-R2-HELLO/zero-cuda-gate.log` on that branch, not on main); a fresh clone of that branch built and ran hello-GPU on the GB10 on 2026-10-22, exit 0, once (`evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/fresh-hello.log`). That clone used `git@github.com:aien-spark/omega.git` over SSH, not the README's public URL. Missing: the versioned API (`docs/runtime/API.md` + manifest check with negative controls, omega `runtime/r1-api`, unmerged), the run from main's README URL, and both on main. | +| **C3. General libraries.** | Any-shape GEMM in BF16 and FP8, both layouts, at least 200 shapes from 1 to 8192, every shape correct against a host reference, speed given as a fraction of the measured tensor-core ceiling. Reductions and prefix sums over lengths 1 to 2^28, bit-exact against the frozen-order host reference. | PARTIAL (2026-10-24): any-shape GEMM (omega `c3/gemm`, `evidence/C3-GEMM/`) and reductions and prefix sums (omega `c3/reduce-scan`, contained in `c3/gemm`, `evidence/C3-SCAN/`) are bit-exact in the warp simulator against the chip-measured tensor-core and arithmetic models. Chip: scan PASS, 8,665 checks over every n to 2048, 2^k-1/2^k/2^k+1 to 2^28 and 64 random lengths, on 2026-10-22 against `c3/gemm` a7d6463b in 38 s (`evidence/C3-SCAN/03-chip-20261022-a7d6463b.log`) and again on 2026-10-24 on the L386 train tip f16b56a58 (`evidence/C3-SCAN/04-chip-20261024-f16b56a58.log`); the 208-shape GEMM run and its speed fraction NOT RUN. | +| **C4. Streams and events.** | Two independent queues of the same work finish in under 0.75 of the sum of their solo times; an event wait orders two dependent jobs, checked by data, on the chip. | PARTIAL (2026-10-25): second queue and event wait (omega `c4/streams`, carried inside `c5/isolation`) PASS on host and simulator. Chip values run 2026-10-22 (`c5/isolation` f792cd1d, `evidence/C4-STREAMS/03-chip-values-20261022-f792cd1d.log`): the negative control WITHOUT the wait was not red, so no proof. Re-run 2026-10-25 after the driver fix (physics 048e5f5, `c5/isolation` 02db88d33, `evidence/C4-STREAMS/04-chip-values-20261025-048e5f5.log`): `C4 streams chip: PASS (8 checks)`; with the wait 0 of 3072 wrong, without it 3072 of 3072 wrong, so the control is red. The same log shows pair / (A + B) = 0.500 in both barrier modes and the serial red check at 1.000, but on a chip shared with other work; the overlap timing in an exclusive window is NOT RUN. | +| **C5. Sharing and recovery.** | Two processes on one GPU both get correct results, or the second gets a named refusal and the first is unharmed. A kernel that never ends is timed out and a correct launch then succeeds in the same process. | PARTIAL (2026-10-24): recovery after a timeout without restarting the process (omega `c5/isolation`, `evidence/C5-ISOLATION/`): host PASS, platform simulator 16/16 with both recover cases, 11 of 11 broken copies caught, Linux platform on a simulated driver 8/8. Chip: NO RESULT (`evidence/C5-ISOLATION/03-chip-values-20261022-f792cd1d.log` holds only the header; the run died with its worker before printing). The never-ending-kernel run touches the live server's GPU and waits for its owner's OK. | +| **C6. Our own disassembler in every check.** | Omega's own sm_121 disassembler agrees with `nvdisasm` on every library kernel in `src/`, and every check that called `nvdisasm` calls ours. | PASS, receipts on main (`evidence/C6-DISASM/`): on omega `c6/disasm` 19eebe0e all 331 library kernels, 59,152 words, 0 differ from nvdisasm; three red decoders fail as they must. Re-run 2026-10-24 on the L386 train tip after the code generator change (the `*-20261024.log` rows); the head-size-128 attention listing exits 0 there (`08-gpu_attention_test-hd128-20261024.log`, 107 checks). The clause "nothing calls nvdisasm" has a mechanical gate: `11-zero-nvdisasm-20261024.log` (decoy `nvdisasm` called 0 times, exit 0) and its red check `12-red-zero-nvdisasm-planted-calls-20261024.log` (exit 1). After the corpus producer repair (`13-corpus-producer-controls-20261025.log`): `14-test-sm121dis-20261025.log`, 402 kernels, 74,096 words, 0 differ; the red decoder fails all 402. `nvdisasm` stays the offline reference these checks are compared against. | ## 4. The rest of "Omega replaces everything" These are not part of the CUDA claim. They are the rest of what Omega is for, and each has its own bar. -- **No NVIDIA software at all.** Our own GB10 driver replaces `nvidia.ko` and `nvidia-uvm.ko` (L332): Omega's golden tokens identical on our driver and on NVIDIA's, with per-word timing. The GSP firmware stays, as above. +- **No NVIDIA software at all.** Aien builds and uses its own GB10 driver to replace `nvidia.ko` and `nvidia-uvm.ko` (aien-dev/omega-gpu-driver, lane OwnDriver, building on aienux#441; L332). The bar: Omega's golden tokens identical on our driver and on NVIDIA's, with per-word timing. GB10 facts we learn still go upstream to Nova and nouveau as findings. The GSP firmware stays, as above. - **The runtime written in Omega.** The GPU runtime and libraries are C today. The language rule (aien-architecture ADR 0024) keeps C only where hardware, boot, ABI or measurement justifies it, so the runtime moves into Omega once C1 makes that possible. - **The CPU.** The OSC and Omegese backends emit AArch64 machine code today (`src/compiler/osc_a64.c`). The live server is still a gcc and Rust build linked against glibc; it moves to Omega-compiled code as the language grows. -## 5. Performance: matching and then beating CUDA +## 5. Performance: what has been measured + +One DGX Spark GB10. The model is Qwen3.6-35B-A3B in FP8, a mixture-of-experts with about 3B of its 35B parameters active per word (token). It is served by our own C GPU stack (section 2), not by Omega-language kernels. Every number in this section is measured by us, with a receipt, and labelled as one of two kinds: + +- **Chip-only**: time on the GPU per decoded word. It leaves out reading the prompt, the HTTP door and scheduling. It is NOT an end-to-end speed and must not be set beside any end-to-end figure. +- **End to end**: requests sent to the server, timed from the first request out to the last reply in, prompt reading included. -Same machine (one DGX Spark GB10), same kind of model (a ~30B mixture-of-experts with about 3B active per word). Our numbers are measured by us, with receipts. Everyone else's are published by others and labelled that way, with their source; none of them has been re-measured here yet (bar P0). Their models are close relatives of ours, not identical: Qwen3-30B-A3B has no DeltaNet state, Qwen3.6-35B-A3B does. +No same-Spark head-to-head with vLLM, llama.cpp, TensorRT or any other CUDA stack exists yet. It is bar P0 below (lane HeadToHead). Until it is published, this document makes no claim that Omega is level with, ahead of or behind any other system. -| What | Omega today (Qwen3.6-35B-A3B, FP8) | Others on the same box (published by others) | Physical ceiling here | +### End to end + +| What | Measured | Conditions | Receipt | | --- | --- | --- | --- | -| One conversation, words per second | 41.7 to 49.8 (20.1 to 24.0 ms per word; L314 `evidence serve-combined/README.md`, L354 door 20.1 ms) | FP8: vLLM about 28 to 30 on this 35B (Tessera, June 2026), 44 on Qwen3-Coder-30B FP8 (Hellohal2064 vLLM build); llama.cpp 44.3 at Q8_0. 4-bit: llama.cpp 89.3 (Q4_K_M, DandinPower llama.cpp_bench), vLLM 77 to 81 (AWQ/NVFP4), up to 97 to 120 with NVFP4 + MTP (Tessera) | FP8 58.5 to 67 at the measured 207 to 237 GB/s; 4-bit experts and head 82 to 94; plus 4-bit trunk about 142 (`~/handoffs/2026-10-20-q36-ceiling-numbers.md`, L310) | -| Eight conversations at once, total words per second | 57.11 (N=8 stroke, sc `serve/q36-batch-v2` 9c62690a, calc:f67ae6c1) | vLLM 313 (Qwen3-30B-A3B, 8 concurrent, NVIDIA forum harness); 845 (Qwen3-Coder-30B AWQ, GPUwerk) | about 164 at 4k context with f32 state, more with bf16 state (ceiling notes) | -| Reading the prompt (prefill), words per second | 196.8 at 8k, 250 at 2k, 275.5 at 256 (L369, window 20261021T215012Z, omega `serve/q36-prefill-v2` 60ba3051) | llama.cpp about 2,000 to 2,500; vLLM 5,705 at 8k (GPUwerk, AWQ) | roughly 30,000 from the FP8 tensor rate (about 7 GFLOP per word at 237.5 TFLOPS; arithmetic, not measured); prefill is compute-bound | -| Extra kernel launch in a list | 24 to 31 us with wait-for-idle (`evidence/OWN30B-LAUNCH-COST-20261014T0120Z/`) | CUDA graphs: a few us per node (published) | 2.95 percent of a word today (efficiency review G1), so small now; it grows with batching | +| One conversation, words per second | 22.0 to 22.5 | N=1, 32 chat prompts, up to 128 words each, greedy, prompt read one word per beat, chip exclusive and quiet (window 20261021T141700Z-f7b5e0), 2 runs | aien-sovereign-core `serve/q36-batch-v2` 9c62690a [`evidence/q36-batch-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/9c62690a252ab1c0b75eb8933c550316b5c50d52/evidence/q36-batch-20261021) | +| N conversations at once, total words per second | N=8: 57.1. N=16: 62.4. N=32: 65.7 to 66.4 | same run | same (N=8 total 57.11, calc:f67ae6c1) | + +### Chip-only (not end to end) + +| What | Measured | Conditions | Receipt | +| --- | --- | --- | --- | +| Chip time per word, one conversation | 24.0 ms (41.7 words/s); 21.8 ms (45.9 words/s) with the exact two-pass head | median graph chip ms per word, single requests; the receipt says these are not quiet-measure receipts | aien-sovereign-core main f30eb963 `evidence/hum-exact-head/serve-combined/README.md` (L314) | +| Chip time per word, one request | 20.1 ms (49.75 words/s) | ONE request, 10 decoded words, decode only (its 1,274 ms prefill excluded), test server on port 18089, binary `bin-16b27643`, 2026-10-21 | `evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/` (L354; log recovered 2026-10-27) | +| Chip time per word, one conversation, the motor's stroke | 21.9 to 23.0 ms (43.5 to 45.7 words/s) | first-pass medians of `chip_ns_all_windows` over four prompts; server binary `bin-5b726818` per the receipt | aien-sovereign-core `serve/q36-batch-v2` 9c62690a [`evidence/motor-chip-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/9c62690a252ab1c0b75eb8933c550316b5c50d52/evidence/motor-chip-20261021) | +| Reading the prompt in chunks (prefill gate), words per second | 196.8 at 8k, 250 at 2k, 275.5 at 256 | prefill gate inside window 20261021T215012Z, not served through the door yet | omega `serve/q36-prefill-v2` 60ba3051; aien-sovereign-core `serve/q36-prefill-v2` f6f341ef [`evidence/q36-prefill-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/f6f341efc654263ce8a2812bfaef04e297c00808/evidence/q36-prefill-20261021) (L369) | +| Extra kernel launch in a list | 24 to 31 us with wait-for-idle | chip micro-benchmark | `evidence/OWN30B-LAUNCH-COST-20261014T0120Z/` | + +The launch cost's share of one word was given here as "2.95 percent (efficiency review G1)": log not in any repo, NOT_REPRODUCED; re-run needed. + +### Modeled ceilings (arithmetic, not measured) + +From the weight bytes per word in the safetensors headers and the measured 207 to 237 GB/s reads: one conversation at FP8 about 58.5 to 67 words/s; 4-bit experts and head 82.4 to 94.3. Eight conversations at once, about 164 at 4k context with f32 state. Source: `evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/` (L310; the 2026-10-20 note, recovered 2026-10-27). This section used to also give "about 142 with a 4-bit trunk" and "roughly 30,000 words/s prefill from the FP8 tensor rate"; neither is in that note, so both are dropped until recomputed with a recorded source. + +### Figures published by others (not measured here, not comparable to the chip-only rows) -Where we stand: at FP8 with one conversation we are level with or ahead of the published CUDA numbers. We are behind on three things: prompt reading (7 to 30 times), many conversations at once (5 to 15 times), and 4-bit weights (not yet live). All three are work, not physics: the ceilings above are far from reached. +These are other people's numbers for other builds, often other models (Qwen3-30B-A3B has no DeltaNet state; Qwen3.6-35B-A3B does) and other measurement methods. They are listed only to set the P0 work. None has been re-measured on this Spark. FP8, one conversation: vLLM about 28 to 30 on this 35B (Tessera, June 2026), 44 on Qwen3-Coder-30B FP8 (Hellohal2064 vLLM build); llama.cpp 44.3 at Q8_0. 4-bit, one conversation: llama.cpp 89.3 (Q4_K_M, DandinPower llama.cpp_bench), vLLM 77 to 81 (AWQ/NVFP4), up to 97 to 120 with NVFP4 + MTP (Tessera). Eight at once: vLLM 313 (Qwen3-30B-A3B, NVIDIA forum harness); 845 (Qwen3-Coder-30B AWQ, GPUwerk). Prefill: llama.cpp about 2,000 to 2,500; vLLM 5,705 at 8k (GPUwerk, AWQ). Launch: CUDA graphs, a few us per node. ### The performance bar @@ -91,14 +116,14 @@ Each row PASS needs our receipt and the other system measured by us on this Spar | **P3. Many conversations.** | Omega total words per second beats the best measured CUDA number at 8 and 32 conversations. Levers: grouped expert GEMM over the expert union, bf16 state (L313), continuous batching on the stroke (L312, L354). | | **P4. What CUDA stacks do not do.** | At least one measured win that comes from owning the whole path: one submission per word or a resident whole-model kernel (L272), zero-copy use of the shared memory, our own driver's launch path (L332). | -### Targets: the roof, not parity (Drake 2026-10-22: "Get us level or ahead for everything. Push this for the roof as high as you can go.") +### Targets (set 2026-10-22; goals, not results) -Parity with the best CUDA number is the floor. The target for each row is a fraction of this machine's own physical ceiling, set high enough to clear every published CUDA number by a wide margin. The same-model CUDA numbers from P0 replace the published ones as soon as they exist; if a measured CUDA number is above a target here, the target moves above it. +Drake set the direction on 2026-10-22: "Get us level or ahead for everything. Push this for the roof as high as you can go." Nothing in this table is measured or reached. The target for each row is a fraction of this machine's own modeled ceiling. The middle column is published by others for other builds and often other models; it is not a measurement on this Spark. Each target is checked only against P0 figures measured the same way on both sides (end to end against end to end, same model, same prompts). The same-model numbers from P0 replace the published ones as soon as they exist; if a measured number is above a target here, the target moves above it. | Row | Best CUDA number known (published by others) | Our target | Owner | | --- | --- | --- | --- | | One conversation, 8-bit | about 44 words/s | 60 (0.9 of the 8-bit ceiling) | L356, L314 | -| One conversation, best format | 97 to 120 (NVFP4 with MTP) | 150 or more: 4-bit experts, head and trunk in our own format (ceiling about 142) plus several words per pass (MTP, tree verify) | L355, L284 | +| One conversation, best format | 97 to 120 (NVFP4 with MTP) | 150 or more: 4-bit experts, head and trunk in our own format plus several words per pass (MTP, tree verify) | L355, L284 | | One request end to end, prompt included | n/a | within 10 percent of the decode figure for prompts up to 2k | L369, L375 | | 8 conversations at once | 313 to 845 | 0.8 of the per-N ceiling with bf16 state and 4-bit weights, and above the P0 figure for the same model | L354, L312, L313 | | 32 conversations at once | 1,679 (30B, AWQ) | above the P0 figure for the same model | L354, L312 | @@ -113,30 +138,30 @@ CUDA gives you kernels, memory and streams. It leaves the hard part to you: how - **The schedule**: one static table, built once from the model's structure before anything runs. It names which weight part lands in which buffer at which beat. A host proof checks it is complete, acyclic and collision-free, and that it has exactly the true dependency edges (buffer full before fire, layer before layer, word before word, release before refill) and no others. Nothing is decided while running. - **The movement engines**: the NVMe engine reads a beat's weight parts from disk and checks each one's fingerprint on arrival; the RAM engine copies a checked part into the buffer and checks it again. A part that fails a check stops the run. -- **The power engine**: Omega's own GPU kernels, firing on a buffer that is already full. A routed expert that is not in the buffer is a misfire, and the run fails closed. +- **The power engine**: the GPU kernels built in this project (C, encoded by Omega's sm_121 encoder), firing on a buffer that is already full. A routed expert that is not in the buffer is a misfire, and the run fails closed. - **The stroke**: N conversations fire on one read of the weights. Each conversation must produce exactly the words it produces alone. Design, every part and every receipt: [docs/speed/ENGINE.md](https://github.com/aien-dev/omega/blob/edd951976a0a8b199e63a1b55149680cf77033d0/docs/speed/ENGINE.md) (omega `feat/typewriter-engine`). Engine code: [`crates/aien-engine`](https://github.com/aien-dev/aien-sovereign-core/tree/d311394098afc3e09526c46d8c492173ff2c4933/crates/aien-engine) (`schedule.rs`, `movement.rs`, `piston.rs`, `timing.rs`; aien-sovereign-core `feat/typewriter-engine`). The 35B kernels the stroke fires: omega [`motor/serve`](https://github.com/aien-dev/omega/tree/881f43977aa4f6ed8842057bee2e6128649ae05f). -### Live now +### Served on 2026-10-21 -Port 18091 on the Spark serves Qwen3.6-35B-A3B on the motor's stroke (`AIEN_Q36_STROKE=1`, binary `bin-16b0e6f8`), with zero CUDA libraries loaded (section 2 receipt). +On 2026-10-21 port 18091 on the Spark served Qwen3.6-35B-A3B on the motor's stroke (`AIEN_Q36_STROKE=1`, binary `bin-16b0e6f8`), with zero CUDA libraries loaded (section 2 receipt). These are the receipts of that time, not a statement about the server today. | What | Measured | Receipt | | --- | --- | --- | -| Total words per second, N conversations at once (32 mixed chat prompts, 128 words each, prompt reading included, chip exclusive and quiet, 2 runs) | N=1: 22.0 to 22.5. N=8: 57.1. N=16: 62.4. N=32: 65.7 to 66.4 | aien-sovereign-core [`evidence/q36-batch-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/9c62690a252ab1c0b75eb8933c550316b5c50d52/evidence/q36-batch-20261021) | +| Total words per second end to end, N conversations at once (32 mixed chat prompts, up to 128 words each, prompt reading included, chip exclusive and quiet, 2 runs) | N=1: 22.0 to 22.5. N=8: 57.1. N=16: 62.4. N=32: 65.7 to 66.4 | aien-sovereign-core `serve/q36-batch-v2` 9c62690a [`evidence/q36-batch-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/9c62690a252ab1c0b75eb8933c550316b5c50d52/evidence/q36-batch-20261021) | | The stroke against the same conversations taken in turn | 1.80x at N=8, 1.98x at N=16, 1.88x at N=32; at N=1, 0.98x (inside the run-to-run spread) | same | -| Chip time per word, one conversation | 21.9 to 23.0 ms (43.5 to 45.7 words per second), 0.67 of the 63.25 ceiling at today's bytes | aien-sovereign-core `evidence/motor-chip-20261021` (ENGINE.md section F) | +| Chip time per word, one conversation (chip-only, not end to end) | 21.9 to 23.0 ms (43.5 to 45.7 words per second), 0.67 of the modeled 63.25 ceiling at today's bytes | aien-sovereign-core `serve/q36-batch-v2` 9c62690a `evidence/motor-chip-20261021` (ENGINE.md section F) | | Same words as the exact host reference | Gate 1: 32 of 32 words on three prompts, 31 of 32 on the fourth with its one flip inside a band written before the run; the mutant (shared expert dropped) fails. Gate 2 through the HTTP door: 24 of 24 ids; the mutant server fails | same | | Movement engines alone, 35B layer beats | 12 of 12 configurations: 0 late beats, 0 misfires over 1,600 beats each; best beat 7.0 ms for 25.2 MB, median wait between fuel and fire 21 us | omega `evidence/engine/35b-engines-20261020T2349Z` (ENGINE.md section C) | | Whole 35B fed from the engines' buffers (host) | 32 of 32 words equal to the reference, 1,280 beats, 0 misfires | omega `evidence/engine/35b-host-20261021T0025Z` (ENGINE.md section B) | -The one-conversation figure in section 5 (41.7 to 49.8) is chip time per word. Through the door with the prompt read word by word, a single request today gets about 22 words per second end to end. Faster prompt reading (below) is what closes that gap. +The chip-only figures in section 5 (41.7 to 49.75 words per second) are GPU time per decoded word, not end-to-end speed. Through the door, with the prompt read word by word, one request got about 22 words per second end to end (22.0 to 22.5, above). Faster prompt reading (below) is what closes that gap. -### Ready, not yet live +### Built, not served -- **Prompt reading in chunks**: 275.5, 250.0 and 196.8 words per second at 256, 2k and 8k prompts against 49.7, 48.6 and 45.3 word by word (5.5x, 5.1x, 4.3x), output bit-identical at all three lengths. omega `serve/q36-prefill-v2` 60ba3051, aien-sovereign-core `serve/q36-prefill-v2` [`evidence/q36-prefill-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/f6f341efc654263ce8a2812bfaef04e297c00808/evidence/q36-prefill-20261021). -- **Exact two-pass word scoring**: 21.8 against 24.0 ms per word, served words identical (L314). +- **Prompt reading in chunks** (chip-only prefill gate): 275.5, 250.0 and 196.8 words per second at 256, 2k and 8k prompts against 49.7, 48.6 and 45.3 word by word (5.5x, 5.1x, 4.3x), output bit-identical at all three lengths. omega `serve/q36-prefill-v2` 60ba3051, aien-sovereign-core `serve/q36-prefill-v2` [`evidence/q36-prefill-20261021`](https://github.com/aien-dev/aien-sovereign-core/tree/f6f341efc654263ce8a2812bfaef04e297c00808/evidence/q36-prefill-20261021). +- **Exact two-pass word scoring**: 21.8 against 24.0 ms chip time per word (chip-only), served words identical (L314; aien-sovereign-core main f30eb963 `evidence/hum-exact-head/serve-combined/README.md`). ### Not done, said plainly diff --git a/docs/ROADMAP-1.0.md b/docs/ROADMAP-1.0.md index cc65df38c..44e10c938 100644 --- a/docs/ROADMAP-1.0.md +++ b/docs/ROADMAP-1.0.md @@ -293,6 +293,7 @@ Acceptance: | AArch64 Linux static ELF (program and function mode) | MERGED; host EXERCISED by `OMEGA-SEED` | QUALIFIED by RM1's full gate at the release commit | | WebAssembly MVP via OSC IR v1 (`irwasm`) | MERGED, scalar subset; host EXERCISED by authors | Gate wired (RM1); scope decision: stay scalar-only for 1.0, or add linear memory, text and globals with IR v2+ | | SPIR-V 1.0 OpenCL Kernel via OSC IR v1 (`irspirv`) | IMPLEMENTED and CPU EXERCISED in [#804](https://github.com/aien-dev/omega-mv/pull/804); [ABI, parity and toolchain](SPIRV.md) | Standalone `seed/spirv/gate-irspirv.sh`: full irwasm scalar corpus, exact trap/result parity on PoCL CPU, validator, determinism, mutant and refusals. Manifest wiring needs operator authorization; GPU and DPC++ integration NOT_RUN. | +| StableHLO MLIR text via OSC IR v1/v7 (`irstablehlo`, Google TPU path) | IMPLEMENTED; EXERCISED on IREE 3.13 llvm-cpu and XLA CPU PJRT (jaxlib 0.12.0.1) interop oracles, see [seed/stablehlo](../seed/stablehlo/README.md) | Standalone `seed/stablehlo/gate-irstablehlo.sh`: elementwise one-block functions, exact results on both oracles, Omega-native integer cross-check, wrong-op, wrong-expected, malformed-module and refusal controls. Signed overflow trap NOT preserved. TPU (closed libtpu) NOT_RUN. | | x86-64 Linux static ELF | DRAFT integration pending implementation/evidence on canonical base `6999fa9e6`, using historical `7eca2ac3f`; [design and unsupported paths](X86-LINUX.md) | Published PR; default AArch64 output byte-identical (C2 manifest); full existing fixture differential with equal trap codes; independent objdump oracle and wrong-encoding mutants; all NOT_RUN for this draft; QEMU labelled EMULATED, physical x86 NOT_RUN unless tested | | x86-64 UEFI PE32+ | Historical implementation in `7eca2ac3f`; removed from the Linux-only FR-9 draft | Outside this integration; separate firmware/PE32+ acceptance and evidence required; Linux execution does not establish firmware or physical x86 qualification | | RISC-V RV64GC (#630), other ISAs (#629, #628) | PROPOSED | Out of 1.0 unless a decision adds it | diff --git a/evidence/IRSTABLEHLO-20261026/gate.log b/evidence/IRSTABLEHLO-20261026/gate.log new file mode 100644 index 000000000..3d8224597 --- /dev/null +++ b/evidence/IRSTABLEHLO-20261026/gate.log @@ -0,0 +1,53 @@ +SOURCE 70a057475bb51c4f9bd254bfcbe097c6f142cc32 +COMPILER 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f +ORACLE iree-compile 3.13.0rc20261016 @ 89ece87b89852100c0a4ac3d515e14842d090967 +ORACLE iree-run-module 06ad551b3fd3e1014885cf8134db79d2544e5b290eeb36d10126a3f32af4bb5d +ORACLE pjrt jax 0.12.0.1 jaxlib 0.12.0.1 +Linux aarch64 +PASS case-1-vaddi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-2-vaddu32 ui32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-3-vaddi64 i64 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-4-madi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-5-biasi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-6-vaddf32 f32 deterministic, IREE exact match, PJRT bitwise match, native NOT_RUN (omc ir has no float words at this pin) +PASS case-7-vaddf64 f64 deterministic, IREE exact match, PJRT bitwise match, native NOT_RUN (omc ir has no float words at this pin) +PASS negative wrong op (add->subtract) i32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong op (add->multiply) f32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong expected (element 0 = 1) i32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong expected (element 4 one ulp up) f32: IREE [FAILED], PJRT MISMATCH +PASS negative malformed (closing brace dropped): iree-compile and PJRT refused +PASS negative malformed (unknown op stablehlo.addx): iree-compile and PJRT refused +PASS negative malformed (return type f32 vs i32 value): iree-compile and PJRT refused +DIVERGENCE signed overflow: Omega native exit 101 (trap); IREE and PJRT return -2147483648 (StableHLO: implementation-defined) +PASS refusal integer div -> UNSUPPORTED_OP (exit 24) +PASS refusal integer shl -> UNSUPPORTED_OP (exit 24) +PASS refusal branches -> UNSUPPORTED_OP (exit 24) +PASS refusal mixed element types -> UNSUPPORTED_TAG (exit 25) +PASS refusal bool result -> UNSUPPORTED_TAG (exit 25) +PASS refusal f32 tag in wire v1 -> UNSUPPORTED_TAG (exit 25) +PASS refusal unknown function -> NO_FUNCTION (exit 30) +PASS refusal N zero -> USAGE (exit 29) +PASS refusal N leading zero -> USAGE (exit 29) +PASS refusal N above 16777216 -> USAGE (exit 29) +PASS refusal N not decimal -> USAGE (exit 29) +PASS refusal missing function argument -> USAGE (exit 29) +PASS refusal bad magic -> MAGIC (exit 20) +PASS refusal wire version 2 -> VERSION (exit 21) +PASS refusal truncated -> TRUNCATED (exit 22) +PASS refusal trailing byte -> TRAILING (exit 27) +SHA256 a6834f3d159acb747fa1fb6ff32555c75943efc51ed290da0c4d9fbadef926f1 build/seed/stablehlo/irstablehlo +SHA256 d7c398cbae781009df96bb6c165de20e33183d09ad03b4b1dbf854e7698b2a4f build/seed/stablehlo/case-1-vaddi32.again.mlir +SHA256 d7c398cbae781009df96bb6c165de20e33183d09ad03b4b1dbf854e7698b2a4f build/seed/stablehlo/case-1-vaddi32.mlir +SHA256 745f25fa09e9159b60a37aee3ee8a58433b59b15b4fa0c344c4e27d90348ab50 build/seed/stablehlo/case-2-vaddu32.again.mlir +SHA256 745f25fa09e9159b60a37aee3ee8a58433b59b15b4fa0c344c4e27d90348ab50 build/seed/stablehlo/case-2-vaddu32.mlir +SHA256 7dfd7e028434d7cdd7d71e95918568c3345df2db836399aa0efd7ff87c992e8d build/seed/stablehlo/case-3-vaddi64.again.mlir +SHA256 7dfd7e028434d7cdd7d71e95918568c3345df2db836399aa0efd7ff87c992e8d build/seed/stablehlo/case-3-vaddi64.mlir +SHA256 44cce882a97aa3a2a3b50af4ea880acfddee00b0b59541708421d75cf5fb3cb0 build/seed/stablehlo/case-4-madi32.again.mlir +SHA256 44cce882a97aa3a2a3b50af4ea880acfddee00b0b59541708421d75cf5fb3cb0 build/seed/stablehlo/case-4-madi32.mlir +SHA256 d1df8369e3eabcb950cf5ee2bcf718780b784d88147a71a777ba0cbac39242f8 build/seed/stablehlo/case-5-biasi32.again.mlir +SHA256 d1df8369e3eabcb950cf5ee2bcf718780b784d88147a71a777ba0cbac39242f8 build/seed/stablehlo/case-5-biasi32.mlir +SHA256 b070166afba5c9f4b8b72e5de47e584f9b3594f05725192887ddec76a72c0126 build/seed/stablehlo/case-6-vaddf32.again.mlir +SHA256 b070166afba5c9f4b8b72e5de47e584f9b3594f05725192887ddec76a72c0126 build/seed/stablehlo/case-6-vaddf32.mlir +SHA256 ed454c24cab4a2bd3b74ebcf055169f9cb81a925462c7327f415a9678ecaf0e8 build/seed/stablehlo/case-7-vaddf64.again.mlir +SHA256 ed454c24cab4a2bd3b74ebcf055169f9cb81a925462c7327f415a9678ecaf0e8 build/seed/stablehlo/case-7-vaddf64.mlir +PASS irstablehlo: 7 cases on two interop oracles (not Omega-native, not hardware), 23 negatives caught diff --git a/evidence/IRSTABLEHLO-20261026/receipt.log b/evidence/IRSTABLEHLO-20261026/receipt.log new file mode 100644 index 000000000..ceb1c9230 --- /dev/null +++ b/evidence/IRSTABLEHLO-20261026/receipt.log @@ -0,0 +1,19 @@ +Source revision exercised: 70a057475bb51c4f9bd254bfcbe097c6f142cc32 +Platform: Linux aarch64 (DGX Spark host CPU; GPU not used). +Command: IREE_COMPILE=/bin/iree-compile IREE_RUN=/bin/iree-run-module PYTHON=/bin/python nice -n 19 sh seed/stablehlo/gate-irstablehlo.sh +Observed exit: 0 +Full output: gate.log +Observed gate verdict: PASS irstablehlo: 7 cases on two interop oracles (not Omega-native, not hardware), 23 negatives caught + +Oracles (interop oracle, not Omega-native; they read the Omega-written module, never generate it): +iree-base-compiler 3.13.0 wheel sha256 230aec9b5d63c49f3f1ba228c35a7ce950075ce7b7780b786c85fa6fb0be3dbb +iree-base-runtime 3.13.0 wheel sha256 2a46a517c7dbdaa8701f9ee324dd94089af51a8251f36bd689949ee37e30d1d1 +jaxlib 0.12.0.1 wheel sha256 40812201c3bcd4cb104b88f71f58fec4cbd0c32ba90e5c92b3fa8f40819f6774 +jax 0.12.0.1 wheel sha256 e9dfd256ba090259b10f97f0755d4fc92535b8cb38c0a40df6488a8c8a7dd8ae +numpy 2.5.4 wheel sha256 fe4d21ab149f15e4e6043dfb0de87e6e5f34ac176cde83060e9802981fca2ac2 + +Determinism: each module is translated twice per run (cmp); a second full run of the +gate (before this commit, same translator source) printed identical SHA256 lines. +Expected vectors: Wolfram Language evaluator, 2026-10-26 (integer wrap/fit checks; f32/f64 +round-to-nearest-even of each sum; decimal round-trip of every float input and expected value). +Evidence class: HOST interop oracle. TPU: NOT_RUN (libtpu is closed and x86_64-only; no TPU VM). diff --git a/evidence/IRSTABLEHLO-20261026/rerun-c1e19133.log b/evidence/IRSTABLEHLO-20261026/rerun-c1e19133.log new file mode 100644 index 000000000..629e216e6 --- /dev/null +++ b/evidence/IRSTABLEHLO-20261026/rerun-c1e19133.log @@ -0,0 +1,54 @@ +Rerun at c1e1913379009f086e336de8fa3d0a138ca4010d (PJRT oracle platform made selectable; gate pins cpu). Same command. Observed exit: 0 +SOURCE c1e1913379009f086e336de8fa3d0a138ca4010d +COMPILER 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f +ORACLE iree-compile 3.13.0rc20261016 @ 89ece87b89852100c0a4ac3d515e14842d090967 +ORACLE iree-run-module 06ad551b3fd3e1014885cf8134db79d2544e5b290eeb36d10126a3f32af4bb5d +ORACLE pjrt jax 0.12.0.1 jaxlib 0.12.0.1 +Linux aarch64 +PASS case-1-vaddi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-2-vaddu32 ui32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-3-vaddi64 i64 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-4-madi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-5-biasi32 i32 deterministic, IREE exact match, PJRT bitwise match, native +PASS case-6-vaddf32 f32 deterministic, IREE exact match, PJRT bitwise match, native NOT_RUN (omc ir has no float words at this pin) +PASS case-7-vaddf64 f64 deterministic, IREE exact match, PJRT bitwise match, native NOT_RUN (omc ir has no float words at this pin) +PASS negative wrong op (add->subtract) i32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong op (add->multiply) f32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong expected (element 0 = 1) i32: IREE [FAILED], PJRT MISMATCH +PASS negative wrong expected (element 4 one ulp up) f32: IREE [FAILED], PJRT MISMATCH +PASS negative malformed (closing brace dropped): iree-compile and PJRT refused +PASS negative malformed (unknown op stablehlo.addx): iree-compile and PJRT refused +PASS negative malformed (return type f32 vs i32 value): iree-compile and PJRT refused +DIVERGENCE signed overflow: Omega native exit 101 (trap); IREE and PJRT return -2147483648 (StableHLO: implementation-defined) +PASS refusal integer div -> UNSUPPORTED_OP (exit 24) +PASS refusal integer shl -> UNSUPPORTED_OP (exit 24) +PASS refusal branches -> UNSUPPORTED_OP (exit 24) +PASS refusal mixed element types -> UNSUPPORTED_TAG (exit 25) +PASS refusal bool result -> UNSUPPORTED_TAG (exit 25) +PASS refusal f32 tag in wire v1 -> UNSUPPORTED_TAG (exit 25) +PASS refusal unknown function -> NO_FUNCTION (exit 30) +PASS refusal N zero -> USAGE (exit 29) +PASS refusal N leading zero -> USAGE (exit 29) +PASS refusal N above 16777216 -> USAGE (exit 29) +PASS refusal N not decimal -> USAGE (exit 29) +PASS refusal missing function argument -> USAGE (exit 29) +PASS refusal bad magic -> MAGIC (exit 20) +PASS refusal wire version 2 -> VERSION (exit 21) +PASS refusal truncated -> TRUNCATED (exit 22) +PASS refusal trailing byte -> TRAILING (exit 27) +SHA256 a6834f3d159acb747fa1fb6ff32555c75943efc51ed290da0c4d9fbadef926f1 build/seed/stablehlo/irstablehlo +SHA256 d7c398cbae781009df96bb6c165de20e33183d09ad03b4b1dbf854e7698b2a4f build/seed/stablehlo/case-1-vaddi32.again.mlir +SHA256 d7c398cbae781009df96bb6c165de20e33183d09ad03b4b1dbf854e7698b2a4f build/seed/stablehlo/case-1-vaddi32.mlir +SHA256 745f25fa09e9159b60a37aee3ee8a58433b59b15b4fa0c344c4e27d90348ab50 build/seed/stablehlo/case-2-vaddu32.again.mlir +SHA256 745f25fa09e9159b60a37aee3ee8a58433b59b15b4fa0c344c4e27d90348ab50 build/seed/stablehlo/case-2-vaddu32.mlir +SHA256 7dfd7e028434d7cdd7d71e95918568c3345df2db836399aa0efd7ff87c992e8d build/seed/stablehlo/case-3-vaddi64.again.mlir +SHA256 7dfd7e028434d7cdd7d71e95918568c3345df2db836399aa0efd7ff87c992e8d build/seed/stablehlo/case-3-vaddi64.mlir +SHA256 44cce882a97aa3a2a3b50af4ea880acfddee00b0b59541708421d75cf5fb3cb0 build/seed/stablehlo/case-4-madi32.again.mlir +SHA256 44cce882a97aa3a2a3b50af4ea880acfddee00b0b59541708421d75cf5fb3cb0 build/seed/stablehlo/case-4-madi32.mlir +SHA256 d1df8369e3eabcb950cf5ee2bcf718780b784d88147a71a777ba0cbac39242f8 build/seed/stablehlo/case-5-biasi32.again.mlir +SHA256 d1df8369e3eabcb950cf5ee2bcf718780b784d88147a71a777ba0cbac39242f8 build/seed/stablehlo/case-5-biasi32.mlir +SHA256 b070166afba5c9f4b8b72e5de47e584f9b3594f05725192887ddec76a72c0126 build/seed/stablehlo/case-6-vaddf32.again.mlir +SHA256 b070166afba5c9f4b8b72e5de47e584f9b3594f05725192887ddec76a72c0126 build/seed/stablehlo/case-6-vaddf32.mlir +SHA256 ed454c24cab4a2bd3b74ebcf055169f9cb81a925462c7327f415a9678ecaf0e8 build/seed/stablehlo/case-7-vaddf64.again.mlir +SHA256 ed454c24cab4a2bd3b74ebcf055169f9cb81a925462c7327f415a9678ecaf0e8 build/seed/stablehlo/case-7-vaddf64.mlir +PASS irstablehlo: 7 cases on two interop oracles (not Omega-native, not hardware), 23 negatives caught diff --git a/evidence/RECEIPTS-RECOVERED-20261027/README.md b/evidence/RECEIPTS-RECOVERED-20261027/README.md new file mode 100644 index 000000000..5ed2f8e95 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/README.md @@ -0,0 +1,49 @@ +# Receipts recovered on 2026-10-27 + +`docs/OMEGA.md` cited several runs whose logs were in no repository ("receipt unpushed, carried with the rebase") or whose only source was a path on the DGX Spark. Every file in this folder is a byte copy of a file found on the Spark on 2026-10-27, with no edits. Each subfolder has a `SHA256SUMS` computed with `sha256sum` on the copied bytes. The copies were made with `cp -p`, so the file mtimes are the originals (the one exception is the excerpt in `l354-door-one-row-20261021/`, see below). + +Nothing here was re-run. These are the original logs of the original runs, with what they do and do not show. + +## c1-omegese-gpu-front-chip-20261022 (bar C1) + +- Original path: `~/handoffs/evidence-L386-chip-20261022/omega-omegese-gpu-front/`. That folder's `SOURCES.txt` (copied here as `SOURCES-evidence-L386-chip-20261022.txt`) says the logs came from worktree `omega-omegese-gpu-front`, branch `omegese/gpu-front`, head d1ac019ef604982d3dd3456b8d339ab3b78aa1b6, copied 2026-10-24T22:56:30Z. Branch `omegese/gpu-front` d1ac019e does not contain these logs. +- Run: 2026-10-22, 07:03Z to 07:05Z UTC (mtimes 02:03:32 to 02:05:51 -0500). + +| File | Commit, binary | Verbatim final line | What it shows | +| --- | --- | --- | --- | +| `build-host.log` | 3aafd8a8 | `EXIT_CODE=0` | host suite `test_osc_gpu: 1308 checks, 0 failed` | +| `chip-red.log` | 3aafd8a8, binary b5c0674a... | `EXIT_CODE=143 (expected 1 with value mismatches)` | mutant run before the close fix; killed, no verdict | +| `chip-red-deadlock.txt` | | `ptrace: Inappropriate ioctl for device.` | the attempt to attach a debugger to the hung mutant run | +| `chip-red-deadlock-repro.log` | | `EXIT_CODE=124` | the hang reproduced under a 10 s timeout | +| `rebuild-close.log` | | `EXIT_CODE=0` | rebuild after the close fix | +| `chip-red-after-close-fix.log` | mutant 1 | `EXIT_CODE=1` | `643 checks, 14 failed`; includes `FAIL: gemm: chip launch -2: gemm launch: marker wait timed out (latched)` and `FAIL: attn: not run, an earlier chip failure` | +| `chip-green-after-close-fix.log` | d1ac019e, binary cb74c2ba... | `EXIT_CODE=1` | mutant 0: `645 checks, 5 failed`: ops_f op 8 (1 wrong), vadd 996 wrong words, vadd short inputs 896 wrong words, vadd short inputs status 0 (want 3), gate 939 wrong words. om_gemm and om_attn print no failure line in this run | + +Correction to `docs/OMEGA.md` (bar C1, status 2026-10-24): the latched GEMM launch and "attention not run" come from the mutant run (`chip-red-after-close-fix.log`), where a failure is the expected result. The non-mutant run (`chip-green-after-close-fix.log`) failed on vector add, the gate kernel and one ops_f op. It printed no failure for om_gemm or om_attn. The log does not list which checks those two kernels ran, so this is not a GEMM or attention PASS. Bar C1 stays FAIL. + +## c2-r2-hello-fresh-checkout-20261022 (bar C2) + +- Original path: `~/handoffs/evidence-L386-chip-20261022/omega-runtime-r2-hello/fresh-hello.log`, mtime 2026-10-22 02:06:27 -0500. Source worktree `omega-runtime-r2-hello`, branch `runtime/r2-hello`, head 0f44b52bf43cbd21241ad269d5c21493c5863ffc. +- Run: 2026-10-22T07:06:05Z, a fresh clone in `/tmp`, commit 0f44b52b, `make hello-gpu`. +- Verbatim final line: `EXIT_CODE=0`. The result lines: `checked 1048576 of 1048576 elements: 0 wrong, 0 never written`, `PASS`, `# fresh-checkout-hello exit code: 0`. + +Two corrections to `docs/OMEGA.md` (bar C2): +- The log records ONE run, not two. Lines 100 to 104 repeat the tail of the same output (line 100 starts mid-sentence); they are not a second run. +- The clone URL was `git@github.com:aien-spark/omega.git` (SSH, an authenticated account), not the README's `https://github.com/aien-dev/omega-mv`. So this is not yet "only the README commands from an empty folder". + +## l354-door-one-row-20261021 (section 5, one-conversation figure "20.1 ms") + +- Original path: `~/.local/state/aien-q36/batch-18089.log`, the log of a test server (port 18089) started by `serve-batch.sh` (aien-sovereign-core `serve/q36-batch-v2` 9c62690a, `evidence/q36-batch-20261021/serve-batch.sh`). Full file: 349,359 bytes, mtime 2026-10-21 10:06:22 -0500, sha256 9f2f1c9fbff24f6a45043947b3bfcac9686e708f0b3b931690e8e95e21cb09d1. It holds nine runs. +- `batch-18089-lines-1-114.log` is lines 1 to 114 of that file (`sed -n 1,114p`), the whole first run: `start batch door real8 (bin-16b27643, 8 slots, ctx 2048, swap=none)` at 2026-10-21T12:52:02Z. Its mtime is the time of the excerpt, not of the run. +- Verbatim final line: `aien-serve-http: shutdown complete in 0 ms`. +- The figure OMEGA.md cites is line 110: `qwen36-batch: spell over: 14 beats, 73 steps, 73 row tokens (10 decoded), 20.1 ms/step wall, chip 20.1 ms/step, spell 1.5 s`, and line 111, `prompt 63 tok, reply 10 tok, ... decode 201 ms (49.75 tok/s)`. That is one request with 10 decoded tokens, decode only (the 1,274 ms prefill is excluded), on a shared chip. It is not an end-to-end figure and not a quiet-window measurement. + +## q36-ceiling-notes-20261020 (section 5, "Physical ceiling here" column) + +- Original path: `~/handoffs/2026-10-20-q36-ceiling-numbers.md`, mtime 2026-10-20 17:06:37 -0500, 26 lines. +- These are MODELED numbers (bytes per token from the safetensors headers, divided into the measured 207 to 237 GB/s), not a run. The note says the arithmetic was checked in Wolfram by the coordinator on 2026-10-20; the calculation records themselves are not in this file. +- Verbatim final line: `What this means for the engine: past about 8 heads the DeltaNet state is the biggest mover of bytes. Levers it names: state in bf16 (measure the drift), and candidate heads on ONE sequence (MTP / tree verify) read and write the state once for k tokens, so they amortize the state as well as the weights; independent sequences do not.` + +## Not found + +- "2.95 percent of a word (efficiency review G1)", cited in `docs/OMEGA.md` section 5: no file on the Spark or in any repository contains it, except copies of `docs/OMEGA.md`. NOT_REPRODUCED; re-run needed. diff --git a/evidence/RECEIPTS-RECOVERED-20261027/SHA256SUMS b/evidence/RECEIPTS-RECOVERED-20261027/SHA256SUMS new file mode 100644 index 000000000..1fa42314a --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/SHA256SUMS @@ -0,0 +1,2 @@ +ee9b69ccf237bd0d2445f29fdcf7fb6b6b755400ddda52a1e4a2079949734f10 README.md +8dbc26a2f68512a2f0b393c904d3473199d7d0e0e8a444915e92a6ee547e16e1 SOURCES-evidence-L386-chip-20261022.txt diff --git a/evidence/RECEIPTS-RECOVERED-20261027/SOURCES-evidence-L386-chip-20261022.txt b/evidence/RECEIPTS-RECOVERED-20261027/SOURCES-evidence-L386-chip-20261022.txt new file mode 100644 index 000000000..c9e33caac --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/SOURCES-evidence-L386-chip-20261022.txt @@ -0,0 +1,4 @@ +worktree=omega-c3-scan branch=c3/gemm head=a7d6463b9df4485484e207f11fb7802d09aed627 copied=2026-10-24T22:56:30Z +worktree=omega-c5 branch=c5/isolation head=f792cd1d35b0e9c191647518c3be651a8d86dc21 copied=2026-10-24T22:56:30Z +worktree=omega-omegese-gpu-front branch=omegese/gpu-front head=d1ac019ef604982d3dd3456b8d339ab3b78aa1b6 copied=2026-10-24T22:56:30Z +worktree=omega-runtime-r2-hello branch=runtime/r2-hello head=0f44b52bf43cbd21241ad269d5c21493c5863ffc copied=2026-10-24T22:56:30Z diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/SHA256SUMS b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/SHA256SUMS new file mode 100644 index 000000000..70419cb36 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/SHA256SUMS @@ -0,0 +1,7 @@ +2e11ee2d75a49c210fd9ea9925179c4c6d2d40a9c60347c2e408d0b17b6c185b build-host.log +5bd86d0c15464603eab53de5377cac88eafa4eeeeb7eece51c6851af8f959abc chip-green-after-close-fix.log +801f9a44a8bf93f87ea2f22dc1da2d1833adc396fb55fac6ed2cf2b6963a8daa chip-red-after-close-fix.log +8d17f4d9ecaee28297578b4541a1b3051d6e7cc89f74fb08b8ced5371a703b96 chip-red-deadlock-repro.log +734ba920970bc38353a56fc79116cc8fd0cc21c5e1334e0d2b71d501ae53bc32 chip-red-deadlock.txt +c2b94553961269033b84465686d23e1504835128a1b0dbd347b75334d8e5e3aa chip-red.log +fe24a304dfbf386ad0933877dd624c0ac2d927d179962b10708c5a792f5ff7a1 rebuild-close.log diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/build-host.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/build-host.log new file mode 100644 index 000000000..875b2110f --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/build-host.log @@ -0,0 +1,40 @@ +Thu Oct 22 07:03:23 UTC 2026 +3aafd8a887d091fc239bd3aa43723571667f8720 +COMMAND: quiet-build make -j4 PHYSICS_DIR=../physics-l386 test-osc-gpu build/osc_gpu/test_osc_gpu_chip +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -ffp-contract=off -Isrc -Isrc/compiler -Itests -o build/osc_gpu/test_osc_gpu tests/osc_gpu/test_osc_gpu.c src/omega_osc_gpu.c src/omega_blackwell_codegen.c src/omega_blackwell_matmul.c src/omega_osc_launch_args.c src/compiler/osc_a64.c src/compiler/osc_alloc.c src/compiler/osc_cg.c src/compiler/osc_check.c src/compiler/osc_diag.c src/compiler/osc_front.c src/compiler/osc_interp.c src/compiler/osc_ir.c src/compiler/osc_lex.c src/compiler/osc_lower.c src/compiler/osc_native.c src/compiler/osc_parse.c src/compiler/osc_rt.c src/sha256.c -lm +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -o build/omegese/omegese tools/omegese/omegese.c +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -Isrc -Isrc/compiler -o build/omega_emit/omega_emit tools/omega_emit/omega_emit.c src/compiler/osc_a64.c src/compiler/osc_alloc.c src/compiler/osc_cg.c src/compiler/osc_check.c src/compiler/osc_diag.c src/compiler/osc_front.c src/compiler/osc_interp.c src/compiler/osc_ir.c src/compiler/osc_lex.c src/compiler/osc_lower.c src/compiler/osc_native.c src/compiler/osc_parse.c src/compiler/osc_rt.c src/sha256.c +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -Isrc -Isrc/checker2 -DC2_SOURCES_SHA256='"abc8a0b20ed030d8f4d87c1d49497a38dcc03af6e1e9b4c5b16bd935acc656a0"' -o build/checker2/checker2 src/checker2/checker2_main.c src/checker2/c2_ir.c src/checker2/c2_check.c src/checker2/c2_lrat.c src/checker2/c2_blast.c src/checker2/c2_receipt.c src/sha256.c src/searchtrace/sig/ed25519.c src/searchtrace/sig/sha512.c src/searchtrace/sig/ct.c +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -ffp-contract=off -Isrc -Isrc/compiler -Itests -o build/osc_gpu/osc_gpu_build tools/osc_gpu/osc_gpu_build.c src/omega_osc_gpu.c src/omega_blackwell_codegen.c src/omega_blackwell_matmul.c src/omega_osc_launch_args.c src/compiler/osc_a64.c src/compiler/osc_alloc.c src/compiler/osc_cg.c src/compiler/osc_check.c src/compiler/osc_diag.c src/compiler/osc_front.c src/compiler/osc_interp.c src/compiler/osc_ir.c src/compiler/osc_lex.c src/compiler/osc_lower.c src/compiler/osc_native.c src/compiler/osc_parse.c src/compiler/osc_rt.c src/sha256.c -lm +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -ffp-contract=off -Isrc -Isrc/compiler -Itests -DOSC_CHIP -Wno-unused-function -pthread -I../physics-l386/m16 -I../physics-l386/nvrm -I../physics-l386/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I../physics-l386/third_party/nvidia-open-580.173.02/kernel-open/common/inc -I../physics-l386/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I../physics-l386/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o build/osc_gpu/test_osc_gpu_chip tests/osc_gpu/test_osc_gpu.c \ + src/omega_osc_gpu.c src/omega_blackwell_codegen.c src/omega_blackwell_matmul.c src/omega_osc_launch_args.c src/omega_osc_launch.c src/omega_gpu_session.c src/omega_gpu_platform.c src/omega_gpu_platform_linux.c src/omega_gpu_fmt.c src/omega_blackwell_qmd.c ../physics-l386/m16/m16_native.c ../physics-l386/nvrm/nvrm.c src/compiler/osc_a64.c src/compiler/osc_alloc.c src/compiler/osc_cg.c src/compiler/osc_check.c src/compiler/osc_diag.c src/compiler/osc_front.c src/compiler/osc_interp.c src/compiler/osc_ir.c src/compiler/osc_lex.c src/compiler/osc_lower.c src/compiler/osc_native.c src/compiler/osc_parse.c src/compiler/osc_rt.c src/sha256.c -lm +sh tests/osc_gpu/run.sh build/omegese/omegese build/omega_emit/omega_emit build/checker2/checker2 build/osc_gpu/test_osc_gpu build/osc_gpu/ir build/osc_gpu/osc_gpu_build +run.sh: 13 kernels emitted and accepted by checker2 +run.sh: 12 broken kernels refused with their expected reasons +run.sh: 1 embedded kernels still build to the bytes they embed + division by a number: 5899975 quotients checked + vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words + gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + gemm 248 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + reduce 192 instructions, 24 registers, 256 threads, 8224 shared bytes, 2 regions on 1 barriers, 12 argument words + nest16 112 instructions, 16 registers, 32 threads, 0 shared bytes, 0 regions on 0 barriers, 8 argument words + ops_u 624 instructions, 32 registers, 256 threads, 0 shared bytes, 16 regions on 1 barriers, 24 argument words + ops_f 208 instructions, 32 registers, 256 threads, 256 shared bytes, 0 regions on 0 barriers, 20 argument words + nest16j 288 instructions, 16 registers, 32 threads, 0 shared bytes, 16 regions on 16 barriers, 8 argument words + vloop 80 instructions, 24 registers, 64 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + om_vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words + om_gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + om_gemm 256 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + om_attn 248 instructions, 48 registers, 128 threads, 16 shared bytes, 1 regions on 1 barriers, 22 argument words + ops_f 208 instructions, 32 registers, 256 threads, 256 shared bytes, 0 regions on 0 barriers, 20 argument words + vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words + mutant 1 (stores ignore poison): caught by 16 checks + mutant 2 (joins dropped): caught by 52 checks + mutant 3 (no add overflow trap): caught by 5 checks + mutant 4 (intervals not stretched): caught by 10 checks + mutant 5 (every region on barrier 0): caught by 3 checks + mutant 6 (shared not zeroed): caught by 2 checks + mutant 7 (bounds-failed loads run): caught by 4 checks + mutant 8 (division magic off by one): caught by 4 checks +test_osc_gpu: 1308 checks, 0 failed +EXIT_CODE=0 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-green-after-close-fix.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-green-after-close-fix.log new file mode 100644 index 000000000..956c51b7e --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-green-after-close-fix.log @@ -0,0 +1,26 @@ +Thu Oct 22 07:05:50 UTC 2026 +d1ac019ef604982d3dd3456b8d339ab3b78aa1b6 +cb74c2baf46b80bbe20cac6d5165ee0f1e22f98176de1d8724c120e5a2b81e9f build/osc_gpu/test_osc_gpu_chip +COMMAND: spark-window run timeout 180 stdbuf -oL -eL env OSC_GPU_MUTANT=0 build/osc_gpu/test_osc_gpu_chip build/osc_gpu/ir +test_osc_gpu_chip: GB10, mutant 0, MUFU tolerance 2^-20 relative (stated in the source before the run) + vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words + gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + gemm 248 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + reduce 192 instructions, 24 registers, 256 threads, 8224 shared bytes, 2 regions on 1 barriers, 12 argument words + nest16 112 instructions, 16 registers, 32 threads, 0 shared bytes, 0 regions on 0 barriers, 8 argument words + ops_u 624 instructions, 32 registers, 256 threads, 0 shared bytes, 16 regions on 1 barriers, 24 argument words + ops_f 208 instructions, 32 registers, 256 threads, 256 shared bytes, 0 regions on 0 barriers, 20 argument words +FAIL: ops_f op 8 order 0: 1 wrong (first t 31: got 0x00000000 want 0x00200000), status 0 + nest16j 288 instructions, 16 registers, 32 threads, 0 shared bytes, 16 regions on 16 barriers, 8 argument words + vloop 80 instructions, 24 registers, 64 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + om_vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: vadd order 0: 996 wrong words, status 0 +FAIL: vadd short inputs order 0: 896 words wrong (a trapped thread stored, or a good one did not) +FAIL: vadd short inputs: status code 0, want 3 + om_gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words +FAIL: gate order 0: 939 wrong words + om_gemm 256 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + om_attn 248 instructions, 48 registers, 128 threads, 16 shared bytes, 1 regions on 1 barriers, 22 argument words +test_osc_gpu_chip: 59 chip launches, 107.251 ms on the chip in total +test_osc_gpu_chip: 645 checks, 5 failed +EXIT_CODE=1 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-after-close-fix.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-after-close-fix.log new file mode 100644 index 000000000..bbf611edf --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-after-close-fix.log @@ -0,0 +1,35 @@ +Thu Oct 22 07:05:48 UTC 2026 +d1ac019ef604982d3dd3456b8d339ab3b78aa1b6 +cb74c2baf46b80bbe20cac6d5165ee0f1e22f98176de1d8724c120e5a2b81e9f build/osc_gpu/test_osc_gpu_chip +COMMAND: spark-window run timeout 180 stdbuf -oL -eL env OSC_GPU_MUTANT=1 build/osc_gpu/test_osc_gpu_chip build/osc_gpu/ir +test_osc_gpu_chip: GB10, mutant 1, MUFU tolerance 2^-20 relative (stated in the source before the run) + vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: vadd short inputs order 0: 100 words wrong (a trapped thread stored, or a good one did not) + gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + gemm 248 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + reduce 192 instructions, 24 registers, 256 threads, 8224 shared bytes, 2 regions on 1 barriers, 12 argument words + nest16 112 instructions, 16 registers, 32 threads, 0 shared bytes, 0 regions on 0 barriers, 8 argument words + ops_u 624 instructions, 32 registers, 256 threads, 0 shared bytes, 16 regions on 1 barriers, 24 argument words +FAIL: ops_u op 0 order 0: 36 wrong (first t 3: got 0x00000000 want 0xdeadbeef, a 0xffffffff b 0x00000001) +FAIL: ops_u op 1 order 0: 75 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 2 order 0: 184 wrong (first t 0: got 0x00000000 want 0xdeadbeef, a 0x3e845270 b 0x0000000f) +FAIL: ops_u op 10 order 0: 182 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 11 order 0: 182 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 28 order 0: 104 wrong (first t 0: got 0x00000000 want 0xdeadbeef, a 0x3e845270 b 0x0000000f) + ops_f 208 instructions, 32 registers, 256 threads, 256 shared bytes, 0 regions on 0 barriers, 20 argument words +FAIL: ops_f op 8 order 0: 1 wrong (first t 31: got 0x00000000 want 0x00200000), status 0 + nest16j 288 instructions, 16 registers, 32 threads, 0 shared bytes, 16 regions on 16 barriers, 8 argument words + vloop 80 instructions, 24 registers, 64 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + om_vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: vadd order 0: 996 wrong words, status 0 +FAIL: vadd short inputs order 0: 896 words wrong (a trapped thread stored, or a good one did not) +FAIL: vadd short inputs: status code 0, want 3 + om_gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words +FAIL: gate order 0: 939 wrong words + om_gemm 256 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: gemm: chip launch -2: gemm launch: marker wait timed out (latched) + om_attn 248 instructions, 48 registers, 128 threads, 16 shared bytes, 1 regions on 1 barriers, 22 argument words +FAIL: attn: not run, an earlier chip failure +test_osc_gpu_chip: 57 chip launches, 105.378 ms on the chip in total +test_osc_gpu_chip: 643 checks, 14 failed +EXIT_CODE=1 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock-repro.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock-repro.log new file mode 100644 index 000000000..4a49338cb --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock-repro.log @@ -0,0 +1,28 @@ +COMMAND: spark-window run timeout 10 stdbuf -oL -eL env OSC_GPU_MUTANT=1 build/osc_gpu/test_osc_gpu_chip build/osc_gpu/ir +test_osc_gpu_chip: GB10, mutant 1, MUFU tolerance 2^-20 relative (stated in the source before the run) + vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: vadd short inputs order 0: 100 words wrong (a trapped thread stored, or a good one did not) + gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + gemm 248 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + reduce 192 instructions, 24 registers, 256 threads, 8224 shared bytes, 2 regions on 1 barriers, 12 argument words + nest16 112 instructions, 16 registers, 32 threads, 0 shared bytes, 0 regions on 0 barriers, 8 argument words + ops_u 624 instructions, 32 registers, 256 threads, 0 shared bytes, 16 regions on 1 barriers, 24 argument words +FAIL: ops_u op 0 order 0: 36 wrong (first t 3: got 0x00000000 want 0xdeadbeef, a 0xffffffff b 0x00000001) +FAIL: ops_u op 1 order 0: 75 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 2 order 0: 184 wrong (first t 0: got 0x00000000 want 0xdeadbeef, a 0x3e845270 b 0x0000000f) +FAIL: ops_u op 10 order 0: 182 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 11 order 0: 182 wrong (first t 1: got 0x00000000 want 0xdeadbeef, a 0x32cad522 b 0x71f95219) +FAIL: ops_u op 28 order 0: 104 wrong (first t 0: got 0x00000000 want 0xdeadbeef, a 0x3e845270 b 0x0000000f) + ops_f 208 instructions, 32 registers, 256 threads, 256 shared bytes, 0 regions on 0 barriers, 20 argument words +FAIL: ops_f op 8 order 0: 1 wrong (first t 31: got 0x00000000 want 0x00200000), status 0 + nest16j 288 instructions, 16 registers, 32 threads, 0 shared bytes, 16 regions on 16 barriers, 8 argument words + vloop 80 instructions, 24 registers, 64 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words + om_vadd 64 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 16 argument words +FAIL: vadd order 0: 996 wrong words, status 0 +FAIL: vadd short inputs order 0: 896 words wrong (a trapped thread stored, or a good one did not) +FAIL: vadd short inputs: status code 0, want 3 + om_gate 72 instructions, 24 registers, 256 threads, 0 shared bytes, 1 regions on 1 barriers, 12 argument words +FAIL: gate order 0: 939 wrong words + om_gemm 256 instructions, 40 registers, 256 threads, 2048 shared bytes, 1 regions on 1 barriers, 16 argument words + om_attn 248 instructions, 48 registers, 128 threads, 16 shared bytes, 1 regions on 1 barriers, 22 argument words +EXIT_CODE=124 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock.txt b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock.txt new file mode 100644 index 000000000..af9918cf8 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red-deadlock.txt @@ -0,0 +1,4 @@ +Could not attach to process. If your uid matches the uid of the target +process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try +again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf +ptrace: Inappropriate ioctl for device. diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red.log new file mode 100644 index 000000000..f05a66a37 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/chip-red.log @@ -0,0 +1,6 @@ +Thu Oct 22 07:04:27 UTC 2026 +3aafd8a887d091fc239bd3aa43723571667f8720 +b5c0674ad7af704c2f256a08ff166559aa9b0dfd7abd0dfcef31857305cc2c85 build/osc_gpu/test_osc_gpu_chip +COMMAND: spark-window run env OSC_GPU_MUTANT=1 timeout 180 build/osc_gpu/test_osc_gpu_chip build/osc_gpu/ir +Terminated +EXIT_CODE=143 (expected 1 with value mismatches) diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/rebuild-close.log b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/rebuild-close.log new file mode 100644 index 000000000..72fb74cfe --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c1-omegese-gpu-front-chip-20261022/rebuild-close.log @@ -0,0 +1,4 @@ +COMMAND: quiet-build make -j4 PHYSICS_DIR=../physics-l386 build/osc_gpu/test_osc_gpu_chip +cc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -ffp-contract=off -Isrc -Isrc/compiler -Itests -DOSC_CHIP -Wno-unused-function -pthread -I../physics-l386/m16 -I../physics-l386/nvrm -I../physics-l386/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I../physics-l386/third_party/nvidia-open-580.173.02/kernel-open/common/inc -I../physics-l386/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I../physics-l386/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o build/osc_gpu/test_osc_gpu_chip tests/osc_gpu/test_osc_gpu.c \ + src/omega_osc_gpu.c src/omega_blackwell_codegen.c src/omega_blackwell_matmul.c src/omega_osc_launch_args.c src/omega_osc_launch.c src/omega_gpu_session.c src/omega_gpu_platform.c src/omega_gpu_platform_linux.c src/omega_gpu_fmt.c src/omega_blackwell_qmd.c ../physics-l386/m16/m16_native.c ../physics-l386/nvrm/nvrm.c src/compiler/osc_a64.c src/compiler/osc_alloc.c src/compiler/osc_cg.c src/compiler/osc_check.c src/compiler/osc_diag.c src/compiler/osc_front.c src/compiler/osc_interp.c src/compiler/osc_ir.c src/compiler/osc_lex.c src/compiler/osc_lower.c src/compiler/osc_native.c src/compiler/osc_parse.c src/compiler/osc_rt.c src/sha256.c -lm +EXIT_CODE=0 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/SHA256SUMS b/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/SHA256SUMS new file mode 100644 index 000000000..c3cd37135 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/SHA256SUMS @@ -0,0 +1 @@ +0b6b283dcbc1e354330129d1a6bd0672f88bcb13004091e8bfc845630fecc95c fresh-hello.log diff --git a/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/fresh-hello.log b/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/fresh-hello.log new file mode 100644 index 000000000..51374a40b --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/c2-r2-hello-fresh-checkout-20261022/fresh-hello.log @@ -0,0 +1,105 @@ +# fresh-checkout-hello: branch=runtime/r2-hello url=git@github.com:aien-spark/omega.git +# date: 2026-10-22T07:06:05Z host: Linux 7.0.0-1019-nvidia aarch64 work: /tmp/omega-fresh.ZoMOb3 +# README commands: +# git clone https://github.com/aien-dev/omega-mv omega +# cd omega +# make hello-gpu +$ git clone --branch runtime/r2-hello git@github.com:aien-spark/omega.git omega +Cloning into 'omega'... +$ cd omega +# commit: 0f44b52bf43cbd21241ad269d5c21493c5863ffc +$ make hello-gpu +fetch-physics: build/physics at 6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf (matches physics.lock) +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/sha256.c -o build/sha256.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_canonical.c -o build/omega_canonical.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_validate.c -o build/omega_validate.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_core.c -o build/omega_core.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_codec.c -o build/omega_codec.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/aarch64_encoder.c -o build/aarch64_encoder.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/aarch64_decoder.c -o build/aarch64_decoder.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_realize.c -o build/omega_realize.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_exec.c -o build/omega_exec.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_self_host.c -o build/omega_self_host.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_verify.c -o build/omega_verify.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_program.c -o build/omega_program.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_synthesis.c -o build/omega_synthesis.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_library.c -o build/omega_library.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_discovery.c -o build/omega_discovery.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_machine.c -o build/omega_machine.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_realize_synth.c -o build/omega_realize_synth.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_matvec.c -o build/omega_matvec.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_accelerator.c -o build/omega_accelerator.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_accelerator_world.c -o build/omega_accelerator_world.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_vector.c -o build/omega_vector.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_encoder.c -o build/omega_blackwell_encoder.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_qmd.c -o build/omega_blackwell_qmd.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_realize.c -o build/omega_blackwell_realize.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_submit.c -o build/omega_blackwell_submit.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_engine.c -o build/omega_blackwell_engine.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_engine.c -o build/omega_gpu_engine.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_matmul.c -o build/omega_blackwell_matmul.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen.c -o build/omega_blackwell_codegen.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_session.c -o build/omega_gpu_session.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_platform.c -o build/omega_gpu_platform.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_platform_linux.c -o build/omega_gpu_platform_linux.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_fmt.c -o build/omega_gpu_fmt.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_matmul_api.c -o build/omega_gpu_matmul_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_elementwise_api.c -o build/omega_gpu_elementwise_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_attention_api.c -o build/omega_gpu_attention_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_serving.c -o build/omega_gpu_serving.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_wait.c -o build/omega_gpu_wait.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_evidence.c -o build/omega_evidence.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c build/physics/m16/m16_native.c -o build/m16_native.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c build/physics/nvrm/nvrm.c -o build/nvrm.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_moe_api.c -o build/omega_gpu_moe_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_moe.c -o build/omega_blackwell_codegen_moe.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_fp8_pack.c -o build/omega_gpu_fp8_pack.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_fp8_api.c -o build/omega_gpu_fp8_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_moe2.c -o build/omega_blackwell_codegen_moe2.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_attn.c -o build/omega_blackwell_codegen_attn.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_decode_attn_api.c -o build/omega_gpu_decode_attn_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_hostmath.c -o build/omega_gpu_hostmath.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_router.c -o build/omega_blackwell_codegen_router.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_router_api.c -o build/omega_gpu_router_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_cmdlist.c -o build/omega_gpu_cmdlist.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_dec.c -o build/omega_blackwell_codegen_dec.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_mem_cached.c -o build/omega_gpu_mem_cached.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_decode_graph.c -o build/omega_gpu_decode_graph.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_bf16.c -o build/omega_blackwell_codegen_bf16.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_bf16_gemv_api.c -o build/omega_gpu_bf16_gemv_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_gemm.c -o build/omega_blackwell_codegen_gemm.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_fp8gemm_api.c -o build/omega_gpu_fp8gemm_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tc.c -o build/omega_blackwell_codegen_tc.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_tcgemm_api.c -o build/omega_gpu_tcgemm_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pattn.c -o build/omega_blackwell_codegen_pattn.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_prefill_attn_api.c -o build/omega_gpu_prefill_attn_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pf.c -o build/omega_blackwell_codegen_pf.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_prefill.c -o build/omega_gpu_prefill.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tc2.c -o build/omega_blackwell_codegen_tc2.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_pfgemm.c -o build/omega_gpu_pfgemm.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_qmma.c -o build/omega_blackwell_codegen_qmma.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_qg.c -o build/omega_blackwell_codegen_qg.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_pfhost.c -o build/omega_blackwell_codegen_pfhost.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_pfhost.c -o build/omega_gpu_pfhost.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blackwell_codegen_tern.c -o build/omega_blackwell_codegen_tern.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_gpu_tern_api.c -o build/omega_gpu_tern_api.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_program_ir.c -o build/omega_program_ir.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_vc_bridge.c -o build/omega_vc_bridge.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_resolve.c -o build/omega_resolve.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_receipt.c -o build/omega_receipt.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_blake3.c -o build/omega_blake3.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -c src/omega_vcstore.c -o build/omega_vcstore.o +ar rcs build/libomega_gpu.a build/sha256.o build/omega_canonical.o build/omega_validate.o build/omega_core.o build/omega_codec.o build/aarch64_encoder.o build/aarch64_decoder.o build/omega_realize.o build/omega_exec.o build/omega_self_host.o build/omega_verify.o build/omega_program.o build/omega_synthesis.o build/omega_library.o build/omega_discovery.o build/omega_machine.o build/omega_realize_synth.o build/omega_matvec.o build/omega_accelerator.o build/omega_accelerator_world.o build/omega_vector.o build/omega_blackwell_encoder.o build/omega_blackwell_qmd.o build/omega_blackwell_realize.o build/omega_blackwell_submit.o build/omega_blackwell_engine.o build/omega_gpu_engine.o build/omega_blackwell_matmul.o build/omega_blackwell_codegen.o build/omega_gpu_session.o build/omega_gpu_platform.o build/omega_gpu_platform_linux.o build/omega_gpu_fmt.o build/omega_gpu_matmul_api.o build/omega_gpu_elementwise_api.o build/omega_gpu_attention_api.o build/omega_gpu_serving.o build/omega_gpu_wait.o build/omega_evidence.o build/m16_native.o build/nvrm.o build/omega_gpu_moe_api.o build/omega_blackwell_codegen_moe.o build/omega_gpu_fp8_pack.o build/omega_gpu_fp8_api.o build/omega_blackwell_codegen_moe2.o build/omega_blackwell_codegen_attn.o build/omega_gpu_decode_attn_api.o build/omega_gpu_hostmath.o build/omega_blackwell_codegen_router.o build/omega_gpu_router_api.o build/omega_gpu_cmdlist.o build/omega_blackwell_codegen_dec.o build/omega_gpu_mem_cached.o build/omega_gpu_decode_graph.o build/omega_blackwell_codegen_bf16.o build/omega_gpu_bf16_gemv_api.o build/omega_blackwell_codegen_gemm.o build/omega_gpu_fp8gemm_api.o build/omega_blackwell_codegen_tc.o build/omega_gpu_tcgemm_api.o build/omega_blackwell_codegen_pattn.o build/omega_gpu_prefill_attn_api.o build/omega_blackwell_codegen_pf.o build/omega_gpu_prefill.o build/omega_blackwell_codegen_tc2.o build/omega_gpu_pfgemm.o build/omega_blackwell_codegen_qmma.o build/omega_blackwell_codegen_qg.o build/omega_blackwell_codegen_pfhost.o build/omega_gpu_pfhost.o build/omega_blackwell_codegen_tern.o build/omega_gpu_tern_api.o build/omega_program_ir.o build/omega_vc_bridge.o build/omega_resolve.o build/omega_receipt.o build/omega_blake3.o build/omega_vcstore.o +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -Ibuild/physics/m16 -Ibuild/physics/nvrm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/common/inc -Ibuild/physics/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -Ibuild/physics/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o build/hello_gpu examples/hello_gpu/hello_gpu.c build/libomega_gpu.a -lpthread -lm +./build/hello_gpu +hello_gpu: c = a + b over 1048576 floats on the GPU, built with Omega's own kernel builder +kernel: 32 instructions, 12 registers +checked 1048576 of 1048576 elements: 0 wrong, 0 never written +PASS +# fresh-checkout-hello exit code: 0 + a + b over 1048576 floats on the GPU, built with Omega's own kernel builder +kernel: 32 instructions, 12 registers +checked 1048576 of 1048576 elements: 0 wrong, 0 never written +PASS +# fresh-checkout-hello exit code: 0 +EXIT_CODE=0 diff --git a/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/SHA256SUMS b/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/SHA256SUMS new file mode 100644 index 000000000..db265c11c --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/SHA256SUMS @@ -0,0 +1 @@ +47f923585f09cd40353ed24bddfe99372bb036f99d6953fcd769297a59b37159 batch-18089-lines-1-114.log diff --git a/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/batch-18089-lines-1-114.log b/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/batch-18089-lines-1-114.log new file mode 100644 index 000000000..87aab8e7d --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/l354-door-one-row-20261021/batch-18089-lines-1-114.log @@ -0,0 +1,114 @@ +=== 2026-10-21T12:52:02Z start batch door real8 (bin-16b27643, 8 slots, ctx 2048, swap=none) MemAvailable 38 GB +q36-extra: MemAvailable 25 GB < 42 GB, waiting (holding the slot) +aien-serve-http: tokenizer from /home/drakestapleton/models/qwen3.6-35b-a3b-fp8-95a723d0 (chat layout qwen3.6 (Qwen3.6-35B-A3B, thinking per request, template default on), stop ids [248046, 248044]) +aien-serve-http: loading Qwen3.8 (qwen3_5) onto the Omega engine from /home/drakestapleton/models/qwen3.6-35b-a3b-fp8-95a723d0 +aien-serve-http: qwen36-batch: uploading 40 layers, 8 rows of 2048 positions (model needs 37254 MiB, MemAvailable 63290 MiB) +qwen36 omega: exact two-pass head ON (fp8b screen + Row bound, built in 6.1 s) +aien-serve-http: qwen36-batch engine ready in 81.5 s: context 2048 tokens, 8 rows, weights 34.65 GB resident, per-row state 142.8 MiB on paper, 13.1 MiB measured (MemAvailable 28471 MiB -> 28366 MiB), rss 37.54 GB, prompt tokens per beat 16 +aien-serve-http: serving qwen3.6-35b-a3b-fp8 at http://127.0.0.1:18089/v1 (engine omega) +aien-serve-http: qwen36-batch: chip lock after 0 ms +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 7), queued 0 ms, now 1 rows +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 0), queued 331 ms, now 2 rows +aien-serve-http: qwen36-batch: join: prompt 25 tok, reuse 0 tok (cold, row 1), queued 332 ms, now 3 rows +aien-serve-http: qwen36-batch: join: prompt 25 tok, reuse 0 tok (cold, row 2), queued 332 ms, now 4 rows +aien-serve-http: qwen36-batch: join: prompt 26 tok, reuse 0 tok (cold, row 3), queued 331 ms, now 5 rows +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 4), queued 331 ms, now 6 rows +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 5), queued 328 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 22 tok, reuse 0 tok (cold, row 6), queued 328 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 3, prompt 26 tok (reused 0), prefill 3646 ms, decode 9 tok in 1248 ms over 8 beats, mean rows 8.00, wall 156.0 ms/token, Length +aien-serve-http: chatcmpl-18e08f5db9727ff80004: prompt 26 tok, reply 9 tok, finish length, prefill 3646 ms, decode 1248 ms (7.21 tok/s), sampling mode=greedy seed=1792590267219606680 temp=0 top_p=0.95 top_k=20 greedy=9 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 1, prompt 25 tok (reused 0), prefill 3623 ms, decode 9 tok in 1407 ms over 9 beats, mean rows 7.89, wall 156.3 ms/token, Stop +aien-serve-http: qwen36-batch: leave: row 6, prompt 22 tok (reused 0), prefill 3320 ms, decode 10 tok in 1708 ms over 9 beats, mean rows 7.89, wall 189.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f5db954a1510002: prompt 25 tok, reply 9 tok, finish stop, prefill 3623 ms, decode 1407 ms (6.40 tok/s), sampling mode=greedy seed=1792590292987453537 temp=0 top_p=0.95 top_k=20 greedy=10 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: chatcmpl-18e08f5db9ac91c70007: prompt 22 tok, reply 10 tok, finish length, prefill 3320 ms, decode 1708 ms (5.85 tok/s), sampling mode=greedy seed=1792590271518379639 temp=0 top_p=0.95 top_k=20 greedy=10 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 21 tok, reuse 0 tok (cold, row 3), queued 10 ms, now 6 rows +aien-serve-http: qwen36-batch: join: prompt 25 tok, reuse 0 tok (cold, row 6), queued 10 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 1), queued 10 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 7, prompt 23 tok (reused 0), prefill 1453 ms, decode 22 tok in 6710 ms over 21 beats, mean rows 7.52, wall 319.5 ms/token, Length +aien-serve-http: chatcmpl-18e08f5db94f9e7f0000: prompt 23 tok, reply 22 tok, finish length, prefill 1453 ms, decode 6710 ms (3.28 tok/s), sampling mode=greedy seed=1792590284397188095 temp=0 top_p=0.95 top_k=20 greedy=22 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 26 tok, reuse 0 tok (cold, row 7), queued 94 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 5, prompt 23 tok (reused 0), prefill 3446 ms, decode 21 tok in 4520 ms over 21 beats, mean rows 7.48, wall 215.2 ms/token, Stop +aien-serve-http: chatcmpl-18e08f5db99592e10006: prompt 23 tok, reply 21 tok, finish stop, prefill 3446 ms, decode 4520 ms (4.65 tok/s), sampling mode=greedy seed=1792590275811840049 temp=0 top_p=0.95 top_k=20 greedy=22 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 22 tok, reuse 0 tok (cold, row 5), queued 16 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 4, prompt 24 tok (reused 0), prefill 3556 ms, decode 27 tok in 6217 ms over 27 beats, mean rows 7.56, wall 230.3 ms/token, Stop +aien-serve-http: chatcmpl-18e08f5db97c315b0005: prompt 24 tok, reply 27 tok, finish stop, prefill 3556 ms, decode 6217 ms (4.34 tok/s), sampling mode=greedy seed=1792590262925275131 temp=0 top_p=0.95 top_k=20 greedy=28 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 4), queued 127 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 3, prompt 21 tok (reused 0), prefill 1427 ms, decode 16 tok in 3298 ms over 15 beats, mean rows 7.73, wall 219.9 ms/token, Length +aien-serve-http: chatcmpl-18e08f5f09be48710008: prompt 21 tok, reply 16 tok, finish length, prefill 1427 ms, decode 3298 ms (4.85 tok/s), sampling mode=greedy seed=1792590255681847553 temp=0 top_p=0.95 top_k=20 greedy=16 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 3), queued 51 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 7, prompt 26 tok (reused 0), prefill 953 ms, decode 11 tok in 2578 ms over 10 beats, mean rows 7.70, wall 257.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f5fa27cb076000b: prompt 26 tok, reply 11 tok, finish length, prefill 953 ms, decode 2578 ms (4.27 tok/s), sampling mode=greedy seed=1792590245359559494 temp=0 top_p=0.95 top_k=20 greedy=11 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 7), queued 73 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 1, prompt 24 tok (reused 0), prefill 1553 ms, decode 24 tok in 5166 ms over 23 beats, mean rows 7.61, wall 224.6 ms/token, Length +aien-serve-http: qwen36-batch: leave: row 0, prompt 24 tok (reused 0), prefill 3558 ms, decode 38 tok in 8484 ms over 37 beats, mean rows 7.49, wall 229.3 ms/token, Length +aien-serve-http: chatcmpl-18e08f5db95356400001: prompt 24 tok, reply 38 tok, finish length, prefill 3558 ms, decode 8484 ms (4.48 tok/s), sampling mode=greedy seed=1792590280102466656 temp=0 top_p=0.95 top_k=20 greedy=38 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: chatcmpl-18e08f5f09c47ef2000a: prompt 24 tok, reply 24 tok, finish length, prefill 1553 ms, decode 5166 ms (4.65 tok/s), sampling mode=greedy seed=1792590247092321154 temp=0 top_p=0.95 top_k=20 greedy=24 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 19 tok, reuse 0 tok (cold, row 1), queued 220 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 30 tok, reuse 0 tok (cold, row 0), queued 220 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 2, prompt 25 tok (reused 0), prefill 3623 ms, decode 44 tok in 10608 ms over 43 beats, mean rows 7.47, wall 246.7 ms/token, Length +aien-serve-http: chatcmpl-18e08f5db955dc410003: prompt 25 tok, reply 44 tok, finish length, prefill 3623 ms, decode 10608 ms (4.15 tok/s), sampling mode=greedy seed=1792590288692566929 temp=0 top_p=0.95 top_k=20 greedy=44 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 22 tok, reuse 0 tok (cold, row 2), queued 117 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 5, prompt 22 tok (reused 0), prefill 907 ms, decode 25 tok in 6056 ms over 24 beats, mean rows 7.42, wall 252.3 ms/token, Length +aien-serve-http: chatcmpl-18e08f5fc1129c8a000c: prompt 22 tok, reply 25 tok, finish length, prefill 907 ms, decode 6056 ms (4.13 tok/s), sampling mode=greedy seed=1792590241577736282 temp=0 top_p=0.95 top_k=20 greedy=25 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 5), queued 89 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 1, prompt 19 tok (reused 0), prefill 992 ms, decode 17 tok in 3461 ms over 16 beats, mean rows 7.69, wall 216.3 ms/token, Length +aien-serve-http: chatcmpl-18e08f60b50991010010: prompt 19 tok, reply 17 tok, finish length, prefill 992 ms, decode 3461 ms (4.91 tok/s), sampling mode=greedy seed=1792590365929866289 temp=0 top_p=0.95 top_k=20 greedy=17 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 7, prompt 23 tok (reused 0), prefill 657 ms, decode 20 tok in 4589 ms over 19 beats, mean rows 7.68, wall 241.5 ms/token, Length +aien-serve-http: qwen36-batch: leave: row 6, prompt 25 tok (reused 0), prefill 1578 ms, decode 45 tok in 10389 ms over 44 beats, mean rows 7.57, wall 236.1 ms/token, Length +aien-serve-http: chatcmpl-18e08f609693977a000f: prompt 23 tok, reply 20 tok, finish length, prefill 657 ms, decode 4589 ms (4.36 tok/s), sampling mode=greedy seed=1792590361123852554 temp=0 top_p=0.95 top_k=20 greedy=20 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: chatcmpl-18e08f5f09c448720009: prompt 25 tok, reply 45 tok, finish length, prefill 1578 ms, decode 10389 ms (4.33 tok/s), sampling mode=greedy seed=1792590251387273906 temp=0 top_p=0.95 top_k=20 greedy=45 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 3, prompt 23 tok (reused 0), prefill 860 ms, decode 29 tok in 6143 ms over 28 beats, mean rows 7.29, wall 219.4 ms/token, Length +aien-serve-http: chatcmpl-18e08f603b06e190000e: prompt 23 tok, reply 29 tok, finish length, prefill 860 ms, decode 6143 ms (4.72 tok/s), sampling mode=greedy seed=1792590355292936320 temp=0 top_p=0.95 top_k=20 greedy=29 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 25 tok, reuse 0 tok (cold, row 1), queued 28 ms, now 5 rows +aien-serve-http: qwen36-batch: join: prompt 21 tok, reuse 0 tok (cold, row 7), queued 28 ms, now 6 rows +aien-serve-http: qwen36-batch: join: prompt 28 tok, reuse 0 tok (cold, row 6), queued 29 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 3), queued 29 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 0, prompt 30 tok (reused 0), prefill 1220 ms, decode 24 tok in 5815 ms over 23 beats, mean rows 7.13, wall 252.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f60b50991410011: prompt 30 tok, reply 24 tok, finish length, prefill 1220 ms, decode 5815 ms (4.13 tok/s), sampling mode=greedy seed=1792590365929866321 temp=0 top_p=0.95 top_k=20 greedy=24 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 0), queued 100 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 2, prompt 22 tok (reused 0), prefill 719 ms, decode 23 tok in 5670 ms over 22 beats, mean rows 7.05, wall 257.7 ms/token, Length +aien-serve-http: chatcmpl-18e08f612f3b02050012: prompt 22 tok, reply 23 tok, finish length, prefill 719 ms, decode 5670 ms (4.06 tok/s), sampling mode=greedy seed=1792590376569862565 temp=0 top_p=0.95 top_k=20 greedy=23 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 20 tok, reuse 0 tok (cold, row 2), queued 106 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 7, prompt 21 tok (reused 0), prefill 1793 ms, decode 13 tok in 2869 ms over 12 beats, mean rows 7.50, wall 239.1 ms/token, Length +aien-serve-http: chatcmpl-18e08f61e72945e00015: prompt 21 tok, reply 13 tok, finish length, prefill 1793 ms, decode 2869 ms (4.53 tok/s), sampling mode=greedy seed=1792590388245643344 temp=0 top_p=0.95 top_k=20 greedy=13 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 4, prompt 23 tok (reused 0), prefill 832 ms, decode 47 tok in 11563 ms over 46 beats, mean rows 7.24, wall 251.4 ms/token, Length +aien-serve-http: qwen36-batch: leave: row 0, prompt 24 tok (reused 0), prefill 756 ms, decode 7 tok in 1406 ms over 7 beats, mean rows 7.57, wall 200.9 ms/token, Stop +aien-serve-http: chatcmpl-18e08f601c7b5169000d: prompt 23 tok, reply 47 tok, finish length, prefill 832 ms, decode 11563 ms (4.06 tok/s), sampling mode=greedy seed=1792590350485504729 temp=0 top_p=0.95 top_k=20 greedy=47 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: chatcmpl-18e08f62800bb1480018: prompt 24 tok, reply 7 tok, finish stop, prefill 756 ms, decode 1406 ms (4.98 tok/s), sampling mode=greedy seed=1792590407990487848 temp=0 top_p=0.95 top_k=20 greedy=8 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 21 tok, reuse 0 tok (cold, row 7), queued 93 ms, now 6 rows +aien-serve-http: qwen36-batch: join: prompt 22 tok, reuse 0 tok (cold, row 0), queued 93 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 4), queued 93 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 5, prompt 23 tok (reused 0), prefill 733 ms, decode 31 tok in 7500 ms over 30 beats, mean rows 6.87, wall 250.0 ms/token, Length +aien-serve-http: qwen36-batch: leave: row 3, prompt 24 tok (reused 0), prefill 1984 ms, decode 19 tok in 4245 ms over 18 beats, mean rows 6.94, wall 235.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f616c1f39b10013: prompt 23 tok, reply 31 tok, finish length, prefill 733 ms, decode 7500 ms (4.13 tok/s), sampling mode=greedy seed=1792590373296482497 temp=0 top_p=0.95 top_k=20 greedy=31 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: chatcmpl-18e08f61e72a35800017: prompt 24 tok, reply 19 tok, finish length, prefill 1984 ms, decode 4245 ms (4.48 tok/s), sampling mode=greedy seed=1792590392540671808 temp=0 top_p=0.95 top_k=20 greedy=19 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 24 tok, reuse 0 tok (cold, row 5), queued 30 ms, now 7 rows +aien-serve-http: qwen36-batch: join: prompt 28 tok, reuse 0 tok (cold, row 3), queued 31 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 6, prompt 28 tok (reused 0), prefill 2090 ms, decode 26 tok in 6471 ms over 25 beats, mean rows 7.16, wall 258.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f61e7296dd00016: prompt 28 tok, reply 26 tok, finish length, prefill 2090 ms, decode 6471 ms (4.02 tok/s), sampling mode=greedy seed=1792590396835588368 temp=0 top_p=0.95 top_k=20 greedy=26 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: join: prompt 23 tok, reuse 0 tok (cold, row 6), queued 19 ms, now 8 rows +aien-serve-http: qwen36-batch: leave: row 1, prompt 25 tok (reused 0), prefill 2029 ms, decode 30 tok in 7565 ms over 29 beats, mean rows 7.24, wall 260.9 ms/token, Length +aien-serve-http: chatcmpl-18e08f61e72945800014: prompt 25 tok, reply 30 tok, finish length, prefill 2029 ms, decode 7565 ms (3.97 tok/s), sampling mode=greedy seed=1792590388245643024 temp=0 top_p=0.95 top_k=20 greedy=30 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 4, prompt 23 tok (reused 0), prefill 1470 ms, decode 12 tok in 3068 ms over 11 beats, mean rows 7.82, wall 278.9 ms/token, Length +aien-serve-http: chatcmpl-18e08f63189ddb1f001c: prompt 23 tok, reply 12 tok, finish length, prefill 1470 ms, decode 3068 ms (3.91 tok/s), sampling mode=greedy seed=1792590427730072911 temp=0 top_p=0.95 top_k=20 greedy=12 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 0, prompt 22 tok (reused 0), prefill 1447 ms, decode 18 tok in 3796 ms over 17 beats, mean rows 7.18, wall 223.3 ms/token, Length +aien-serve-http: chatcmpl-18e08f63189c17fe001b: prompt 22 tok, reply 18 tok, finish length, prefill 1447 ms, decode 3796 ms (4.74 tok/s), sampling mode=greedy seed=1792590401960153358 temp=0 top_p=0.95 top_k=20 greedy=18 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 5, prompt 24 tok (reused 0), prefill 1191 ms, decode 24 tok in 3460 ms over 24 beats, mean rows 6.29, wall 144.2 ms/token, Stop +aien-serve-http: chatcmpl-18e08f63740f1905001d: prompt 24 tok, reply 24 tok, finish stop, prefill 1191 ms, decode 3460 ms (6.94 tok/s), sampling mode=greedy seed=1792590424969250069 temp=0 top_p=0.95 top_k=20 greedy=25 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 2, prompt 20 tok (reused 0), prefill 685 ms, decode 40 tok in 7270 ms over 39 beats, mean rows 6.15, wall 186.4 ms/token, Length +aien-serve-http: chatcmpl-18e08f62bd14001d0019: prompt 20 tok, reply 40 tok, finish length, prefill 685 ms, decode 7270 ms (5.50 tok/s), sampling mode=greedy seed=1792590413309409037 temp=0 top_p=0.95 top_k=20 greedy=40 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 7, prompt 21 tok (reused 0), prefill 1403 ms, decode 32 tok in 5088 ms over 31 beats, mean rows 6.00, wall 164.1 ms/token, Length +aien-serve-http: chatcmpl-18e08f63189c11ae001a: prompt 21 tok, reply 32 tok, finish length, prefill 1403 ms, decode 5088 ms (6.29 tok/s), sampling mode=greedy seed=1792590401960149614 temp=0 top_p=0.95 top_k=20 greedy=32 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 3, prompt 28 tok (reused 0), prefill 1275 ms, decode 39 tok in 4096 ms over 38 beats, mean rows 4.95, wall 107.8 ms/token, Length +aien-serve-http: chatcmpl-18e08f63740f1945001e: prompt 28 tok, reply 39 tok, finish length, prefill 1275 ms, decode 4096 ms (9.52 tok/s), sampling mode=greedy seed=1792590424969249973 temp=0 top_p=0.95 top_k=20 greedy=39 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: leave: row 6, prompt 23 tok (reused 0), prefill 739 ms, decode 46 tok in 2880 ms over 45 beats, mean rows 3.27, wall 64.0 ms/token, Length +aien-serve-http: chatcmpl-18e08f63ee36c628001f: prompt 23 tok, reply 46 tok, finish length, prefill 739 ms, decode 2880 ms (15.97 tok/s), sampling mode=greedy seed=1792590418428736888 temp=0 top_p=0.95 top_k=20 greedy=46 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: qwen36-batch: spell over: 140 beats, 497 steps, 1527 row tokens (771 decoded), 60.3 ms/step wall, chip 60.0 ms/step, spell 30.3 s +aien-serve-http: qwen36-batch: chip lock after 0 ms +aien-serve-http: qwen36-batch: join: prompt 63 tok, reuse 0 tok (cold, row 1), queued 0 ms, now 1 rows +aien-serve-http: qwen36-batch: leave: row 1, prompt 63 tok (reused 0), prefill 1274 ms, decode 10 tok in 201 ms over 10 beats, mean rows 1.00, wall 20.1 ms/token, Stop +aien-serve-http: qwen36-batch: spell over: 14 beats, 73 steps, 73 row tokens (10 decoded), 20.1 ms/step wall, chip 20.1 ms/step, spell 1.5 s +aien-serve-http: chatcmpl-18e08f64c858deac0020: prompt 63 tok, reply 10 tok, finish stop, prefill 1274 ms, decode 201 ms (49.75 tok/s), sampling mode=greedy seed=1792590177275270732 temp=0 top_p=0.95 top_k=20 greedy=11 sampled=0 kept(min/med/mean/max)=0/0/0.00/0 kept1=0/0 top_prob(min/mean)=1.0000/1.0000 p_repeat=1.000e0 +aien-serve-http: SIGTERM received +aien-serve-http: shutting down: no new requests; finishing the one in flight and draining persistent KV +aien-serve-http: shutdown complete in 0 ms diff --git a/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/2026-10-20-q36-ceiling-numbers.md b/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/2026-10-20-q36-ceiling-numbers.md new file mode 100644 index 000000000..7077a6cd9 --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/2026-10-20-q36-ceiling-numbers.md @@ -0,0 +1,26 @@ + +## Numbers, checked in Wolfram from the real safetensors headers (coordinator, 2026-10-20) +Qwen3.6-35B-A3B FP8 on disk: 37.45 GB. Routed experts 33.02 GB (256 per layer x 40 layers, 3.22 MB each), lm_head 1.017 GB, embed 1.017 GB (row lookup, ~0 bytes at decode), linear attention 1.017 GB (30 layers), full attention 0.300 GB (10 layers), shared experts 0.129 GB, norms etc 0.042 GB, MTP head 0.018 GB, vision tower 0.893 GB (never read for text). +Bytes touched per token at decode (top-8 of 256 per layer): routed 1.032 GB + trunk 1.488 GB + lm_head 1.017 GB = 3.537 GB FP8. With W4 experts and W4 head: 2.512 GB. The lm_head is 29 percent of the FP8 bytes per token: a head lever is worth as much as the experts. +KV cache: 10 full-attention layers x 2 KV heads x 256 dim x K and V = 20,480 B/token bf16 (10,240 FP8); 32k context = 0.67 GB bf16. KV is small on this model; the weights are the whole story. +Memory ceiling, one head per stroke (measured GB10 207 to 237 GB/s; 273 on paper): + FP8: 58.5 to 67.0 tok/s (77 on paper) beat at 237 GB/s: 14.9 ms + W4 experts+head: 82.4 to 94.3 tok/s (109) beat at 237 GB/s: 10.6 ms +Reference, the 27B dense at W4 (13.65 GB/token): ceiling 15.2 to 17.4 tok/s; measured 14.29 = 0.82 of ceiling. The 35B MoE moves the ceiling 4 to 5.4x by reading fewer bytes, nothing else. +Math ceiling (118.81 TFLOPS bf16, 2 flop per weight): about 16,800 tok/s, so the stroke stays memory-bound up to about 250 heads; the knee for N heads per stroke will come from something else first (expert union, KV reads, launch cost), which is what to measure. +Expert union with N independent sequences on one stroke (8 of 256 per layer, expected distinct experts per layer): N=1: 8; N=2: 15.8; N=4: 30.5; N=8: 57.4; N=16: 102; N=32: 163. So routed bytes per stroke grow almost linearly with N until about N=8 and then saturate toward 256; the trunk and head (2.5 GB of the 3.5) are read once regardless of N. At N=8: routed 7.4 GB + trunk/head 2.5 GB = 9.9 GB per stroke for 8 tokens = 1.24 GB/token, ceiling about 190 tok/s total at 237 GB/s. At N=32: 21.1 + 2.5 = 23.6 GB per stroke for 32 tokens = 0.74 GB/token, about 320 tok/s total. These are the numbers H6 must meet or explain; real routing is correlated (domains share experts), so the measured union should sit BELOW these independent-draw figures; if it sits above, something is wrong. + +## Order (Drake 2026-10-20: "there's no real reason it has to go in any particular order, right?") +Right, with one exception that is physics, not habit. Within ONE token, layer L+1 reads the residual that layer L wrote, so the 40 layers run in order for that token (and token t+1 of one sequence waits for token t, unless a candidate head guesses it and the stroke verifies the guess). Everything else is free and the design should use that freedom: the 8 experts of a layer run in any order or all at once; the weight READS for a beat land in any order as long as they are in the cylinder before it fires (so disk and RAM layout follow the engines, not the model); different heads sit at different layers at the same time (head A at layer 30 while head B is at layer 3), which is how the pistons overlap; the next head's bytes load during this head's compute; the lm_head of one token overlaps the first layers of the next. Write the schedule so that only the true dependencies (residual chain within a token, token chain within a sequence, buffer full before fire) are edges, and every other order is left to the engine that wants it. Test: a host check that the schedule has exactly those edges and no others. + +## CORRECTION + max heads (coordinator, Wolfram, 2026-10-20 later) +The N-heads figures above (N=8 ~190, N=32 ~320 tok/s) left out the per-head cost. Each head carries its own DeltaNet state: 30 layers x 32 value heads x 128 x 128 f32 = 62.9 MB (f32 in our engine: omega src/omega_gpu_gdn_api.h OMEGA_GPU_GDN_STATE_FLOATS, sc qwen38_omega.rs states: Vec), read AND written every token = 126 MB per head per token, plus its KV read (20,480 B x context). Corrected, at 237 GB/s: + N heads | total tok/s 4k ctx | per head | memory || 32k ctx total | per head | memory + 1 | 63 | 63.3 | 0.1 GB || 55 | 54.7 | 0.7 GB + 4 | 130 | 32.5 | 0.6 || 98 | 24.6 | 2.9 + 8 | 164 | 20.4 | 1.2 || 116 | 14.6 | 5.9 + 32 | 250 | 7.8 | 4.7 || 155 | 4.8 | 23.5 + 128 | 491 | 3.8 | 18.8 || 221 | 1.7 | 94 + 512 | 849 | 1.7 | 75.2 || does not fit +The stroke never becomes math-bound (math ceiling ~16,800 tok/s). Total tok/s climbs toward a wall set by the per-head bytes, not the weights: 1,130 tok/s at 4k (f32 state), 297 at 32k; bf16 state raises 4k to 1,614. Heads that fit in a 60 GB budget (assumed budget, set it from MemAvailable after the 35B swap): ~408 at 4k, ~81 at 32k. +What this means for the engine: past about 8 heads the DeltaNet state is the biggest mover of bytes. Levers it names: state in bf16 (measure the drift), and candidate heads on ONE sequence (MTP / tree verify) read and write the state once for k tokens, so they amortize the state as well as the weights; independent sequences do not. diff --git a/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/SHA256SUMS b/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/SHA256SUMS new file mode 100644 index 000000000..a6bc3fc8e --- /dev/null +++ b/evidence/RECEIPTS-RECOVERED-20261027/q36-ceiling-notes-20261020/SHA256SUMS @@ -0,0 +1 @@ +63d7699a7ce2cfd791216ef986168f97eb211e17b225ddb421010ceb25fd6cb8 2026-10-20-q36-ceiling-numbers.md diff --git a/evidence/dattn-maxpos-128k-20261018/SHA256SUMS b/evidence/dattn-maxpos-128k-20261018/SHA256SUMS new file mode 100644 index 000000000..6b888476a --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/SHA256SUMS @@ -0,0 +1,15 @@ +d9f97cdd41468e3eb8a59e75a75ac8d46f8b99eeb3af9a16bbb3084f23d2bf6c receipt-baseline-matmul.json +cf2b3a3221f550d13a5f21fc9f30f8cffdc56ca890133545d8aa385cce798758 receipt-depth1.json +861f7c6039c8edc79d7a345560ac23652c40991120190c4391d140449d3c26ec receipt-main.json +f8b11afddc5258727d90b135e636b18ef3ff4fbd4201d5ce5d4ddce47e7963b2 receipt-noevict.json +995bdecbd5aab8b995475b6e0928f68c50954982e999e2e433be72d8fd88d90e receipt-persplit1024.json +cb8644c9485182b9b3be6dc6ccfd2ae50fd6723bf2da1adfa8cdb3f40b4e44e2 baseline-matmul.log +9299283f6a93f7ab1f548b05e42c1ddb693c6fc3ebd54b61f92f7bfd5a11d4e3 build.log +c64eecfb5f82da86267419c14d4c26364fce77816b260b62766cc59ab8d5ab69 depth1.log +6cbdc51faf9642bf5df1967a6895af0110738f59b1d913026d7239da926130e2 host-only.log +23ef187e257f146674f2c8755e7e6c59288c6826934b2fb76096a414b3b0a8fd main.log +e0e67d44010c6303d14eabef1aa26c5de325c53096cec23b88badcf0d9c5e703 noevict.log +2553ea7b000e8a78803ff5ef87dc16613183d37f6b2f7275e6ec6a57078a5805 persplit1024.log +4300659812ef5b97fb92306b0139350b7c93c82d79ae382925b0c1d21ad1bcb7 runner.log +2f0512cfebb60b3751133eab11007e16857e11de4671ee4cd4bde0bcb99c0368 sim.log +598a41e99f6a110681be8a477c5aabe7e95b2bd85ec6f96ce6b76d362c31ef5d device.txt diff --git a/evidence/dattn-maxpos-128k-20261018/baseline-matmul.log b/evidence/dattn-maxpos-128k-20261018/baseline-matmul.log new file mode 100644 index 000000000..3d0d25d87 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/baseline-matmul.log @@ -0,0 +1,4 @@ +PASS timing 1x2048x8192 upload_ms=144.1 ok_calls=100 median_ms=0.411 p90_ms=0.716 min_ms=0.309 max_ms=1.033 chip_ns_mean=433546 grid=64x1 e2e_first=2.36603e-07 e2e_last=2.36603e-07 repeat_mismatch=0 +PASS timing 1x8192x2048 upload_ms=105.2 ok_calls=100 median_ms=0.412 p90_ms=0.614 min_ms=0.365 max_ms=1.121 chip_ns_mean=474051 grid=64x1 e2e_first=5.21488e-07 e2e_last=5.21488e-07 repeat_mismatch=0 +PASS: 4 checks, 0 failed +baseline exit 0 (recorded) diff --git a/evidence/dattn-maxpos-128k-20261018/build.log b/evidence/dattn-maxpos-128k-20261018/build.log new file mode 100644 index 000000000..edf91d1fc --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/build.log @@ -0,0 +1 @@ +cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I/home/drakestapleton/workspace/physics-own30b-k/m16 -I/home/drakestapleton/workspace/physics-own30b-k/nvrm -I/home/drakestapleton/workspace/physics-own30b-k/third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I/home/drakestapleton/workspace/physics-own30b-k/third_party/nvidia-open-580.173.02/kernel-open/common/inc -I/home/drakestapleton/workspace/physics-own30b-k/third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I/home/drakestapleton/workspace/physics-own30b-k/third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o build/gpu_matmul_api_test tests/gpu_matmul_api_test.c build/libomega_gpu.a -lpthread -lm diff --git a/evidence/dattn-maxpos-128k-20261018/depth1.log b/evidence/dattn-maxpos-128k-20261018/depth1.log new file mode 100644 index 000000000..ef06ac237 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/depth1.log @@ -0,0 +1,18 @@ +cache alloc (1 layer, 131072 positions): rc=OK 861.6 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=2048 fill=0.0ms chip_med=37.4us (0.1 GB/s) call_med=39.5us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=14336 fill=0.0ms chip_med=39.7us (0.4 GB/s) call_med=41.8us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=524288 fill=0.0ms chip_med=65.2us (8.0 GB/s) call_med=67.3us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=1 kv_bytes=616448 fill=0.0ms chip_med=71.8us (8.6 GB/s) call_med=74.0us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=1 kv_bytes=2097152 fill=0.0ms chip_med=77.2us (27.2 GB/s) call_med=79.1us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=1 kv_bytes=8388608 fill=0.2ms chip_med=173.8us (48.3 GB/s) call_med=176.0us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=1 kv_bytes=16777216 fill=0.5ms chip_med=346.8us (48.4 GB/s) call_med=348.9us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=1 kv_bytes=67108864 fill=2.8ms chip_med=1150.7us (58.3 GB/s) call_med=1152.7us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=1 kv_bytes=134217728 fill=5.5ms chip_med=2306.3us (58.2 GB/s) call_med=2308.5us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=1 kv_bytes=204800000 fill=8.7ms chip_med=3524.0us (58.1 GB/s) call_med=3526.3us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=1 kv_bytes=268435456 fill=11.5ms chip_med=4641.6us (57.8 GB/s) call_med=4643.7us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS +depth 1 exit 0 (informational) diff --git a/evidence/dattn-maxpos-128k-20261018/device.txt b/evidence/dattn-maxpos-128k-20261018/device.txt new file mode 100644 index 000000000..8e526662d --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/device.txt @@ -0,0 +1,6 @@ +start 2026-10-18T10:47:18Z omega=268550ca63d8aeb0134d9170d6f73fae840aa291 branch=feat/dattn-maxpos-128k dirty=1 physics=/home/drakestapleton/workspace/physics-own30b-k physics_commit=6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf physics_lock=6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf +Linux spark-b87b 7.0.0-1019-nvidia #19~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Sun Sep 6 18:35:11 UTC 2 aarch64 aarch64 aarch64 GNU/Linux +NVIDIA GB10, 580.173.02 + total used free shared buff/cache available +Mem: 121 47 4 0 76 74 +end 2026-10-18T10:47:35Z diff --git a/evidence/dattn-maxpos-128k-20261018/host-only.log b/evidence/dattn-maxpos-128k-20261018/host-only.log new file mode 100644 index 000000000..de76b94e0 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/host-only.log @@ -0,0 +1,7 @@ +rope rows vs libm: 1013 positions x 64 dims, 4 one-ulp differences, 0 worse +hostmath vs libm: sincos max abs 2.22e-16, pow/exp/log max rel 1.31e-14 +codegen depth 1: 988 instructions, 112 registers (declared 120, 256 threads -> 30720 of 65536) +codegen depth 2: 996 instructions, 116 registers (declared 120, 256 threads -> 30720 of 65536) +codegen depth 3: 1004 instructions, 120 registers (declared 128, 256 threads -> 32768 of 65536) +codegen depth 4: 1012 instructions, 124 registers (declared 128, 256 threads -> 32768 of 65536) +gpu_decode_attn_test: 42 checks, 0 failed: PASS diff --git a/evidence/dattn-maxpos-128k-20261018/main.log b/evidence/dattn-maxpos-128k-20261018/main.log new file mode 100644 index 000000000..b99f23631 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/main.log @@ -0,0 +1,17 @@ +cache alloc (1 layer, 131072 positions): rc=OK 854.1 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=2048 fill=0.0ms chip_med=38.3us (0.1 GB/s) call_med=40.5us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=14336 fill=0.0ms chip_med=40.3us (0.4 GB/s) call_med=42.3us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=524288 fill=0.0ms chip_med=69.4us (7.6 GB/s) call_med=71.4us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=4 kv_bytes=616448 fill=0.0ms chip_med=71.8us (8.6 GB/s) call_med=73.8us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=78.9us (26.6 GB/s) call_med=80.8us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=176.0us (47.7 GB/s) call_med=177.9us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=351.1us (47.8 GB/s) call_med=353.2us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=4 kv_bytes=67108864 fill=2.3ms chip_med=1212.6us (55.3 GB/s) call_med=1214.4us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=4 kv_bytes=134217728 fill=5.0ms chip_med=2306.5us (58.2 GB/s) call_med=2308.9us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=4 kv_bytes=204800000 fill=8.8ms chip_med=3537.2us (57.9 GB/s) call_med=3542.3us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=4 kv_bytes=268435456 fill=9.7ms chip_med=4692.6us (57.2 GB/s) call_med=4695.6us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS diff --git a/evidence/dattn-maxpos-128k-20261018/noevict.log b/evidence/dattn-maxpos-128k-20261018/noevict.log new file mode 100644 index 000000000..792a51025 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/noevict.log @@ -0,0 +1,18 @@ +cache alloc (1 layer, 131072 positions): rc=OK 861.9 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=2048 fill=0.0ms chip_med=37.3us (0.1 GB/s) call_med=39.3us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=14336 fill=0.0ms chip_med=39.3us (0.4 GB/s) call_med=41.4us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=524288 fill=0.0ms chip_med=67.9us (7.7 GB/s) call_med=69.9us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=4 kv_bytes=616448 fill=0.0ms chip_med=71.9us (8.6 GB/s) call_med=73.7us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=80.7us (26.0 GB/s) call_med=82.8us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=164.9us (50.9 GB/s) call_med=166.8us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=352.3us (47.6 GB/s) call_med=354.3us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=4 kv_bytes=67108864 fill=2.3ms chip_med=1195.7us (56.1 GB/s) call_med=1197.5us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=4 kv_bytes=134217728 fill=4.7ms chip_med=2306.0us (58.2 GB/s) call_med=2308.1us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=4 kv_bytes=204800000 fill=7.4ms chip_med=3625.8us (56.5 GB/s) call_med=3628.0us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=4 kv_bytes=268435456 fill=11.3ms chip_med=4731.2us (56.7 GB/s) call_med=4733.4us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS +no-evict exit 0 (informational) diff --git a/evidence/dattn-maxpos-128k-20261018/persplit1024.log b/evidence/dattn-maxpos-128k-20261018/persplit1024.log new file mode 100644 index 000000000..96190c77a --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/persplit1024.log @@ -0,0 +1,18 @@ +cache alloc (1 layer, 131072 positions): rc=OK 853.5 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=2048 fill=0.0ms chip_med=37.8us (0.1 GB/s) call_med=40.0us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=14336 fill=0.0ms chip_med=39.1us (0.4 GB/s) call_med=41.1us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=524288 fill=0.0ms chip_med=68.0us (7.7 GB/s) call_med=70.0us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=616448 fill=0.0ms chip_med=82.0us (7.5 GB/s) call_med=84.0us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: inert (1 split, the combine is not exercised) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=168.9us (12.4 GB/s) call_med=171.1us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=1024 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=184.5us (45.5 GB/s) call_med=186.4us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=8x4 per_split=1024 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=229.9us (73.0 GB/s) call_med=231.9us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=1024 depth=4 kv_bytes=67108864 fill=2.2ms chip_med=777.9us (86.3 GB/s) call_med=780.2us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=64x4 per_split=1024 depth=4 kv_bytes=134217728 fill=4.7ms chip_med=1366.4us (98.2 GB/s) call_med=1368.5us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=98x4 per_split=1024 depth=4 kv_bytes=204800000 fill=7.3ms chip_med=2102.7us (97.4 GB/s) call_med=2104.9us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=1024 depth=4 kv_bytes=268435456 fill=9.7ms chip_med=3124.8us (85.9 GB/s) call_med=3127.4us reps=20 +gpu_decode_attn_test: 37 checks, 0 failed: PASS +per-split 1024 exit 0 (informational) diff --git a/evidence/dattn-maxpos-128k-20261018/receipt-baseline-matmul.json b/evidence/dattn-maxpos-128k-20261018/receipt-baseline-matmul.json new file mode 100644 index 000000000..4e6b056bf --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/receipt-baseline-matmul.json @@ -0,0 +1 @@ +{"schema":"OMEGA_GPU_MATMUL_API_TIMING_V1","cta_budget":64,"spin_us":0,"calls":100,"shapes":[{"m":1,"k":2048,"n":8192,"pass":true,"upload_ms":144.051,"ok_calls":100,"median_ms":0.4110,"p90_ms":0.7164,"min_ms":0.3087,"max_ms":1.0325,"chip_ns_mean":433546,"grid_x":64,"grid_y":1,"e2e_first":2.36603e-07,"e2e_last":2.36603e-07,"e2e_bad_first":0,"e2e_bad_last":0,"repeat_mismatch":0},{"m":1,"k":8192,"n":2048,"pass":true,"upload_ms":105.151,"ok_calls":100,"median_ms":0.4122,"p90_ms":0.6144,"min_ms":0.3654,"max_ms":1.1210,"chip_ns_mean":474051,"grid_x":64,"grid_y":1,"e2e_first":5.21488e-07,"e2e_last":5.21488e-07,"e2e_bad_first":0,"e2e_bad_last":0,"repeat_mismatch":0}],"blocked":false,"checks":4,"failed":0,"verdict":"OMEGA_GPU_MATMUL_TIMING_PASS"} diff --git a/evidence/dattn-maxpos-128k-20261018/receipt-depth1.json b/evidence/dattn-maxpos-128k-20261018/receipt-depth1.json new file mode 100644 index 000000000..dfc726292 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/receipt-depth1.json @@ -0,0 +1 @@ +{"receipt":"OMEGA_GPU_DECODE_ATTN_V1","reps":20,"evict":1,"points":[{"name":"context 1","pos":0,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (1 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":2048,"fill_ms":0.0,"chip_median_ns":37376,"gb_per_s":0.1,"call_median_ns":39489,"reps":20},{"name":"context 7","pos":6,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":14336,"fill_ms":0.0,"chip_median_ns":39745,"gb_per_s":0.4,"call_median_ns":41809,"reps":20},{"name":"context 256","pos":255,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":524288,"fill_ms":0.0,"chip_median_ns":65218,"gb_per_s":8.0,"call_median_ns":67282,"reps":20},{"name":"context 301 sharp q","pos":300,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":2,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":616448,"fill_ms":0.0,"chip_median_ns":71778,"gb_per_s":8.6,"call_median_ns":73970,"reps":20},{"name":"context 301 sharp q mutant 1","caught":1,"rc":"OK","bad":3630,"worst_of_tol":25.864},{"name":"context 301 sharp q mutant 2","caught":1,"rc":"OK","bad":3773,"worst_of_tol":40.263},{"name":"context 301 sharp q mutant 3","caught":1,"rc":"OK","bad":820,"worst_of_tol":6.838},{"name":"context 301 sharp q mutant 4","caught":1,"rc":"OK","bad":2010,"worst_of_tol":18.655},{"name":"context 1024","pos":1023,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":4,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":2097152,"fill_ms":0.0,"chip_median_ns":77202,"gb_per_s":27.2,"call_median_ns":79122,"reps":20},{"name":"context 4096","pos":4095,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":16,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":8388608,"fill_ms":0.2,"chip_median_ns":173828,"gb_per_s":48.3,"call_median_ns":175988,"reps":20},{"name":"context 8192","pos":8191,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":32,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":16777216,"fill_ms":0.5,"chip_median_ns":346824,"gb_per_s":48.4,"call_median_ns":348920,"reps":20},{"name":"context 32768","pos":32767,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":128,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":67108864,"fill_ms":2.8,"chip_median_ns":1150716,"gb_per_s":58.3,"call_median_ns":1152716,"reps":20},{"name":"context 65536 (old cap)","pos":65535,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":256,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":134217728,"fill_ms":5.5,"chip_median_ns":2306328,"gb_per_s":58.2,"call_median_ns":2308456,"reps":20},{"name":"context 100000","pos":99999,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":391,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":204800000,"fill_ms":8.7,"chip_median_ns":3523989,"gb_per_s":58.1,"call_median_ns":3526262,"reps":20},{"name":"context 131072 (cap)","pos":131071,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":512,"grid_y":4,"per_split":256,"depth":1,"kv_bytes":268435456,"fill_ms":11.5,"chip_median_ns":4641632,"gb_per_s":57.8,"call_median_ns":4643729,"reps":20}],"checks":38,"failed":0,"device_opens":1,"verdict":"OMEGA_GPU_DECODE_ATTN_PASS"} diff --git a/evidence/dattn-maxpos-128k-20261018/receipt-main.json b/evidence/dattn-maxpos-128k-20261018/receipt-main.json new file mode 100644 index 000000000..f6f5991a6 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/receipt-main.json @@ -0,0 +1 @@ +{"receipt":"OMEGA_GPU_DECODE_ATTN_V1","reps":20,"evict":1,"points":[{"name":"context 1","pos":0,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (1 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":2048,"fill_ms":0.0,"chip_median_ns":38305,"gb_per_s":0.1,"call_median_ns":40465,"reps":20},{"name":"context 7","pos":6,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":14336,"fill_ms":0.0,"chip_median_ns":40289,"gb_per_s":0.4,"call_median_ns":42289,"reps":20},{"name":"context 256","pos":255,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":524288,"fill_ms":0.0,"chip_median_ns":69378,"gb_per_s":7.6,"call_median_ns":71362,"reps":20},{"name":"context 301 sharp q","pos":300,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":2,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":616448,"fill_ms":0.0,"chip_median_ns":71841,"gb_per_s":8.6,"call_median_ns":73761,"reps":20},{"name":"context 301 sharp q mutant 1","caught":1,"rc":"OK","bad":3630,"worst_of_tol":25.864},{"name":"context 301 sharp q mutant 2","caught":1,"rc":"OK","bad":3773,"worst_of_tol":40.263},{"name":"context 301 sharp q mutant 3","caught":1,"rc":"OK","bad":820,"worst_of_tol":6.838},{"name":"context 301 sharp q mutant 4","caught":1,"rc":"OK","bad":2010,"worst_of_tol":18.655},{"name":"context 1024","pos":1023,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":4,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":2097152,"fill_ms":0.0,"chip_median_ns":78898,"gb_per_s":26.6,"call_median_ns":80850,"reps":20},{"name":"context 4096","pos":4095,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":16,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":8388608,"fill_ms":0.2,"chip_median_ns":175972,"gb_per_s":47.7,"call_median_ns":177909,"reps":20},{"name":"context 8192","pos":8191,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":32,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":16777216,"fill_ms":0.4,"chip_median_ns":351113,"gb_per_s":47.8,"call_median_ns":353161,"reps":20},{"name":"context 32768","pos":32767,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":128,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":67108864,"fill_ms":2.3,"chip_median_ns":1212589,"gb_per_s":55.3,"call_median_ns":1214445,"reps":20},{"name":"context 65536 (old cap)","pos":65535,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":256,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":134217728,"fill_ms":5.0,"chip_median_ns":2306519,"gb_per_s":58.2,"call_median_ns":2308855,"reps":20},{"name":"context 100000","pos":99999,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":391,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":204800000,"fill_ms":8.8,"chip_median_ns":3537205,"gb_per_s":57.9,"call_median_ns":3542277,"reps":20},{"name":"context 131072 (cap)","pos":131071,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":512,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":268435456,"fill_ms":9.7,"chip_median_ns":4692609,"gb_per_s":57.2,"call_median_ns":4695569,"reps":20}],"checks":38,"failed":0,"device_opens":1,"verdict":"OMEGA_GPU_DECODE_ATTN_PASS"} diff --git a/evidence/dattn-maxpos-128k-20261018/receipt-noevict.json b/evidence/dattn-maxpos-128k-20261018/receipt-noevict.json new file mode 100644 index 000000000..0c684a680 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/receipt-noevict.json @@ -0,0 +1 @@ +{"receipt":"OMEGA_GPU_DECODE_ATTN_V1","reps":20,"evict":0,"points":[{"name":"context 1","pos":0,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (1 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":2048,"fill_ms":0.0,"chip_median_ns":37281,"gb_per_s":0.1,"call_median_ns":39344,"reps":20},{"name":"context 7","pos":6,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":14336,"fill_ms":0.0,"chip_median_ns":39329,"gb_per_s":0.4,"call_median_ns":41361,"reps":20},{"name":"context 256","pos":255,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":524288,"fill_ms":0.0,"chip_median_ns":67906,"gb_per_s":7.7,"call_median_ns":69938,"reps":20},{"name":"context 301 sharp q","pos":300,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":2,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":616448,"fill_ms":0.0,"chip_median_ns":71906,"gb_per_s":8.6,"call_median_ns":73746,"reps":20},{"name":"context 301 sharp q mutant 1","caught":1,"rc":"OK","bad":3630,"worst_of_tol":25.864},{"name":"context 301 sharp q mutant 2","caught":1,"rc":"OK","bad":3773,"worst_of_tol":40.263},{"name":"context 301 sharp q mutant 3","caught":1,"rc":"OK","bad":820,"worst_of_tol":6.838},{"name":"context 301 sharp q mutant 4","caught":1,"rc":"OK","bad":2010,"worst_of_tol":18.655},{"name":"context 1024","pos":1023,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":4,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":2097152,"fill_ms":0.0,"chip_median_ns":80722,"gb_per_s":26.0,"call_median_ns":82834,"reps":20},{"name":"context 4096","pos":4095,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":16,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":8388608,"fill_ms":0.2,"chip_median_ns":164884,"gb_per_s":50.9,"call_median_ns":166836,"reps":20},{"name":"context 8192","pos":8191,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":32,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":16777216,"fill_ms":0.4,"chip_median_ns":352281,"gb_per_s":47.6,"call_median_ns":354313,"reps":20},{"name":"context 32768","pos":32767,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":128,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":67108864,"fill_ms":2.3,"chip_median_ns":1195660,"gb_per_s":56.1,"call_median_ns":1197452,"reps":20},{"name":"context 65536 (old cap)","pos":65535,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":256,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":134217728,"fill_ms":4.7,"chip_median_ns":2306039,"gb_per_s":58.2,"call_median_ns":2308072,"reps":20},{"name":"context 100000","pos":99999,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":391,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":204800000,"fill_ms":7.4,"chip_median_ns":3625831,"gb_per_s":56.5,"call_median_ns":3628039,"reps":20},{"name":"context 131072 (cap)","pos":131071,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":512,"grid_y":4,"per_split":256,"depth":4,"kv_bytes":268435456,"fill_ms":11.3,"chip_median_ns":4731234,"gb_per_s":56.7,"call_median_ns":4733442,"reps":20}],"checks":38,"failed":0,"device_opens":1,"verdict":"OMEGA_GPU_DECODE_ATTN_PASS"} diff --git a/evidence/dattn-maxpos-128k-20261018/receipt-persplit1024.json b/evidence/dattn-maxpos-128k-20261018/receipt-persplit1024.json new file mode 100644 index 000000000..d8a853b0e --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/receipt-persplit1024.json @@ -0,0 +1 @@ +{"receipt":"OMEGA_GPU_DECODE_ATTN_V1","reps":20,"evict":1,"points":[{"name":"context 1","pos":0,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (1 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":2048,"fill_ms":0.0,"chip_median_ns":37825,"gb_per_s":0.1,"call_median_ns":39985,"reps":20},{"name":"context 7","pos":6,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":14336,"fill_ms":0.0,"chip_median_ns":39073,"gb_per_s":0.4,"call_median_ns":41121,"reps":20},{"name":"context 256","pos":255,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":524288,"fill_ms":0.0,"chip_median_ns":68050,"gb_per_s":7.7,"call_median_ns":69953,"reps":20},{"name":"context 301 sharp q","pos":300,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":616448,"fill_ms":0.0,"chip_median_ns":82018,"gb_per_s":7.5,"call_median_ns":83986,"reps":20},{"name":"context 301 sharp q mutant 1","caught":1,"rc":"OK","bad":3630,"worst_of_tol":25.864},{"name":"context 301 sharp q mutant 2","caught":1,"rc":"OK","bad":3773,"worst_of_tol":40.263},{"name":"context 301 sharp q mutant 3","caught":1,"rc":"OK","bad":820,"worst_of_tol":6.838},{"name":"context 1024","pos":1023,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":1,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":2097152,"fill_ms":0.0,"chip_median_ns":168884,"gb_per_s":12.4,"call_median_ns":171076,"reps":20},{"name":"context 4096","pos":4095,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":4,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":8388608,"fill_ms":0.2,"chip_median_ns":184469,"gb_per_s":45.5,"call_median_ns":186389,"reps":20},{"name":"context 8192","pos":8191,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":8,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":16777216,"fill_ms":0.4,"chip_median_ns":229909,"gb_per_s":73.0,"call_median_ns":231877,"reps":20},{"name":"context 32768","pos":32767,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":32,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":67108864,"fill_ms":2.2,"chip_median_ns":777939,"gb_per_s":86.3,"call_median_ns":780211,"reps":20},{"name":"context 65536 (old cap)","pos":65535,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":64,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":134217728,"fill_ms":4.7,"chip_median_ns":1366401,"gb_per_s":98.2,"call_median_ns":1368545,"reps":20},{"name":"context 100000","pos":99999,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":98,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":204800000,"fill_ms":7.3,"chip_median_ns":2102707,"gb_per_s":97.4,"call_median_ns":2104883,"reps":20},{"name":"context 131072 (cap)","pos":131071,"rc":"OK","bad":0,"worst_of_tol":0.000,"rows":"ok (0 one-ulp k flips)","second_call_identical":1,"grid_x":128,"grid_y":4,"per_split":1024,"depth":4,"kv_bytes":268435456,"fill_ms":9.7,"chip_median_ns":3124811,"gb_per_s":85.9,"call_median_ns":3127355,"reps":20}],"checks":37,"failed":0,"device_opens":1,"verdict":"OMEGA_GPU_DECODE_ATTN_PASS"} diff --git a/evidence/dattn-maxpos-128k-20261018/runner.log b/evidence/dattn-maxpos-128k-20261018/runner.log new file mode 100644 index 000000000..6eaf90997 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/runner.log @@ -0,0 +1,98 @@ +rope rows vs libm: 1013 positions x 64 dims, 4 one-ulp differences, 0 worse +hostmath vs libm: sincos max abs 2.22e-16, pow/exp/log max rel 1.31e-14 +codegen depth 1: 988 instructions, 112 registers (declared 120, 256 threads -> 30720 of 65536) +codegen depth 2: 996 instructions, 116 registers (declared 120, 256 threads -> 30720 of 65536) +codegen depth 3: 1004 instructions, 120 registers (declared 128, 256 threads -> 32768 of 65536) +codegen depth 4: 1012 instructions, 124 registers (declared 128, 256 threads -> 32768 of 65536) +gpu_decode_attn_test: 42 checks, 0 failed: PASS +sim context 1 depth 1: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 7 depth 2: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 7, sharp q (x4) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 256 (full chunk, 1 split) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 257 (2 splits, last holds one position) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 301 (2 splits) depth 3: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 701 (3 splits) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 701 (per_split 512: 2 chunks per CTA) depth 2: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim mutant 1 at context 301: caught (bad=4601 worst=24.241 rows: k[0] chip bf76 ref becc) +sim mutant 2 at context 301: caught (bad=3756 worst=37.139 rows: ok (0 one-ulp k flips)) +sim mutant 3 at context 301: caught (bad=2114 worst=16.257 rows: v[0] chip 0000 ref bf4c) +sim mutant 4 at context 301: caught (bad=2233 worst=21.965 rows: ok (0 one-ulp k flips)) +sim: 6925320 warp issues in total +gpu_decode_attn_test: 12 checks, 0 failed: PASS +PASS timing 1x2048x8192 upload_ms=144.1 ok_calls=100 median_ms=0.411 p90_ms=0.716 min_ms=0.309 max_ms=1.033 chip_ns_mean=433546 grid=64x1 e2e_first=2.36603e-07 e2e_last=2.36603e-07 repeat_mismatch=0 +PASS timing 1x8192x2048 upload_ms=105.2 ok_calls=100 median_ms=0.412 p90_ms=0.614 min_ms=0.365 max_ms=1.121 chip_ns_mean=474051 grid=64x1 e2e_first=5.21488e-07 e2e_last=5.21488e-07 repeat_mismatch=0 +PASS: 4 checks, 0 failed +baseline exit 0 (recorded) +cache alloc (1 layer, 131072 positions): rc=OK 854.1 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=2048 fill=0.0ms chip_med=38.3us (0.1 GB/s) call_med=40.5us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=14336 fill=0.0ms chip_med=40.3us (0.4 GB/s) call_med=42.3us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=524288 fill=0.0ms chip_med=69.4us (7.6 GB/s) call_med=71.4us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=4 kv_bytes=616448 fill=0.0ms chip_med=71.8us (8.6 GB/s) call_med=73.8us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=78.9us (26.6 GB/s) call_med=80.8us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=176.0us (47.7 GB/s) call_med=177.9us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=351.1us (47.8 GB/s) call_med=353.2us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=4 kv_bytes=67108864 fill=2.3ms chip_med=1212.6us (55.3 GB/s) call_med=1214.4us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=4 kv_bytes=134217728 fill=5.0ms chip_med=2306.5us (58.2 GB/s) call_med=2308.9us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=4 kv_bytes=204800000 fill=8.8ms chip_med=3537.2us (57.9 GB/s) call_med=3542.3us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=4 kv_bytes=268435456 fill=9.7ms chip_med=4692.6us (57.2 GB/s) call_med=4695.6us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS +cache alloc (1 layer, 131072 positions): rc=OK 861.9 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=2048 fill=0.0ms chip_med=37.3us (0.1 GB/s) call_med=39.3us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=14336 fill=0.0ms chip_med=39.3us (0.4 GB/s) call_med=41.4us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=4 kv_bytes=524288 fill=0.0ms chip_med=67.9us (7.7 GB/s) call_med=69.9us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=4 kv_bytes=616448 fill=0.0ms chip_med=71.9us (8.6 GB/s) call_med=73.7us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=80.7us (26.0 GB/s) call_med=82.8us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=164.9us (50.9 GB/s) call_med=166.8us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=352.3us (47.6 GB/s) call_med=354.3us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=4 kv_bytes=67108864 fill=2.3ms chip_med=1195.7us (56.1 GB/s) call_med=1197.5us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=4 kv_bytes=134217728 fill=4.7ms chip_med=2306.0us (58.2 GB/s) call_med=2308.1us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=4 kv_bytes=204800000 fill=7.4ms chip_med=3625.8us (56.5 GB/s) call_med=3628.0us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=4 kv_bytes=268435456 fill=11.3ms chip_med=4731.2us (56.7 GB/s) call_med=4733.4us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS +no-evict exit 0 (informational) +cache alloc (1 layer, 131072 positions): rc=OK 861.6 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=2048 fill=0.0ms chip_med=37.4us (0.1 GB/s) call_med=39.5us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=14336 fill=0.0ms chip_med=39.7us (0.4 GB/s) call_med=41.8us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=256 depth=1 kv_bytes=524288 fill=0.0ms chip_med=65.2us (8.0 GB/s) call_med=67.3us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=2x4 per_split=256 depth=1 kv_bytes=616448 fill=0.0ms chip_med=71.8us (8.6 GB/s) call_med=74.0us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: caught (rc=OK bad=2010 worst=18.655) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=256 depth=1 kv_bytes=2097152 fill=0.0ms chip_med=77.2us (27.2 GB/s) call_med=79.1us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=16x4 per_split=256 depth=1 kv_bytes=8388608 fill=0.2ms chip_med=173.8us (48.3 GB/s) call_med=176.0us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=256 depth=1 kv_bytes=16777216 fill=0.5ms chip_med=346.8us (48.4 GB/s) call_med=348.9us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=256 depth=1 kv_bytes=67108864 fill=2.8ms chip_med=1150.7us (58.3 GB/s) call_med=1152.7us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=256x4 per_split=256 depth=1 kv_bytes=134217728 fill=5.5ms chip_med=2306.3us (58.2 GB/s) call_med=2308.5us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=391x4 per_split=256 depth=1 kv_bytes=204800000 fill=8.7ms chip_med=3524.0us (58.1 GB/s) call_med=3526.3us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=512x4 per_split=256 depth=1 kv_bytes=268435456 fill=11.5ms chip_med=4641.6us (57.8 GB/s) call_med=4643.7us reps=20 +gpu_decode_attn_test: 38 checks, 0 failed: PASS +depth 1 exit 0 (informational) +cache alloc (1 layer, 131072 positions): rc=OK 853.5 ms () +chip context 1 rc=OK bad=0 worst=0.000 rows=ok (1 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=2048 fill=0.0ms chip_med=37.8us (0.1 GB/s) call_med=40.0us reps=20 +chip context 7 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=14336 fill=0.0ms chip_med=39.1us (0.4 GB/s) call_med=41.1us reps=20 +chip context 256 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=524288 fill=0.0ms chip_med=68.0us (7.7 GB/s) call_med=70.0us reps=20 +chip context 301 sharp q rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=616448 fill=0.0ms chip_med=82.0us (7.5 GB/s) call_med=84.0us reps=20 +chip context 301 sharp q mutant 1: caught (rc=OK bad=3630 worst=25.864) +chip context 301 sharp q mutant 2: caught (rc=OK bad=3773 worst=40.263) +chip context 301 sharp q mutant 3: caught (rc=OK bad=820 worst=6.838) +chip context 301 sharp q mutant 4: inert (1 split, the combine is not exercised) +chip context 1024 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=1x4 per_split=1024 depth=4 kv_bytes=2097152 fill=0.0ms chip_med=168.9us (12.4 GB/s) call_med=171.1us reps=20 +chip context 4096 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=4x4 per_split=1024 depth=4 kv_bytes=8388608 fill=0.2ms chip_med=184.5us (45.5 GB/s) call_med=186.4us reps=20 +chip context 8192 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=8x4 per_split=1024 depth=4 kv_bytes=16777216 fill=0.4ms chip_med=229.9us (73.0 GB/s) call_med=231.9us reps=20 +chip context 32768 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=32x4 per_split=1024 depth=4 kv_bytes=67108864 fill=2.2ms chip_med=777.9us (86.3 GB/s) call_med=780.2us reps=20 +chip context 65536 (old cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=64x4 per_split=1024 depth=4 kv_bytes=134217728 fill=4.7ms chip_med=1366.4us (98.2 GB/s) call_med=1368.5us reps=20 +chip context 100000 rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=98x4 per_split=1024 depth=4 kv_bytes=204800000 fill=7.3ms chip_med=2102.7us (97.4 GB/s) call_med=2104.9us reps=20 +chip context 131072 (cap) rc=OK bad=0 worst=0.000 rows=ok (0 one-ulp k flips) grid=128x4 per_split=1024 depth=4 kv_bytes=268435456 fill=9.7ms chip_med=3124.8us (85.9 GB/s) call_med=3127.4us reps=20 +gpu_decode_attn_test: 37 checks, 0 failed: PASS +per-split 1024 exit 0 (informational) +GPU_DECODE_ATTN_CHIP: PASS +rc=0 diff --git a/evidence/dattn-maxpos-128k-20261018/sim.log b/evidence/dattn-maxpos-128k-20261018/sim.log new file mode 100644 index 000000000..95adec6d8 --- /dev/null +++ b/evidence/dattn-maxpos-128k-20261018/sim.log @@ -0,0 +1,14 @@ +sim context 1 depth 1: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 7 depth 2: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 7, sharp q (x4) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 256 (full chunk, 1 split) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 257 (2 splits, last holds one position) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 301 (2 splits) depth 3: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 701 (3 splits) depth 4: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim context 701 (per_split 512: 2 chunks per CTA) depth 2: ok bad=0 worst=0.000 rows: ok (0 one-ulp k flips) +sim mutant 1 at context 301: caught (bad=4601 worst=24.241 rows: k[0] chip bf76 ref becc) +sim mutant 2 at context 301: caught (bad=3756 worst=37.139 rows: ok (0 one-ulp k flips)) +sim mutant 3 at context 301: caught (bad=2114 worst=16.257 rows: v[0] chip 0000 ref bf4c) +sim mutant 4 at context 301: caught (bad=2233 worst=21.965 rows: ok (0 one-ulp k flips)) +sim: 6925320 warp issues in total +gpu_decode_attn_test: 12 checks, 0 failed: PASS diff --git a/examples/semantic-codebook/README.md b/examples/semantic-codebook/README.md new file mode 100644 index 000000000..da7842543 --- /dev/null +++ b/examples/semantic-codebook/README.md @@ -0,0 +1,63 @@ +# Seeded Omega local semantic short-code smoke + +**Status: PROPOSED / compiler and native execution NOT_RUN.** Source: dispatch-v0.om; exact synthetic dictionary: codebook-v0.txt; proposed contract: [semantic-codebook-v0.md](../../spec/semantic-codebook-v0.md). Work: [Omega #721](https://github.com/aien-dev/omega-mv/issues/721), [Architecture #315](https://github.com/aien-dev/aien-architecture-mv/issues/315). + +## The synthetic 256-bit root + +The UTF-8 bytes of codebook-v0.txt including the final newline hash to SHA-256: + + a4d36c23819c865d1d3ae271508fee7e38c1919f62852821ac19f80c3714b0f3 + +Its little-endian unsigned 64-bit limbs are: + + 6739245970865574820 + 9146405468906863133 + 2389306260950466872 + 17559557173790906796 + +Independent external fixture check (not product code): + + sha256sum examples/semantic-codebook/codebook-v0.txt + +The program compares all four limbs and one epoch; it does not independently authenticate the supplied root, validate full Omega canonical semantic identities or check capability authority. + +## Expected input/result test cases + +All admitted results are u8 values encoded as unsigned u16 values from 0 through 255. Rejected operations use values above 65280, so a valid u8 result is not confused with a refusal. This encoding is **only for this toy**, not a general production result ABI. + +| Case | Short code | Epoch | x | parameter | Expected result | +| --- | ---: | ---: | ---: | ---: | ---: | +| add one | 0 | 9 | 41 | 0 | 42 | +| multiply two | 1 | 9 | 21 | 0 | 42 | +| twice plus parameter | 2 | 9 | 20 | 2 | 42 | +| wrapping add | 0 | 9 | 255 | 0 | 0 | +| wrapping multiply | 1 | 9 | 128 | 0 | 0 | +| wrapping affine | 2 | 9 | 127 | 2 | 0 | +| stale epoch | 0 | 8 | 41 | 0 | 65281 (FF01) | +| unknown code | 3 | 9 | 41 | 0 | 65282 (FF02) | +| changed root limb | 0 | 9 | 41 | 0 | 65283 (FF03) | + +## Owner-run native test (AArch64 Linux, no GPU required) + +Execute only on a claimed isolated, source-pinned Omega worktree. From the repo root: + + sh seed/omega-from-seed.sh + mkdir -p build/semcode + seed/out/omc < examples/semantic-codebook/dispatch-v0.om > build/semcode/dispatch-v0 + chmod +x build/semcode/dispatch-v0 + timeout 5 build/semcode/dispatch-v0 + echo "$?" + +Expected compile rc=0 and program exit rc=0. This command sequence was **NOT_RUN** by the creator of this GitHub branch. The harness tests nine cases internally and returns a distinct nonzero status when any check fails. The native compiler may reject or miscompile a new program; if so record the exact error and fix through the existing seed/compiler owner. Do not infer PASS from GitHub file creation. + +The code uses the currently documented seed grammar: fixed struct, view parameter, function calls, u8/u16/u64 arithmetic, comparisons, conditional returns. If a call/struct capability is missing at the chosen pinned seed profile, stop with MISSING_CAPABILITY and the relevant existing seed owner; no foreign product fallback. + +## First independent review requirements + +1. A *second* checker reconstructs the synthetic hash from the exact fixture bytes, independently computes all nine outcomes including unsigned-u8 wraparound, and catches mutated expected values. +2. Verify the source actually compiles and returns zero on the named pinned AArch64 seed compiler. Record SHA256 of source, compiler binary, compiled binary, exact command/host identity and actual stdout/stderr. +3. Audit why a caller-provided matching root is **not** authentication. Production admission must verify full canonical Omega semantic/contract identity, signed evidence and capability before any short reference becomes executable. +4. Keep short-code compressed signaling and program-body factoring separate. The toy does **not** reduce final executable size, remove LLM/35B weights or lower measured RAM bandwidth. +5. File additional adversarial cases under [#721](https://github.com/aien-dev/omega-mv/issues/721) after formal contract freeze, not by changing these fixture bytes silently. + +This starter PR is an implementation **example**, not a verified project-wide semantic-compression feature. \ No newline at end of file diff --git a/examples/semantic-codebook/codebook-v0.txt b/examples/semantic-codebook/codebook-v0.txt new file mode 100644 index 000000000..6920ca668 --- /dev/null +++ b/examples/semantic-codebook/codebook-v0.txt @@ -0,0 +1,9 @@ +omega.semcode.smoke.v0 +version=0 +epoch=9 +atom[0]=u8:add1:u8->u8 +atom[1]=u8:mul2:u8->u8 +atom[2]=u8:affine2plus:u8,u8->u8 +status_ff01=epoch +status_ff02=index +status_ff03=digest diff --git a/examples/semantic-codebook/dispatch-v0.om b/examples/semantic-codebook/dispatch-v0.om new file mode 100644 index 000000000..e79fedcb3 --- /dev/null +++ b/examples/semantic-codebook/dispatch-v0.om @@ -0,0 +1,68 @@ +note SPDX-License-Identifier: AGPL-3.0-only +note SEM-1 research smoke only. 256-bit root from codebook-v0.txt, untrusted caller. +note This source does not validate the canonical program IDs, signatures, or capabilities. +note A 16-bit return is 0x00vv for a successful u8 result, or 0xffNN for refusal. +note First-party executable syntax is seeded Omega .om, not legacy .osc. + +struct Root a ulong b ulong c ulong d ulong end + +fn dispatch root view Root code uchar epoch uchar x uchar p uchar to ushort +if ne get root a 6739245970865574820 +ret 65283 +end +if ne get root b 9146405468906863133 +ret 65283 +end +if ne get root c 2389306260950466872 +ret 65283 +end +if ne get root d 17559557173790906796 +ret 65283 +end +if ne epoch 9 +ret 65281 +end +if gt code 2 +ret 65282 +end +if eq code 0 +ret ushort add x 1 +end +if eq code 1 +ret ushort mul x 2 +end +ret ushort add mul x 2 p +end + +fn main to int +root = new Root 6739245970865574820 9146405468906863133 2389306260950466872 17559557173790906796 +if ne dispatch root 0 9 41 0 42 +ret 1 +end +if ne dispatch root 1 9 21 0 42 +ret 2 +end +if ne dispatch root 2 9 20 2 42 +ret 3 +end +if ne dispatch root 0 9 255 0 0 +ret 4 +end +if ne dispatch root 1 9 128 0 0 +ret 5 +end +if ne dispatch root 2 9 127 2 0 +ret 6 +end +if ne dispatch root 0 8 41 0 65281 +ret 7 +end +if ne dispatch root 3 9 41 0 65282 +ret 8 +end +bad = new Root 6739245970865574820 9146405468906863133 2389306260950466872 17559557173790906797 +if ne dispatch bad 0 9 41 0 65283 +ret 9 +end +ret 0 +end diff --git a/mk/.crumb b/mk/.crumb index e38efa48f..e20192f79 100644 --- a/mk/.crumb +++ b/mk/.crumb @@ -7,14 +7,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-28T03:06:12Z", + "compiled_at": "2026-10-30T14:43:13Z", "compiler": "crumb-compile/1", - "digest": "sha256:8f0e5cb325040247440527f6b54b65cf72c47ff5adca75b4f32a1ddf2b2d6ade", + "digest": "sha256:b3962e76064f21cffac99f4ccf6152ab08e20971c86e764c96ac6e9cd741df82", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 75, - "generated_at_commit": "79b8c1f9c24195c53ac8dad111d35175a4431506", - "source_tree": "sha256:b8302c1e15664dfe98c550a03830f5d4cf75c5451a6c75eed5042e623dea5d10" + "files": 76, + "generated_at_commit": "c2be51d02bf84ceb45269dd8d51ce63c2954c346", + "source_tree": "sha256:8139c03987a06dc2524e83db3e384789b6bcb7c2de8bd0a349cfe498a03ebe10" }, "owner_lane": "", "provenance": { diff --git a/mk/omega-mufu-ftz.mk b/mk/omega-mufu-ftz.mk new file mode 100644 index 000000000..00ebb48d3 --- /dev/null +++ b/mk/omega-mufu-ftz.mk @@ -0,0 +1,19 @@ +# MUFU flush rule (omega #462): the GB10 MUFU unit (EX2 / RCP / RSQ) flushes a subnormal input or result to a +# sign-preserving zero. tests/bw_mufu_ftz.h is the one host model of it; every warp simulator and SwiGLU host reference +# routes through it. test-mufu-ftz runs the helper unit test, then one MUFU instruction through each simulator's +# ws_lane_exec (bw_warp_sim.h, _k, _pa, _tc). Picked up by `-include mk/*.mk`. Host only: opens no device, needs no +# physics headers, takes no chip lock. The attention test's own per-thread simulator is checked by +# `gpu_attention_test --host-only` (test-gpu-attention). +MUFU_FTZ_SIMS := bw_warp_sim bw_warp_sim_k bw_warp_sim_pa bw_warp_sim_tc +MUFU_FTZ_CFLAGS := -std=gnu11 -O2 -Wall -Wextra -Werror -D_GNU_SOURCE -ffp-contract=off -Isrc -Itests +.PHONY: test-mufu-ftz +$(OUT_DIR)/test_mufu_ftz_helper: tests/bw_mufu_ftz_test.c tests/bw_mufu_ftz.h + @mkdir -p $(OUT_DIR) + gcc $(MUFU_FTZ_CFLAGS) -o $@ tests/bw_mufu_ftz_test.c -lm +$(OUT_DIR)/test_mufu_ftz_%: tests/bw_mufu_ftz_test.c tests/bw_mufu_ftz.h tests/%.h tests/bw_hmma_model.h tests/bw_qmma_model.h src/omega_blackwell_codegen.h + @mkdir -p $(OUT_DIR) + gcc $(MUFU_FTZ_CFLAGS) -DWS_SIM_HDR='"$*.h"' -o $@ tests/bw_mufu_ftz_test.c -lm +test-mufu-ftz: $(OUT_DIR)/test_mufu_ftz_helper $(addprefix $(OUT_DIR)/test_mufu_ftz_,$(MUFU_FTZ_SIMS)) + $(OUT_DIR)/test_mufu_ftz_helper + @for s in $(MUFU_FTZ_SIMS); do $(OUT_DIR)/test_mufu_ftz_$$s || exit 1; done + @echo "test-mufu-ftz: PASS (helper + $(words $(MUFU_FTZ_SIMS)) simulators)" diff --git a/neuralese/.crumb b/neuralese/.crumb new file mode 100644 index 000000000..2f6606f4a --- /dev/null +++ b/neuralese/.crumb @@ -0,0 +1,27 @@ +{ + "extensions": { + "generated": { + "children": [ + { + "digest": "df1e86f20b9581b3504b71b24ba57057dcf0a8072d13ff432bf9b807426a1b7b", + "last_commit": "d4f616206", + "name": "fixtures", + "purpose": "Independent SHA-256 envelope fixtures and exact decoded-source oracles for the native Omega host" + } + ], + "children_root": "sha256:28401713f198d1dcce005e957b4337a0f1342e25cda0fcfc9a4377534b9c340d", + "compiled_at": "2026-10-30T16:30:39Z", + "compiler": "crumb-compile/1", + "digest": "sha256:0cf0eba142c8b72205e4a3f002c1899f3961b07e3188815460d8f09673c69b88", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 181, + "generated_at_commit": "e022a7d11c6c90b911c6fe276e0b44d9f4b961e6", + "source_tree": "sha256:da802cd94e89f5a4c03ba866d137cfe909005f97d86914cc78f1aafc16be4b6f" + } + }, + "layer": "supplement", + "name": "neuralese", + "purpose": "Bounded untrusted representation envelopes and explicit checked Omega decoding; learned extension remains proposed", + "schema_version": "1.0.0" +} diff --git a/neuralese/README.md b/neuralese/README.md new file mode 100644 index 000000000..949d1ac4b --- /dev/null +++ b/neuralese/README.md @@ -0,0 +1,384 @@ +# Neuralese supplement to Omega + +Status: **PROPOSED** learned-representation design. The bounded, hand-authored +codebook below is **IMPLEMENTED / EXERCISED** on the host, not learned reasoning or +hardware **QUALIFIED**. It remains a pending implementation candidate. Omega keeps +its name. Neuralese is a representation supplement, not a second execution +language, compiler mode, authority source or bypass. + +Source baseline: `aien-dev/omega-mv` main +`6999fa9e6dae4847c155ef4eacaece74f491d3ca` (2026-10-28). +Compiler: committed `seed/out/omc`, SHA-256 +`d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84`. +Compiler source SHA-256: +`3f937160c823d3a90a6b4cc296f00f517f36ede7fd27a06505c998985ec62240`. +Authority: `docs/one_layer/OMEGESE.md`, sections 9, 10 and 12, and +`seed/omc/omc.om` at that baseline. No syntax changes are proposed by this patch. + +Current pin after merging main `62d1d0d668f897386a0e311374f8dbcc5c32dde8` +(2026-10-30): committed `seed/out/omc` SHA-256 +`62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b`, compiler +source SHA-256 `96d51b63c8f451661ac715395078e04f39195e50c9e8fe37746cda121e4d7a1e`. +The gate refuses any other compiler hash, so the reproduction command below uses +this current pin; the original baseline pin above now yields `OM2GATE INVALID` +with every case `NOT_RUN` on this tree. + +## Proposed learned-representation envelope + +An untrusted producer may submit a learned representation for communication or an +intermediate proposal. The envelope must bind all of the following: + +- Envelope version and an unambiguous framing length, with a receiver-owned bound. +- Producer model identity: an immutable model artifact digest plus architecture, + tokenizer/preprocessor and representation-layer/version identities. A friendly + model name alone is insufficient. A non-model producer must identify itself as + such; it cannot claim a model identity. +- Decoder identity: immutable decoder artifact digest, codebook/schema version, + decoder configuration and exact compatible producer identities. +- Dimension/shape, dtype, byte encoding, byte order and canonical serialization. + A decoder's registry entry fixes the permitted values and payload limit. +- Checksum algorithm and digest of the metadata and payload together. A checksum + detects accidental corruption; it authenticates nobody and grants no authority. +- Context/task binding when representations depend on a task or preceding state. + A future contextual decoder must reject missing, stale or mismatched context. + +Identity pairs are exact registry keys. Vectors from different models, layers, +quantizations or decoder revisions are not interchangeable even if their shape +matches. Registry admission is a separate reviewed change, not a model decision. +The proposed learned format is not accepted by this reference implementation. + +## Decode boundary and normal checked execution + +1. Bound and frame the entire input; reject unsupported identities, shapes, + encodings, checksum mismatches and noncanonical fields before emitting output. +2. Decode only into explicit Omega source or a separately specified explicit + operation representation. Keep the original envelope and decoded artifact for + replay; never treat payload bytes, logits or model confidence as instructions. +3. Feed the explicit artifact into the ordinary compiler. Apply the same type, + ownership, bounds, effect and capability admission policy that applies to a + source-text proposal. Never grant a decoder a privileged execution entry point. +4. Runtime checks and the actual receiver's capabilities remain authoritative at + execution. Validate the resulting behavior with independent task acceptance + checks, not a second assertion by the producer or decoder. + +The current native compiler's host words use ambient process permissions +(`seed/host/README.md`); compiling a host operation does **not** establish capability +confinement. This supplement does not invent or claim such confinement. Its +implemented codebook emits only pure scalar operations, no host/device words, +capability handles, resources or effects. Consequently no effectful request is +admissible in this implementation. A future effectful consumer must use its +existing checked capability/effect executor; absent that executor, it must refuse. + +Contracts use `om2 debug`, not release erasure. This is not a sandbox for arbitrary +source, and the test runner executes only the closed, hand-authored codebook. + +## Implemented bounded reference format: NLE1 + +This is an intentionally small discrete representation, **not a latent vector**. +All fields are unsigned bytes. Byte offsets and lengths below are bookkeeping. +The complete frame is exactly 78 bytes; a 79-byte read buffer detects oversize +without allocating from an untrusted length. The reader handles short reads and +requires EOF. Read/write errors are failures, not successful empty artifacts. + +| Offset | Bytes | Meaning and required value | +| --- | --- | --- | +| 0 | 4 | ASCII `NLE1` | +| 4 | 1 | Producer registry id `1`: `hand-authored-codebook-fixture/v1`, no model | +| 5 | 1 | Decoder registry id `1`: `omega-neuralese-codebook/v1`, source `decode.om` | +| 6 | 1 | Dimension `4` (four payload bytes, not a learned feature dimension) | +| 7 | 1 | Dtype id `1`: unsigned 8-bit integer | +| 8 | 1 | Encoding id `1`: raw bytes, byte order not applicable to one-byte scalars | +| 9 | 1 | Payload length `4` | +| 10 | 1 | Opcode: `1` increment, `2` double, `3` identity | +| 11 | 1 | Operand, unsigned byte; ordinary decoded contract accepts at most `16` | +| 12 | 2 | Reserved, must both be zero | +| 14 | 64 | SHA-256 of bytes `[0,14)`, canonical lowercase hexadecimal in FIPS 180-4 digest order | + +The explicit registry names above bind to the candidate source revision and its +recorded SHA-256 in `host-results.json`; numeric ids are not globally portable +model names. Any decoder or codebook change requires a new reviewed registry +version, not reinterpretation of an existing envelope. NLE1 is proposed until +review/merge and is not a public or production wire protocol. + +Each opcode emits the complete source for `apply(x: uint)` with `requires le x 16` +and `ensures le result 32`, followed by `main`. The operand is emitted as canonical +decimal text, never copied as source bytes. The compiler emits the normal type, +arithmetic and contract checks. An input operand of `17` is a syntactically valid +proposal but the ordinary runtime precondition refuses it (exit `109`). Validation +is not a certificate that a task was solved. + +Refusal statuses: `10` oversize; `11` magic/version; `12` unknown producer/decoder +pair; `13` dimension; `14` dtype; `15` byte encoding; `16` short frame; `17` +checksum; `18` reserved field; `19` unknown opcode; `20` payload length. `80` is +input I/O failure and `81` output I/O failure. All validation refusals emit no +source. SHA-256 reuses `om/tls/sha2.om`; there is no host decoder fallback. + +## Host reproduction and verification scope + +From the repository root on Linux AArch64: + +```sh +sha256sum seed/out/omc seed/omc/omc.om +mkdir -p build +if seed/out/omc < seed/qualification/om2/gate.om > build/neuralese-gate; then + chmod +x build/neuralese-gate && + build/neuralese-gate seed/out/omc \ + 62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b \ + neuralese/host.cases build/neuralese-host +else + exit 1 +fi +``` + +The scratch directory must not exist, and its exact relative name is part of +`host.cases`: later cases compile the earlier decoder's actual `.out` artifact. +Do not run the gate executable if compiling it returned nonzero. The existing +native Omega conductor checks the compiler hash, concatenates the decoder and +existing program-library SHA implementation, then sends each emitted source +through **that same unchanged compiler** and executes it. No stale output from a +failed compile is run. +The conductor provides bounded child deadlines, exact stdout/stderr/status checks, +exclusive scratch creation and source substitution for mutants. No new host- +language conductor, production library or runtime dependency is introduced. + +The committed `.wire` fixtures are independent SHA-256 test data constructed +with Python 3.12.3 standard-library `hashlib` as a read-only verification oracle; +their metadata/payload bytes and exact decoded-source oracles are committed. +The implementation and test conductor remain `.om`. SHA-256 of the first +fourteen bytes can also be compared with the fixture's trailing lowercase digest +using an independent `sha256sum` byte checker. No Python implementation participates +in decoding, compilation or the repeatable host suite. + +The suite covers every codebook operation, contract boundary inputs, unknown +producer and decoder separately, dimension/dtype/encoding/length/checksum/magic, +both reserved bytes, both opcode bounds, empty/short/oversize input, and ordinary +compiler type/purity and runtime contract refusals. Every validation return has +an independent success-return mutant, exercised against each applicable refusal +fixture; the mutant must exit successfully and emit source instead of the empty +refusal oracle. A wrong-codebook mutant must change exact emitted bytes and the +subsequently compiled result. An erased precondition must change the ordinary +contract refusal into the operand result. A false postcondition must trap. +SHA digests are independent byte-checker results, not mathematical predictions. + +Independent expected arithmetic: WolframLanguageEvaluator query +`{7+1,7*2,7,16+1,16*2}` returned `{8,14,7,17,32}` on 2026-10-28. +The Wolfram mount was verified with `Integrate[x^2,{x,0,1}] -> 1/3` and +WolframAlpha `sqrt(27)/2 -> (3 sqrt(3))/2`. These establish expected arithmetic, +not execution evidence. The clean implementation pin exercised was +`39e89fb1c2aaed99ddc05ec565274dd05792b70f`. The host conductor returned +`OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0`, including seventeen +guard-removal mutant kills, the wrong-codebook control, and ordinary type, +purity, precondition and postcondition checks. Measured source/artifact hashes, +commands and every verdict are in +[`host-results.287fdc263f7af93107c378ba63c92202a0e6c1479cb1ff6971706b423b0b15fb.json`](host-results.287fdc263f7af93107c378ba63c92202a0e6c1479cb1ff6971706b423b0b15fb.json); +the unedited conductor transcript is +[`host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log`](host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log). +Those files record the baseline-compiler run and are kept unedited. After the +main merge above, the same unchanged `host.cases` against the current pin +returned `OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0` on +2026-10-30 (host CPU, Linux AArch64). +No model inference, learned representation, GPU, hardware qualification, +production transport, merge or deployment is claimed. + +## Concrete extension proposals and non-requirements + +**Required new language features for this patch: none.** Byte framing, bounded +arrays, SHA-256, discrete decoding, source emission, contracts and host testing all +use existing syntax. A fixed-size learned CPU decoder could likewise be written +with existing bounded arrays and scalar arithmetic; its weights, implementation +and independent correctness evidence are missing work, not new keywords. + +The following are concrete conditional proposals, not implemented syntax: + +1. **Typed effect/capability admission for a general effectful decoder consumer.** + Add a separately specified compiler/executor interface that accepts explicit + operations plus receiver-owned capability ids, checks declared effects against + those ids, and refuses unknown, expired or insufficient capabilities before any + host/device effect. It must not accept authority from envelope metadata. The + smallest gate uses an explicit denied file-write operation and proves no file + exists, then grants only the exact resource and proves a write; a gate-removal + mutant must be caught. This requires an executor/policy design decision and + operator review, not a decoder privilege or a change in this patch. +2. **Typed bounded accelerator submission if the later decoder requires it.** + Specify input/output pool handles, element types/shapes and maximum work before + adding any host word. Refuse unknown handles, incompatible shape/dtype, + out-of-range regions and unauthorized submissions. The first test is a host + simulator plus refusal mutants; only a separately authorized physical run can + qualify device behavior. Existing low-level device words are not evidence that + such a typed inference interface or GPU model path exists. + +No heap, dynamic tensor sizes, implicit imports, vector coercion, new latent +primitive or arbitrary foreign runtime is required or proposed for the bounded +experiment. Do not add them as a prerequisite by assumption. Protocol framing, +model registry, decoder implementations and task adapters are ordinary Omega +application work, not necessarily language extensions. + +## Later bounded experiment: PROPOSED, NOT_RUN + +Preregister a task corpus of small pure integer/state-transform programs expressible +in the current compiler. Specify input bounds, outputs, forbidden effects and an +independent reference checker before running a producer. Use the same tasks and +held-out cases for all arms: + +- Source-text producer: emits explicit Omega directly. +- Structured-operations producer: emits a fixed operation schema/codebook decoded + deterministically into explicit Omega. +- Learned-representation producer: emits a model-bound representation consumed by + an explicitly pinned compatible decoder, then the same explicit Omega boundary. + +Pin task corpus, producer/model artifacts, tokenizer, decoder/configuration, +representation location/dimension/dtype/encoding, seeds, prompts, retry budget, +compiler and acceptance checker. Separate codebook fitting/training tasks from +held-out tasks. Do not compare vectors from incompatible producers. + +Apply identical compiler checks, kept contracts, receiver capability/effect +policy and independent semantic acceptance checks to every arm. Preserve all +attempts, decoded source and refusals; malformed envelopes, compiler refusals, +contract violations, wrong results and missing evidence remain failures or +NOT_RUN, never silently dropped. Preregister comparison definitions for task +success, checked refusal rate, proposal bytes, total producer plus decoder cost, +latency and reproducibility. Require independent replays and guard-removal/wrong- +result controls. Do not infer private latent reasoning from either success or +compression, and do not claim efficiency before measuring the full path. + +No models have been run for this supplement. A later run needs its own authority, +resource reservation where applicable, immutable evidence and separate review. + +## NL4: canonical numerical payload to closed pure execution + +This additive boundary addresses [#920](https://github.com/aien-dev/omega-mv/issues/920) +on draft #919, without replacing its historical NLE1 fixtures or receipts. +It consumes the canonical LTP0 schema and `lpvalid` from +[aien-protocols-mv #69](https://github.com/aien-dev/aien-protocols-mv/issues/69), +not another envelope. Exact immutable native dependency commits, hashes, licenses +and staging paths are in [`nl4-dependencies.json`](nl4-dependencies.json). +The reused NL1 Hadamard unit is handwritten `.om`, licensed AGPL-3.0-only. +Composed qualification executables retain that license; it is not silently +reimplemented in a host language. No permanent foreign decoder/runtime is added. + +`proposal.om` implements a bounded native IEEE32 big-endian payload encoder and +a tensor-to-typed-proposal decoder. Rank-one length-eight contiguous f32 and +signed affine i8 payloads are admitted by LTP0; quantization scale and signed +zero-point are checked against the receiver template. The codec itself does not +authenticate a model or grant authority. Native-model profile2 is deliberately +refused by this synthetic-only consumer. + +The fixed G0 projection uses Hadamard columns {2,3,5,8}/sqrt(8), producing eight +coordinates from four features. It is not the learned three-coordinate channel. +The first two decoded bits propose opcode1 increment,2 double or3 identity; +opcode0 is refused. The other two propose explicit uint operand0..3. +Scores within1/16 of exactly0 or1 are accepted; everything ambiguous refuses. +These thresholds are frozen correctness fixtures, not tuned held-out results. +The receiver independently supplies the expected opcode and operand on the CLI; +the message cannot provide its own objective oracle. + +The proposed `uint[16]` descriptor is explicit: + +| Index | Meaning | +|---|---| +|0|opcode1/2/3| +|1|left operand uint0..3| +|2|right operand1 increment,2 double,0 identity| +|3,4,5|rank1, sole dimension1, element count1| +|6,7,8,9|result byte bound4, operation step bound1, required effects0, closed uint type id1| +|10..15|reserved zero| + +`nlproposal(frame,proposal)` requires prior successful canonical `lpvalid`; +it proposes, never executes or reserves. All refusal paths preserve the caller's +descriptor. `nlmatch` compares all sixteen fields with a receiver-owned descriptor. +The host harness first validates LTP0 against a local admitted fixture context, +then proposes, compares, and calls ordinary compiled `om2 debug` functions with +`requires x<=16` and `ensures result<=32`. Vectors are never instructions or +dynamically executed source. All nonzero producer effect classes are refused, +even if the synthetic template admits them. + +The receipt stream is `NL4R1 decision op lhs rhs rank dim0 dim1 elements effects result`. +Success decision0 is stdout after executing the closed pure function. Refusals +write stderr with a nonzero decision and every other numeric field zero, stdout +empty. These are **HOST_SYNTHETIC** observations, not signed/authorized production +receipts. The fixture's issued time is the receiver's synthetic clock and its +high-water is0. This one-shot pure process has no durable replay ledger. +Shape/type/resource admission and capability-reference equality are necessary +checks, not capability authorization. + +LTP0 field101 is the producer-node effect class; fields192/224 preserve existing +producer MJR1 DAG/input-binding semantics. A production caller must verify a +completed producer MJR1.output_digest equals SHA256(entire LTP0), equals the +independently admitted consumer CONTENT digest, and matches generation plus +objective/tenant/subject. Consumer capability/verifier admission is independent. +`lpvalid` does not verify this signed relation. Current native host words have +ambient process permissions, not a capability sandbox. The absent canonical +bindings are concrete owner proposals: +[AEGIS #79](https://github.com/aien-dev/aegis-runtime-mv/issues/79) and +[microjob reservation #70](https://github.com/aien-dev/aien-protocols-mv/issues/70). +They must bind existing authority and lifecycle, never invent a Neuralese grant. +Production admission, durable replay protection and all effectful execution are +**NOT_RUN**. + +### Independent math and replay + +Raw actual Wolfram tool-call/result events are preserved in `nl4-wolfram-*.jsonl`; +no private model activations or inference traces are included. +Verification calls were `Integrate[x^2,{x,0,1}] -> 1/3` and Alpha +`sqrt(27)/2 -> 3 sqrt(3)/2`. The exact query in `nl4-wolfram-oracle.jsonl` +checks `Transpose[E].E == IdentityMatrix[4]`, all sixteen `X.E^T.E-X` zero, +and all sixteen exact real decodes after IEEE32 rounding. Its exact maximum +feature error is `1-47453131/(33554432*Sqrt[2])`. +That models quantized input decoded in exact arithmetic, not a claim that native +floating-point execution is exact. The native encoder is separately compared +byte-for-byte against independently Wolfram-exported IEEE32 payloads. +`nl4-wolfram-int8.jsonl` queries `Q=Round[16 H]`, `Q.E/16`, +returning maximum exact feature error `-1+3/(2*Sqrt[2])` and all sixteen bits +recovered within the frozen tolerance. Independent ambiguity, wrong-sign and +wrong-scale controls are in `nl4-wolfram-ambiguity.jsonl`. + +The scoped compiler hash `d6290c76...` is not a substitute for older pins. +It is exactly the committed `seed/out/omc` introduced by +`1fe5976d398646b17acabbf6d9dfae96b017e439`, with the full binary/source hashes in +the lock. Read-only `git show :seed/out/omc | sha256sum` resolved the +older `2c824805...` at82a399b9 and `49923639...` at ec07d25d as different +historical binaries. No compiler change is part of NL4. After the main merge +recorded at the top of this file, the committed compiler is `62775d2a...`; the +lock and receipt below keep the `d6290c76...` run unedited, and the command +below uses the current pin because the conductor refuses any other hash. + +From this checkout with separately fetched sibling source repositories: + +```sh +mkdir -p build/nl4-deps +git -C ../aien-train show 0e01c58a41f1a2fb976efa75c1cc554503aa2ee4:native/neuralese/hadamard.om > build/nl4-deps/h.om +git -C ../aien-protocols-mv show 6fb728a14781eb4e5262ffbdc9c2e6be64974f36:specs/latent-payload/validator.om > build/nl4-deps/v.om +sha256sum build/nl4-deps/h.om build/nl4-deps/v.om +# Refuse to continue unless both hashes equal nl4-dependencies.json. +seed/out/omc < seed/qualification/om2/gate.om > build/nl4-gate +chmod +x build/nl4-gate +build/nl4-gate seed/out/omc 62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b neuralese/nl4-host.cases build/nl4-host +``` + +The conductor hashes the compiler itself and requires a previously absent scratch +directory. `codec-check.om` checks all sixteen independent encoder payloads and +refusal output preservation; the end-to-end cases use independent expected +results, explicit wrong objective/operand, quantization ambiguity and malformed/ +stale/foreign/withdrawn-context refusals. Guard-removal and wrong-operation +mutants must be killed, and native pre/postcondition violations must trap. +These are deterministic correctness cases, not independent statistical trials +or the preregistered learned-arm campaign (benchmarks draft #56). + +Observed at clean implementation `09b1394fe68287eaa10b0d90cf07a9dd00e6cb60`: +`OM2GATE PASS cases=63 pass=63 fail=0 invalid=0 not_run=0` +(24 pure executions,27 deliberate refusals,9 killed mutants,2 native contract +traps,1 sixteen-payload independent codec oracle). +The unchanged inherited suite separately returned54/54PASS. +The actual receipt is +[`nl4-host-results.03b624d6ad393604d958f554fc55844885712ca49f425f98459974846e9e5280.json`](nl4-host-results.03b624d6ad393604d958f554fc55844885712ca49f425f98459974846e9e5280.json). +`nl4-host-pass.log` and `nl4-inherited-pass.log` preserve every verdict; +the initial compiler/name and lexical-order failures are retained separately, +not rewritten as success. Representative actual channels are +`nl4-success.stdout` and `nl4-refusal.stderr`. + +Re-run on 2026-10-30 after merging main `62d1d0d668f897386a0e311374f8dbcc5c32dde8`, +with both staged dependencies matching the lock hashes and compiler +`62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b`: the unchanged +`nl4-host.cases` returned `OM2GATE PASS cases=63 pass=63 fail=0 invalid=0 not_run=0` +and the inherited `host.cases` returned `OM2GATE PASS cases=54 pass=54 fail=0 +invalid=0 not_run=0` (host CPU, Linux AArch64). diff --git a/neuralese/codec-check.om b/neuralese/codec-check.om new file mode 100644 index 000000000..ca462df14 --- /dev/null +++ b/neuralese/codec-check.om @@ -0,0 +1,66 @@ +om2 debug +note SPDX-License-Identifier: AGPL-3.0-only +note Test entry composed with proposal.om and pinned NL1 Hadamard source. +text codecok "NL4 codec independent IEEE32 oracle PASS\n" +fn main to int +oracle = new uchar 513 0 +features = new f64 4 0.0f64 +wire = new uchar 32 0 +p = new uint 16 99 +frame = new uchar 1056 0 +n = read 0 oracle 0 513 +if ne n 512 +ret 1 +end +for row ulong 16 +for j ulong 4 +put features j f64 and shr row sub ulong 3 j 1 +end +if ne nlencode features wire 0 +ret 2 +end +for k ulong 32 +if ne get wire k get oracle add mul row 32 k +ret 3 +end +end +end +put features 0 bitcast f64 ulong 0x7ff8000000000000 +if ne nlencode features wire 50 +ret 4 +end +for k ulong 32 +if ne get wire k get oracle add ulong 480 k +ret 5 +end +end +if ne nlproposal part frame 0 4 p 40 +ret 6 +end +for k ulong 16 +if ne get p k 99 +ret 7 +end +end +put frame 5 1 +put frame 10 1 +put frame 11 1 +put frame 19 32 +put frame 23 8 +put frame 27 8 +put frame 101 1 +put frame 107 1 +if ne nlproposal frame p 43 +ret 8 +end +for k ulong 16 +if ne get p k 99 +ret 9 +end +end +n = write 1 codecok 0 len codecok +if ne n long len codecok +ret 10 +end +ret 0 +end diff --git a/neuralese/decode.om b/neuralese/decode.om new file mode 100644 index 000000000..e928c1db1 --- /dev/null +++ b/neuralese/decode.om @@ -0,0 +1,134 @@ +note SPDX-License-Identifier: Apache-2.0 +note Concatenate before om/tls/sha2.om. No learned producer is implemented. +note NLE1: ten metadata bytes, four payload bytes, lowercase hex SHA-256 of those bytes. +note Unknown identities and representations have no executable interpretation. +om2 debug +text magic "NLE1" +text hexdigs "0123456789abcdef" +text prefix "om2 debug\nfn apply x uint to uint\nrequires le x 16\nensures le result 32\n" +text incop "ret add x 1\n" +text dblop "ret mul x 2\n" +text idop "ret x\n" +text suffix "end\nfn main to int\nret int apply uint " +text tail "\nend\n" +fn hashok a view uchar 79 to bool +msgbuf = new uchar 14 0 +digest = new uchar 32 0 +ctx = new ulong 40 0 +for i ulong 14 +put msgbuf i get a i +end +sha256_init ctx +sha256_update ctx msgbuf +sha256_final ctx digest +for i ulong 32 +offset = add mul i 2 14 +value = get digest i +if ne get a offset get hexdigs shr value 4 +ret false +end +offset = add offset 1 +if ne get a offset get hexdigs and value 15 +ret false +end +end +ret true +end +fn validate a view uchar 79 n ulong to int +if gt n 78 +ret 10 +end +if lt n 78 +ret 16 +end +for i ulong 4 +if ne get a i get magic i +ret 11 +end +end +note This registry pair denotes a hand-authored fixture, not a trained model. +if or ne get a 4 1 ne get a 5 1 +ret 12 +end +if ne get a 6 4 +ret 13 +end +if ne get a 7 1 +ret 14 +end +if ne get a 8 1 +ret 15 +end +if ne get a 9 4 +ret 20 +end +if not hashok a +ret 17 +end +if or ne get a 12 0 ne get a 13 0 +ret 18 +end +if or lt get a 10 1 gt get a 10 3 +ret 19 +end +ret 0 +end +fn output b view uchar * to void +p = ulong 0 +while lt p len b bound 256 +r = write 1 b p sub len b p +if le r 0 +exit 81 +end +p = add p ulong r +end +end +fn number v uchar to void +b = new uchar 3 0 +n = ulong 0 +if ge v 100 +put b n add uchar 48 div v 100 +n = add n 1 +end +if ge v 10 +put b n add uchar 48 rem div v 10 10 +n = add n 1 +end +put b n add uchar 48 rem v 10 +n = add n 1 +output part b 0 n +end +fn main to int +a = new uchar 79 0 +n = ulong 0 +note Every successful read increases n, so at most seventy-nine iterations occur. +while lt n 79 bound 79 +r = read 0 a n sub 79 n +if lt r 0 +ret 80 +end +if eq r 0 +break +end +n = add n ulong r +end +status = validate a n +if ne status 0 +ret status +end +note Emission happens only after complete validation. No payload is ever execprog input. +output prefix +if eq get a 10 1 +output incop +end +if eq get a 10 2 +output dblop +end +if eq get a 10 3 +output idop +end +output suffix +number get a 11 +output tail +ret 0 +end diff --git a/neuralese/fixtures/.crumb b/neuralese/fixtures/.crumb new file mode 100644 index 000000000..66ea84439 --- /dev/null +++ b/neuralese/fixtures/.crumb @@ -0,0 +1,20 @@ +{ + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-28T14:31:35Z", + "compiler": "crumb-compile/1", + "digest": "sha256:df1e86f20b9581b3504b71b24ba57057dcf0a8072d13ff432bf9b807426a1b7b", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 158, + "generated_at_commit": "d4f61620600b24cd4c22763baa97465ab1efc049", + "source_tree": "sha256:180c925eabac8875ab7aedafd4700e54217f0e420a80ffe4691da38a5ff2aa7a" + } + }, + "layer": "test", + "name": "neuralese-fixtures", + "purpose": "Independent SHA-256 envelope fixtures and exact decoded-source oracles for the native Omega host conductor", + "schema_version": "1.0.0" +} diff --git a/neuralese/fixtures/check-10.from b/neuralese/fixtures/check-10.from new file mode 100644 index 000000000..0f642a14c --- /dev/null +++ b/neuralese/fixtures/check-10.from @@ -0,0 +1 @@ +ret 10 diff --git a/neuralese/fixtures/check-11.from b/neuralese/fixtures/check-11.from new file mode 100644 index 000000000..a9371607b --- /dev/null +++ b/neuralese/fixtures/check-11.from @@ -0,0 +1 @@ +ret 11 diff --git a/neuralese/fixtures/check-12.from b/neuralese/fixtures/check-12.from new file mode 100644 index 000000000..6c2d2a80a --- /dev/null +++ b/neuralese/fixtures/check-12.from @@ -0,0 +1 @@ +ret 12 diff --git a/neuralese/fixtures/check-13.from b/neuralese/fixtures/check-13.from new file mode 100644 index 000000000..ffcc4abdc --- /dev/null +++ b/neuralese/fixtures/check-13.from @@ -0,0 +1 @@ +ret 13 diff --git a/neuralese/fixtures/check-14.from b/neuralese/fixtures/check-14.from new file mode 100644 index 000000000..bb1e17d9f --- /dev/null +++ b/neuralese/fixtures/check-14.from @@ -0,0 +1 @@ +ret 14 diff --git a/neuralese/fixtures/check-15.from b/neuralese/fixtures/check-15.from new file mode 100644 index 000000000..1428f9c78 --- /dev/null +++ b/neuralese/fixtures/check-15.from @@ -0,0 +1 @@ +ret 15 diff --git a/neuralese/fixtures/check-16.from b/neuralese/fixtures/check-16.from new file mode 100644 index 000000000..bff77dfb8 --- /dev/null +++ b/neuralese/fixtures/check-16.from @@ -0,0 +1 @@ +ret 16 diff --git a/neuralese/fixtures/check-17.from b/neuralese/fixtures/check-17.from new file mode 100644 index 000000000..7420efbbe --- /dev/null +++ b/neuralese/fixtures/check-17.from @@ -0,0 +1 @@ +ret 17 diff --git a/neuralese/fixtures/check-18.from b/neuralese/fixtures/check-18.from new file mode 100644 index 000000000..8f13c136b --- /dev/null +++ b/neuralese/fixtures/check-18.from @@ -0,0 +1 @@ +ret 18 diff --git a/neuralese/fixtures/check-19.from b/neuralese/fixtures/check-19.from new file mode 100644 index 000000000..328693cd7 --- /dev/null +++ b/neuralese/fixtures/check-19.from @@ -0,0 +1 @@ +ret 19 diff --git a/neuralese/fixtures/check-20.from b/neuralese/fixtures/check-20.from new file mode 100644 index 000000000..a1d654380 --- /dev/null +++ b/neuralese/fixtures/check-20.from @@ -0,0 +1 @@ +ret 20 diff --git a/neuralese/fixtures/checksum-first.wire b/neuralese/fixtures/checksum-first.wire new file mode 100644 index 000000000..2cee36035 Binary files /dev/null and b/neuralese/fixtures/checksum-first.wire differ diff --git a/neuralese/fixtures/checksum-last.wire b/neuralese/fixtures/checksum-last.wire new file mode 100644 index 000000000..cfa8f748a Binary files /dev/null and b/neuralese/fixtures/checksum-last.wire differ diff --git a/neuralese/fixtures/codebook.from b/neuralese/fixtures/codebook.from new file mode 100644 index 000000000..9549cd60b --- /dev/null +++ b/neuralese/fixtures/codebook.from @@ -0,0 +1 @@ +text incop "ret add x 1\n" \ No newline at end of file diff --git a/neuralese/fixtures/codebook.to b/neuralese/fixtures/codebook.to new file mode 100644 index 000000000..f41db5d83 --- /dev/null +++ b/neuralese/fixtures/codebook.to @@ -0,0 +1 @@ +text incop "ret mul x 2\n" \ No newline at end of file diff --git a/neuralese/fixtures/contract.from b/neuralese/fixtures/contract.from new file mode 100644 index 000000000..247027749 --- /dev/null +++ b/neuralese/fixtures/contract.from @@ -0,0 +1 @@ +requires le x 16 \ No newline at end of file diff --git a/neuralese/fixtures/contract.to b/neuralese/fixtures/contract.to new file mode 100644 index 000000000..6682cacff --- /dev/null +++ b/neuralese/fixtures/contract.to @@ -0,0 +1 @@ +requires true \ No newline at end of file diff --git a/neuralese/fixtures/decoder.wire b/neuralese/fixtures/decoder.wire new file mode 100644 index 000000000..7a9c54468 Binary files /dev/null and b/neuralese/fixtures/decoder.wire differ diff --git a/neuralese/fixtures/dimension.wire b/neuralese/fixtures/dimension.wire new file mode 100644 index 000000000..27cc7ce8e Binary files /dev/null and b/neuralese/fixtures/dimension.wire differ diff --git a/neuralese/fixtures/dtype.wire b/neuralese/fixtures/dtype.wire new file mode 100644 index 000000000..43d6be956 Binary files /dev/null and b/neuralese/fixtures/dtype.wire differ diff --git a/neuralese/fixtures/empty.wire b/neuralese/fixtures/empty.wire new file mode 100644 index 000000000..e69de29bb diff --git a/neuralese/fixtures/encoding.wire b/neuralese/fixtures/encoding.wire new file mode 100644 index 000000000..a000214f9 Binary files /dev/null and b/neuralese/fixtures/encoding.wire differ diff --git a/neuralese/fixtures/large.wire b/neuralese/fixtures/large.wire new file mode 100644 index 000000000..2a88b52e0 Binary files /dev/null and b/neuralese/fixtures/large.wire differ diff --git a/neuralese/fixtures/magic.wire b/neuralese/fixtures/magic.wire new file mode 100644 index 000000000..5c9ed0770 Binary files /dev/null and b/neuralese/fixtures/magic.wire differ diff --git a/neuralese/fixtures/nl4-0000.wire b/neuralese/fixtures/nl4-0000.wire new file mode 100644 index 000000000..51fbe87e2 Binary files /dev/null and b/neuralese/fixtures/nl4-0000.wire differ diff --git a/neuralese/fixtures/nl4-0001.wire b/neuralese/fixtures/nl4-0001.wire new file mode 100644 index 000000000..d34a0097f Binary files /dev/null and b/neuralese/fixtures/nl4-0001.wire differ diff --git a/neuralese/fixtures/nl4-0010.wire b/neuralese/fixtures/nl4-0010.wire new file mode 100644 index 000000000..025c3852f Binary files /dev/null and b/neuralese/fixtures/nl4-0010.wire differ diff --git a/neuralese/fixtures/nl4-0011.wire b/neuralese/fixtures/nl4-0011.wire new file mode 100644 index 000000000..e60d89f29 Binary files /dev/null and b/neuralese/fixtures/nl4-0011.wire differ diff --git a/neuralese/fixtures/nl4-0100.expected b/neuralese/fixtures/nl4-0100.expected new file mode 100644 index 000000000..2b231d39a --- /dev/null +++ b/neuralese/fixtures/nl4-0100.expected @@ -0,0 +1 @@ +NL4R1 0 2 0 2 1 1 0 1 0 0 diff --git a/neuralese/fixtures/nl4-0100.wire b/neuralese/fixtures/nl4-0100.wire new file mode 100644 index 000000000..eb10b1b7f Binary files /dev/null and b/neuralese/fixtures/nl4-0100.wire differ diff --git a/neuralese/fixtures/nl4-0101.expected b/neuralese/fixtures/nl4-0101.expected new file mode 100644 index 000000000..244b41335 --- /dev/null +++ b/neuralese/fixtures/nl4-0101.expected @@ -0,0 +1 @@ +NL4R1 0 2 2 2 1 1 0 1 0 4 diff --git a/neuralese/fixtures/nl4-0101.wire b/neuralese/fixtures/nl4-0101.wire new file mode 100644 index 000000000..7275c5496 Binary files /dev/null and b/neuralese/fixtures/nl4-0101.wire differ diff --git a/neuralese/fixtures/nl4-0110.expected b/neuralese/fixtures/nl4-0110.expected new file mode 100644 index 000000000..5b39c35c2 --- /dev/null +++ b/neuralese/fixtures/nl4-0110.expected @@ -0,0 +1 @@ +NL4R1 0 2 1 2 1 1 0 1 0 2 diff --git a/neuralese/fixtures/nl4-0110.wire b/neuralese/fixtures/nl4-0110.wire new file mode 100644 index 000000000..aaee2033a Binary files /dev/null and b/neuralese/fixtures/nl4-0110.wire differ diff --git a/neuralese/fixtures/nl4-0111.expected b/neuralese/fixtures/nl4-0111.expected new file mode 100644 index 000000000..310715686 --- /dev/null +++ b/neuralese/fixtures/nl4-0111.expected @@ -0,0 +1 @@ +NL4R1 0 2 3 2 1 1 0 1 0 6 diff --git a/neuralese/fixtures/nl4-0111.wire b/neuralese/fixtures/nl4-0111.wire new file mode 100644 index 000000000..86db1cdc1 Binary files /dev/null and b/neuralese/fixtures/nl4-0111.wire differ diff --git a/neuralese/fixtures/nl4-10.refused b/neuralese/fixtures/nl4-10.refused new file mode 100644 index 000000000..1e6472622 --- /dev/null +++ b/neuralese/fixtures/nl4-10.refused @@ -0,0 +1 @@ +NL4R1 10 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-1000.expected b/neuralese/fixtures/nl4-1000.expected new file mode 100644 index 000000000..8109aaa43 --- /dev/null +++ b/neuralese/fixtures/nl4-1000.expected @@ -0,0 +1 @@ +NL4R1 0 1 0 1 1 1 0 1 0 1 diff --git a/neuralese/fixtures/nl4-1000.wire b/neuralese/fixtures/nl4-1000.wire new file mode 100644 index 000000000..1c47282e0 Binary files /dev/null and b/neuralese/fixtures/nl4-1000.wire differ diff --git a/neuralese/fixtures/nl4-1001.expected b/neuralese/fixtures/nl4-1001.expected new file mode 100644 index 000000000..fc23162a1 --- /dev/null +++ b/neuralese/fixtures/nl4-1001.expected @@ -0,0 +1 @@ +NL4R1 0 1 2 1 1 1 0 1 0 3 diff --git a/neuralese/fixtures/nl4-1001.wire b/neuralese/fixtures/nl4-1001.wire new file mode 100644 index 000000000..45bc17412 Binary files /dev/null and b/neuralese/fixtures/nl4-1001.wire differ diff --git a/neuralese/fixtures/nl4-1010.expected b/neuralese/fixtures/nl4-1010.expected new file mode 100644 index 000000000..4e98504df --- /dev/null +++ b/neuralese/fixtures/nl4-1010.expected @@ -0,0 +1 @@ +NL4R1 0 1 1 1 1 1 0 1 0 2 diff --git a/neuralese/fixtures/nl4-1010.wire b/neuralese/fixtures/nl4-1010.wire new file mode 100644 index 000000000..bfaccdc59 Binary files /dev/null and b/neuralese/fixtures/nl4-1010.wire differ diff --git a/neuralese/fixtures/nl4-1011.expected b/neuralese/fixtures/nl4-1011.expected new file mode 100644 index 000000000..3ec610f9b --- /dev/null +++ b/neuralese/fixtures/nl4-1011.expected @@ -0,0 +1 @@ +NL4R1 0 1 3 1 1 1 0 1 0 4 diff --git a/neuralese/fixtures/nl4-1011.wire b/neuralese/fixtures/nl4-1011.wire new file mode 100644 index 000000000..75aebb4a5 Binary files /dev/null and b/neuralese/fixtures/nl4-1011.wire differ diff --git a/neuralese/fixtures/nl4-11.refused b/neuralese/fixtures/nl4-11.refused new file mode 100644 index 000000000..92db338cc --- /dev/null +++ b/neuralese/fixtures/nl4-11.refused @@ -0,0 +1 @@ +NL4R1 11 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-1100.expected b/neuralese/fixtures/nl4-1100.expected new file mode 100644 index 000000000..43e6387e2 --- /dev/null +++ b/neuralese/fixtures/nl4-1100.expected @@ -0,0 +1 @@ +NL4R1 0 3 0 0 1 1 0 1 0 0 diff --git a/neuralese/fixtures/nl4-1100.wire b/neuralese/fixtures/nl4-1100.wire new file mode 100644 index 000000000..5979f2196 Binary files /dev/null and b/neuralese/fixtures/nl4-1100.wire differ diff --git a/neuralese/fixtures/nl4-1101.expected b/neuralese/fixtures/nl4-1101.expected new file mode 100644 index 000000000..be3db30db --- /dev/null +++ b/neuralese/fixtures/nl4-1101.expected @@ -0,0 +1 @@ +NL4R1 0 3 2 0 1 1 0 1 0 2 diff --git a/neuralese/fixtures/nl4-1101.wire b/neuralese/fixtures/nl4-1101.wire new file mode 100644 index 000000000..cc1fad563 Binary files /dev/null and b/neuralese/fixtures/nl4-1101.wire differ diff --git a/neuralese/fixtures/nl4-1110.expected b/neuralese/fixtures/nl4-1110.expected new file mode 100644 index 000000000..0bd44c75b --- /dev/null +++ b/neuralese/fixtures/nl4-1110.expected @@ -0,0 +1 @@ +NL4R1 0 3 1 0 1 1 0 1 0 1 diff --git a/neuralese/fixtures/nl4-1110.wire b/neuralese/fixtures/nl4-1110.wire new file mode 100644 index 000000000..4c82c7e9e Binary files /dev/null and b/neuralese/fixtures/nl4-1110.wire differ diff --git a/neuralese/fixtures/nl4-1111.expected b/neuralese/fixtures/nl4-1111.expected new file mode 100644 index 000000000..338fad37d --- /dev/null +++ b/neuralese/fixtures/nl4-1111.expected @@ -0,0 +1 @@ +NL4R1 0 3 3 0 1 1 0 1 0 3 diff --git a/neuralese/fixtures/nl4-1111.wire b/neuralese/fixtures/nl4-1111.wire new file mode 100644 index 000000000..9a1bfb729 Binary files /dev/null and b/neuralese/fixtures/nl4-1111.wire differ diff --git a/neuralese/fixtures/nl4-13.refused b/neuralese/fixtures/nl4-13.refused new file mode 100644 index 000000000..f8d37a82b --- /dev/null +++ b/neuralese/fixtures/nl4-13.refused @@ -0,0 +1 @@ +NL4R1 13 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-14.refused b/neuralese/fixtures/nl4-14.refused new file mode 100644 index 000000000..379ae1ccf --- /dev/null +++ b/neuralese/fixtures/nl4-14.refused @@ -0,0 +1 @@ +NL4R1 14 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-15.refused b/neuralese/fixtures/nl4-15.refused new file mode 100644 index 000000000..ab474bb51 --- /dev/null +++ b/neuralese/fixtures/nl4-15.refused @@ -0,0 +1 @@ +NL4R1 15 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-16.refused b/neuralese/fixtures/nl4-16.refused new file mode 100644 index 000000000..f299c4bff --- /dev/null +++ b/neuralese/fixtures/nl4-16.refused @@ -0,0 +1 @@ +NL4R1 16 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-17.refused b/neuralese/fixtures/nl4-17.refused new file mode 100644 index 000000000..3367482c4 --- /dev/null +++ b/neuralese/fixtures/nl4-17.refused @@ -0,0 +1 @@ +NL4R1 17 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-18.refused b/neuralese/fixtures/nl4-18.refused new file mode 100644 index 000000000..9b996f67e --- /dev/null +++ b/neuralese/fixtures/nl4-18.refused @@ -0,0 +1 @@ +NL4R1 18 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-19.refused b/neuralese/fixtures/nl4-19.refused new file mode 100644 index 000000000..bbaa07198 --- /dev/null +++ b/neuralese/fixtures/nl4-19.refused @@ -0,0 +1 @@ +NL4R1 19 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-20.refused b/neuralese/fixtures/nl4-20.refused new file mode 100644 index 000000000..584335ead --- /dev/null +++ b/neuralese/fixtures/nl4-20.refused @@ -0,0 +1 @@ +NL4R1 20 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-21.refused b/neuralese/fixtures/nl4-21.refused new file mode 100644 index 000000000..a93a69801 --- /dev/null +++ b/neuralese/fixtures/nl4-21.refused @@ -0,0 +1 @@ +NL4R1 21 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-22.refused b/neuralese/fixtures/nl4-22.refused new file mode 100644 index 000000000..f5b1ee682 --- /dev/null +++ b/neuralese/fixtures/nl4-22.refused @@ -0,0 +1 @@ +NL4R1 22 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-41.refused b/neuralese/fixtures/nl4-41.refused new file mode 100644 index 000000000..c5177da94 --- /dev/null +++ b/neuralese/fixtures/nl4-41.refused @@ -0,0 +1 @@ +NL4R1 41 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-43.refused b/neuralese/fixtures/nl4-43.refused new file mode 100644 index 000000000..6c70049f1 --- /dev/null +++ b/neuralese/fixtures/nl4-43.refused @@ -0,0 +1 @@ +NL4R1 43 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-47.refused b/neuralese/fixtures/nl4-47.refused new file mode 100644 index 000000000..7b8802206 --- /dev/null +++ b/neuralese/fixtures/nl4-47.refused @@ -0,0 +1 @@ +NL4R1 47 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-48.refused b/neuralese/fixtures/nl4-48.refused new file mode 100644 index 000000000..1f6a04fd8 --- /dev/null +++ b/neuralese/fixtures/nl4-48.refused @@ -0,0 +1 @@ +NL4R1 48 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-49.refused b/neuralese/fixtures/nl4-49.refused new file mode 100644 index 000000000..cfc2cbe22 --- /dev/null +++ b/neuralese/fixtures/nl4-49.refused @@ -0,0 +1 @@ +NL4R1 49 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/fixtures/nl4-alias.wire b/neuralese/fixtures/nl4-alias.wire new file mode 100644 index 000000000..6e1859582 Binary files /dev/null and b/neuralese/fixtures/nl4-alias.wire differ diff --git a/neuralese/fixtures/nl4-ambiguous.wire b/neuralese/fixtures/nl4-ambiguous.wire new file mode 100644 index 000000000..45403e0a0 Binary files /dev/null and b/neuralese/fixtures/nl4-ambiguous.wire differ diff --git a/neuralese/fixtures/nl4-bad-scale.wire b/neuralese/fixtures/nl4-bad-scale.wire new file mode 100644 index 000000000..7a31ef68e Binary files /dev/null and b/neuralese/fixtures/nl4-bad-scale.wire differ diff --git a/neuralese/fixtures/nl4-codec.expected b/neuralese/fixtures/nl4-codec.expected new file mode 100644 index 000000000..378cf5163 --- /dev/null +++ b/neuralese/fixtures/nl4-codec.expected @@ -0,0 +1 @@ +NL4 codec independent IEEE32 oracle PASS diff --git a/neuralese/fixtures/nl4-context-alias.bin b/neuralese/fixtures/nl4-context-alias.bin new file mode 100644 index 000000000..defd1a4dd Binary files /dev/null and b/neuralese/fixtures/nl4-context-alias.bin differ diff --git a/neuralese/fixtures/nl4-context-effect.bin b/neuralese/fixtures/nl4-context-effect.bin new file mode 100644 index 000000000..529dca2e0 Binary files /dev/null and b/neuralese/fixtures/nl4-context-effect.bin differ diff --git a/neuralese/fixtures/nl4-context-i8.bin b/neuralese/fixtures/nl4-context-i8.bin new file mode 100644 index 000000000..b1e3f4466 Binary files /dev/null and b/neuralese/fixtures/nl4-context-i8.bin differ diff --git a/neuralese/fixtures/nl4-context-native.bin b/neuralese/fixtures/nl4-context-native.bin new file mode 100644 index 000000000..238dc2638 Binary files /dev/null and b/neuralese/fixtures/nl4-context-native.bin differ diff --git a/neuralese/fixtures/nl4-context-wrongscale.bin b/neuralese/fixtures/nl4-context-wrongscale.bin new file mode 100644 index 000000000..a639a838e Binary files /dev/null and b/neuralese/fixtures/nl4-context-wrongscale.bin differ diff --git a/neuralese/fixtures/nl4-context.bin b/neuralese/fixtures/nl4-context.bin new file mode 100644 index 000000000..28d06400e Binary files /dev/null and b/neuralese/fixtures/nl4-context.bin differ diff --git a/neuralese/fixtures/nl4-context.from b/neuralese/fixtures/nl4-context.from new file mode 100644 index 000000000..2d790f03f --- /dev/null +++ b/neuralese/fixtures/nl4-context.from @@ -0,0 +1 @@ +if not lpeq a c 88 776 diff --git a/neuralese/fixtures/nl4-effect.from b/neuralese/fixtures/nl4-effect.from new file mode 100644 index 000000000..6f77ab5b6 --- /dev/null +++ b/neuralese/fixtures/nl4-effect.from @@ -0,0 +1 @@ +if ne get a 101 0 diff --git a/neuralese/fixtures/nl4-effect.wire b/neuralese/fixtures/nl4-effect.wire new file mode 100644 index 000000000..d0ab3f2e5 Binary files /dev/null and b/neuralese/fixtures/nl4-effect.wire differ diff --git a/neuralese/fixtures/nl4-expiry.from b/neuralese/fixtures/nl4-expiry.from new file mode 100644 index 000000000..95c89f8e2 --- /dev/null +++ b/neuralese/fixtures/nl4-expiry.from @@ -0,0 +1 @@ +if or le expiry now le expiry issued diff --git a/neuralese/fixtures/nl4-false.to b/neuralese/fixtures/nl4-false.to new file mode 100644 index 000000000..ab9f5d9be --- /dev/null +++ b/neuralese/fixtures/nl4-false.to @@ -0,0 +1 @@ +if false diff --git a/neuralese/fixtures/nl4-foreign.wire b/neuralese/fixtures/nl4-foreign.wire new file mode 100644 index 000000000..33622ccf4 Binary files /dev/null and b/neuralese/fixtures/nl4-foreign.wire differ diff --git a/neuralese/fixtures/nl4-future.wire b/neuralese/fixtures/nl4-future.wire new file mode 100644 index 000000000..e5470e68d Binary files /dev/null and b/neuralese/fixtures/nl4-future.wire differ diff --git a/neuralese/fixtures/nl4-i8-0000.wire b/neuralese/fixtures/nl4-i8-0000.wire new file mode 100644 index 000000000..cd6151588 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0000.wire differ diff --git a/neuralese/fixtures/nl4-i8-0001.wire b/neuralese/fixtures/nl4-i8-0001.wire new file mode 100644 index 000000000..f94586ef7 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0001.wire differ diff --git a/neuralese/fixtures/nl4-i8-0010.wire b/neuralese/fixtures/nl4-i8-0010.wire new file mode 100644 index 000000000..b5494de4a Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0010.wire differ diff --git a/neuralese/fixtures/nl4-i8-0011.wire b/neuralese/fixtures/nl4-i8-0011.wire new file mode 100644 index 000000000..d187087e0 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0011.wire differ diff --git a/neuralese/fixtures/nl4-i8-0100.wire b/neuralese/fixtures/nl4-i8-0100.wire new file mode 100644 index 000000000..d0632cadf Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0100.wire differ diff --git a/neuralese/fixtures/nl4-i8-0101.wire b/neuralese/fixtures/nl4-i8-0101.wire new file mode 100644 index 000000000..bb49a0b79 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0101.wire differ diff --git a/neuralese/fixtures/nl4-i8-0110.wire b/neuralese/fixtures/nl4-i8-0110.wire new file mode 100644 index 000000000..367cc6c75 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0110.wire differ diff --git a/neuralese/fixtures/nl4-i8-0111.wire b/neuralese/fixtures/nl4-i8-0111.wire new file mode 100644 index 000000000..cd761b490 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-0111.wire differ diff --git a/neuralese/fixtures/nl4-i8-1000.wire b/neuralese/fixtures/nl4-i8-1000.wire new file mode 100644 index 000000000..4e86751c2 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1000.wire differ diff --git a/neuralese/fixtures/nl4-i8-1001.wire b/neuralese/fixtures/nl4-i8-1001.wire new file mode 100644 index 000000000..aff5c40e9 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1001.wire differ diff --git a/neuralese/fixtures/nl4-i8-1010.wire b/neuralese/fixtures/nl4-i8-1010.wire new file mode 100644 index 000000000..69127722c Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1010.wire differ diff --git a/neuralese/fixtures/nl4-i8-1011.wire b/neuralese/fixtures/nl4-i8-1011.wire new file mode 100644 index 000000000..ab0f1f21a Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1011.wire differ diff --git a/neuralese/fixtures/nl4-i8-1100.wire b/neuralese/fixtures/nl4-i8-1100.wire new file mode 100644 index 000000000..aaf636966 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1100.wire differ diff --git a/neuralese/fixtures/nl4-i8-1101.wire b/neuralese/fixtures/nl4-i8-1101.wire new file mode 100644 index 000000000..db09f0f36 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1101.wire differ diff --git a/neuralese/fixtures/nl4-i8-1110.wire b/neuralese/fixtures/nl4-i8-1110.wire new file mode 100644 index 000000000..5bda8392d Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1110.wire differ diff --git a/neuralese/fixtures/nl4-i8-1111.wire b/neuralese/fixtures/nl4-i8-1111.wire new file mode 100644 index 000000000..b05e0af08 Binary files /dev/null and b/neuralese/fixtures/nl4-i8-1111.wire differ diff --git a/neuralese/fixtures/nl4-integrity.from b/neuralese/fixtures/nl4-integrity.from new file mode 100644 index 000000000..7f72a03a5 --- /dev/null +++ b/neuralese/fixtures/nl4-integrity.from @@ -0,0 +1 @@ +if not lphash a diff --git a/neuralese/fixtures/nl4-integrity.wire b/neuralese/fixtures/nl4-integrity.wire new file mode 100644 index 000000000..75e0f4f74 Binary files /dev/null and b/neuralese/fixtures/nl4-integrity.wire differ diff --git a/neuralese/fixtures/nl4-match.from b/neuralese/fixtures/nl4-match.from new file mode 100644 index 000000000..0aaeee332 --- /dev/null +++ b/neuralese/fixtures/nl4-match.from @@ -0,0 +1 @@ +if not nlmatch p e diff --git a/neuralese/fixtures/nl4-native.wire b/neuralese/fixtures/nl4-native.wire new file mode 100644 index 000000000..bbd96b152 Binary files /dev/null and b/neuralese/fixtures/nl4-native.wire differ diff --git a/neuralese/fixtures/nl4-no-capability.wire b/neuralese/fixtures/nl4-no-capability.wire new file mode 100644 index 000000000..61f9d09b7 Binary files /dev/null and b/neuralese/fixtures/nl4-no-capability.wire differ diff --git a/neuralese/fixtures/nl4-no-resource.wire b/neuralese/fixtures/nl4-no-resource.wire new file mode 100644 index 000000000..638e43721 Binary files /dev/null and b/neuralese/fixtures/nl4-no-resource.wire differ diff --git a/neuralese/fixtures/nl4-nonce.wire b/neuralese/fixtures/nl4-nonce.wire new file mode 100644 index 000000000..d4da4f170 Binary files /dev/null and b/neuralese/fixtures/nl4-nonce.wire differ diff --git a/neuralese/fixtures/nl4-nonfinite.wire b/neuralese/fixtures/nl4-nonfinite.wire new file mode 100644 index 000000000..4a18c5de8 Binary files /dev/null and b/neuralese/fixtures/nl4-nonfinite.wire differ diff --git a/neuralese/fixtures/nl4-operation.from b/neuralese/fixtures/nl4-operation.from new file mode 100644 index 000000000..db215727e --- /dev/null +++ b/neuralese/fixtures/nl4-operation.from @@ -0,0 +1 @@ +ret add x 1 diff --git a/neuralese/fixtures/nl4-operation.to b/neuralese/fixtures/nl4-operation.to new file mode 100644 index 000000000..e41b96065 --- /dev/null +++ b/neuralese/fixtures/nl4-operation.to @@ -0,0 +1 @@ +ret add x 2 diff --git a/neuralese/fixtures/nl4-oracle-payloads.bin b/neuralese/fixtures/nl4-oracle-payloads.bin new file mode 100644 index 000000000..4e9166be9 Binary files /dev/null and b/neuralese/fixtures/nl4-oracle-payloads.bin differ diff --git a/neuralese/fixtures/nl4-oversized.wire b/neuralese/fixtures/nl4-oversized.wire new file mode 100644 index 000000000..90058f4ad Binary files /dev/null and b/neuralese/fixtures/nl4-oversized.wire differ diff --git a/neuralese/fixtures/nl4-post.to b/neuralese/fixtures/nl4-post.to new file mode 100644 index 000000000..944994373 --- /dev/null +++ b/neuralese/fixtures/nl4-post.to @@ -0,0 +1 @@ +ret add x 33 diff --git a/neuralese/fixtures/nl4-pre.from b/neuralese/fixtures/nl4-pre.from new file mode 100644 index 000000000..19c366a74 --- /dev/null +++ b/neuralese/fixtures/nl4-pre.from @@ -0,0 +1 @@ +z = nlinc get p 1 diff --git a/neuralese/fixtures/nl4-pre.to b/neuralese/fixtures/nl4-pre.to new file mode 100644 index 000000000..c8e86b4d7 --- /dev/null +++ b/neuralese/fixtures/nl4-pre.to @@ -0,0 +1 @@ +z = nlinc uint 17 diff --git a/neuralese/fixtures/nl4-replay.wire b/neuralese/fixtures/nl4-replay.wire new file mode 100644 index 000000000..ebe3eb3c0 Binary files /dev/null and b/neuralese/fixtures/nl4-replay.wire differ diff --git a/neuralese/fixtures/nl4-reserved.wire b/neuralese/fixtures/nl4-reserved.wire new file mode 100644 index 000000000..ff0a748e6 Binary files /dev/null and b/neuralese/fixtures/nl4-reserved.wire differ diff --git a/neuralese/fixtures/nl4-sequence.from b/neuralese/fixtures/nl4-sequence.from new file mode 100644 index 000000000..9e2238368 --- /dev/null +++ b/neuralese/fixtures/nl4-sequence.from @@ -0,0 +1 @@ +if le lpbe64 a 80 lastseq diff --git a/neuralese/fixtures/nl4-shape.from b/neuralese/fixtures/nl4-shape.from new file mode 100644 index 000000000..b4281c37d --- /dev/null +++ b/neuralese/fixtures/nl4-shape.from @@ -0,0 +1 @@ +if not lpshape a diff --git a/neuralese/fixtures/nl4-shape.wire b/neuralese/fixtures/nl4-shape.wire new file mode 100644 index 000000000..1ffdb77fe Binary files /dev/null and b/neuralese/fixtures/nl4-shape.wire differ diff --git a/neuralese/fixtures/nl4-signflip.wire b/neuralese/fixtures/nl4-signflip.wire new file mode 100644 index 000000000..a8bbebb63 Binary files /dev/null and b/neuralese/fixtures/nl4-signflip.wire differ diff --git a/neuralese/fixtures/nl4-stale.wire b/neuralese/fixtures/nl4-stale.wire new file mode 100644 index 000000000..cc76c87dc Binary files /dev/null and b/neuralese/fixtures/nl4-stale.wire differ diff --git a/neuralese/fixtures/nl4-truncated.wire b/neuralese/fixtures/nl4-truncated.wire new file mode 100644 index 000000000..26e1ddfd9 Binary files /dev/null and b/neuralese/fixtures/nl4-truncated.wire differ diff --git a/neuralese/fixtures/nl4-unknown-decoder.wire b/neuralese/fixtures/nl4-unknown-decoder.wire new file mode 100644 index 000000000..5584af33f Binary files /dev/null and b/neuralese/fixtures/nl4-unknown-decoder.wire differ diff --git a/neuralese/fixtures/nl4-version.wire b/neuralese/fixtures/nl4-version.wire new file mode 100644 index 000000000..b8dd36c24 Binary files /dev/null and b/neuralese/fixtures/nl4-version.wire differ diff --git a/neuralese/fixtures/nl4-withdrawn.wire b/neuralese/fixtures/nl4-withdrawn.wire new file mode 100644 index 000000000..9efcee8fe Binary files /dev/null and b/neuralese/fixtures/nl4-withdrawn.wire differ diff --git a/neuralese/fixtures/nl4-wrong-model.wire b/neuralese/fixtures/nl4-wrong-model.wire new file mode 100644 index 000000000..578e9b0d5 Binary files /dev/null and b/neuralese/fixtures/nl4-wrong-model.wire differ diff --git a/neuralese/fixtures/nl4-wrongscale.wire b/neuralese/fixtures/nl4-wrongscale.wire new file mode 100644 index 000000000..6162cdd42 Binary files /dev/null and b/neuralese/fixtures/nl4-wrongscale.wire differ diff --git a/neuralese/fixtures/opcode-high.wire b/neuralese/fixtures/opcode-high.wire new file mode 100644 index 000000000..06628e267 Binary files /dev/null and b/neuralese/fixtures/opcode-high.wire differ diff --git a/neuralese/fixtures/opcode-low.wire b/neuralese/fixtures/opcode-low.wire new file mode 100644 index 000000000..64558c65c Binary files /dev/null and b/neuralese/fixtures/opcode-low.wire differ diff --git a/neuralese/fixtures/oversize.wire b/neuralese/fixtures/oversize.wire new file mode 100644 index 000000000..99e3e4a20 Binary files /dev/null and b/neuralese/fixtures/oversize.wire differ diff --git a/neuralese/fixtures/payload-length.wire b/neuralese/fixtures/payload-length.wire new file mode 100644 index 000000000..415f26de4 Binary files /dev/null and b/neuralese/fixtures/payload-length.wire differ diff --git a/neuralese/fixtures/positive-1-16.om b/neuralese/fixtures/positive-1-16.om new file mode 100644 index 000000000..d590fdbb3 --- /dev/null +++ b/neuralese/fixtures/positive-1-16.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret add x 1 +end +fn main to int +ret int apply uint 16 +end diff --git a/neuralese/fixtures/positive-1-16.wire b/neuralese/fixtures/positive-1-16.wire new file mode 100644 index 000000000..e3785897c Binary files /dev/null and b/neuralese/fixtures/positive-1-16.wire differ diff --git a/neuralese/fixtures/positive-1-7.om b/neuralese/fixtures/positive-1-7.om new file mode 100644 index 000000000..9e9f29697 --- /dev/null +++ b/neuralese/fixtures/positive-1-7.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret add x 1 +end +fn main to int +ret int apply uint 7 +end diff --git a/neuralese/fixtures/positive-1-7.wire b/neuralese/fixtures/positive-1-7.wire new file mode 100644 index 000000000..8419b92f6 Binary files /dev/null and b/neuralese/fixtures/positive-1-7.wire differ diff --git a/neuralese/fixtures/positive-2-16.om b/neuralese/fixtures/positive-2-16.om new file mode 100644 index 000000000..e7715a087 --- /dev/null +++ b/neuralese/fixtures/positive-2-16.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret mul x 2 +end +fn main to int +ret int apply uint 16 +end diff --git a/neuralese/fixtures/positive-2-16.wire b/neuralese/fixtures/positive-2-16.wire new file mode 100644 index 000000000..e983cc717 Binary files /dev/null and b/neuralese/fixtures/positive-2-16.wire differ diff --git a/neuralese/fixtures/positive-2-7.om b/neuralese/fixtures/positive-2-7.om new file mode 100644 index 000000000..81482e289 --- /dev/null +++ b/neuralese/fixtures/positive-2-7.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret mul x 2 +end +fn main to int +ret int apply uint 7 +end diff --git a/neuralese/fixtures/positive-2-7.wire b/neuralese/fixtures/positive-2-7.wire new file mode 100644 index 000000000..fb127d4ff Binary files /dev/null and b/neuralese/fixtures/positive-2-7.wire differ diff --git a/neuralese/fixtures/positive-3-127.om b/neuralese/fixtures/positive-3-127.om new file mode 100644 index 000000000..7239aca4c --- /dev/null +++ b/neuralese/fixtures/positive-3-127.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret x +end +fn main to int +ret int apply uint 127 +end diff --git a/neuralese/fixtures/positive-3-127.wire b/neuralese/fixtures/positive-3-127.wire new file mode 100644 index 000000000..c0e5e94cd Binary files /dev/null and b/neuralese/fixtures/positive-3-127.wire differ diff --git a/neuralese/fixtures/positive-3-17.om b/neuralese/fixtures/positive-3-17.om new file mode 100644 index 000000000..af239b0bc --- /dev/null +++ b/neuralese/fixtures/positive-3-17.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret x +end +fn main to int +ret int apply uint 17 +end diff --git a/neuralese/fixtures/positive-3-17.wire b/neuralese/fixtures/positive-3-17.wire new file mode 100644 index 000000000..38d84eb52 Binary files /dev/null and b/neuralese/fixtures/positive-3-17.wire differ diff --git a/neuralese/fixtures/positive-3-7.om b/neuralese/fixtures/positive-3-7.om new file mode 100644 index 000000000..160d6f538 --- /dev/null +++ b/neuralese/fixtures/positive-3-7.om @@ -0,0 +1,9 @@ +om2 debug +fn apply x uint to uint +requires le x 16 +ensures le result 32 +ret x +end +fn main to int +ret int apply uint 7 +end diff --git a/neuralese/fixtures/positive-3-7.wire b/neuralese/fixtures/positive-3-7.wire new file mode 100644 index 000000000..acf53ca22 Binary files /dev/null and b/neuralese/fixtures/positive-3-7.wire differ diff --git a/neuralese/fixtures/post.from b/neuralese/fixtures/post.from new file mode 100644 index 000000000..92997bd1f --- /dev/null +++ b/neuralese/fixtures/post.from @@ -0,0 +1 @@ +ensures le result 32 \ No newline at end of file diff --git a/neuralese/fixtures/post.to b/neuralese/fixtures/post.to new file mode 100644 index 000000000..bc8b8e54e --- /dev/null +++ b/neuralese/fixtures/post.to @@ -0,0 +1 @@ +ensures le result 0 \ No newline at end of file diff --git a/neuralese/fixtures/producer.wire b/neuralese/fixtures/producer.wire new file mode 100644 index 000000000..26ba88e94 Binary files /dev/null and b/neuralese/fixtures/producer.wire differ diff --git a/neuralese/fixtures/purity.to b/neuralese/fixtures/purity.to new file mode 100644 index 000000000..9c639bf72 --- /dev/null +++ b/neuralese/fixtures/purity.to @@ -0,0 +1 @@ +requires eq apply x 0 \ No newline at end of file diff --git a/neuralese/fixtures/reserved-first.wire b/neuralese/fixtures/reserved-first.wire new file mode 100644 index 000000000..0582991e0 Binary files /dev/null and b/neuralese/fixtures/reserved-first.wire differ diff --git a/neuralese/fixtures/reserved-second.wire b/neuralese/fixtures/reserved-second.wire new file mode 100644 index 000000000..2e717a012 Binary files /dev/null and b/neuralese/fixtures/reserved-second.wire differ diff --git a/neuralese/fixtures/short.wire b/neuralese/fixtures/short.wire new file mode 100644 index 000000000..6fee04c95 Binary files /dev/null and b/neuralese/fixtures/short.wire differ diff --git a/neuralese/fixtures/success.to b/neuralese/fixtures/success.to new file mode 100644 index 000000000..4daa13bc7 --- /dev/null +++ b/neuralese/fixtures/success.to @@ -0,0 +1 @@ +ret 0 diff --git a/neuralese/fixtures/type.from b/neuralese/fixtures/type.from new file mode 100644 index 000000000..fd46aed6d --- /dev/null +++ b/neuralese/fixtures/type.from @@ -0,0 +1 @@ +ret add x 1 \ No newline at end of file diff --git a/neuralese/fixtures/type.to b/neuralese/fixtures/type.to new file mode 100644 index 000000000..69bbe988b --- /dev/null +++ b/neuralese/fixtures/type.to @@ -0,0 +1 @@ +ret add x uchar 1 \ No newline at end of file diff --git a/neuralese/host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log b/neuralese/host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log new file mode 100644 index 000000000..6baa00506 --- /dev/null +++ b/neuralese/host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log @@ -0,0 +1,262 @@ +OM2GATE START cases=neuralese/host.cases scratch=build/neuralese-host +IDENTITY omc seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE decode-positive-1-7 line=3 + $ seed/out/omc < build/neuralese-host/3.src > build/neuralese-host/3.elf 2> build/neuralese-host/3.cerr + $ build/neuralese-host/3.elf < neuralese/fixtures/positive-1-7.wire > build/neuralese-host/3.out 2> build/neuralese-host/3.err +VERDICT decode-positive-1-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-1-7 line=4 + $ seed/out/omc < build/neuralese-host/4.src > build/neuralese-host/4.elf 2> build/neuralese-host/4.cerr + $ build/neuralese-host/4.elf < /dev/null > build/neuralese-host/4.out 2> build/neuralese-host/4.err +VERDICT execute-positive-1-7 PASS run exit=8 expected=8 stdout=match stderr=match +CASE decode-positive-2-7 line=5 + $ seed/out/omc < build/neuralese-host/5.src > build/neuralese-host/5.elf 2> build/neuralese-host/5.cerr + $ build/neuralese-host/5.elf < neuralese/fixtures/positive-2-7.wire > build/neuralese-host/5.out 2> build/neuralese-host/5.err +VERDICT decode-positive-2-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-2-7 line=6 + $ seed/out/omc < build/neuralese-host/6.src > build/neuralese-host/6.elf 2> build/neuralese-host/6.cerr + $ build/neuralese-host/6.elf < /dev/null > build/neuralese-host/6.out 2> build/neuralese-host/6.err +VERDICT execute-positive-2-7 PASS run exit=14 expected=14 stdout=match stderr=match +CASE decode-positive-3-7 line=7 + $ seed/out/omc < build/neuralese-host/7.src > build/neuralese-host/7.elf 2> build/neuralese-host/7.cerr + $ build/neuralese-host/7.elf < neuralese/fixtures/positive-3-7.wire > build/neuralese-host/7.out 2> build/neuralese-host/7.err +VERDICT decode-positive-3-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-7 line=8 + $ seed/out/omc < build/neuralese-host/8.src > build/neuralese-host/8.elf 2> build/neuralese-host/8.cerr + $ build/neuralese-host/8.elf < /dev/null > build/neuralese-host/8.out 2> build/neuralese-host/8.err +VERDICT execute-positive-3-7 PASS run exit=7 expected=7 stdout=match stderr=match +CASE decode-positive-1-16 line=9 + $ seed/out/omc < build/neuralese-host/9.src > build/neuralese-host/9.elf 2> build/neuralese-host/9.cerr + $ build/neuralese-host/9.elf < neuralese/fixtures/positive-1-16.wire > build/neuralese-host/9.out 2> build/neuralese-host/9.err +VERDICT decode-positive-1-16 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-1-16 line=10 + $ seed/out/omc < build/neuralese-host/10.src > build/neuralese-host/10.elf 2> build/neuralese-host/10.cerr + $ build/neuralese-host/10.elf < /dev/null > build/neuralese-host/10.out 2> build/neuralese-host/10.err +VERDICT execute-positive-1-16 PASS run exit=17 expected=17 stdout=match stderr=match +CASE decode-positive-2-16 line=11 + $ seed/out/omc < build/neuralese-host/11.src > build/neuralese-host/11.elf 2> build/neuralese-host/11.cerr + $ build/neuralese-host/11.elf < neuralese/fixtures/positive-2-16.wire > build/neuralese-host/11.out 2> build/neuralese-host/11.err +VERDICT decode-positive-2-16 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-2-16 line=12 + $ seed/out/omc < build/neuralese-host/12.src > build/neuralese-host/12.elf 2> build/neuralese-host/12.cerr + $ build/neuralese-host/12.elf < /dev/null > build/neuralese-host/12.out 2> build/neuralese-host/12.err +VERDICT execute-positive-2-16 PASS run exit=32 expected=32 stdout=match stderr=match +CASE decode-positive-3-17 line=13 + $ seed/out/omc < build/neuralese-host/13.src > build/neuralese-host/13.elf 2> build/neuralese-host/13.cerr + $ build/neuralese-host/13.elf < neuralese/fixtures/positive-3-17.wire > build/neuralese-host/13.out 2> build/neuralese-host/13.err +VERDICT decode-positive-3-17 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-17 line=14 + $ seed/out/omc < build/neuralese-host/14.src > build/neuralese-host/14.elf 2> build/neuralese-host/14.cerr + $ build/neuralese-host/14.elf < /dev/null > build/neuralese-host/14.out 2> build/neuralese-host/14.err +VERDICT execute-positive-3-17 PASS run exit=109 expected=109 stdout=match stderr=match +CASE decode-positive-3-127 line=15 + $ seed/out/omc < build/neuralese-host/15.src > build/neuralese-host/15.elf 2> build/neuralese-host/15.cerr + $ build/neuralese-host/15.elf < neuralese/fixtures/positive-3-127.wire > build/neuralese-host/15.out 2> build/neuralese-host/15.err +VERDICT decode-positive-3-127 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-127 line=16 + $ seed/out/omc < build/neuralese-host/16.src > build/neuralese-host/16.elf 2> build/neuralese-host/16.cerr + $ build/neuralese-host/16.elf < /dev/null > build/neuralese-host/16.out 2> build/neuralese-host/16.err +VERDICT execute-positive-3-127 PASS run exit=109 expected=109 stdout=match stderr=match +CASE refuse-oversize line=17 + $ seed/out/omc < build/neuralese-host/17.src > build/neuralese-host/17.elf 2> build/neuralese-host/17.cerr + $ build/neuralese-host/17.elf < neuralese/fixtures/oversize.wire > build/neuralese-host/17.out 2> build/neuralese-host/17.err +VERDICT refuse-oversize PASS run exit=10 expected=10 stdout=match stderr=match +CASE refuse-short line=18 + $ seed/out/omc < build/neuralese-host/18.src > build/neuralese-host/18.elf 2> build/neuralese-host/18.cerr + $ build/neuralese-host/18.elf < neuralese/fixtures/short.wire > build/neuralese-host/18.out 2> build/neuralese-host/18.err +VERDICT refuse-short PASS run exit=16 expected=16 stdout=match stderr=match +CASE refuse-magic line=19 + $ seed/out/omc < build/neuralese-host/19.src > build/neuralese-host/19.elf 2> build/neuralese-host/19.cerr + $ build/neuralese-host/19.elf < neuralese/fixtures/magic.wire > build/neuralese-host/19.out 2> build/neuralese-host/19.err +VERDICT refuse-magic PASS run exit=11 expected=11 stdout=match stderr=match +CASE refuse-producer line=20 + $ seed/out/omc < build/neuralese-host/20.src > build/neuralese-host/20.elf 2> build/neuralese-host/20.cerr + $ build/neuralese-host/20.elf < neuralese/fixtures/producer.wire > build/neuralese-host/20.out 2> build/neuralese-host/20.err +VERDICT refuse-producer PASS run exit=12 expected=12 stdout=match stderr=match +CASE refuse-decoder line=21 + $ seed/out/omc < build/neuralese-host/21.src > build/neuralese-host/21.elf 2> build/neuralese-host/21.cerr + $ build/neuralese-host/21.elf < neuralese/fixtures/decoder.wire > build/neuralese-host/21.out 2> build/neuralese-host/21.err +VERDICT refuse-decoder PASS run exit=12 expected=12 stdout=match stderr=match +CASE refuse-dimension line=22 + $ seed/out/omc < build/neuralese-host/22.src > build/neuralese-host/22.elf 2> build/neuralese-host/22.cerr + $ build/neuralese-host/22.elf < neuralese/fixtures/dimension.wire > build/neuralese-host/22.out 2> build/neuralese-host/22.err +VERDICT refuse-dimension PASS run exit=13 expected=13 stdout=match stderr=match +CASE refuse-dtype line=23 + $ seed/out/omc < build/neuralese-host/23.src > build/neuralese-host/23.elf 2> build/neuralese-host/23.cerr + $ build/neuralese-host/23.elf < neuralese/fixtures/dtype.wire > build/neuralese-host/23.out 2> build/neuralese-host/23.err +VERDICT refuse-dtype PASS run exit=14 expected=14 stdout=match stderr=match +CASE refuse-encoding line=24 + $ seed/out/omc < build/neuralese-host/24.src > build/neuralese-host/24.elf 2> build/neuralese-host/24.cerr + $ build/neuralese-host/24.elf < neuralese/fixtures/encoding.wire > build/neuralese-host/24.out 2> build/neuralese-host/24.err +VERDICT refuse-encoding PASS run exit=15 expected=15 stdout=match stderr=match +CASE refuse-payload-length line=25 + $ seed/out/omc < build/neuralese-host/25.src > build/neuralese-host/25.elf 2> build/neuralese-host/25.cerr + $ build/neuralese-host/25.elf < neuralese/fixtures/payload-length.wire > build/neuralese-host/25.out 2> build/neuralese-host/25.err +VERDICT refuse-payload-length PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-checksum-first line=26 + $ seed/out/omc < build/neuralese-host/26.src > build/neuralese-host/26.elf 2> build/neuralese-host/26.cerr + $ build/neuralese-host/26.elf < neuralese/fixtures/checksum-first.wire > build/neuralese-host/26.out 2> build/neuralese-host/26.err +VERDICT refuse-checksum-first PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-checksum-last line=27 + $ seed/out/omc < build/neuralese-host/27.src > build/neuralese-host/27.elf 2> build/neuralese-host/27.cerr + $ build/neuralese-host/27.elf < neuralese/fixtures/checksum-last.wire > build/neuralese-host/27.out 2> build/neuralese-host/27.err +VERDICT refuse-checksum-last PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-reserved-first line=28 + $ seed/out/omc < build/neuralese-host/28.src > build/neuralese-host/28.elf 2> build/neuralese-host/28.cerr + $ build/neuralese-host/28.elf < neuralese/fixtures/reserved-first.wire > build/neuralese-host/28.out 2> build/neuralese-host/28.err +VERDICT refuse-reserved-first PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-reserved-second line=29 + $ seed/out/omc < build/neuralese-host/29.src > build/neuralese-host/29.elf 2> build/neuralese-host/29.cerr + $ build/neuralese-host/29.elf < neuralese/fixtures/reserved-second.wire > build/neuralese-host/29.out 2> build/neuralese-host/29.err +VERDICT refuse-reserved-second PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-opcode-low line=30 + $ seed/out/omc < build/neuralese-host/30.src > build/neuralese-host/30.elf 2> build/neuralese-host/30.cerr + $ build/neuralese-host/30.elf < neuralese/fixtures/opcode-low.wire > build/neuralese-host/30.out 2> build/neuralese-host/30.err +VERDICT refuse-opcode-low PASS run exit=19 expected=19 stdout=match stderr=match +CASE refuse-opcode-high line=31 + $ seed/out/omc < build/neuralese-host/31.src > build/neuralese-host/31.elf 2> build/neuralese-host/31.cerr + $ build/neuralese-host/31.elf < neuralese/fixtures/opcode-high.wire > build/neuralese-host/31.out 2> build/neuralese-host/31.err +VERDICT refuse-opcode-high PASS run exit=19 expected=19 stdout=match stderr=match +CASE refuse-empty line=32 + $ seed/out/omc < build/neuralese-host/32.src > build/neuralese-host/32.elf 2> build/neuralese-host/32.cerr + $ build/neuralese-host/32.elf < neuralese/fixtures/empty.wire > build/neuralese-host/32.out 2> build/neuralese-host/32.err +VERDICT refuse-empty PASS run exit=16 expected=16 stdout=match stderr=match +CASE refuse-large line=33 + $ seed/out/omc < build/neuralese-host/33.src > build/neuralese-host/33.elf 2> build/neuralese-host/33.cerr + $ build/neuralese-host/33.elf < neuralese/fixtures/large.wire > build/neuralese-host/33.out 2> build/neuralese-host/33.err +VERDICT refuse-large PASS run exit=10 expected=10 stdout=match stderr=match +SUBST neuralese/fixtures/check-10.from neuralese/fixtures/success.to +CASE kill-guard-oversize line=35 + MUTATE exact-once substitution at byte 1061 + $ seed/out/omc < build/neuralese-host/35.src > build/neuralese-host/35.elf 2> build/neuralese-host/35.cerr + $ build/neuralese-host/35.elf < neuralese/fixtures/oversize.wire > build/neuralese-host/35.out 2> build/neuralese-host/35.err +VERDICT kill-guard-oversize PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-16.from neuralese/fixtures/success.to +CASE kill-guard-short line=37 + MUTATE exact-once substitution at byte 1083 + $ seed/out/omc < build/neuralese-host/37.src > build/neuralese-host/37.elf 2> build/neuralese-host/37.cerr + $ build/neuralese-host/37.elf < neuralese/fixtures/short.wire > build/neuralese-host/37.out 2> build/neuralese-host/37.err +VERDICT kill-guard-short PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-11.from neuralese/fixtures/success.to +CASE kill-guard-magic line=39 + MUTATE exact-once substitution at byte 1134 + $ seed/out/omc < build/neuralese-host/39.src > build/neuralese-host/39.elf 2> build/neuralese-host/39.cerr + $ build/neuralese-host/39.elf < neuralese/fixtures/magic.wire > build/neuralese-host/39.out 2> build/neuralese-host/39.err +VERDICT kill-guard-magic PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-12.from neuralese/fixtures/success.to +CASE kill-guard-producer line=41 + MUTATE exact-once substitution at byte 1259 + $ seed/out/omc < build/neuralese-host/41.src > build/neuralese-host/41.elf 2> build/neuralese-host/41.cerr + $ build/neuralese-host/41.elf < neuralese/fixtures/producer.wire > build/neuralese-host/41.out 2> build/neuralese-host/41.err +VERDICT kill-guard-producer PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-12.from neuralese/fixtures/success.to +CASE kill-guard-decoder line=43 + MUTATE exact-once substitution at byte 1259 + $ seed/out/omc < build/neuralese-host/43.src > build/neuralese-host/43.elf 2> build/neuralese-host/43.cerr + $ build/neuralese-host/43.elf < neuralese/fixtures/decoder.wire > build/neuralese-host/43.out 2> build/neuralese-host/43.err +VERDICT kill-guard-decoder PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-13.from neuralese/fixtures/success.to +CASE kill-guard-dimension line=45 + MUTATE exact-once substitution at byte 1286 + $ seed/out/omc < build/neuralese-host/45.src > build/neuralese-host/45.elf 2> build/neuralese-host/45.cerr + $ build/neuralese-host/45.elf < neuralese/fixtures/dimension.wire > build/neuralese-host/45.out 2> build/neuralese-host/45.err +VERDICT kill-guard-dimension PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-14.from neuralese/fixtures/success.to +CASE kill-guard-dtype line=47 + MUTATE exact-once substitution at byte 1313 + $ seed/out/omc < build/neuralese-host/47.src > build/neuralese-host/47.elf 2> build/neuralese-host/47.cerr + $ build/neuralese-host/47.elf < neuralese/fixtures/dtype.wire > build/neuralese-host/47.out 2> build/neuralese-host/47.err +VERDICT kill-guard-dtype PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-15.from neuralese/fixtures/success.to +CASE kill-guard-encoding line=49 + MUTATE exact-once substitution at byte 1340 + $ seed/out/omc < build/neuralese-host/49.src > build/neuralese-host/49.elf 2> build/neuralese-host/49.cerr + $ build/neuralese-host/49.elf < neuralese/fixtures/encoding.wire > build/neuralese-host/49.out 2> build/neuralese-host/49.err +VERDICT kill-guard-encoding PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-20.from neuralese/fixtures/success.to +CASE kill-guard-payload-length line=51 + MUTATE exact-once substitution at byte 1367 + $ seed/out/omc < build/neuralese-host/51.src > build/neuralese-host/51.elf 2> build/neuralese-host/51.cerr + $ build/neuralese-host/51.elf < neuralese/fixtures/payload-length.wire > build/neuralese-host/51.out 2> build/neuralese-host/51.err +VERDICT kill-guard-payload-length PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-17.from neuralese/fixtures/success.to +CASE kill-guard-checksum-first line=53 + MUTATE exact-once substitution at byte 1394 + $ seed/out/omc < build/neuralese-host/53.src > build/neuralese-host/53.elf 2> build/neuralese-host/53.cerr + $ build/neuralese-host/53.elf < neuralese/fixtures/checksum-first.wire > build/neuralese-host/53.out 2> build/neuralese-host/53.err +VERDICT kill-guard-checksum-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-17.from neuralese/fixtures/success.to +CASE kill-guard-checksum-last line=55 + MUTATE exact-once substitution at byte 1394 + $ seed/out/omc < build/neuralese-host/55.src > build/neuralese-host/55.elf 2> build/neuralese-host/55.cerr + $ build/neuralese-host/55.elf < neuralese/fixtures/checksum-last.wire > build/neuralese-host/55.out 2> build/neuralese-host/55.err +VERDICT kill-guard-checksum-last PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-18.from neuralese/fixtures/success.to +CASE kill-guard-reserved-first line=57 + MUTATE exact-once substitution at byte 1439 + $ seed/out/omc < build/neuralese-host/57.src > build/neuralese-host/57.elf 2> build/neuralese-host/57.cerr + $ build/neuralese-host/57.elf < neuralese/fixtures/reserved-first.wire > build/neuralese-host/57.out 2> build/neuralese-host/57.err +VERDICT kill-guard-reserved-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-18.from neuralese/fixtures/success.to +CASE kill-guard-reserved-second line=59 + MUTATE exact-once substitution at byte 1439 + $ seed/out/omc < build/neuralese-host/59.src > build/neuralese-host/59.elf 2> build/neuralese-host/59.cerr + $ build/neuralese-host/59.elf < neuralese/fixtures/reserved-second.wire > build/neuralese-host/59.out 2> build/neuralese-host/59.err +VERDICT kill-guard-reserved-second PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-19.from neuralese/fixtures/success.to +CASE kill-guard-opcode-low line=61 + MUTATE exact-once substitution at byte 1484 + $ seed/out/omc < build/neuralese-host/61.src > build/neuralese-host/61.elf 2> build/neuralese-host/61.cerr + $ build/neuralese-host/61.elf < neuralese/fixtures/opcode-low.wire > build/neuralese-host/61.out 2> build/neuralese-host/61.err +VERDICT kill-guard-opcode-low PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-19.from neuralese/fixtures/success.to +CASE kill-guard-opcode-high line=63 + MUTATE exact-once substitution at byte 1484 + $ seed/out/omc < build/neuralese-host/63.src > build/neuralese-host/63.elf 2> build/neuralese-host/63.cerr + $ build/neuralese-host/63.elf < neuralese/fixtures/opcode-high.wire > build/neuralese-host/63.out 2> build/neuralese-host/63.err +VERDICT kill-guard-opcode-high PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-16.from neuralese/fixtures/success.to +CASE kill-guard-empty line=65 + MUTATE exact-once substitution at byte 1083 + $ seed/out/omc < build/neuralese-host/65.src > build/neuralese-host/65.elf 2> build/neuralese-host/65.cerr + $ build/neuralese-host/65.elf < neuralese/fixtures/empty.wire > build/neuralese-host/65.out 2> build/neuralese-host/65.err +VERDICT kill-guard-empty PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-10.from neuralese/fixtures/success.to +CASE kill-guard-large line=67 + MUTATE exact-once substitution at byte 1061 + $ seed/out/omc < build/neuralese-host/67.src > build/neuralese-host/67.elf 2> build/neuralese-host/67.cerr + $ build/neuralese-host/67.elf < neuralese/fixtures/large.wire > build/neuralese-host/67.out 2> build/neuralese-host/67.err +VERDICT kill-guard-large PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/codebook.from neuralese/fixtures/codebook.to +CASE kill-codebook line=69 + MUTATE exact-once substitution at byte 436 + $ seed/out/omc < build/neuralese-host/69.src > build/neuralese-host/69.elf 2> build/neuralese-host/69.cerr + $ build/neuralese-host/69.elf < neuralese/fixtures/positive-1-7.wire > build/neuralese-host/69.out 2> build/neuralese-host/69.err +VERDICT kill-codebook PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 76 stderr=match +CASE execute-wrong-codebook line=70 + $ seed/out/omc < build/neuralese-host/70.src > build/neuralese-host/70.elf 2> build/neuralese-host/70.cerr + $ build/neuralese-host/70.elf < /dev/null > build/neuralese-host/70.out 2> build/neuralese-host/70.err +VERDICT execute-wrong-codebook PASS run exit=14 expected=14 stdout=match stderr=match +SUBST neuralese/fixtures/contract.from neuralese/fixtures/contract.to +CASE kill-precondition line=72 + MUTATE exact-once substitution at byte 34 + $ seed/out/omc < build/neuralese-host/72.src > build/neuralese-host/72.elf 2> build/neuralese-host/72.cerr + $ build/neuralese-host/72.elf < /dev/null > build/neuralese-host/72.out 2> build/neuralese-host/72.err +VERDICT kill-precondition PASS run exit=17 expected=17 stdout=match stderr=match +SUBST neuralese/fixtures/type.from neuralese/fixtures/type.to +CASE ordinary-type-refusal line=74 + MUTATE exact-once substitution at byte 72 + $ seed/out/omc < build/neuralese-host/74.src > build/neuralese-host/74.elf 2> build/neuralese-host/74.cerr +VERDICT ordinary-type-refusal PASS compile exit=7 expected=7 refused with the expected error +SUBST neuralese/fixtures/contract.from neuralese/fixtures/purity.to +CASE ordinary-purity-refusal line=76 + MUTATE exact-once substitution at byte 34 + $ seed/out/omc < build/neuralese-host/76.src > build/neuralese-host/76.elf 2> build/neuralese-host/76.cerr +VERDICT ordinary-purity-refusal PASS compile exit=30 expected=30 refused with the expected error +SUBST neuralese/fixtures/post.from neuralese/fixtures/post.to +CASE ordinary-postcondition-refusal line=78 + MUTATE exact-once substitution at byte 51 + $ seed/out/omc < build/neuralese-host/78.src > build/neuralese-host/78.elf 2> build/neuralese-host/78.cerr + $ build/neuralese-host/78.elf < /dev/null > build/neuralese-host/78.out 2> build/neuralese-host/78.err +VERDICT ordinary-postcondition-refusal PASS run exit=110 expected=110 stdout=match stderr=match +OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0 diff --git a/neuralese/host-proposal.om b/neuralese/host-proposal.om new file mode 100644 index 000000000..118095047 --- /dev/null +++ b/neuralese/host-proposal.om @@ -0,0 +1,181 @@ +note SPDX-License-Identifier: Apache-2.0 +note Host synthetic one-shot CLI: receiver-context-file expected-op expected-operand. +note This harness cannot authorize effects or reserve a production microjob. +om2 debug +note Closed compiled ordinary Omega operations, never dynamically execute vector bytes. +fn nlinc x uint to uint +requires le x 16 +ensures le result 32 +ret add x 1 +end +fn nldouble x uint to uint +requires le x 16 +ensures le result 32 +ret mul x 2 +end +fn nlident x uint to uint +requires le x 16 +ensures le result 32 +ret x +end +text nlrhead "NL4R1 0 " +text nlrtail " 1 1 0 1 0 " +text nlrno "NL4R1 " +text nlzeros " 0 0 0 0 0 0 0 0 0\n" +text nlendl "\n" +text nlspace " " +fn nlout b view uchar * fd int to void +pos = ulong 0 +while lt pos len b bound 8192 +r = write fd b pos sub len b pos +if le r 0 +exit 81 +end +pos = add pos ulong r +end +end +fn nlnumber v uint fd int to void +b = new uchar 10 0 +pos = ulong 10 +x = v +while true bound 10 +pos = sub pos 1 +put b pos uchar add rem x 10 48 +x = div x 10 +if eq x 0 +break +end +end +nlout part b pos sub 10 pos fd +end +fn nlfail code int to int +nlout nlrno 2 +nlnumber uint code 2 +nlout nlzeros 2 +ret code +end +fn nlread fd int b edit uchar * to long +pos = ulong 0 +while lt pos len b bound 5121 +r = read fd b pos sub len b pos +if lt r 0 +ret r +end +if eq r 0 +break +end +pos = add pos ulong r +end +ret long pos +end +fn nlcontext c edit uchar 1025 to int +path = new uchar 4096 0 +n = argread 1 path 0 4096 +if le n 0 +ret 80 +end +fd = fopen path 0 ulong n 0 0 +if lt fd 0 +ret 80 +end +r = nlread int fd c +cl = fclose int fd +if or ne r 1024 ne cl 0 +ret 80 +end +ret 0 +end +fn nlrequest e edit uint 16 to int +argbuf = new uchar 2 0 +r = argread 2 argbuf 0 2 +if ne r 1 +ret 80 +end +v = get argbuf 0 +if or lt v 49 gt v 51 +ret 80 +end +put e 0 uint sub v 48 +r = argread 3 argbuf 0 2 +if ne r 1 +ret 80 +end +v = get argbuf 0 +if or lt v 48 gt v 51 +ret 80 +end +put e 1 uint sub v 48 +if eq get e 0 1 +put e 2 1 +end +if eq get e 0 2 +put e 2 2 +end +put e 3 1 +put e 4 1 +put e 5 1 +put e 6 4 +put e 7 1 +put e 8 0 +put e 9 1 +ret 0 +end +fn nlexec p view uint 16 to void +z = uint 0 +if eq get p 0 1 +z = nlinc get p 1 +end +if eq get p 0 2 +z = nldouble get p 1 +end +if eq get p 0 3 +z = nlident get p 1 +end +nlout nlrhead 1 +for i ulong 3 +if ne i 0 +nlout nlspace 1 +end +nlnumber get p i 1 +end +nlout nlrtail 1 +nlnumber z 1 +nlout nlendl 1 +end +fn main to int +frame = new uchar 5121 0 +ctx = new uchar 1025 0 +p = new uint 16 0 +e = new uint 16 0 +if ne argcnt 4 +ret nlfail 80 +end +r = nlcontext ctx +if ne r 0 +ret nlfail r +end +r = nlrequest e +if ne r 0 +ret nlfail r +end +n = nlread 0 frame +if lt n 0 +ret nlfail 80 +end +note Receiver fixture's issued_at is the trusted synthetic clock, not input now. +now = lpbe64 ctx 64 +r = lpvalid part frame 0 ulong n part ctx 0 1024 now 0 +if ne r 0 +ret nlfail r +end +r = nlproposal part frame 0 ulong n p +if ne r 0 +ret nlfail r +end +if not nlmatch p e +ret nlfail 49 +end +note One-shot pure proposal only; no reservation or external effect occurs. +nlexec p +ret 0 +end diff --git a/neuralese/host-results.287fdc263f7af93107c378ba63c92202a0e6c1479cb1ff6971706b423b0b15fb.json b/neuralese/host-results.287fdc263f7af93107c378ba63c92202a0e6c1479cb1ff6971706b423b0b15fb.json new file mode 100644 index 000000000..4402e03b8 --- /dev/null +++ b/neuralese/host-results.287fdc263f7af93107c378ba63c92202a0e6c1479cb1ff6971706b423b0b15fb.json @@ -0,0 +1,365 @@ +{ + "arithmetic_oracle": { + "WolframLanguageEvaluator": "{7+1,7*2,7,16+1,16*2} -> {8,14,7,17,32}", + "date": "2026-10-28", + "meaning": "expected arithmetic, not measured execution", + "verification": [ + "Integrate[x^2,{x,0,1}] -> 1/3", + "WolframAlpha sqrt(27)/2 -> (3 sqrt(3))/2" + ] + }, + "artifact_sha256": { + "build/neuralese-gate": "6c8691c21074595312fdd0f22ca30b6fbe48fb88f2fb0a58936f2960056acefa", + "build/neuralese-host/10.elf": "b0bfea28163bb2a040b8a4c77a0b5e6218a240491e16480bb10278d31a969c7f", + "build/neuralese-host/10.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/10.src": "452c187191210b0c7215cbefecbc59afc2b4377e478f4b19db463b834373b5c6", + "build/neuralese-host/11.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/11.out": "4dd0598678e5c982c15e8545c49aa5ddb1914c8ffa60fd6fc1ab7278f6e2bde7", + "build/neuralese-host/11.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/12.elf": "5a3eb42482facaaa6adc5ced689344b63fde8b642d37496e0bdeebff5450efb7", + "build/neuralese-host/12.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/12.src": "4dd0598678e5c982c15e8545c49aa5ddb1914c8ffa60fd6fc1ab7278f6e2bde7", + "build/neuralese-host/13.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/13.out": "0012d111a999cfbd0c045d6f15702cf47a6cd946b689ee95a0c3cf9200aa9ef7", + "build/neuralese-host/13.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/14.elf": "a1928d878a257225994596d1f5bf60572784672137c938af87b4f90dee4b0963", + "build/neuralese-host/14.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/14.src": "0012d111a999cfbd0c045d6f15702cf47a6cd946b689ee95a0c3cf9200aa9ef7", + "build/neuralese-host/15.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/15.out": "933b846a10487abb23a11efc98f1dd82c3743d4bcdaf86d3d8634a1bb47b9598", + "build/neuralese-host/15.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/16.elf": "257fcf461eb929953d0df6031084c9ecd576691e84af5edad148acc5842abaa3", + "build/neuralese-host/16.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/16.src": "933b846a10487abb23a11efc98f1dd82c3743d4bcdaf86d3d8634a1bb47b9598", + "build/neuralese-host/17.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/17.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/17.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/18.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/18.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/18.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/19.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/19.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/19.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/20.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/20.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/20.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/21.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/21.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/21.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/22.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/22.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/22.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/23.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/23.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/23.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/24.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/24.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/24.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/25.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/25.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/25.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/26.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/26.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/26.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/27.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/27.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/27.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/28.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/28.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/28.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/29.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/29.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/29.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/3.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/3.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/3.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/30.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/30.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/30.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/31.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/31.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/31.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/32.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/32.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/32.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/33.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/33.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/33.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/35.elf": "f29606141b83b9cba36738ab5d8ec6014b93ffdd5c8c7dda88a1390025251d82", + "build/neuralese-host/35.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/35.src": "2fb2ed317a804457a69f813116004925c98b50caa3a92482e6f67d43ff694bfc", + "build/neuralese-host/37.elf": "af345d148a4891d22328c47f9c49bf80ee55c6b3e0664d24fad6d981c8ef207f", + "build/neuralese-host/37.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/37.src": "363f3bbe0b6530d854be71bbe535148f68d1d3e513709cbde39661baef645b7b", + "build/neuralese-host/39.elf": "a0744f0c27acd09930c83db2194210f67c71f1b3157e58d77a505c8da58c9cc0", + "build/neuralese-host/39.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/39.src": "47d87eea9afcfad49bb507dd4e911ccffe81d6ff9ffd487a13f797ad446dbae0", + "build/neuralese-host/4.elf": "51afb134f80236343b9a0028a60c15d2094b3f1840eb6906a05b0583fc882ca3", + "build/neuralese-host/4.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/4.src": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/41.elf": "421a32514da6fbca3d0735f511e62856e5b6ec1409f8af93bb84e5afb07134cd", + "build/neuralese-host/41.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/41.src": "6458bc7d7ba32ff0005646e054220d2658cbebb13fd61ed88ddef23ae1030389", + "build/neuralese-host/43.elf": "421a32514da6fbca3d0735f511e62856e5b6ec1409f8af93bb84e5afb07134cd", + "build/neuralese-host/43.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/43.src": "6458bc7d7ba32ff0005646e054220d2658cbebb13fd61ed88ddef23ae1030389", + "build/neuralese-host/45.elf": "6c172648b7d292e9ac0d532877c0bdbea166a7beda48dee87875bc3b5c82b3f6", + "build/neuralese-host/45.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/45.src": "d0d596b61ffb58bb26b0484c0e8fcac8d2620ad30ae3bc327e1c8829bcb69549", + "build/neuralese-host/47.elf": "a7f4383d392e901d9b33867bb27070752172698230e2c330b5c1bbbef7410a02", + "build/neuralese-host/47.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/47.src": "dcae3fec69f7877c8998b5e5121c874d1cae397152aca18f4f273c9f9187bf01", + "build/neuralese-host/49.elf": "e0aa646d5619523ee6b49b1d41973185587dbd5a69593c94fdec7ee23f18f098", + "build/neuralese-host/49.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/49.src": "55b6088a75edc484fe9f87b0b885f5e068970bb4f67f1fd4de879f6b103d02c0", + "build/neuralese-host/5.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/5.out": "9b9367813bab44fb777b65102443aa686b55eabd28f7550cf7f4d62ca53703ca", + "build/neuralese-host/5.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/51.elf": "34fe2319441fb60f8d9468b01e8d6682d50af04a66eb0d0a6c0ef2e96862a66d", + "build/neuralese-host/51.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/51.src": "cb74e9db45a267aece665bafef249b9ab1d288a3200963a76a36495b95962e19", + "build/neuralese-host/53.elf": "4032bb6e5c30d5f13d99914a6e5c5e40be57c2cf4fc4217b275a15336ee23607", + "build/neuralese-host/53.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/53.src": "4ae5f909cc7ae2941017122d2afd087dcde3f2d5b418088603add5fc1de96126", + "build/neuralese-host/55.elf": "4032bb6e5c30d5f13d99914a6e5c5e40be57c2cf4fc4217b275a15336ee23607", + "build/neuralese-host/55.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/55.src": "4ae5f909cc7ae2941017122d2afd087dcde3f2d5b418088603add5fc1de96126", + "build/neuralese-host/57.elf": "b21d5035a9934f808deafb274e7d8fb1b10fcdeacbcbc477d949de53a1ba9664", + "build/neuralese-host/57.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/57.src": "6b79e183ed8f480cc21053f3180243101f9778e6fa0aae2d71fb1583bb812f70", + "build/neuralese-host/59.elf": "b21d5035a9934f808deafb274e7d8fb1b10fcdeacbcbc477d949de53a1ba9664", + "build/neuralese-host/59.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/59.src": "6b79e183ed8f480cc21053f3180243101f9778e6fa0aae2d71fb1583bb812f70", + "build/neuralese-host/6.elf": "d0ee9f6c07a1fdaf0110861cf757bf018704f6d463e1c76a55e47365ec6e23f6", + "build/neuralese-host/6.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/6.src": "9b9367813bab44fb777b65102443aa686b55eabd28f7550cf7f4d62ca53703ca", + "build/neuralese-host/61.elf": "1375f7513c880ac07e930774137b6aa8b1e0c8896f5fb2c7d8c286b37c19cccf", + "build/neuralese-host/61.out": "27d0472e5256bed385ed3ab025cc5365e97af52ee9b45f1e264a9b88cbc6451c", + "build/neuralese-host/61.src": "57180394f3e859dc27ba85119664aab32d0fafd3c415785e93461040c823f0c9", + "build/neuralese-host/63.elf": "1375f7513c880ac07e930774137b6aa8b1e0c8896f5fb2c7d8c286b37c19cccf", + "build/neuralese-host/63.out": "27d0472e5256bed385ed3ab025cc5365e97af52ee9b45f1e264a9b88cbc6451c", + "build/neuralese-host/63.src": "57180394f3e859dc27ba85119664aab32d0fafd3c415785e93461040c823f0c9", + "build/neuralese-host/65.elf": "af345d148a4891d22328c47f9c49bf80ee55c6b3e0664d24fad6d981c8ef207f", + "build/neuralese-host/65.out": "7d9f0160b116ecff7df27a69fde76d770d145253b35484078bd656adaa95be1d", + "build/neuralese-host/65.src": "363f3bbe0b6530d854be71bbe535148f68d1d3e513709cbde39661baef645b7b", + "build/neuralese-host/67.elf": "f29606141b83b9cba36738ab5d8ec6014b93ffdd5c8c7dda88a1390025251d82", + "build/neuralese-host/67.out": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "build/neuralese-host/67.src": "2fb2ed317a804457a69f813116004925c98b50caa3a92482e6f67d43ff694bfc", + "build/neuralese-host/69.elf": "18fb659139a05411e10a9543ffbc1653dbb56aca944ef7f0d8643dcafe5804ed", + "build/neuralese-host/69.out": "9b9367813bab44fb777b65102443aa686b55eabd28f7550cf7f4d62ca53703ca", + "build/neuralese-host/69.src": "79c4b12477c326a868b6406189904f478603ccbbcf866a0e39b1cb90ea4d21c6", + "build/neuralese-host/7.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/7.out": "fbaf09f097392a79c7806f066a3a84256619ec5ceee7bfdce0f3dc6b5aa3d7ba", + "build/neuralese-host/7.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0", + "build/neuralese-host/70.elf": "d0ee9f6c07a1fdaf0110861cf757bf018704f6d463e1c76a55e47365ec6e23f6", + "build/neuralese-host/70.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/70.src": "9b9367813bab44fb777b65102443aa686b55eabd28f7550cf7f4d62ca53703ca", + "build/neuralese-host/72.elf": "d3fc8a1929a09e3894b6da3505260ee0a56619fda0f2df2f61c33530d8e096f6", + "build/neuralese-host/72.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/72.src": "f4508f0801d07468b756e8f04e519e19f7679edbd9a0a3d74949c49a97d43360", + "build/neuralese-host/74.elf": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/74.src": "6e6040e74dc4109c0ae42f00d3086a786c9c0023033606ac5fb54f48edd26a40", + "build/neuralese-host/76.elf": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/76.src": "94d59432512b22d05b103e6e560f21c605cfd3c8a75f22323ead9a99466ba845", + "build/neuralese-host/78.elf": "3acad0f513ff2e10ba271e141db41125ccdfe5f3e54ac1987b0096610ec579c1", + "build/neuralese-host/78.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/78.src": "d4fe0e7ac881d8f6c91ec577bd9dba87bd2bd06fc2bc529342b89fa045308728", + "build/neuralese-host/8.elf": "2eadf885074ad9ad3b227a98545c5c0011e98a8c1eff46e40ea7b0f103991e16", + "build/neuralese-host/8.out": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "build/neuralese-host/8.src": "fbaf09f097392a79c7806f066a3a84256619ec5ceee7bfdce0f3dc6b5aa3d7ba", + "build/neuralese-host/9.elf": "730fba925e0b8a7dd0f31adf85c687d732028967a3b21fbd30c716b9ddb18595", + "build/neuralese-host/9.out": "452c187191210b0c7215cbefecbc59afc2b4377e478f4b19db463b834373b5c6", + "build/neuralese-host/9.src": "68e1d48b9ae4bbec397eeffd3aab5c1dd9c5ad34880e80bfc225a174aa01a1f0" + }, + "baseline": "6999fa9e6dae4847c155ef4eacaece74f491d3ca", + "commands": [ + { + "command": "seed/out/omc < seed/qualification/om2/gate.om > build/neuralese-gate", + "exit": 0, + "stderr": "" + }, + { + "argv": [ + "build/neuralese-gate", + "seed/out/omc", + "d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84", + "neuralese/host.cases", + "build/neuralese-host" + ], + "exit": 0, + "summary": "OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0" + } + ], + "compiler_sha256": "d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84", + "host": { + "machine": "aarch64", + "release": "7.0.0-1019-nvidia", + "system": "Linux" + }, + "independent_fixture_checksum_oracle": { + "command": "sha256sum (stdin is exactly the first fourteen fixture bytes)", + "fixture_generator_oracle": "Python 3.12.3 stdlib hashlib; no host decoder/test conductor implementation", + "fixtures": [ + "magic", + "producer", + "decoder", + "dimension", + "dtype", + "encoding", + "payload-length", + "reserved-first", + "reserved-second", + "opcode-low", + "opcode-high", + "positive-1-16.wire", + "positive-1-7.wire", + "positive-2-16.wire", + "positive-2-7.wire", + "positive-3-127.wire", + "positive-3-17.wire", + "positive-3-7.wire" + ], + "result": "all match their trailing ASCII hex digest" + }, + "limits": [ + "Hand-authored fixed discrete codebook; no learned producer or latent vector.", + "Only pure operations admitted; no general effect/capability executor is implemented.", + "Conductor executes fixed trusted sources with ambient host permissions and a per-child deadline; not a general sandbox.", + "No model/service/GPU endpoint contacted by the supplement or host suite." + ], + "log": { + "path": "neuralese/host-3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222.log", + "sha256": "3163bdc1f56d02803df5061439d0a51156443b339e8e08870a93647894e99222" + }, + "not_claimed": [ + "QUALIFIED", + "MERGED", + "DEPLOYED", + "learned reasoning", + "model experiment", + "capability sandbox", + "GPU execution" + ], + "recorded_at": "2026-10-28T13:46:12.673625+00:00", + "schema": "omega-neuralese-host-exercise-v1", + "source_clean_at_execution": true, + "source_pin": "39e89fb1c2aaed99ddc05ec565274dd05792b70f", + "source_repository": "https://github.com/aien-dev/omega-mv", + "source_sha256": { + "neuralese/decode.om": "2ee50df5da0ad373d0bf31d24f00bb92d9dd5e57c1a4c368dc4748ac106cc741", + "neuralese/fixtures/check-10.from": "c244c1b7f73a52da63290ec63b6d8f7120c5dc353263508f7f2404d52d18b3fd", + "neuralese/fixtures/check-11.from": "a49464cda61c6f7c4436bf6c548f72fb223aee8880ceaed929b8663662551202", + "neuralese/fixtures/check-12.from": "b125dc358f23340476b5ff26a270f9088036d8cd888d7ebe92e68cf66ecf1878", + "neuralese/fixtures/check-13.from": "54ef1b81d64c8e84891dd713fa18419a9d7621c4353a4450445ac0b7c4ea73e7", + "neuralese/fixtures/check-14.from": "5c8b96d2a4cfd48a8396a39c6e2279fc44d86bf2960176fc1a5431c60c4c937a", + "neuralese/fixtures/check-15.from": "14aed89c79f232b326b38b7887e8b3fa3f5e0ff7c2ebba3ac620b285f554d31d", + "neuralese/fixtures/check-16.from": "6520163bbebc584b14a9b07ce4fb9deb101725e84a5cc812e999b2f4e23cf57d", + "neuralese/fixtures/check-17.from": "faddf730bdb8a9ad29c37d2c197c2472e6b3e4bcd7cbfade93b61e47c291b5dd", + "neuralese/fixtures/check-18.from": "3d8cba82e18f21aeab2e8b3ef3daa823933d4d16f11362a54863086df8f49054", + "neuralese/fixtures/check-19.from": "bad2267ddb018ed0262e83684028d8312e50fcdbe77b09c00aaa4698fdf15d8f", + "neuralese/fixtures/check-20.from": "dcf1354a94964564df03ad654227ff897fa939529ed72f71274c780ca7d10a18", + "neuralese/fixtures/checksum-first.wire": "b99ec325b1a4f4e8a39b0fd536b7b325d2f2707586965b0bce6b20f610c85eb4", + "neuralese/fixtures/checksum-last.wire": "13e5b1457ef14bbf162b436ebdd7280d6287fbb607f1574cc4bcc6bcef76c8e1", + "neuralese/fixtures/codebook.from": "3a67e71d26cd055e386f0ac70289ec1a8381b91eb513ecef497e599d9f35051a", + "neuralese/fixtures/codebook.to": "3bc2034939c9313baa6e53b7724bee1f07b82ee6d0d9bb9503fec4439119f3ad", + "neuralese/fixtures/contract.from": "e8a5f79fde29e1821277000de9d1ebb87372965665065e099128ba11d06f4ed2", + "neuralese/fixtures/contract.to": "5488c3f87d4a7a860e7a1ec1533f45cdf6bcbbdfbb344fa6e7fc29abf9095be4", + "neuralese/fixtures/decoder.wire": "b30860628770edbe40d3ebc87ee175d7a8965b20b2b335178586306fe3382566", + "neuralese/fixtures/dimension.wire": "a0ed6f7e4f301a538f19dd03f7dbbcc268b0188e97234634372a6abc11a058da", + "neuralese/fixtures/dtype.wire": "3da458b0189f6c386e8d0ba3f05b9ceb2a228cdbc23e9cc4a75ca62312ca819d", + "neuralese/fixtures/empty.wire": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "neuralese/fixtures/encoding.wire": "5a375c852e0b1e4a8f6fd7282b19beaaa3bc1a6490e59f95614c1d60f8622651", + "neuralese/fixtures/large.wire": "3ed229c8b03b1ef08d5555548fa656886e923add6bd0acd1d63d1271ea014853", + "neuralese/fixtures/magic.wire": "038ce102cca97ff6ed325f1a3476b14170d094465097d128083c57f9d8921014", + "neuralese/fixtures/opcode-high.wire": "8b7950161a6ccc85acc3e340b5dfbe265b9dbe8e5ccf36a4221bf0c123774aa9", + "neuralese/fixtures/opcode-low.wire": "c6315b6103ac45181563cc49a7f835fe52d87e4141f10c375dd30e1eee339a89", + "neuralese/fixtures/oversize.wire": "fa193338472d38f0267ff2cfe5d97c0920a6da9b4acbd2ce3708c28fe83f0b92", + "neuralese/fixtures/payload-length.wire": "b547deb197c88c5a16a85b7d0dde33ac60d4b1780c4ff4ab9df9ae1405ab789c", + "neuralese/fixtures/positive-1-16.om": "452c187191210b0c7215cbefecbc59afc2b4377e478f4b19db463b834373b5c6", + "neuralese/fixtures/positive-1-16.wire": "0d3cbb797149069dfca6d9a3175e57cfc9a05e72e74ee2ced498295a05096643", + "neuralese/fixtures/positive-1-7.om": "0fc157bcf82a65092225c603a15ff39442bf44ff6215f025d4d794aa41b85379", + "neuralese/fixtures/positive-1-7.wire": "1cfef42ea542ef3ad6bb49c9854d62c12acc0b8556f57c4582d36c28271bceea", + "neuralese/fixtures/positive-2-16.om": "4dd0598678e5c982c15e8545c49aa5ddb1914c8ffa60fd6fc1ab7278f6e2bde7", + "neuralese/fixtures/positive-2-16.wire": "eab740e8a5c3b29d1555f016ddbedc26564420b9880e541996c980e00b47a12f", + "neuralese/fixtures/positive-2-7.om": "9b9367813bab44fb777b65102443aa686b55eabd28f7550cf7f4d62ca53703ca", + "neuralese/fixtures/positive-2-7.wire": "5d5339e24ef3a0f5348b57672a9286f8e34bde70e99f2e0112157f3ee4c33d93", + "neuralese/fixtures/positive-3-127.om": "933b846a10487abb23a11efc98f1dd82c3743d4bcdaf86d3d8634a1bb47b9598", + "neuralese/fixtures/positive-3-127.wire": "2f857332763f4a5de9aeba8920d079bdde1539d5c3c194c57e6a38f75c3c4f3d", + "neuralese/fixtures/positive-3-17.om": "0012d111a999cfbd0c045d6f15702cf47a6cd946b689ee95a0c3cf9200aa9ef7", + "neuralese/fixtures/positive-3-17.wire": "8332e38b5beb5c84e7c28dc04fede5db44b63d78808a1fd6b69d458943c83e84", + "neuralese/fixtures/positive-3-7.om": "fbaf09f097392a79c7806f066a3a84256619ec5ceee7bfdce0f3dc6b5aa3d7ba", + "neuralese/fixtures/positive-3-7.wire": "c06bdafe430a1520e4c2ad06662d890c37c18091584b73ba3db86943dfd9a565", + "neuralese/fixtures/post.from": "6f67bba428df5678e2ad17d3ce69e6da2bc5af1852cd6de4d44b856ec54e05b3", + "neuralese/fixtures/post.to": "6a9e7d9c4d8d35788f282ae651da3b08f6974a47172e9d7e28a1cce28563384d", + "neuralese/fixtures/producer.wire": "7ae4d070dcbb4ff46a51f3a1624e589f5de068c983a2e84485f8a07e4792827e", + "neuralese/fixtures/purity.to": "57a3680cf391849be79e6d42d905e2fb6d4e8c2abf662ffd421e78739d695e5c", + "neuralese/fixtures/reserved-first.wire": "7ebd5895fd63dcc98d1e859616040ed4f641a6f91b3b0b5bf0546b33cdb7be2c", + "neuralese/fixtures/reserved-second.wire": "baed40f1b0c83d4a2a6b24b31d94160fe56da204714ca5788de1bfd50ae6f104", + "neuralese/fixtures/short.wire": "392357b887279a278539c2723d35fa09ce4fed68009f69a042e8b153b9b1c7be", + "neuralese/fixtures/success.to": "2079e9531fc86e9b6752fbb016540b7d166c423c892eef97628069941721c96d", + "neuralese/fixtures/type.from": "9e26ce87c3f736a6dd2480e2505c5900fc1d4a7933d99ca8bb9b12275539cfbb", + "neuralese/fixtures/type.to": "ab70a0b44928adc7bc1efaaed20514ae141ddd6f9400a8423c5bf4be1916102b", + "neuralese/host.cases": "32f4aba7201c9d22eef75f4159b1565691024a51ba4ce58b30a4cbc27a06dd5d", + "om/tls/sha2.om": "5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33", + "seed/omc/omc.om": "3f937160c823d3a90a6b4cc296f00f517f36ede7fd27a06505c998985ec62240", + "seed/out/omc": "d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84", + "seed/qualification/om2/gate.om": "250361be99ced1246405b2e4a2e2de71373a90d0a0569fb43821ed8b106e045f" + }, + "status": "EXERCISED", + "verdicts": [ + "VERDICT decode-positive-1-7 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-1-7 PASS run exit=8 expected=8 stdout=match stderr=match", + "VERDICT decode-positive-2-7 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-2-7 PASS run exit=14 expected=14 stdout=match stderr=match", + "VERDICT decode-positive-3-7 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-3-7 PASS run exit=7 expected=7 stdout=match stderr=match", + "VERDICT decode-positive-1-16 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-1-16 PASS run exit=17 expected=17 stdout=match stderr=match", + "VERDICT decode-positive-2-16 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-2-16 PASS run exit=32 expected=32 stdout=match stderr=match", + "VERDICT decode-positive-3-17 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-3-17 PASS run exit=109 expected=109 stdout=match stderr=match", + "VERDICT decode-positive-3-127 PASS run exit=0 expected=0 stdout=match stderr=match", + "VERDICT execute-positive-3-127 PASS run exit=109 expected=109 stdout=match stderr=match", + "VERDICT refuse-oversize PASS run exit=10 expected=10 stdout=match stderr=match", + "VERDICT refuse-short PASS run exit=16 expected=16 stdout=match stderr=match", + "VERDICT refuse-magic PASS run exit=11 expected=11 stdout=match stderr=match", + "VERDICT refuse-producer PASS run exit=12 expected=12 stdout=match stderr=match", + "VERDICT refuse-decoder PASS run exit=12 expected=12 stdout=match stderr=match", + "VERDICT refuse-dimension PASS run exit=13 expected=13 stdout=match stderr=match", + "VERDICT refuse-dtype PASS run exit=14 expected=14 stdout=match stderr=match", + "VERDICT refuse-encoding PASS run exit=15 expected=15 stdout=match stderr=match", + "VERDICT refuse-payload-length PASS run exit=20 expected=20 stdout=match stderr=match", + "VERDICT refuse-checksum-first PASS run exit=17 expected=17 stdout=match stderr=match", + "VERDICT refuse-checksum-last PASS run exit=17 expected=17 stdout=match stderr=match", + "VERDICT refuse-reserved-first PASS run exit=18 expected=18 stdout=match stderr=match", + "VERDICT refuse-reserved-second PASS run exit=18 expected=18 stdout=match stderr=match", + "VERDICT refuse-opcode-low PASS run exit=19 expected=19 stdout=match stderr=match", + "VERDICT refuse-opcode-high PASS run exit=19 expected=19 stdout=match stderr=match", + "VERDICT refuse-empty PASS run exit=16 expected=16 stdout=match stderr=match", + "VERDICT refuse-large PASS run exit=10 expected=10 stdout=match stderr=match", + "VERDICT kill-guard-oversize PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-short PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-magic PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-producer PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-decoder PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-dimension PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-dtype PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-encoding PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-payload-length PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-checksum-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-checksum-last PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-reserved-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-reserved-second PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-opcode-low PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-opcode-high PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-empty PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-guard-large PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match", + "VERDICT kill-codebook PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 76 stderr=match", + "VERDICT execute-wrong-codebook PASS run exit=14 expected=14 stdout=match stderr=match", + "VERDICT kill-precondition PASS run exit=17 expected=17 stdout=match stderr=match", + "VERDICT ordinary-type-refusal PASS compile exit=7 expected=7 refused with the expected error", + "VERDICT ordinary-purity-refusal PASS compile exit=30 expected=30 refused with the expected error", + "VERDICT ordinary-postcondition-refusal PASS run exit=110 expected=110 stdout=match stderr=match" + ] +} diff --git a/neuralese/host.cases b/neuralese/host.cases new file mode 100644 index 000000000..7c1dfec00 --- /dev/null +++ b/neuralese/host.cases @@ -0,0 +1,78 @@ +# Native Omega host conductor. Scratch path MUST be build/neuralese-host. +deadline 20 +decode-positive-1-7 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-1-7.wire file:neuralese/fixtures/positive-1-7.om - 0 +execute-positive-1-7 run build/neuralese-host/3.out - - - 8 +decode-positive-2-7 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-2-7.wire file:neuralese/fixtures/positive-2-7.om - 0 +execute-positive-2-7 run build/neuralese-host/5.out - - - 14 +decode-positive-3-7 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-3-7.wire file:neuralese/fixtures/positive-3-7.om - 0 +execute-positive-3-7 run build/neuralese-host/7.out - - - 7 +decode-positive-1-16 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-1-16.wire file:neuralese/fixtures/positive-1-16.om - 0 +execute-positive-1-16 run build/neuralese-host/9.out - - - 17 +decode-positive-2-16 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-2-16.wire file:neuralese/fixtures/positive-2-16.om - 0 +execute-positive-2-16 run build/neuralese-host/11.out - - - 32 +decode-positive-3-17 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-3-17.wire file:neuralese/fixtures/positive-3-17.om - 0 +execute-positive-3-17 run build/neuralese-host/13.out - - - 109 +decode-positive-3-127 run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-3-127.wire file:neuralese/fixtures/positive-3-127.om - 0 +execute-positive-3-127 run build/neuralese-host/15.out - - - 109 +refuse-oversize run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/oversize.wire - - 10 +refuse-short run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/short.wire - - 16 +refuse-magic run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/magic.wire - - 11 +refuse-producer run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/producer.wire - - 12 +refuse-decoder run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/decoder.wire - - 12 +refuse-dimension run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/dimension.wire - - 13 +refuse-dtype run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/dtype.wire - - 14 +refuse-encoding run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/encoding.wire - - 15 +refuse-payload-length run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/payload-length.wire - - 20 +refuse-checksum-first run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/checksum-first.wire - - 17 +refuse-checksum-last run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/checksum-last.wire - - 17 +refuse-reserved-first run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/reserved-first.wire - - 18 +refuse-reserved-second run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/reserved-second.wire - - 18 +refuse-opcode-low run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/opcode-low.wire - - 19 +refuse-opcode-high run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/opcode-high.wire - - 19 +refuse-empty run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/empty.wire - - 16 +refuse-large run neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/large.wire - - 10 +subst neuralese/fixtures/check-10.from neuralese/fixtures/success.to +kill-guard-oversize kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/oversize.wire - - 0 +subst neuralese/fixtures/check-16.from neuralese/fixtures/success.to +kill-guard-short kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/short.wire - - 0 +subst neuralese/fixtures/check-11.from neuralese/fixtures/success.to +kill-guard-magic kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/magic.wire - - 0 +subst neuralese/fixtures/check-12.from neuralese/fixtures/success.to +kill-guard-producer kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/producer.wire - - 0 +subst neuralese/fixtures/check-12.from neuralese/fixtures/success.to +kill-guard-decoder kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/decoder.wire - - 0 +subst neuralese/fixtures/check-13.from neuralese/fixtures/success.to +kill-guard-dimension kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/dimension.wire - - 0 +subst neuralese/fixtures/check-14.from neuralese/fixtures/success.to +kill-guard-dtype kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/dtype.wire - - 0 +subst neuralese/fixtures/check-15.from neuralese/fixtures/success.to +kill-guard-encoding kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/encoding.wire - - 0 +subst neuralese/fixtures/check-20.from neuralese/fixtures/success.to +kill-guard-payload-length kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/payload-length.wire - - 0 +subst neuralese/fixtures/check-17.from neuralese/fixtures/success.to +kill-guard-checksum-first kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/checksum-first.wire - - 0 +subst neuralese/fixtures/check-17.from neuralese/fixtures/success.to +kill-guard-checksum-last kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/checksum-last.wire - - 0 +subst neuralese/fixtures/check-18.from neuralese/fixtures/success.to +kill-guard-reserved-first kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/reserved-first.wire - - 0 +subst neuralese/fixtures/check-18.from neuralese/fixtures/success.to +kill-guard-reserved-second kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/reserved-second.wire - - 0 +subst neuralese/fixtures/check-19.from neuralese/fixtures/success.to +kill-guard-opcode-low kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/opcode-low.wire - - 0 +subst neuralese/fixtures/check-19.from neuralese/fixtures/success.to +kill-guard-opcode-high kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/opcode-high.wire - - 0 +subst neuralese/fixtures/check-16.from neuralese/fixtures/success.to +kill-guard-empty kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/empty.wire - - 0 +subst neuralese/fixtures/check-10.from neuralese/fixtures/success.to +kill-guard-large kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/large.wire - - 0 +subst neuralese/fixtures/codebook.from neuralese/fixtures/codebook.to +kill-codebook kill neuralese/decode.om+om/tls/sha2.om file:neuralese/fixtures/positive-1-7.wire file:neuralese/fixtures/positive-1-7.om - 0 +execute-wrong-codebook run build/neuralese-host/69.out - - - 14 +subst neuralese/fixtures/contract.from neuralese/fixtures/contract.to +kill-precondition run build/neuralese-host/13.out - - - 17 +subst neuralese/fixtures/type.from neuralese/fixtures/type.to +ordinary-type-refusal refuse build/neuralese-host/3.out 7 +subst neuralese/fixtures/contract.from neuralese/fixtures/purity.to +ordinary-purity-refusal refuse build/neuralese-host/3.out 30 +subst neuralese/fixtures/post.from neuralese/fixtures/post.to +ordinary-postcondition-refusal run build/neuralese-host/3.out - - - 110 diff --git a/neuralese/nl4-codec-compile.stderr b/neuralese/nl4-codec-compile.stderr new file mode 100644 index 000000000..e69de29bb diff --git a/neuralese/nl4-dependencies.json b/neuralese/nl4-dependencies.json new file mode 100644 index 000000000..8da8309c5 --- /dev/null +++ b/neuralese/nl4-dependencies.json @@ -0,0 +1,31 @@ +{ + "schema": "nl4-native-source-lock-1", + "scope": "HOST_SYNTHETIC closed pure operations; no production authority", + "omega_base": "e79566c191ea8ef11888e69ce50d8fadf375d4fd", + "compiler_introduced_by": "1fe5976d398646b17acabbf6d9dfae96b017e439", + "compiler_sha256": "d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84", + "compiler_source_sha256": "3f937160c823d3a90a6b4cc296f00f517f36ede7fd27a06505c998985ec62240", + "sources": [ + { + "repository": "https://github.com/aien-dev/aien-train.git", + "commit": "0e01c58a41f1a2fb976efa75c1cc554503aa2ee4", + "path": "native/neuralese/hadamard.om", + "sha256": "da4a1b91fcd72b4f5fa3a70461932626acdbc62a9a8d0b9876433f4a44f6ed20", + "staged_path": "build/nl4-deps/h.om", + "license": "AGPL-3.0-only", + "purpose": "Seeded handwritten fixed Hadamard projection; no learned producer or foreign runtime" + }, + { + "repository": "https://github.com/aien-dev/aien-protocols-mv.git", + "commit": "6fb728a14781eb4e5262ffbdc9c2e6be64974f36", + "path": "specs/latent-payload/validator.om", + "sha256": "e85d174839f7d0c3406f783ec0fd69d52ce5576bdcca4892c16b21b09f14b003", + "staged_path": "build/nl4-deps/v.om", + "license": "Apache-2.0", + "purpose": "Canonical LTP0 pure receiver-template validator; not a reservation/capability grant" + } + ], + "host_dependencies": [], + "verification_only": ["pinned seed/out/omc", "native OM2GATE conductor", "git source oracle", "sha256sum", "mounted Wolfram evaluator and Alpha", "Node crypto SHA256 binary-fixture oracle; not build or product runtime"], + "missing_production_bindings": ["https://github.com/aien-dev/aegis-runtime-mv/issues/79", "https://github.com/aien-dev/aien-protocols-mv/issues/70"] +} diff --git a/neuralese/nl4-host-initial-fail.log b/neuralese/nl4-host-initial-fail.log new file mode 100644 index 000000000..907c06d59 --- /dev/null +++ b/neuralese/nl4-host-initial-fail.log @@ -0,0 +1,215 @@ +OM2GATE START cases=neuralese/nl4-host.cases scratch=build/nl4-host +IDENTITY omc seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE codec-oracle line=3 + $ seed/out/omc < build/nl4-host/3.src > build/nl4-host/3.elf 2> build/nl4-host/3.cerr +VERDICT codec-oracle FAIL compile exit=12 expected=0 +CASE f32-double0 line=4 + $ seed/out/omc < build/nl4-host/4.src > build/nl4-host/4.elf 2> build/nl4-host/4.cerr +VERDICT f32-double0 FAIL compile exit=13 expected=0 +CASE f32-double2 line=5 + $ seed/out/omc < build/nl4-host/5.src > build/nl4-host/5.elf 2> build/nl4-host/5.cerr +VERDICT f32-double2 FAIL compile exit=13 expected=0 +CASE f32-double1 line=6 + $ seed/out/omc < build/nl4-host/6.src > build/nl4-host/6.elf 2> build/nl4-host/6.cerr +VERDICT f32-double1 FAIL compile exit=13 expected=0 +CASE f32-double3 line=7 + $ seed/out/omc < build/nl4-host/7.src > build/nl4-host/7.elf 2> build/nl4-host/7.cerr +VERDICT f32-double3 FAIL compile exit=13 expected=0 +CASE f32-inc0 line=8 + $ seed/out/omc < build/nl4-host/8.src > build/nl4-host/8.elf 2> build/nl4-host/8.cerr +VERDICT f32-inc0 FAIL compile exit=13 expected=0 +CASE f32-inc2 line=9 + $ seed/out/omc < build/nl4-host/9.src > build/nl4-host/9.elf 2> build/nl4-host/9.cerr +VERDICT f32-inc2 FAIL compile exit=13 expected=0 +CASE f32-inc1 line=10 + $ seed/out/omc < build/nl4-host/10.src > build/nl4-host/10.elf 2> build/nl4-host/10.cerr +VERDICT f32-inc1 FAIL compile exit=13 expected=0 +CASE f32-inc3 line=11 + $ seed/out/omc < build/nl4-host/11.src > build/nl4-host/11.elf 2> build/nl4-host/11.cerr +VERDICT f32-inc3 FAIL compile exit=13 expected=0 +CASE f32-id0 line=12 + $ seed/out/omc < build/nl4-host/12.src > build/nl4-host/12.elf 2> build/nl4-host/12.cerr +VERDICT f32-id0 FAIL compile exit=13 expected=0 +CASE f32-id2 line=13 + $ seed/out/omc < build/nl4-host/13.src > build/nl4-host/13.elf 2> build/nl4-host/13.cerr +VERDICT f32-id2 FAIL compile exit=13 expected=0 +CASE f32-id1 line=14 + $ seed/out/omc < build/nl4-host/14.src > build/nl4-host/14.elf 2> build/nl4-host/14.cerr +VERDICT f32-id1 FAIL compile exit=13 expected=0 +CASE f32-id3 line=15 + $ seed/out/omc < build/nl4-host/15.src > build/nl4-host/15.elf 2> build/nl4-host/15.cerr +VERDICT f32-id3 FAIL compile exit=13 expected=0 +CASE i8-double0 line=16 + $ seed/out/omc < build/nl4-host/16.src > build/nl4-host/16.elf 2> build/nl4-host/16.cerr +VERDICT i8-double0 FAIL compile exit=13 expected=0 +CASE i8-double2 line=17 + $ seed/out/omc < build/nl4-host/17.src > build/nl4-host/17.elf 2> build/nl4-host/17.cerr +VERDICT i8-double2 FAIL compile exit=13 expected=0 +CASE i8-double1 line=18 + $ seed/out/omc < build/nl4-host/18.src > build/nl4-host/18.elf 2> build/nl4-host/18.cerr +VERDICT i8-double1 FAIL compile exit=13 expected=0 +CASE i8-double3 line=19 + $ seed/out/omc < build/nl4-host/19.src > build/nl4-host/19.elf 2> build/nl4-host/19.cerr +VERDICT i8-double3 FAIL compile exit=13 expected=0 +CASE i8-inc0 line=20 + $ seed/out/omc < build/nl4-host/20.src > build/nl4-host/20.elf 2> build/nl4-host/20.cerr +VERDICT i8-inc0 FAIL compile exit=13 expected=0 +CASE i8-inc2 line=21 + $ seed/out/omc < build/nl4-host/21.src > build/nl4-host/21.elf 2> build/nl4-host/21.cerr +VERDICT i8-inc2 FAIL compile exit=13 expected=0 +CASE i8-inc1 line=22 + $ seed/out/omc < build/nl4-host/22.src > build/nl4-host/22.elf 2> build/nl4-host/22.cerr +VERDICT i8-inc1 FAIL compile exit=13 expected=0 +CASE i8-inc3 line=23 + $ seed/out/omc < build/nl4-host/23.src > build/nl4-host/23.elf 2> build/nl4-host/23.cerr +VERDICT i8-inc3 FAIL compile exit=13 expected=0 +CASE i8-id0 line=24 + $ seed/out/omc < build/nl4-host/24.src > build/nl4-host/24.elf 2> build/nl4-host/24.cerr +VERDICT i8-id0 FAIL compile exit=13 expected=0 +CASE i8-id2 line=25 + $ seed/out/omc < build/nl4-host/25.src > build/nl4-host/25.elf 2> build/nl4-host/25.cerr +VERDICT i8-id2 FAIL compile exit=13 expected=0 +CASE i8-id1 line=26 + $ seed/out/omc < build/nl4-host/26.src > build/nl4-host/26.elf 2> build/nl4-host/26.cerr +VERDICT i8-id1 FAIL compile exit=13 expected=0 +CASE i8-id3 line=27 + $ seed/out/omc < build/nl4-host/27.src > build/nl4-host/27.elf 2> build/nl4-host/27.cerr +VERDICT i8-id3 FAIL compile exit=13 expected=0 +CASE reserved-op0 line=28 + $ seed/out/omc < build/nl4-host/28.src > build/nl4-host/28.elf 2> build/nl4-host/28.cerr +VERDICT reserved-op0 FAIL compile exit=13 expected=0 +CASE refuse-effect line=29 + $ seed/out/omc < build/nl4-host/29.src > build/nl4-host/29.elf 2> build/nl4-host/29.cerr +VERDICT refuse-effect FAIL compile exit=13 expected=0 +CASE refuse-live-profile line=30 + $ seed/out/omc < build/nl4-host/30.src > build/nl4-host/30.elf 2> build/nl4-host/30.cerr +VERDICT refuse-live-profile FAIL compile exit=13 expected=0 +CASE refuse-stale line=31 + $ seed/out/omc < build/nl4-host/31.src > build/nl4-host/31.elf 2> build/nl4-host/31.cerr +VERDICT refuse-stale FAIL compile exit=13 expected=0 +CASE refuse-future line=32 + $ seed/out/omc < build/nl4-host/32.src > build/nl4-host/32.elf 2> build/nl4-host/32.cerr +VERDICT refuse-future FAIL compile exit=13 expected=0 +CASE refuse-replay line=33 + $ seed/out/omc < build/nl4-host/33.src > build/nl4-host/33.elf 2> build/nl4-host/33.cerr +VERDICT refuse-replay FAIL compile exit=13 expected=0 +CASE refuse-nonce line=34 + $ seed/out/omc < build/nl4-host/34.src > build/nl4-host/34.elf 2> build/nl4-host/34.cerr +VERDICT refuse-nonce FAIL compile exit=13 expected=0 +CASE refuse-foreign-tenant line=35 + $ seed/out/omc < build/nl4-host/35.src > build/nl4-host/35.elf 2> build/nl4-host/35.cerr +VERDICT refuse-foreign-tenant FAIL compile exit=13 expected=0 +CASE refuse-consent-root line=36 + $ seed/out/omc < build/nl4-host/36.src > build/nl4-host/36.elf 2> build/nl4-host/36.cerr +VERDICT refuse-consent-root FAIL compile exit=13 expected=0 +CASE refuse-decoder line=37 + $ seed/out/omc < build/nl4-host/37.src > build/nl4-host/37.elf 2> build/nl4-host/37.cerr +VERDICT refuse-decoder FAIL compile exit=13 expected=0 +CASE refuse-model line=38 + $ seed/out/omc < build/nl4-host/38.src > build/nl4-host/38.elf 2> build/nl4-host/38.cerr +VERDICT refuse-model FAIL compile exit=13 expected=0 +CASE refuse-shape line=39 + $ seed/out/omc < build/nl4-host/39.src > build/nl4-host/39.elf 2> build/nl4-host/39.cerr +VERDICT refuse-shape FAIL compile exit=13 expected=0 +CASE refuse-alias-stride line=40 + $ seed/out/omc < build/nl4-host/40.src > build/nl4-host/40.elf 2> build/nl4-host/40.cerr +VERDICT refuse-alias-stride FAIL compile exit=13 expected=0 +CASE refuse-nonfinite line=41 + $ seed/out/omc < build/nl4-host/41.src > build/nl4-host/41.elf 2> build/nl4-host/41.cerr +VERDICT refuse-nonfinite FAIL compile exit=13 expected=0 +CASE refuse-integrity line=42 + $ seed/out/omc < build/nl4-host/42.src > build/nl4-host/42.elf 2> build/nl4-host/42.cerr +VERDICT refuse-integrity FAIL compile exit=13 expected=0 +CASE refuse-reserved line=43 + $ seed/out/omc < build/nl4-host/43.src > build/nl4-host/43.elf 2> build/nl4-host/43.cerr +VERDICT refuse-reserved FAIL compile exit=13 expected=0 +CASE refuse-zero-cap-ref line=44 + $ seed/out/omc < build/nl4-host/44.src > build/nl4-host/44.elf 2> build/nl4-host/44.cerr +VERDICT refuse-zero-cap-ref FAIL compile exit=13 expected=0 +CASE refuse-no-resource line=45 + $ seed/out/omc < build/nl4-host/45.src > build/nl4-host/45.elf 2> build/nl4-host/45.cerr +VERDICT refuse-no-resource FAIL compile exit=13 expected=0 +CASE refuse-version line=46 + $ seed/out/omc < build/nl4-host/46.src > build/nl4-host/46.elf 2> build/nl4-host/46.cerr +VERDICT refuse-version FAIL compile exit=13 expected=0 +CASE refuse-scale line=47 + $ seed/out/omc < build/nl4-host/47.src > build/nl4-host/47.elf 2> build/nl4-host/47.cerr +VERDICT refuse-scale FAIL compile exit=13 expected=0 +CASE refuse-truncated line=48 + $ seed/out/omc < build/nl4-host/48.src > build/nl4-host/48.elf 2> build/nl4-host/48.cerr +VERDICT refuse-truncated FAIL compile exit=13 expected=0 +CASE refuse-oversized line=49 + $ seed/out/omc < build/nl4-host/49.src > build/nl4-host/49.elf 2> build/nl4-host/49.cerr +VERDICT refuse-oversized FAIL compile exit=13 expected=0 +CASE refuse-ambiguous line=50 + $ seed/out/omc < build/nl4-host/50.src > build/nl4-host/50.elf 2> build/nl4-host/50.cerr +VERDICT refuse-ambiguous FAIL compile exit=13 expected=0 +CASE refuse-signflip line=51 + $ seed/out/omc < build/nl4-host/51.src > build/nl4-host/51.elf 2> build/nl4-host/51.cerr +VERDICT refuse-signflip FAIL compile exit=13 expected=0 +CASE refuse-wrongscale line=52 + $ seed/out/omc < build/nl4-host/52.src > build/nl4-host/52.elf 2> build/nl4-host/52.cerr +VERDICT refuse-wrongscale FAIL compile exit=13 expected=0 +CASE refuse-wrong-op line=53 + $ seed/out/omc < build/nl4-host/53.src > build/nl4-host/53.elf 2> build/nl4-host/53.cerr +VERDICT refuse-wrong-op FAIL compile exit=13 expected=0 +CASE refuse-wrong-operand line=54 + $ seed/out/omc < build/nl4-host/54.src > build/nl4-host/54.elf 2> build/nl4-host/54.cerr +VERDICT refuse-wrong-operand FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-effect.from neuralese/fixtures/nl4-false.to +CASE kill-effect line=56 + MUTATE exact-once substitution at byte 4504 + $ seed/out/omc < build/nl4-host/56.src > build/nl4-host/56.elf 2> build/nl4-host/56.cerr +VERDICT kill-effect FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-expiry.from neuralese/fixtures/nl4-false.to +CASE kill-expiry line=58 + MUTATE exact-once substitution at byte 10404 + $ seed/out/omc < build/nl4-host/58.src > build/nl4-host/58.elf 2> build/nl4-host/58.cerr +VERDICT kill-expiry FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-sequence.from neuralese/fixtures/nl4-false.to +CASE kill-sequence line=60 + MUTATE exact-once substitution at byte 10488 + $ seed/out/omc < build/nl4-host/60.src > build/nl4-host/60.elf 2> build/nl4-host/60.cerr +VERDICT kill-sequence FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-tenant-binding line=62 + MUTATE exact-once substitution at byte 10590 + $ seed/out/omc < build/nl4-host/62.src > build/nl4-host/62.elf 2> build/nl4-host/62.cerr +VERDICT kill-tenant-binding FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-consent-binding line=64 + MUTATE exact-once substitution at byte 10590 + $ seed/out/omc < build/nl4-host/64.src > build/nl4-host/64.elf 2> build/nl4-host/64.cerr +VERDICT kill-consent-binding FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-integrity.from neuralese/fixtures/nl4-false.to +CASE kill-integrity line=66 + MUTATE exact-once substitution at byte 10653 + $ seed/out/omc < build/nl4-host/66.src > build/nl4-host/66.elf 2> build/nl4-host/66.cerr +VERDICT kill-integrity FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-shape.from neuralese/fixtures/nl4-false.to +CASE kill-shape-alias line=68 + MUTATE exact-once substitution at byte 10183 + $ seed/out/omc < build/nl4-host/68.src > build/nl4-host/68.elf 2> build/nl4-host/68.cerr +VERDICT kill-shape-alias FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-match.from neuralese/fixtures/nl4-false.to +CASE kill-wrong-objective line=70 + MUTATE exact-once substitution at byte 2839 + $ seed/out/omc < build/nl4-host/70.src > build/nl4-host/70.elf 2> build/nl4-host/70.cerr +VERDICT kill-wrong-objective FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-operation.to +CASE kill-wrong-operation line=72 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host/72.src > build/nl4-host/72.elf 2> build/nl4-host/72.cerr +VERDICT kill-wrong-operation FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-pre.from neuralese/fixtures/nl4-pre.to +CASE ordinary-precondition line=74 + MUTATE exact-once substitution at byte 2089 + $ seed/out/omc < build/nl4-host/74.src > build/nl4-host/74.elf 2> build/nl4-host/74.cerr +VERDICT ordinary-precondition FAIL compile exit=13 expected=0 +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-post.to +CASE ordinary-postcondition line=76 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host/76.src > build/nl4-host/76.elf 2> build/nl4-host/76.cerr +VERDICT ordinary-postcondition FAIL compile exit=13 expected=0 +OM2GATE FAIL cases=63 pass=0 fail=63 invalid=0 not_run=0 diff --git a/neuralese/nl4-host-order-fail.log b/neuralese/nl4-host-order-fail.log new file mode 100644 index 000000000..b7fed60ae --- /dev/null +++ b/neuralese/nl4-host-order-fail.log @@ -0,0 +1,215 @@ +OM2GATE START cases=neuralese/nl4-host.cases scratch=build/nl4-host-r2 +IDENTITY omc seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE codec-oracle line=3 + $ seed/out/omc < build/nl4-host-r2/3.src > build/nl4-host-r2/3.elf 2> build/nl4-host-r2/3.cerr +VERDICT codec-oracle FAIL compile exit=3 expected=0 +CASE f32-double0 line=4 + $ seed/out/omc < build/nl4-host-r2/4.src > build/nl4-host-r2/4.elf 2> build/nl4-host-r2/4.cerr +VERDICT f32-double0 FAIL compile exit=3 expected=0 +CASE f32-double2 line=5 + $ seed/out/omc < build/nl4-host-r2/5.src > build/nl4-host-r2/5.elf 2> build/nl4-host-r2/5.cerr +VERDICT f32-double2 FAIL compile exit=3 expected=0 +CASE f32-double1 line=6 + $ seed/out/omc < build/nl4-host-r2/6.src > build/nl4-host-r2/6.elf 2> build/nl4-host-r2/6.cerr +VERDICT f32-double1 FAIL compile exit=3 expected=0 +CASE f32-double3 line=7 + $ seed/out/omc < build/nl4-host-r2/7.src > build/nl4-host-r2/7.elf 2> build/nl4-host-r2/7.cerr +VERDICT f32-double3 FAIL compile exit=3 expected=0 +CASE f32-inc0 line=8 + $ seed/out/omc < build/nl4-host-r2/8.src > build/nl4-host-r2/8.elf 2> build/nl4-host-r2/8.cerr +VERDICT f32-inc0 FAIL compile exit=3 expected=0 +CASE f32-inc2 line=9 + $ seed/out/omc < build/nl4-host-r2/9.src > build/nl4-host-r2/9.elf 2> build/nl4-host-r2/9.cerr +VERDICT f32-inc2 FAIL compile exit=3 expected=0 +CASE f32-inc1 line=10 + $ seed/out/omc < build/nl4-host-r2/10.src > build/nl4-host-r2/10.elf 2> build/nl4-host-r2/10.cerr +VERDICT f32-inc1 FAIL compile exit=3 expected=0 +CASE f32-inc3 line=11 + $ seed/out/omc < build/nl4-host-r2/11.src > build/nl4-host-r2/11.elf 2> build/nl4-host-r2/11.cerr +VERDICT f32-inc3 FAIL compile exit=3 expected=0 +CASE f32-id0 line=12 + $ seed/out/omc < build/nl4-host-r2/12.src > build/nl4-host-r2/12.elf 2> build/nl4-host-r2/12.cerr +VERDICT f32-id0 FAIL compile exit=3 expected=0 +CASE f32-id2 line=13 + $ seed/out/omc < build/nl4-host-r2/13.src > build/nl4-host-r2/13.elf 2> build/nl4-host-r2/13.cerr +VERDICT f32-id2 FAIL compile exit=3 expected=0 +CASE f32-id1 line=14 + $ seed/out/omc < build/nl4-host-r2/14.src > build/nl4-host-r2/14.elf 2> build/nl4-host-r2/14.cerr +VERDICT f32-id1 FAIL compile exit=3 expected=0 +CASE f32-id3 line=15 + $ seed/out/omc < build/nl4-host-r2/15.src > build/nl4-host-r2/15.elf 2> build/nl4-host-r2/15.cerr +VERDICT f32-id3 FAIL compile exit=3 expected=0 +CASE i8-double0 line=16 + $ seed/out/omc < build/nl4-host-r2/16.src > build/nl4-host-r2/16.elf 2> build/nl4-host-r2/16.cerr +VERDICT i8-double0 FAIL compile exit=3 expected=0 +CASE i8-double2 line=17 + $ seed/out/omc < build/nl4-host-r2/17.src > build/nl4-host-r2/17.elf 2> build/nl4-host-r2/17.cerr +VERDICT i8-double2 FAIL compile exit=3 expected=0 +CASE i8-double1 line=18 + $ seed/out/omc < build/nl4-host-r2/18.src > build/nl4-host-r2/18.elf 2> build/nl4-host-r2/18.cerr +VERDICT i8-double1 FAIL compile exit=3 expected=0 +CASE i8-double3 line=19 + $ seed/out/omc < build/nl4-host-r2/19.src > build/nl4-host-r2/19.elf 2> build/nl4-host-r2/19.cerr +VERDICT i8-double3 FAIL compile exit=3 expected=0 +CASE i8-inc0 line=20 + $ seed/out/omc < build/nl4-host-r2/20.src > build/nl4-host-r2/20.elf 2> build/nl4-host-r2/20.cerr +VERDICT i8-inc0 FAIL compile exit=3 expected=0 +CASE i8-inc2 line=21 + $ seed/out/omc < build/nl4-host-r2/21.src > build/nl4-host-r2/21.elf 2> build/nl4-host-r2/21.cerr +VERDICT i8-inc2 FAIL compile exit=3 expected=0 +CASE i8-inc1 line=22 + $ seed/out/omc < build/nl4-host-r2/22.src > build/nl4-host-r2/22.elf 2> build/nl4-host-r2/22.cerr +VERDICT i8-inc1 FAIL compile exit=3 expected=0 +CASE i8-inc3 line=23 + $ seed/out/omc < build/nl4-host-r2/23.src > build/nl4-host-r2/23.elf 2> build/nl4-host-r2/23.cerr +VERDICT i8-inc3 FAIL compile exit=3 expected=0 +CASE i8-id0 line=24 + $ seed/out/omc < build/nl4-host-r2/24.src > build/nl4-host-r2/24.elf 2> build/nl4-host-r2/24.cerr +VERDICT i8-id0 FAIL compile exit=3 expected=0 +CASE i8-id2 line=25 + $ seed/out/omc < build/nl4-host-r2/25.src > build/nl4-host-r2/25.elf 2> build/nl4-host-r2/25.cerr +VERDICT i8-id2 FAIL compile exit=3 expected=0 +CASE i8-id1 line=26 + $ seed/out/omc < build/nl4-host-r2/26.src > build/nl4-host-r2/26.elf 2> build/nl4-host-r2/26.cerr +VERDICT i8-id1 FAIL compile exit=3 expected=0 +CASE i8-id3 line=27 + $ seed/out/omc < build/nl4-host-r2/27.src > build/nl4-host-r2/27.elf 2> build/nl4-host-r2/27.cerr +VERDICT i8-id3 FAIL compile exit=3 expected=0 +CASE reserved-op0 line=28 + $ seed/out/omc < build/nl4-host-r2/28.src > build/nl4-host-r2/28.elf 2> build/nl4-host-r2/28.cerr +VERDICT reserved-op0 FAIL compile exit=3 expected=0 +CASE refuse-effect line=29 + $ seed/out/omc < build/nl4-host-r2/29.src > build/nl4-host-r2/29.elf 2> build/nl4-host-r2/29.cerr +VERDICT refuse-effect FAIL compile exit=3 expected=0 +CASE refuse-live-profile line=30 + $ seed/out/omc < build/nl4-host-r2/30.src > build/nl4-host-r2/30.elf 2> build/nl4-host-r2/30.cerr +VERDICT refuse-live-profile FAIL compile exit=3 expected=0 +CASE refuse-stale line=31 + $ seed/out/omc < build/nl4-host-r2/31.src > build/nl4-host-r2/31.elf 2> build/nl4-host-r2/31.cerr +VERDICT refuse-stale FAIL compile exit=3 expected=0 +CASE refuse-future line=32 + $ seed/out/omc < build/nl4-host-r2/32.src > build/nl4-host-r2/32.elf 2> build/nl4-host-r2/32.cerr +VERDICT refuse-future FAIL compile exit=3 expected=0 +CASE refuse-replay line=33 + $ seed/out/omc < build/nl4-host-r2/33.src > build/nl4-host-r2/33.elf 2> build/nl4-host-r2/33.cerr +VERDICT refuse-replay FAIL compile exit=3 expected=0 +CASE refuse-nonce line=34 + $ seed/out/omc < build/nl4-host-r2/34.src > build/nl4-host-r2/34.elf 2> build/nl4-host-r2/34.cerr +VERDICT refuse-nonce FAIL compile exit=3 expected=0 +CASE refuse-foreign-tenant line=35 + $ seed/out/omc < build/nl4-host-r2/35.src > build/nl4-host-r2/35.elf 2> build/nl4-host-r2/35.cerr +VERDICT refuse-foreign-tenant FAIL compile exit=3 expected=0 +CASE refuse-consent-root line=36 + $ seed/out/omc < build/nl4-host-r2/36.src > build/nl4-host-r2/36.elf 2> build/nl4-host-r2/36.cerr +VERDICT refuse-consent-root FAIL compile exit=3 expected=0 +CASE refuse-decoder line=37 + $ seed/out/omc < build/nl4-host-r2/37.src > build/nl4-host-r2/37.elf 2> build/nl4-host-r2/37.cerr +VERDICT refuse-decoder FAIL compile exit=3 expected=0 +CASE refuse-model line=38 + $ seed/out/omc < build/nl4-host-r2/38.src > build/nl4-host-r2/38.elf 2> build/nl4-host-r2/38.cerr +VERDICT refuse-model FAIL compile exit=3 expected=0 +CASE refuse-shape line=39 + $ seed/out/omc < build/nl4-host-r2/39.src > build/nl4-host-r2/39.elf 2> build/nl4-host-r2/39.cerr +VERDICT refuse-shape FAIL compile exit=3 expected=0 +CASE refuse-alias-stride line=40 + $ seed/out/omc < build/nl4-host-r2/40.src > build/nl4-host-r2/40.elf 2> build/nl4-host-r2/40.cerr +VERDICT refuse-alias-stride FAIL compile exit=3 expected=0 +CASE refuse-nonfinite line=41 + $ seed/out/omc < build/nl4-host-r2/41.src > build/nl4-host-r2/41.elf 2> build/nl4-host-r2/41.cerr +VERDICT refuse-nonfinite FAIL compile exit=3 expected=0 +CASE refuse-integrity line=42 + $ seed/out/omc < build/nl4-host-r2/42.src > build/nl4-host-r2/42.elf 2> build/nl4-host-r2/42.cerr +VERDICT refuse-integrity FAIL compile exit=3 expected=0 +CASE refuse-reserved line=43 + $ seed/out/omc < build/nl4-host-r2/43.src > build/nl4-host-r2/43.elf 2> build/nl4-host-r2/43.cerr +VERDICT refuse-reserved FAIL compile exit=3 expected=0 +CASE refuse-zero-cap-ref line=44 + $ seed/out/omc < build/nl4-host-r2/44.src > build/nl4-host-r2/44.elf 2> build/nl4-host-r2/44.cerr +VERDICT refuse-zero-cap-ref FAIL compile exit=3 expected=0 +CASE refuse-no-resource line=45 + $ seed/out/omc < build/nl4-host-r2/45.src > build/nl4-host-r2/45.elf 2> build/nl4-host-r2/45.cerr +VERDICT refuse-no-resource FAIL compile exit=3 expected=0 +CASE refuse-version line=46 + $ seed/out/omc < build/nl4-host-r2/46.src > build/nl4-host-r2/46.elf 2> build/nl4-host-r2/46.cerr +VERDICT refuse-version FAIL compile exit=3 expected=0 +CASE refuse-scale line=47 + $ seed/out/omc < build/nl4-host-r2/47.src > build/nl4-host-r2/47.elf 2> build/nl4-host-r2/47.cerr +VERDICT refuse-scale FAIL compile exit=3 expected=0 +CASE refuse-truncated line=48 + $ seed/out/omc < build/nl4-host-r2/48.src > build/nl4-host-r2/48.elf 2> build/nl4-host-r2/48.cerr +VERDICT refuse-truncated FAIL compile exit=3 expected=0 +CASE refuse-oversized line=49 + $ seed/out/omc < build/nl4-host-r2/49.src > build/nl4-host-r2/49.elf 2> build/nl4-host-r2/49.cerr +VERDICT refuse-oversized FAIL compile exit=3 expected=0 +CASE refuse-ambiguous line=50 + $ seed/out/omc < build/nl4-host-r2/50.src > build/nl4-host-r2/50.elf 2> build/nl4-host-r2/50.cerr +VERDICT refuse-ambiguous FAIL compile exit=3 expected=0 +CASE refuse-signflip line=51 + $ seed/out/omc < build/nl4-host-r2/51.src > build/nl4-host-r2/51.elf 2> build/nl4-host-r2/51.cerr +VERDICT refuse-signflip FAIL compile exit=3 expected=0 +CASE refuse-wrongscale line=52 + $ seed/out/omc < build/nl4-host-r2/52.src > build/nl4-host-r2/52.elf 2> build/nl4-host-r2/52.cerr +VERDICT refuse-wrongscale FAIL compile exit=3 expected=0 +CASE refuse-wrong-op line=53 + $ seed/out/omc < build/nl4-host-r2/53.src > build/nl4-host-r2/53.elf 2> build/nl4-host-r2/53.cerr +VERDICT refuse-wrong-op FAIL compile exit=3 expected=0 +CASE refuse-wrong-operand line=54 + $ seed/out/omc < build/nl4-host-r2/54.src > build/nl4-host-r2/54.elf 2> build/nl4-host-r2/54.cerr +VERDICT refuse-wrong-operand FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-effect.from neuralese/fixtures/nl4-false.to +CASE kill-effect line=56 + MUTATE exact-once substitution at byte 4528 + $ seed/out/omc < build/nl4-host-r2/56.src > build/nl4-host-r2/56.elf 2> build/nl4-host-r2/56.cerr +VERDICT kill-effect FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-expiry.from neuralese/fixtures/nl4-false.to +CASE kill-expiry line=58 + MUTATE exact-once substitution at byte 10428 + $ seed/out/omc < build/nl4-host-r2/58.src > build/nl4-host-r2/58.elf 2> build/nl4-host-r2/58.cerr +VERDICT kill-expiry FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-sequence.from neuralese/fixtures/nl4-false.to +CASE kill-sequence line=60 + MUTATE exact-once substitution at byte 10512 + $ seed/out/omc < build/nl4-host-r2/60.src > build/nl4-host-r2/60.elf 2> build/nl4-host-r2/60.cerr +VERDICT kill-sequence FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-tenant-binding line=62 + MUTATE exact-once substitution at byte 10614 + $ seed/out/omc < build/nl4-host-r2/62.src > build/nl4-host-r2/62.elf 2> build/nl4-host-r2/62.cerr +VERDICT kill-tenant-binding FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-consent-binding line=64 + MUTATE exact-once substitution at byte 10614 + $ seed/out/omc < build/nl4-host-r2/64.src > build/nl4-host-r2/64.elf 2> build/nl4-host-r2/64.cerr +VERDICT kill-consent-binding FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-integrity.from neuralese/fixtures/nl4-false.to +CASE kill-integrity line=66 + MUTATE exact-once substitution at byte 10677 + $ seed/out/omc < build/nl4-host-r2/66.src > build/nl4-host-r2/66.elf 2> build/nl4-host-r2/66.cerr +VERDICT kill-integrity FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-shape.from neuralese/fixtures/nl4-false.to +CASE kill-shape-alias line=68 + MUTATE exact-once substitution at byte 10207 + $ seed/out/omc < build/nl4-host-r2/68.src > build/nl4-host-r2/68.elf 2> build/nl4-host-r2/68.cerr +VERDICT kill-shape-alias FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-match.from neuralese/fixtures/nl4-false.to +CASE kill-wrong-objective line=70 + MUTATE exact-once substitution at byte 2833 + $ seed/out/omc < build/nl4-host-r2/70.src > build/nl4-host-r2/70.elf 2> build/nl4-host-r2/70.cerr +VERDICT kill-wrong-objective FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-operation.to +CASE kill-wrong-operation line=72 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host-r2/72.src > build/nl4-host-r2/72.elf 2> build/nl4-host-r2/72.cerr +VERDICT kill-wrong-operation FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-pre.from neuralese/fixtures/nl4-pre.to +CASE ordinary-precondition line=74 + MUTATE exact-once substitution at byte 2086 + $ seed/out/omc < build/nl4-host-r2/74.src > build/nl4-host-r2/74.elf 2> build/nl4-host-r2/74.cerr +VERDICT ordinary-precondition FAIL compile exit=3 expected=0 +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-post.to +CASE ordinary-postcondition line=76 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host-r2/76.src > build/nl4-host-r2/76.elf 2> build/nl4-host-r2/76.cerr +VERDICT ordinary-postcondition FAIL compile exit=3 expected=0 +OM2GATE FAIL cases=63 pass=0 fail=63 invalid=0 not_run=0 diff --git a/neuralese/nl4-host-pass.log b/neuralese/nl4-host-pass.log new file mode 100644 index 000000000..0a561f53f --- /dev/null +++ b/neuralese/nl4-host-pass.log @@ -0,0 +1,278 @@ +OM2GATE START cases=neuralese/nl4-host.cases scratch=build/nl4-host-r3 +IDENTITY omc seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE codec-oracle line=3 + $ seed/out/omc < build/nl4-host-r3/3.src > build/nl4-host-r3/3.elf 2> build/nl4-host-r3/3.cerr + $ build/nl4-host-r3/3.elf < neuralese/fixtures/nl4-oracle-payloads.bin > build/nl4-host-r3/3.out 2> build/nl4-host-r3/3.err +VERDICT codec-oracle PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-double0 line=4 + $ seed/out/omc < build/nl4-host-r3/4.src > build/nl4-host-r3/4.elf 2> build/nl4-host-r3/4.cerr + $ build/nl4-host-r3/4.elf neuralese/fixtures/nl4-context.bin 2 0 < neuralese/fixtures/nl4-0100.wire > build/nl4-host-r3/4.out 2> build/nl4-host-r3/4.err +VERDICT f32-double0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-double2 line=5 + $ seed/out/omc < build/nl4-host-r3/5.src > build/nl4-host-r3/5.elf 2> build/nl4-host-r3/5.cerr + $ build/nl4-host-r3/5.elf neuralese/fixtures/nl4-context.bin 2 2 < neuralese/fixtures/nl4-0101.wire > build/nl4-host-r3/5.out 2> build/nl4-host-r3/5.err +VERDICT f32-double2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-double1 line=6 + $ seed/out/omc < build/nl4-host-r3/6.src > build/nl4-host-r3/6.elf 2> build/nl4-host-r3/6.cerr + $ build/nl4-host-r3/6.elf neuralese/fixtures/nl4-context.bin 2 1 < neuralese/fixtures/nl4-0110.wire > build/nl4-host-r3/6.out 2> build/nl4-host-r3/6.err +VERDICT f32-double1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-double3 line=7 + $ seed/out/omc < build/nl4-host-r3/7.src > build/nl4-host-r3/7.elf 2> build/nl4-host-r3/7.cerr + $ build/nl4-host-r3/7.elf neuralese/fixtures/nl4-context.bin 2 3 < neuralese/fixtures/nl4-0111.wire > build/nl4-host-r3/7.out 2> build/nl4-host-r3/7.err +VERDICT f32-double3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-inc0 line=8 + $ seed/out/omc < build/nl4-host-r3/8.src > build/nl4-host-r3/8.elf 2> build/nl4-host-r3/8.cerr + $ build/nl4-host-r3/8.elf neuralese/fixtures/nl4-context.bin 1 0 < neuralese/fixtures/nl4-1000.wire > build/nl4-host-r3/8.out 2> build/nl4-host-r3/8.err +VERDICT f32-inc0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-inc2 line=9 + $ seed/out/omc < build/nl4-host-r3/9.src > build/nl4-host-r3/9.elf 2> build/nl4-host-r3/9.cerr + $ build/nl4-host-r3/9.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/9.out 2> build/nl4-host-r3/9.err +VERDICT f32-inc2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-inc1 line=10 + $ seed/out/omc < build/nl4-host-r3/10.src > build/nl4-host-r3/10.elf 2> build/nl4-host-r3/10.cerr + $ build/nl4-host-r3/10.elf neuralese/fixtures/nl4-context.bin 1 1 < neuralese/fixtures/nl4-1010.wire > build/nl4-host-r3/10.out 2> build/nl4-host-r3/10.err +VERDICT f32-inc1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-inc3 line=11 + $ seed/out/omc < build/nl4-host-r3/11.src > build/nl4-host-r3/11.elf 2> build/nl4-host-r3/11.cerr + $ build/nl4-host-r3/11.elf neuralese/fixtures/nl4-context.bin 1 3 < neuralese/fixtures/nl4-1011.wire > build/nl4-host-r3/11.out 2> build/nl4-host-r3/11.err +VERDICT f32-inc3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-id0 line=12 + $ seed/out/omc < build/nl4-host-r3/12.src > build/nl4-host-r3/12.elf 2> build/nl4-host-r3/12.cerr + $ build/nl4-host-r3/12.elf neuralese/fixtures/nl4-context.bin 3 0 < neuralese/fixtures/nl4-1100.wire > build/nl4-host-r3/12.out 2> build/nl4-host-r3/12.err +VERDICT f32-id0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-id2 line=13 + $ seed/out/omc < build/nl4-host-r3/13.src > build/nl4-host-r3/13.elf 2> build/nl4-host-r3/13.cerr + $ build/nl4-host-r3/13.elf neuralese/fixtures/nl4-context.bin 3 2 < neuralese/fixtures/nl4-1101.wire > build/nl4-host-r3/13.out 2> build/nl4-host-r3/13.err +VERDICT f32-id2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-id1 line=14 + $ seed/out/omc < build/nl4-host-r3/14.src > build/nl4-host-r3/14.elf 2> build/nl4-host-r3/14.cerr + $ build/nl4-host-r3/14.elf neuralese/fixtures/nl4-context.bin 3 1 < neuralese/fixtures/nl4-1110.wire > build/nl4-host-r3/14.out 2> build/nl4-host-r3/14.err +VERDICT f32-id1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE f32-id3 line=15 + $ seed/out/omc < build/nl4-host-r3/15.src > build/nl4-host-r3/15.elf 2> build/nl4-host-r3/15.cerr + $ build/nl4-host-r3/15.elf neuralese/fixtures/nl4-context.bin 3 3 < neuralese/fixtures/nl4-1111.wire > build/nl4-host-r3/15.out 2> build/nl4-host-r3/15.err +VERDICT f32-id3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-double0 line=16 + $ seed/out/omc < build/nl4-host-r3/16.src > build/nl4-host-r3/16.elf 2> build/nl4-host-r3/16.cerr + $ build/nl4-host-r3/16.elf neuralese/fixtures/nl4-context-i8.bin 2 0 < neuralese/fixtures/nl4-i8-0100.wire > build/nl4-host-r3/16.out 2> build/nl4-host-r3/16.err +VERDICT i8-double0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-double2 line=17 + $ seed/out/omc < build/nl4-host-r3/17.src > build/nl4-host-r3/17.elf 2> build/nl4-host-r3/17.cerr + $ build/nl4-host-r3/17.elf neuralese/fixtures/nl4-context-i8.bin 2 2 < neuralese/fixtures/nl4-i8-0101.wire > build/nl4-host-r3/17.out 2> build/nl4-host-r3/17.err +VERDICT i8-double2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-double1 line=18 + $ seed/out/omc < build/nl4-host-r3/18.src > build/nl4-host-r3/18.elf 2> build/nl4-host-r3/18.cerr + $ build/nl4-host-r3/18.elf neuralese/fixtures/nl4-context-i8.bin 2 1 < neuralese/fixtures/nl4-i8-0110.wire > build/nl4-host-r3/18.out 2> build/nl4-host-r3/18.err +VERDICT i8-double1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-double3 line=19 + $ seed/out/omc < build/nl4-host-r3/19.src > build/nl4-host-r3/19.elf 2> build/nl4-host-r3/19.cerr + $ build/nl4-host-r3/19.elf neuralese/fixtures/nl4-context-i8.bin 2 3 < neuralese/fixtures/nl4-i8-0111.wire > build/nl4-host-r3/19.out 2> build/nl4-host-r3/19.err +VERDICT i8-double3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-inc0 line=20 + $ seed/out/omc < build/nl4-host-r3/20.src > build/nl4-host-r3/20.elf 2> build/nl4-host-r3/20.cerr + $ build/nl4-host-r3/20.elf neuralese/fixtures/nl4-context-i8.bin 1 0 < neuralese/fixtures/nl4-i8-1000.wire > build/nl4-host-r3/20.out 2> build/nl4-host-r3/20.err +VERDICT i8-inc0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-inc2 line=21 + $ seed/out/omc < build/nl4-host-r3/21.src > build/nl4-host-r3/21.elf 2> build/nl4-host-r3/21.cerr + $ build/nl4-host-r3/21.elf neuralese/fixtures/nl4-context-i8.bin 1 2 < neuralese/fixtures/nl4-i8-1001.wire > build/nl4-host-r3/21.out 2> build/nl4-host-r3/21.err +VERDICT i8-inc2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-inc1 line=22 + $ seed/out/omc < build/nl4-host-r3/22.src > build/nl4-host-r3/22.elf 2> build/nl4-host-r3/22.cerr + $ build/nl4-host-r3/22.elf neuralese/fixtures/nl4-context-i8.bin 1 1 < neuralese/fixtures/nl4-i8-1010.wire > build/nl4-host-r3/22.out 2> build/nl4-host-r3/22.err +VERDICT i8-inc1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-inc3 line=23 + $ seed/out/omc < build/nl4-host-r3/23.src > build/nl4-host-r3/23.elf 2> build/nl4-host-r3/23.cerr + $ build/nl4-host-r3/23.elf neuralese/fixtures/nl4-context-i8.bin 1 3 < neuralese/fixtures/nl4-i8-1011.wire > build/nl4-host-r3/23.out 2> build/nl4-host-r3/23.err +VERDICT i8-inc3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-id0 line=24 + $ seed/out/omc < build/nl4-host-r3/24.src > build/nl4-host-r3/24.elf 2> build/nl4-host-r3/24.cerr + $ build/nl4-host-r3/24.elf neuralese/fixtures/nl4-context-i8.bin 3 0 < neuralese/fixtures/nl4-i8-1100.wire > build/nl4-host-r3/24.out 2> build/nl4-host-r3/24.err +VERDICT i8-id0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-id2 line=25 + $ seed/out/omc < build/nl4-host-r3/25.src > build/nl4-host-r3/25.elf 2> build/nl4-host-r3/25.cerr + $ build/nl4-host-r3/25.elf neuralese/fixtures/nl4-context-i8.bin 3 2 < neuralese/fixtures/nl4-i8-1101.wire > build/nl4-host-r3/25.out 2> build/nl4-host-r3/25.err +VERDICT i8-id2 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-id1 line=26 + $ seed/out/omc < build/nl4-host-r3/26.src > build/nl4-host-r3/26.elf 2> build/nl4-host-r3/26.cerr + $ build/nl4-host-r3/26.elf neuralese/fixtures/nl4-context-i8.bin 3 1 < neuralese/fixtures/nl4-i8-1110.wire > build/nl4-host-r3/26.out 2> build/nl4-host-r3/26.err +VERDICT i8-id1 PASS run exit=0 expected=0 stdout=match stderr=match +CASE i8-id3 line=27 + $ seed/out/omc < build/nl4-host-r3/27.src > build/nl4-host-r3/27.elf 2> build/nl4-host-r3/27.cerr + $ build/nl4-host-r3/27.elf neuralese/fixtures/nl4-context-i8.bin 3 3 < neuralese/fixtures/nl4-i8-1111.wire > build/nl4-host-r3/27.out 2> build/nl4-host-r3/27.err +VERDICT i8-id3 PASS run exit=0 expected=0 stdout=match stderr=match +CASE reserved-op0 line=28 + $ seed/out/omc < build/nl4-host-r3/28.src > build/nl4-host-r3/28.elf 2> build/nl4-host-r3/28.cerr + $ build/nl4-host-r3/28.elf neuralese/fixtures/nl4-context.bin 1 0 < neuralese/fixtures/nl4-0000.wire > build/nl4-host-r3/28.out 2> build/nl4-host-r3/28.err +VERDICT reserved-op0 PASS run exit=48 expected=48 stdout=match stderr=match +CASE refuse-effect line=29 + $ seed/out/omc < build/nl4-host-r3/29.src > build/nl4-host-r3/29.elf 2> build/nl4-host-r3/29.cerr + $ build/nl4-host-r3/29.elf neuralese/fixtures/nl4-context-effect.bin 1 2 < neuralese/fixtures/nl4-effect.wire > build/nl4-host-r3/29.out 2> build/nl4-host-r3/29.err +VERDICT refuse-effect PASS run exit=43 expected=43 stdout=match stderr=match +CASE refuse-live-profile line=30 + $ seed/out/omc < build/nl4-host-r3/30.src > build/nl4-host-r3/30.elf 2> build/nl4-host-r3/30.cerr + $ build/nl4-host-r3/30.elf neuralese/fixtures/nl4-context-native.bin 1 2 < neuralese/fixtures/nl4-native.wire > build/nl4-host-r3/30.out 2> build/nl4-host-r3/30.err +VERDICT refuse-live-profile PASS run exit=41 expected=41 stdout=match stderr=match +CASE refuse-stale line=31 + $ seed/out/omc < build/nl4-host-r3/31.src > build/nl4-host-r3/31.elf 2> build/nl4-host-r3/31.cerr + $ build/nl4-host-r3/31.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-stale.wire > build/nl4-host-r3/31.out 2> build/nl4-host-r3/31.err +VERDICT refuse-stale PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-future line=32 + $ seed/out/omc < build/nl4-host-r3/32.src > build/nl4-host-r3/32.elf 2> build/nl4-host-r3/32.cerr + $ build/nl4-host-r3/32.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-future.wire > build/nl4-host-r3/32.out 2> build/nl4-host-r3/32.err +VERDICT refuse-future PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-replay line=33 + $ seed/out/omc < build/nl4-host-r3/33.src > build/nl4-host-r3/33.elf 2> build/nl4-host-r3/33.cerr + $ build/nl4-host-r3/33.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-replay.wire > build/nl4-host-r3/33.out 2> build/nl4-host-r3/33.err +VERDICT refuse-replay PASS run exit=19 expected=19 stdout=match stderr=match +CASE refuse-nonce line=34 + $ seed/out/omc < build/nl4-host-r3/34.src > build/nl4-host-r3/34.elf 2> build/nl4-host-r3/34.cerr + $ build/nl4-host-r3/34.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-nonce.wire > build/nl4-host-r3/34.out 2> build/nl4-host-r3/34.err +VERDICT refuse-nonce PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-foreign-tenant line=35 + $ seed/out/omc < build/nl4-host-r3/35.src > build/nl4-host-r3/35.elf 2> build/nl4-host-r3/35.cerr + $ build/nl4-host-r3/35.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-foreign.wire > build/nl4-host-r3/35.out 2> build/nl4-host-r3/35.err +VERDICT refuse-foreign-tenant PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-consent-root line=36 + $ seed/out/omc < build/nl4-host-r3/36.src > build/nl4-host-r3/36.elf 2> build/nl4-host-r3/36.cerr + $ build/nl4-host-r3/36.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-withdrawn.wire > build/nl4-host-r3/36.out 2> build/nl4-host-r3/36.err +VERDICT refuse-consent-root PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-decoder line=37 + $ seed/out/omc < build/nl4-host-r3/37.src > build/nl4-host-r3/37.elf 2> build/nl4-host-r3/37.cerr + $ build/nl4-host-r3/37.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-unknown-decoder.wire > build/nl4-host-r3/37.out 2> build/nl4-host-r3/37.err +VERDICT refuse-decoder PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-model line=38 + $ seed/out/omc < build/nl4-host-r3/38.src > build/nl4-host-r3/38.elf 2> build/nl4-host-r3/38.cerr + $ build/nl4-host-r3/38.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-wrong-model.wire > build/nl4-host-r3/38.out 2> build/nl4-host-r3/38.err +VERDICT refuse-model PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-shape line=39 + $ seed/out/omc < build/nl4-host-r3/39.src > build/nl4-host-r3/39.elf 2> build/nl4-host-r3/39.cerr + $ build/nl4-host-r3/39.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-shape.wire > build/nl4-host-r3/39.out 2> build/nl4-host-r3/39.err +VERDICT refuse-shape PASS run exit=14 expected=14 stdout=match stderr=match +CASE refuse-alias-stride line=40 + $ seed/out/omc < build/nl4-host-r3/40.src > build/nl4-host-r3/40.elf 2> build/nl4-host-r3/40.cerr + $ build/nl4-host-r3/40.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-alias.wire > build/nl4-host-r3/40.out 2> build/nl4-host-r3/40.err +VERDICT refuse-alias-stride PASS run exit=14 expected=14 stdout=match stderr=match +CASE refuse-nonfinite line=41 + $ seed/out/omc < build/nl4-host-r3/41.src > build/nl4-host-r3/41.elf 2> build/nl4-host-r3/41.cerr + $ build/nl4-host-r3/41.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-nonfinite.wire > build/nl4-host-r3/41.out 2> build/nl4-host-r3/41.err +VERDICT refuse-nonfinite PASS run exit=21 expected=21 stdout=match stderr=match +CASE refuse-integrity line=42 + $ seed/out/omc < build/nl4-host-r3/42.src > build/nl4-host-r3/42.elf 2> build/nl4-host-r3/42.cerr + $ build/nl4-host-r3/42.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-integrity.wire > build/nl4-host-r3/42.out 2> build/nl4-host-r3/42.err +VERDICT refuse-integrity PASS run exit=22 expected=22 stdout=match stderr=match +CASE refuse-reserved line=43 + $ seed/out/omc < build/nl4-host-r3/43.src > build/nl4-host-r3/43.elf 2> build/nl4-host-r3/43.cerr + $ build/nl4-host-r3/43.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-reserved.wire > build/nl4-host-r3/43.out 2> build/nl4-host-r3/43.err +VERDICT refuse-reserved PASS run exit=16 expected=16 stdout=match stderr=match +CASE refuse-zero-cap-ref line=44 + $ seed/out/omc < build/nl4-host-r3/44.src > build/nl4-host-r3/44.elf 2> build/nl4-host-r3/44.cerr + $ build/nl4-host-r3/44.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-no-capability.wire > build/nl4-host-r3/44.out 2> build/nl4-host-r3/44.err +VERDICT refuse-zero-cap-ref PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-no-resource line=45 + $ seed/out/omc < build/nl4-host-r3/45.src > build/nl4-host-r3/45.elf 2> build/nl4-host-r3/45.cerr + $ build/nl4-host-r3/45.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-no-resource.wire > build/nl4-host-r3/45.out 2> build/nl4-host-r3/45.err +VERDICT refuse-no-resource PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-version line=46 + $ seed/out/omc < build/nl4-host-r3/46.src > build/nl4-host-r3/46.elf 2> build/nl4-host-r3/46.cerr + $ build/nl4-host-r3/46.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-version.wire > build/nl4-host-r3/46.out 2> build/nl4-host-r3/46.err +VERDICT refuse-version PASS run exit=11 expected=11 stdout=match stderr=match +CASE refuse-scale line=47 + $ seed/out/omc < build/nl4-host-r3/47.src > build/nl4-host-r3/47.elf 2> build/nl4-host-r3/47.cerr + $ build/nl4-host-r3/47.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-bad-scale.wire > build/nl4-host-r3/47.out 2> build/nl4-host-r3/47.err +VERDICT refuse-scale PASS run exit=13 expected=13 stdout=match stderr=match +CASE refuse-truncated line=48 + $ seed/out/omc < build/nl4-host-r3/48.src > build/nl4-host-r3/48.elf 2> build/nl4-host-r3/48.cerr + $ build/nl4-host-r3/48.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-truncated.wire > build/nl4-host-r3/48.out 2> build/nl4-host-r3/48.err +VERDICT refuse-truncated PASS run exit=15 expected=15 stdout=match stderr=match +CASE refuse-oversized line=49 + $ seed/out/omc < build/nl4-host-r3/49.src > build/nl4-host-r3/49.elf 2> build/nl4-host-r3/49.cerr + $ build/nl4-host-r3/49.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-oversized.wire > build/nl4-host-r3/49.out 2> build/nl4-host-r3/49.err +VERDICT refuse-oversized PASS run exit=10 expected=10 stdout=match stderr=match +CASE refuse-ambiguous line=50 + $ seed/out/omc < build/nl4-host-r3/50.src > build/nl4-host-r3/50.elf 2> build/nl4-host-r3/50.cerr + $ build/nl4-host-r3/50.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-ambiguous.wire > build/nl4-host-r3/50.out 2> build/nl4-host-r3/50.err +VERDICT refuse-ambiguous PASS run exit=47 expected=47 stdout=match stderr=match +CASE refuse-signflip line=51 + $ seed/out/omc < build/nl4-host-r3/51.src > build/nl4-host-r3/51.elf 2> build/nl4-host-r3/51.cerr + $ build/nl4-host-r3/51.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-signflip.wire > build/nl4-host-r3/51.out 2> build/nl4-host-r3/51.err +VERDICT refuse-signflip PASS run exit=47 expected=47 stdout=match stderr=match +CASE refuse-wrongscale line=52 + $ seed/out/omc < build/nl4-host-r3/52.src > build/nl4-host-r3/52.elf 2> build/nl4-host-r3/52.cerr + $ build/nl4-host-r3/52.elf neuralese/fixtures/nl4-context-wrongscale.bin 1 2 < neuralese/fixtures/nl4-wrongscale.wire > build/nl4-host-r3/52.out 2> build/nl4-host-r3/52.err +VERDICT refuse-wrongscale PASS run exit=47 expected=47 stdout=match stderr=match +CASE refuse-wrong-op line=53 + $ seed/out/omc < build/nl4-host-r3/53.src > build/nl4-host-r3/53.elf 2> build/nl4-host-r3/53.cerr + $ build/nl4-host-r3/53.elf neuralese/fixtures/nl4-context.bin 2 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/53.out 2> build/nl4-host-r3/53.err +VERDICT refuse-wrong-op PASS run exit=49 expected=49 stdout=match stderr=match +CASE refuse-wrong-operand line=54 + $ seed/out/omc < build/nl4-host-r3/54.src > build/nl4-host-r3/54.elf 2> build/nl4-host-r3/54.cerr + $ build/nl4-host-r3/54.elf neuralese/fixtures/nl4-context.bin 1 3 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/54.out 2> build/nl4-host-r3/54.err +VERDICT refuse-wrong-operand PASS run exit=49 expected=49 stdout=match stderr=match +SUBST neuralese/fixtures/nl4-effect.from neuralese/fixtures/nl4-false.to +CASE kill-effect line=56 + MUTATE exact-once substitution at byte 5418 + $ seed/out/omc < build/nl4-host-r3/56.src > build/nl4-host-r3/56.elf 2> build/nl4-host-r3/56.cerr + $ build/nl4-host-r3/56.elf neuralese/fixtures/nl4-context-effect.bin 1 2 < neuralese/fixtures/nl4-effect.wire > build/nl4-host-r3/56.out 2> build/nl4-host-r3/56.err +VERDICT kill-effect PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-expiry.from neuralese/fixtures/nl4-false.to +CASE kill-expiry line=58 + MUTATE exact-once substitution at byte 10430 + $ seed/out/omc < build/nl4-host-r3/58.src > build/nl4-host-r3/58.elf 2> build/nl4-host-r3/58.cerr + $ build/nl4-host-r3/58.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-stale.wire > build/nl4-host-r3/58.out 2> build/nl4-host-r3/58.err +VERDICT kill-expiry PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-sequence.from neuralese/fixtures/nl4-false.to +CASE kill-sequence line=60 + MUTATE exact-once substitution at byte 10514 + $ seed/out/omc < build/nl4-host-r3/60.src > build/nl4-host-r3/60.elf 2> build/nl4-host-r3/60.cerr + $ build/nl4-host-r3/60.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-replay.wire > build/nl4-host-r3/60.out 2> build/nl4-host-r3/60.err +VERDICT kill-sequence PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-tenant-binding line=62 + MUTATE exact-once substitution at byte 10616 + $ seed/out/omc < build/nl4-host-r3/62.src > build/nl4-host-r3/62.elf 2> build/nl4-host-r3/62.cerr + $ build/nl4-host-r3/62.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-foreign.wire > build/nl4-host-r3/62.out 2> build/nl4-host-r3/62.err +VERDICT kill-tenant-binding PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +CASE kill-consent-binding line=64 + MUTATE exact-once substitution at byte 10616 + $ seed/out/omc < build/nl4-host-r3/64.src > build/nl4-host-r3/64.elf 2> build/nl4-host-r3/64.cerr + $ build/nl4-host-r3/64.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-withdrawn.wire > build/nl4-host-r3/64.out 2> build/nl4-host-r3/64.err +VERDICT kill-consent-binding PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-integrity.from neuralese/fixtures/nl4-false.to +CASE kill-integrity line=66 + MUTATE exact-once substitution at byte 10679 + $ seed/out/omc < build/nl4-host-r3/66.src > build/nl4-host-r3/66.elf 2> build/nl4-host-r3/66.cerr + $ build/nl4-host-r3/66.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-integrity.wire > build/nl4-host-r3/66.out 2> build/nl4-host-r3/66.err +VERDICT kill-integrity PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-shape.from neuralese/fixtures/nl4-false.to +CASE kill-shape-alias line=68 + MUTATE exact-once substitution at byte 10209 + $ seed/out/omc < build/nl4-host-r3/68.src > build/nl4-host-r3/68.elf 2> build/nl4-host-r3/68.cerr + $ build/nl4-host-r3/68.elf neuralese/fixtures/nl4-context-alias.bin 1 2 < neuralese/fixtures/nl4-alias.wire > build/nl4-host-r3/68.out 2> build/nl4-host-r3/68.err +VERDICT kill-shape-alias PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-match.from neuralese/fixtures/nl4-false.to +CASE kill-wrong-objective line=70 + MUTATE exact-once substitution at byte 2835 + $ seed/out/omc < build/nl4-host-r3/70.src > build/nl4-host-r3/70.elf 2> build/nl4-host-r3/70.cerr + $ build/nl4-host-r3/70.elf neuralese/fixtures/nl4-context.bin 2 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/70.out 2> build/nl4-host-r3/70.err +VERDICT kill-wrong-objective PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-operation.to +CASE kill-wrong-operation line=72 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host-r3/72.src > build/nl4-host-r3/72.elf 2> build/nl4-host-r3/72.cerr + $ build/nl4-host-r3/72.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/72.out 2> build/nl4-host-r3/72.err +VERDICT kill-wrong-operation PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 24 stderr=match +SUBST neuralese/fixtures/nl4-pre.from neuralese/fixtures/nl4-pre.to +CASE ordinary-precondition line=74 + MUTATE exact-once substitution at byte 2086 + $ seed/out/omc < build/nl4-host-r3/74.src > build/nl4-host-r3/74.elf 2> build/nl4-host-r3/74.cerr + $ build/nl4-host-r3/74.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/74.out 2> build/nl4-host-r3/74.err +VERDICT ordinary-precondition PASS run exit=109 expected=109 stdout=match stderr=match +SUBST neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-post.to +CASE ordinary-postcondition line=76 + MUTATE exact-once substitution at byte 364 + $ seed/out/omc < build/nl4-host-r3/76.src > build/nl4-host-r3/76.elf 2> build/nl4-host-r3/76.cerr + $ build/nl4-host-r3/76.elf neuralese/fixtures/nl4-context.bin 1 2 < neuralese/fixtures/nl4-1001.wire > build/nl4-host-r3/76.out 2> build/nl4-host-r3/76.err +VERDICT ordinary-postcondition PASS run exit=110 expected=110 stdout=match stderr=match +OM2GATE PASS cases=63 pass=63 fail=0 invalid=0 not_run=0 diff --git a/neuralese/nl4-host-results.03b624d6ad393604d958f554fc55844885712ca49f425f98459974846e9e5280.json b/neuralese/nl4-host-results.03b624d6ad393604d958f554fc55844885712ca49f425f98459974846e9e5280.json new file mode 100644 index 000000000..a22291e99 --- /dev/null +++ b/neuralese/nl4-host-results.03b624d6ad393604d958f554fc55844885712ca49f425f98459974846e9e5280.json @@ -0,0 +1,72 @@ +{ + "schema": "nl4-host-synthetic-receipt-1", + "status": "PASS", + "classification": "HOST_SYNTHETIC", + "implementation_commit": "09b1394fe68287eaa10b0d90cf07a9dd00e6cb60", + "base_draft_919": "e79566c191ea8ef11888e69ce50d8fadf375d4fd", + "clean_implementation_commit": true, + "source_lock": "neuralese/nl4-dependencies.json", + "compiler_sha256": "d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84", + "compiler_origin": "1fe5976d398646b17acabbf6d9dfae96b017e439", + "source_sha256": { + "neuralese/proposal.om": "2a83bfc17f6897d2d1ed017d57a1cfe9b8e1ed15286d13c27a23b9907628319b", + "neuralese/host-proposal.om": "c103f5417d3ae9bf63a13b502da721be673a6bf699c89f98a56e9069b431c665", + "neuralese/codec-check.om": "215138b531c813763fa82310526c1c5ea0a80f6b850f536153a26f43b55097c1", + "neuralese/nl4-host.cases": "67e27e7972dcb89ecd00f0199307d086f151b1d97249e232dd74dbb480bc029f", + "seed/qualification/om2/gate.om": "250361be99ced1246405b2e4a2e2de71373a90d0a0569fb43821ed8b106e045f", + "om/tls/sha2.om": "5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33" + }, + "commands": [ + "seed/out/omc < seed/qualification/om2/gate.om > build/nl4-gate", + "chmod +x build/nl4-gate", + "build/nl4-gate seed/out/omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 neuralese/nl4-host.cases build/nl4-host-r3", + "build/nl4-gate seed/out/omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 neuralese/host.cases build/neuralese-host" + ], + "native_gate": { + "exit": 0, + "observed": "OM2GATE PASS cases=63 pass=63 fail=0 invalid=0 not_run=0", + "codec_oracle_cases": 1, + "executed_positive_cases": 24, + "deliberate_refusal_cases": 27, + "killed_mutants": 9, + "ordinary_contract_traps": 2, + "log": "neuralese/nl4-host-pass.log", + "log_sha256": "572f350531fa4c646475a24b2458abf062332474036d6069ab98de4ae77717d9" + }, + "inherited_gate": { + "exit": 0, + "observed": "OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0", + "log": "neuralese/nl4-inherited-pass.log" + }, + "representative_execution": { + "argv": ["build/nl4-host-r3/9.elf", "neuralese/fixtures/nl4-context.bin", "1", "2"], + "stdin": "neuralese/fixtures/nl4-1001.wire", + "exit": 0, + "stdout": "neuralese/nl4-success.stdout", + "stdout_sha256": "73f7b44bef21cd50fabb255f6dc2ed7c33b231acee9c1c755753cc5615d79082", + "stderr": "empty", + "elf_sha256": "6fb7a87f4f069c0097b1f7ffdf146c41571a07b9da6c4900d272f86b7193aea0" + }, + "representative_refusal": { + "argv": ["build/nl4-host-r3/35.elf", "neuralese/fixtures/nl4-context.bin", "1", "2"], + "stdin": "neuralese/fixtures/nl4-foreign.wire", + "exit": 20, + "stdout": "empty", + "stderr": "neuralese/nl4-refusal.stderr", + "stderr_sha256": "457c5dc66b24adf9b92cea82ab6e907ae65914cf431a98d2ac9238c27e36ece4", + "meaning": "refused foreign tenant template binding; no operation executed" + }, + "failed_attempts_preserved": [ + {"source": "d4f61620600b24cd4c22763baa97465ab1efc049", "status": "FAIL", "log": "neuralese/nl4-host-initial-fail.log", "cause": "overlong text name and encoder expression register exhaustion"}, + {"source_prefix": "1847846", "status": "FAIL", "log": "neuralese/nl4-host-order-fail.log", "cause": "argcnt spelling and lexical global dependency ordering"} + ], + "independent_oracle": "actual mounted Wolfram tool calls/results in neuralese/nl4-wolfram-*.jsonl; IEEE32 bytes and all arithmetic expected results derived there, native execution checked separately", + "production_authority": "NOT_RUN", + "durable_reservation": "NOT_RUN", + "signed_MJB_MJR_CONTENT_relation": "NOT_RUN", + "effectful_execution": "NOT_RUN; every effectful request refused", + "learned_channel_campaign": "NOT_RUN", + "GPU_or_hardware_qualification": "NOT_RUN", + "deployment": "NOT_RUN", + "missing_owner_bindings": ["aien-dev/aegis-runtime-mv#79", "aien-dev/aien-protocols-mv#70"] +} diff --git a/neuralese/nl4-host.cases b/neuralese/nl4-host.cases new file mode 100644 index 000000000..ca566778a --- /dev/null +++ b/neuralese/nl4-host.cases @@ -0,0 +1,76 @@ +# NL4 host synthetic, not production admission. Dependency snapshots verified by nl4-dependencies.json. +deadline 20 +codec-oracle run neuralese/codec-check.om+build/nl4-deps/h.om+neuralese/proposal.om file:neuralese/fixtures/nl4-oracle-payloads.bin file:neuralese/fixtures/nl4-codec.expected - 0 +f32-double0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-0100.wire file:neuralese/fixtures/nl4-0100.expected - 0 neuralese/fixtures/nl4-context.bin 2 0 +f32-double2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-0101.wire file:neuralese/fixtures/nl4-0101.expected - 0 neuralese/fixtures/nl4-context.bin 2 2 +f32-double1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-0110.wire file:neuralese/fixtures/nl4-0110.expected - 0 neuralese/fixtures/nl4-context.bin 2 1 +f32-double3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-0111.wire file:neuralese/fixtures/nl4-0111.expected - 0 neuralese/fixtures/nl4-context.bin 2 3 +f32-inc0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1000.wire file:neuralese/fixtures/nl4-1000.expected - 0 neuralese/fixtures/nl4-context.bin 1 0 +f32-inc2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire file:neuralese/fixtures/nl4-1001.expected - 0 neuralese/fixtures/nl4-context.bin 1 2 +f32-inc1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1010.wire file:neuralese/fixtures/nl4-1010.expected - 0 neuralese/fixtures/nl4-context.bin 1 1 +f32-inc3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1011.wire file:neuralese/fixtures/nl4-1011.expected - 0 neuralese/fixtures/nl4-context.bin 1 3 +f32-id0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1100.wire file:neuralese/fixtures/nl4-1100.expected - 0 neuralese/fixtures/nl4-context.bin 3 0 +f32-id2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1101.wire file:neuralese/fixtures/nl4-1101.expected - 0 neuralese/fixtures/nl4-context.bin 3 2 +f32-id1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1110.wire file:neuralese/fixtures/nl4-1110.expected - 0 neuralese/fixtures/nl4-context.bin 3 1 +f32-id3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1111.wire file:neuralese/fixtures/nl4-1111.expected - 0 neuralese/fixtures/nl4-context.bin 3 3 +i8-double0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-0100.wire file:neuralese/fixtures/nl4-0100.expected - 0 neuralese/fixtures/nl4-context-i8.bin 2 0 +i8-double2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-0101.wire file:neuralese/fixtures/nl4-0101.expected - 0 neuralese/fixtures/nl4-context-i8.bin 2 2 +i8-double1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-0110.wire file:neuralese/fixtures/nl4-0110.expected - 0 neuralese/fixtures/nl4-context-i8.bin 2 1 +i8-double3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-0111.wire file:neuralese/fixtures/nl4-0111.expected - 0 neuralese/fixtures/nl4-context-i8.bin 2 3 +i8-inc0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1000.wire file:neuralese/fixtures/nl4-1000.expected - 0 neuralese/fixtures/nl4-context-i8.bin 1 0 +i8-inc2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1001.wire file:neuralese/fixtures/nl4-1001.expected - 0 neuralese/fixtures/nl4-context-i8.bin 1 2 +i8-inc1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1010.wire file:neuralese/fixtures/nl4-1010.expected - 0 neuralese/fixtures/nl4-context-i8.bin 1 1 +i8-inc3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1011.wire file:neuralese/fixtures/nl4-1011.expected - 0 neuralese/fixtures/nl4-context-i8.bin 1 3 +i8-id0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1100.wire file:neuralese/fixtures/nl4-1100.expected - 0 neuralese/fixtures/nl4-context-i8.bin 3 0 +i8-id2 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1101.wire file:neuralese/fixtures/nl4-1101.expected - 0 neuralese/fixtures/nl4-context-i8.bin 3 2 +i8-id1 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1110.wire file:neuralese/fixtures/nl4-1110.expected - 0 neuralese/fixtures/nl4-context-i8.bin 3 1 +i8-id3 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-i8-1111.wire file:neuralese/fixtures/nl4-1111.expected - 0 neuralese/fixtures/nl4-context-i8.bin 3 3 +reserved-op0 run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-0000.wire - file:neuralese/fixtures/nl4-48.refused 48 neuralese/fixtures/nl4-context.bin 1 0 +refuse-effect run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-effect.wire - file:neuralese/fixtures/nl4-43.refused 43 neuralese/fixtures/nl4-context-effect.bin 1 2 +refuse-live-profile run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-native.wire - file:neuralese/fixtures/nl4-41.refused 41 neuralese/fixtures/nl4-context-native.bin 1 2 +refuse-stale run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-stale.wire - file:neuralese/fixtures/nl4-18.refused 18 neuralese/fixtures/nl4-context.bin 1 2 +refuse-future run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-future.wire - file:neuralese/fixtures/nl4-18.refused 18 neuralese/fixtures/nl4-context.bin 1 2 +refuse-replay run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-replay.wire - file:neuralese/fixtures/nl4-19.refused 19 neuralese/fixtures/nl4-context.bin 1 2 +refuse-nonce run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-nonce.wire - file:neuralese/fixtures/nl4-20.refused 20 neuralese/fixtures/nl4-context.bin 1 2 +refuse-foreign-tenant run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-foreign.wire - file:neuralese/fixtures/nl4-20.refused 20 neuralese/fixtures/nl4-context.bin 1 2 +refuse-consent-root run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-withdrawn.wire - file:neuralese/fixtures/nl4-20.refused 20 neuralese/fixtures/nl4-context.bin 1 2 +refuse-decoder run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-unknown-decoder.wire - file:neuralese/fixtures/nl4-20.refused 20 neuralese/fixtures/nl4-context.bin 1 2 +refuse-model run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-wrong-model.wire - file:neuralese/fixtures/nl4-20.refused 20 neuralese/fixtures/nl4-context.bin 1 2 +refuse-shape run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-shape.wire - file:neuralese/fixtures/nl4-14.refused 14 neuralese/fixtures/nl4-context.bin 1 2 +refuse-alias-stride run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-alias.wire - file:neuralese/fixtures/nl4-14.refused 14 neuralese/fixtures/nl4-context.bin 1 2 +refuse-nonfinite run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-nonfinite.wire - file:neuralese/fixtures/nl4-21.refused 21 neuralese/fixtures/nl4-context.bin 1 2 +refuse-integrity run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-integrity.wire - file:neuralese/fixtures/nl4-22.refused 22 neuralese/fixtures/nl4-context.bin 1 2 +refuse-reserved run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-reserved.wire - file:neuralese/fixtures/nl4-16.refused 16 neuralese/fixtures/nl4-context.bin 1 2 +refuse-zero-cap-ref run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-no-capability.wire - file:neuralese/fixtures/nl4-17.refused 17 neuralese/fixtures/nl4-context.bin 1 2 +refuse-no-resource run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-no-resource.wire - file:neuralese/fixtures/nl4-17.refused 17 neuralese/fixtures/nl4-context.bin 1 2 +refuse-version run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-version.wire - file:neuralese/fixtures/nl4-11.refused 11 neuralese/fixtures/nl4-context.bin 1 2 +refuse-scale run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-bad-scale.wire - file:neuralese/fixtures/nl4-13.refused 13 neuralese/fixtures/nl4-context.bin 1 2 +refuse-truncated run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-truncated.wire - file:neuralese/fixtures/nl4-15.refused 15 neuralese/fixtures/nl4-context.bin 1 2 +refuse-oversized run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-oversized.wire - file:neuralese/fixtures/nl4-10.refused 10 neuralese/fixtures/nl4-context.bin 1 2 +refuse-ambiguous run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-ambiguous.wire - file:neuralese/fixtures/nl4-47.refused 47 neuralese/fixtures/nl4-context.bin 1 2 +refuse-signflip run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-signflip.wire - file:neuralese/fixtures/nl4-47.refused 47 neuralese/fixtures/nl4-context.bin 1 2 +refuse-wrongscale run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-wrongscale.wire - file:neuralese/fixtures/nl4-47.refused 47 neuralese/fixtures/nl4-context-wrongscale.bin 1 2 +refuse-wrong-op run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire - file:neuralese/fixtures/nl4-49.refused 49 neuralese/fixtures/nl4-context.bin 2 2 +refuse-wrong-operand run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire - file:neuralese/fixtures/nl4-49.refused 49 neuralese/fixtures/nl4-context.bin 1 3 +subst neuralese/fixtures/nl4-effect.from neuralese/fixtures/nl4-false.to +kill-effect kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-effect.wire - - 0 neuralese/fixtures/nl4-context-effect.bin 1 2 +subst neuralese/fixtures/nl4-expiry.from neuralese/fixtures/nl4-false.to +kill-expiry kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-stale.wire - - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-sequence.from neuralese/fixtures/nl4-false.to +kill-sequence kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-replay.wire - - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +kill-tenant-binding kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-foreign.wire - - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-context.from neuralese/fixtures/nl4-false.to +kill-consent-binding kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-withdrawn.wire - - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-integrity.from neuralese/fixtures/nl4-false.to +kill-integrity kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-integrity.wire - - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-shape.from neuralese/fixtures/nl4-false.to +kill-shape-alias kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-alias.wire - - 0 neuralese/fixtures/nl4-context-alias.bin 1 2 +subst neuralese/fixtures/nl4-match.from neuralese/fixtures/nl4-false.to +kill-wrong-objective kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire - - 0 neuralese/fixtures/nl4-context.bin 2 2 +subst neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-operation.to +kill-wrong-operation kill neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire file:neuralese/fixtures/nl4-1001.expected - 0 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-pre.from neuralese/fixtures/nl4-pre.to +ordinary-precondition run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire - - 109 neuralese/fixtures/nl4-context.bin 1 2 +subst neuralese/fixtures/nl4-operation.from neuralese/fixtures/nl4-post.to +ordinary-postcondition run neuralese/host-proposal.om+build/nl4-deps/h.om+neuralese/proposal.om+build/nl4-deps/v.om+om/tls/sha2.om file:neuralese/fixtures/nl4-1001.wire - - 110 neuralese/fixtures/nl4-context.bin 1 2 diff --git a/neuralese/nl4-inherited-pass.log b/neuralese/nl4-inherited-pass.log new file mode 100644 index 000000000..6baa00506 --- /dev/null +++ b/neuralese/nl4-inherited-pass.log @@ -0,0 +1,262 @@ +OM2GATE START cases=neuralese/host.cases scratch=build/neuralese-host +IDENTITY omc seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE decode-positive-1-7 line=3 + $ seed/out/omc < build/neuralese-host/3.src > build/neuralese-host/3.elf 2> build/neuralese-host/3.cerr + $ build/neuralese-host/3.elf < neuralese/fixtures/positive-1-7.wire > build/neuralese-host/3.out 2> build/neuralese-host/3.err +VERDICT decode-positive-1-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-1-7 line=4 + $ seed/out/omc < build/neuralese-host/4.src > build/neuralese-host/4.elf 2> build/neuralese-host/4.cerr + $ build/neuralese-host/4.elf < /dev/null > build/neuralese-host/4.out 2> build/neuralese-host/4.err +VERDICT execute-positive-1-7 PASS run exit=8 expected=8 stdout=match stderr=match +CASE decode-positive-2-7 line=5 + $ seed/out/omc < build/neuralese-host/5.src > build/neuralese-host/5.elf 2> build/neuralese-host/5.cerr + $ build/neuralese-host/5.elf < neuralese/fixtures/positive-2-7.wire > build/neuralese-host/5.out 2> build/neuralese-host/5.err +VERDICT decode-positive-2-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-2-7 line=6 + $ seed/out/omc < build/neuralese-host/6.src > build/neuralese-host/6.elf 2> build/neuralese-host/6.cerr + $ build/neuralese-host/6.elf < /dev/null > build/neuralese-host/6.out 2> build/neuralese-host/6.err +VERDICT execute-positive-2-7 PASS run exit=14 expected=14 stdout=match stderr=match +CASE decode-positive-3-7 line=7 + $ seed/out/omc < build/neuralese-host/7.src > build/neuralese-host/7.elf 2> build/neuralese-host/7.cerr + $ build/neuralese-host/7.elf < neuralese/fixtures/positive-3-7.wire > build/neuralese-host/7.out 2> build/neuralese-host/7.err +VERDICT decode-positive-3-7 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-7 line=8 + $ seed/out/omc < build/neuralese-host/8.src > build/neuralese-host/8.elf 2> build/neuralese-host/8.cerr + $ build/neuralese-host/8.elf < /dev/null > build/neuralese-host/8.out 2> build/neuralese-host/8.err +VERDICT execute-positive-3-7 PASS run exit=7 expected=7 stdout=match stderr=match +CASE decode-positive-1-16 line=9 + $ seed/out/omc < build/neuralese-host/9.src > build/neuralese-host/9.elf 2> build/neuralese-host/9.cerr + $ build/neuralese-host/9.elf < neuralese/fixtures/positive-1-16.wire > build/neuralese-host/9.out 2> build/neuralese-host/9.err +VERDICT decode-positive-1-16 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-1-16 line=10 + $ seed/out/omc < build/neuralese-host/10.src > build/neuralese-host/10.elf 2> build/neuralese-host/10.cerr + $ build/neuralese-host/10.elf < /dev/null > build/neuralese-host/10.out 2> build/neuralese-host/10.err +VERDICT execute-positive-1-16 PASS run exit=17 expected=17 stdout=match stderr=match +CASE decode-positive-2-16 line=11 + $ seed/out/omc < build/neuralese-host/11.src > build/neuralese-host/11.elf 2> build/neuralese-host/11.cerr + $ build/neuralese-host/11.elf < neuralese/fixtures/positive-2-16.wire > build/neuralese-host/11.out 2> build/neuralese-host/11.err +VERDICT decode-positive-2-16 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-2-16 line=12 + $ seed/out/omc < build/neuralese-host/12.src > build/neuralese-host/12.elf 2> build/neuralese-host/12.cerr + $ build/neuralese-host/12.elf < /dev/null > build/neuralese-host/12.out 2> build/neuralese-host/12.err +VERDICT execute-positive-2-16 PASS run exit=32 expected=32 stdout=match stderr=match +CASE decode-positive-3-17 line=13 + $ seed/out/omc < build/neuralese-host/13.src > build/neuralese-host/13.elf 2> build/neuralese-host/13.cerr + $ build/neuralese-host/13.elf < neuralese/fixtures/positive-3-17.wire > build/neuralese-host/13.out 2> build/neuralese-host/13.err +VERDICT decode-positive-3-17 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-17 line=14 + $ seed/out/omc < build/neuralese-host/14.src > build/neuralese-host/14.elf 2> build/neuralese-host/14.cerr + $ build/neuralese-host/14.elf < /dev/null > build/neuralese-host/14.out 2> build/neuralese-host/14.err +VERDICT execute-positive-3-17 PASS run exit=109 expected=109 stdout=match stderr=match +CASE decode-positive-3-127 line=15 + $ seed/out/omc < build/neuralese-host/15.src > build/neuralese-host/15.elf 2> build/neuralese-host/15.cerr + $ build/neuralese-host/15.elf < neuralese/fixtures/positive-3-127.wire > build/neuralese-host/15.out 2> build/neuralese-host/15.err +VERDICT decode-positive-3-127 PASS run exit=0 expected=0 stdout=match stderr=match +CASE execute-positive-3-127 line=16 + $ seed/out/omc < build/neuralese-host/16.src > build/neuralese-host/16.elf 2> build/neuralese-host/16.cerr + $ build/neuralese-host/16.elf < /dev/null > build/neuralese-host/16.out 2> build/neuralese-host/16.err +VERDICT execute-positive-3-127 PASS run exit=109 expected=109 stdout=match stderr=match +CASE refuse-oversize line=17 + $ seed/out/omc < build/neuralese-host/17.src > build/neuralese-host/17.elf 2> build/neuralese-host/17.cerr + $ build/neuralese-host/17.elf < neuralese/fixtures/oversize.wire > build/neuralese-host/17.out 2> build/neuralese-host/17.err +VERDICT refuse-oversize PASS run exit=10 expected=10 stdout=match stderr=match +CASE refuse-short line=18 + $ seed/out/omc < build/neuralese-host/18.src > build/neuralese-host/18.elf 2> build/neuralese-host/18.cerr + $ build/neuralese-host/18.elf < neuralese/fixtures/short.wire > build/neuralese-host/18.out 2> build/neuralese-host/18.err +VERDICT refuse-short PASS run exit=16 expected=16 stdout=match stderr=match +CASE refuse-magic line=19 + $ seed/out/omc < build/neuralese-host/19.src > build/neuralese-host/19.elf 2> build/neuralese-host/19.cerr + $ build/neuralese-host/19.elf < neuralese/fixtures/magic.wire > build/neuralese-host/19.out 2> build/neuralese-host/19.err +VERDICT refuse-magic PASS run exit=11 expected=11 stdout=match stderr=match +CASE refuse-producer line=20 + $ seed/out/omc < build/neuralese-host/20.src > build/neuralese-host/20.elf 2> build/neuralese-host/20.cerr + $ build/neuralese-host/20.elf < neuralese/fixtures/producer.wire > build/neuralese-host/20.out 2> build/neuralese-host/20.err +VERDICT refuse-producer PASS run exit=12 expected=12 stdout=match stderr=match +CASE refuse-decoder line=21 + $ seed/out/omc < build/neuralese-host/21.src > build/neuralese-host/21.elf 2> build/neuralese-host/21.cerr + $ build/neuralese-host/21.elf < neuralese/fixtures/decoder.wire > build/neuralese-host/21.out 2> build/neuralese-host/21.err +VERDICT refuse-decoder PASS run exit=12 expected=12 stdout=match stderr=match +CASE refuse-dimension line=22 + $ seed/out/omc < build/neuralese-host/22.src > build/neuralese-host/22.elf 2> build/neuralese-host/22.cerr + $ build/neuralese-host/22.elf < neuralese/fixtures/dimension.wire > build/neuralese-host/22.out 2> build/neuralese-host/22.err +VERDICT refuse-dimension PASS run exit=13 expected=13 stdout=match stderr=match +CASE refuse-dtype line=23 + $ seed/out/omc < build/neuralese-host/23.src > build/neuralese-host/23.elf 2> build/neuralese-host/23.cerr + $ build/neuralese-host/23.elf < neuralese/fixtures/dtype.wire > build/neuralese-host/23.out 2> build/neuralese-host/23.err +VERDICT refuse-dtype PASS run exit=14 expected=14 stdout=match stderr=match +CASE refuse-encoding line=24 + $ seed/out/omc < build/neuralese-host/24.src > build/neuralese-host/24.elf 2> build/neuralese-host/24.cerr + $ build/neuralese-host/24.elf < neuralese/fixtures/encoding.wire > build/neuralese-host/24.out 2> build/neuralese-host/24.err +VERDICT refuse-encoding PASS run exit=15 expected=15 stdout=match stderr=match +CASE refuse-payload-length line=25 + $ seed/out/omc < build/neuralese-host/25.src > build/neuralese-host/25.elf 2> build/neuralese-host/25.cerr + $ build/neuralese-host/25.elf < neuralese/fixtures/payload-length.wire > build/neuralese-host/25.out 2> build/neuralese-host/25.err +VERDICT refuse-payload-length PASS run exit=20 expected=20 stdout=match stderr=match +CASE refuse-checksum-first line=26 + $ seed/out/omc < build/neuralese-host/26.src > build/neuralese-host/26.elf 2> build/neuralese-host/26.cerr + $ build/neuralese-host/26.elf < neuralese/fixtures/checksum-first.wire > build/neuralese-host/26.out 2> build/neuralese-host/26.err +VERDICT refuse-checksum-first PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-checksum-last line=27 + $ seed/out/omc < build/neuralese-host/27.src > build/neuralese-host/27.elf 2> build/neuralese-host/27.cerr + $ build/neuralese-host/27.elf < neuralese/fixtures/checksum-last.wire > build/neuralese-host/27.out 2> build/neuralese-host/27.err +VERDICT refuse-checksum-last PASS run exit=17 expected=17 stdout=match stderr=match +CASE refuse-reserved-first line=28 + $ seed/out/omc < build/neuralese-host/28.src > build/neuralese-host/28.elf 2> build/neuralese-host/28.cerr + $ build/neuralese-host/28.elf < neuralese/fixtures/reserved-first.wire > build/neuralese-host/28.out 2> build/neuralese-host/28.err +VERDICT refuse-reserved-first PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-reserved-second line=29 + $ seed/out/omc < build/neuralese-host/29.src > build/neuralese-host/29.elf 2> build/neuralese-host/29.cerr + $ build/neuralese-host/29.elf < neuralese/fixtures/reserved-second.wire > build/neuralese-host/29.out 2> build/neuralese-host/29.err +VERDICT refuse-reserved-second PASS run exit=18 expected=18 stdout=match stderr=match +CASE refuse-opcode-low line=30 + $ seed/out/omc < build/neuralese-host/30.src > build/neuralese-host/30.elf 2> build/neuralese-host/30.cerr + $ build/neuralese-host/30.elf < neuralese/fixtures/opcode-low.wire > build/neuralese-host/30.out 2> build/neuralese-host/30.err +VERDICT refuse-opcode-low PASS run exit=19 expected=19 stdout=match stderr=match +CASE refuse-opcode-high line=31 + $ seed/out/omc < build/neuralese-host/31.src > build/neuralese-host/31.elf 2> build/neuralese-host/31.cerr + $ build/neuralese-host/31.elf < neuralese/fixtures/opcode-high.wire > build/neuralese-host/31.out 2> build/neuralese-host/31.err +VERDICT refuse-opcode-high PASS run exit=19 expected=19 stdout=match stderr=match +CASE refuse-empty line=32 + $ seed/out/omc < build/neuralese-host/32.src > build/neuralese-host/32.elf 2> build/neuralese-host/32.cerr + $ build/neuralese-host/32.elf < neuralese/fixtures/empty.wire > build/neuralese-host/32.out 2> build/neuralese-host/32.err +VERDICT refuse-empty PASS run exit=16 expected=16 stdout=match stderr=match +CASE refuse-large line=33 + $ seed/out/omc < build/neuralese-host/33.src > build/neuralese-host/33.elf 2> build/neuralese-host/33.cerr + $ build/neuralese-host/33.elf < neuralese/fixtures/large.wire > build/neuralese-host/33.out 2> build/neuralese-host/33.err +VERDICT refuse-large PASS run exit=10 expected=10 stdout=match stderr=match +SUBST neuralese/fixtures/check-10.from neuralese/fixtures/success.to +CASE kill-guard-oversize line=35 + MUTATE exact-once substitution at byte 1061 + $ seed/out/omc < build/neuralese-host/35.src > build/neuralese-host/35.elf 2> build/neuralese-host/35.cerr + $ build/neuralese-host/35.elf < neuralese/fixtures/oversize.wire > build/neuralese-host/35.out 2> build/neuralese-host/35.err +VERDICT kill-guard-oversize PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-16.from neuralese/fixtures/success.to +CASE kill-guard-short line=37 + MUTATE exact-once substitution at byte 1083 + $ seed/out/omc < build/neuralese-host/37.src > build/neuralese-host/37.elf 2> build/neuralese-host/37.cerr + $ build/neuralese-host/37.elf < neuralese/fixtures/short.wire > build/neuralese-host/37.out 2> build/neuralese-host/37.err +VERDICT kill-guard-short PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-11.from neuralese/fixtures/success.to +CASE kill-guard-magic line=39 + MUTATE exact-once substitution at byte 1134 + $ seed/out/omc < build/neuralese-host/39.src > build/neuralese-host/39.elf 2> build/neuralese-host/39.cerr + $ build/neuralese-host/39.elf < neuralese/fixtures/magic.wire > build/neuralese-host/39.out 2> build/neuralese-host/39.err +VERDICT kill-guard-magic PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-12.from neuralese/fixtures/success.to +CASE kill-guard-producer line=41 + MUTATE exact-once substitution at byte 1259 + $ seed/out/omc < build/neuralese-host/41.src > build/neuralese-host/41.elf 2> build/neuralese-host/41.cerr + $ build/neuralese-host/41.elf < neuralese/fixtures/producer.wire > build/neuralese-host/41.out 2> build/neuralese-host/41.err +VERDICT kill-guard-producer PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-12.from neuralese/fixtures/success.to +CASE kill-guard-decoder line=43 + MUTATE exact-once substitution at byte 1259 + $ seed/out/omc < build/neuralese-host/43.src > build/neuralese-host/43.elf 2> build/neuralese-host/43.cerr + $ build/neuralese-host/43.elf < neuralese/fixtures/decoder.wire > build/neuralese-host/43.out 2> build/neuralese-host/43.err +VERDICT kill-guard-decoder PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-13.from neuralese/fixtures/success.to +CASE kill-guard-dimension line=45 + MUTATE exact-once substitution at byte 1286 + $ seed/out/omc < build/neuralese-host/45.src > build/neuralese-host/45.elf 2> build/neuralese-host/45.cerr + $ build/neuralese-host/45.elf < neuralese/fixtures/dimension.wire > build/neuralese-host/45.out 2> build/neuralese-host/45.err +VERDICT kill-guard-dimension PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-14.from neuralese/fixtures/success.to +CASE kill-guard-dtype line=47 + MUTATE exact-once substitution at byte 1313 + $ seed/out/omc < build/neuralese-host/47.src > build/neuralese-host/47.elf 2> build/neuralese-host/47.cerr + $ build/neuralese-host/47.elf < neuralese/fixtures/dtype.wire > build/neuralese-host/47.out 2> build/neuralese-host/47.err +VERDICT kill-guard-dtype PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-15.from neuralese/fixtures/success.to +CASE kill-guard-encoding line=49 + MUTATE exact-once substitution at byte 1340 + $ seed/out/omc < build/neuralese-host/49.src > build/neuralese-host/49.elf 2> build/neuralese-host/49.cerr + $ build/neuralese-host/49.elf < neuralese/fixtures/encoding.wire > build/neuralese-host/49.out 2> build/neuralese-host/49.err +VERDICT kill-guard-encoding PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-20.from neuralese/fixtures/success.to +CASE kill-guard-payload-length line=51 + MUTATE exact-once substitution at byte 1367 + $ seed/out/omc < build/neuralese-host/51.src > build/neuralese-host/51.elf 2> build/neuralese-host/51.cerr + $ build/neuralese-host/51.elf < neuralese/fixtures/payload-length.wire > build/neuralese-host/51.out 2> build/neuralese-host/51.err +VERDICT kill-guard-payload-length PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-17.from neuralese/fixtures/success.to +CASE kill-guard-checksum-first line=53 + MUTATE exact-once substitution at byte 1394 + $ seed/out/omc < build/neuralese-host/53.src > build/neuralese-host/53.elf 2> build/neuralese-host/53.cerr + $ build/neuralese-host/53.elf < neuralese/fixtures/checksum-first.wire > build/neuralese-host/53.out 2> build/neuralese-host/53.err +VERDICT kill-guard-checksum-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-17.from neuralese/fixtures/success.to +CASE kill-guard-checksum-last line=55 + MUTATE exact-once substitution at byte 1394 + $ seed/out/omc < build/neuralese-host/55.src > build/neuralese-host/55.elf 2> build/neuralese-host/55.cerr + $ build/neuralese-host/55.elf < neuralese/fixtures/checksum-last.wire > build/neuralese-host/55.out 2> build/neuralese-host/55.err +VERDICT kill-guard-checksum-last PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-18.from neuralese/fixtures/success.to +CASE kill-guard-reserved-first line=57 + MUTATE exact-once substitution at byte 1439 + $ seed/out/omc < build/neuralese-host/57.src > build/neuralese-host/57.elf 2> build/neuralese-host/57.cerr + $ build/neuralese-host/57.elf < neuralese/fixtures/reserved-first.wire > build/neuralese-host/57.out 2> build/neuralese-host/57.err +VERDICT kill-guard-reserved-first PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-18.from neuralese/fixtures/success.to +CASE kill-guard-reserved-second line=59 + MUTATE exact-once substitution at byte 1439 + $ seed/out/omc < build/neuralese-host/59.src > build/neuralese-host/59.elf 2> build/neuralese-host/59.cerr + $ build/neuralese-host/59.elf < neuralese/fixtures/reserved-second.wire > build/neuralese-host/59.out 2> build/neuralese-host/59.err +VERDICT kill-guard-reserved-second PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-19.from neuralese/fixtures/success.to +CASE kill-guard-opcode-low line=61 + MUTATE exact-once substitution at byte 1484 + $ seed/out/omc < build/neuralese-host/61.src > build/neuralese-host/61.elf 2> build/neuralese-host/61.cerr + $ build/neuralese-host/61.elf < neuralese/fixtures/opcode-low.wire > build/neuralese-host/61.out 2> build/neuralese-host/61.err +VERDICT kill-guard-opcode-low PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-19.from neuralese/fixtures/success.to +CASE kill-guard-opcode-high line=63 + MUTATE exact-once substitution at byte 1484 + $ seed/out/omc < build/neuralese-host/63.src > build/neuralese-host/63.elf 2> build/neuralese-host/63.cerr + $ build/neuralese-host/63.elf < neuralese/fixtures/opcode-high.wire > build/neuralese-host/63.out 2> build/neuralese-host/63.err +VERDICT kill-guard-opcode-high PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-16.from neuralese/fixtures/success.to +CASE kill-guard-empty line=65 + MUTATE exact-once substitution at byte 1083 + $ seed/out/omc < build/neuralese-host/65.src > build/neuralese-host/65.elf 2> build/neuralese-host/65.cerr + $ build/neuralese-host/65.elf < neuralese/fixtures/empty.wire > build/neuralese-host/65.out 2> build/neuralese-host/65.err +VERDICT kill-guard-empty PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/check-10.from neuralese/fixtures/success.to +CASE kill-guard-large line=67 + MUTATE exact-once substitution at byte 1061 + $ seed/out/omc < build/neuralese-host/67.src > build/neuralese-host/67.elf 2> build/neuralese-host/67.cerr + $ build/neuralese-host/67.elf < neuralese/fixtures/large.wire > build/neuralese-host/67.out 2> build/neuralese-host/67.err +VERDICT kill-guard-large PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 0 stderr=match +SUBST neuralese/fixtures/codebook.from neuralese/fixtures/codebook.to +CASE kill-codebook line=69 + MUTATE exact-once substitution at byte 436 + $ seed/out/omc < build/neuralese-host/69.src > build/neuralese-host/69.elf 2> build/neuralese-host/69.cerr + $ build/neuralese-host/69.elf < neuralese/fixtures/positive-1-7.wire > build/neuralese-host/69.out 2> build/neuralese-host/69.err +VERDICT kill-codebook PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 76 stderr=match +CASE execute-wrong-codebook line=70 + $ seed/out/omc < build/neuralese-host/70.src > build/neuralese-host/70.elf 2> build/neuralese-host/70.cerr + $ build/neuralese-host/70.elf < /dev/null > build/neuralese-host/70.out 2> build/neuralese-host/70.err +VERDICT execute-wrong-codebook PASS run exit=14 expected=14 stdout=match stderr=match +SUBST neuralese/fixtures/contract.from neuralese/fixtures/contract.to +CASE kill-precondition line=72 + MUTATE exact-once substitution at byte 34 + $ seed/out/omc < build/neuralese-host/72.src > build/neuralese-host/72.elf 2> build/neuralese-host/72.cerr + $ build/neuralese-host/72.elf < /dev/null > build/neuralese-host/72.out 2> build/neuralese-host/72.err +VERDICT kill-precondition PASS run exit=17 expected=17 stdout=match stderr=match +SUBST neuralese/fixtures/type.from neuralese/fixtures/type.to +CASE ordinary-type-refusal line=74 + MUTATE exact-once substitution at byte 72 + $ seed/out/omc < build/neuralese-host/74.src > build/neuralese-host/74.elf 2> build/neuralese-host/74.cerr +VERDICT ordinary-type-refusal PASS compile exit=7 expected=7 refused with the expected error +SUBST neuralese/fixtures/contract.from neuralese/fixtures/purity.to +CASE ordinary-purity-refusal line=76 + MUTATE exact-once substitution at byte 34 + $ seed/out/omc < build/neuralese-host/76.src > build/neuralese-host/76.elf 2> build/neuralese-host/76.cerr +VERDICT ordinary-purity-refusal PASS compile exit=30 expected=30 refused with the expected error +SUBST neuralese/fixtures/post.from neuralese/fixtures/post.to +CASE ordinary-postcondition-refusal line=78 + MUTATE exact-once substitution at byte 51 + $ seed/out/omc < build/neuralese-host/78.src > build/neuralese-host/78.elf 2> build/neuralese-host/78.cerr + $ build/neuralese-host/78.elf < /dev/null > build/neuralese-host/78.out 2> build/neuralese-host/78.err +VERDICT ordinary-postcondition-refusal PASS run exit=110 expected=110 stdout=match stderr=match +OM2GATE PASS cases=54 pass=54 fail=0 invalid=0 not_run=0 diff --git a/neuralese/nl4-refusal.stderr b/neuralese/nl4-refusal.stderr new file mode 100644 index 000000000..584335ead --- /dev/null +++ b/neuralese/nl4-refusal.stderr @@ -0,0 +1 @@ +NL4R1 20 0 0 0 0 0 0 0 0 0 diff --git a/neuralese/nl4-success.stdout b/neuralese/nl4-success.stdout new file mode 100644 index 000000000..fc23162a1 --- /dev/null +++ b/neuralese/nl4-success.stdout @@ -0,0 +1 @@ +NL4R1 0 1 2 1 1 1 0 1 0 3 diff --git a/neuralese/nl4-wolfram-ambiguity.jsonl b/neuralese/nl4-wolfram-ambiguity.jsonl new file mode 100644 index 000000000..c35d1aefd --- /dev/null +++ b/neuralese/nl4-wolfram-ambiguity.jsonl @@ -0,0 +1,2 @@ +{"type":"tool_execution_start","toolCallId":"toolu_01PV13aqWaeGepqyVL6TGBLk","toolName":"mcp__wolfram_wolframlanguageevaluator","args":{"code":"Module[{w,e,h,p},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];h={1/2,0,0,0}.Transpose[e];p[v_]:=Which[Abs[v]<=1/16,0,Abs[v-1]<=1/16,1,True,-1];ExportString[<|\"ambiguous_bytes\"->Normal[ExportByteArray[N[h,50],\"Real32\",ByteOrdering->1]],\"ambiguous_scores\"->Map[p,{1/2,0,0,0}],\"signflip_scores\"->Map[p,-{1,0,0,1}],\"doubled_scale_scores\"->Map[p,2{1,0,0,1}]|>,\"RawJSON\"]]"}} +{"type":"tool_execution_end","toolCallId":"toolu_01PV13aqWaeGepqyVL6TGBLk","toolName":"mcp__wolfram_wolframlanguageevaluator","result":{"content":[{"type":"text","text":"Out[1]= \"{\\n\\t\\\"ambiguous_bytes\\\":[\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243\\n\\t],\\n\\t\\\"ambiguous_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t0\\n\\t],\\n\\t\\\"signflip_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t-1\\n\\t],\\n\\t\\\"doubled_scale_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t-1\\n\\t]\\n}\""}],"details":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= \"{\\n\\t\\\"ambiguous_bytes\\\":[\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t62,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243,\\n\\t\\t190,\\n\\t\\t53,\\n\\t\\t4,\\n\\t\\t243\\n\\t],\\n\\t\\\"ambiguous_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t0\\n\\t],\\n\\t\\\"signflip_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t-1\\n\\t],\\n\\t\\\"doubled_scale_scores\\\":[\\n\\t\\t-1,\\n\\t\\t0,\\n\\t\\t0,\\n\\t\\t-1\\n\\t]\\n}\""}],"provider":"native","providerName":"OMP"}},"isError":false} diff --git a/neuralese/nl4-wolfram-bytes.jsonl b/neuralese/nl4-wolfram-bytes.jsonl new file mode 100644 index 000000000..8d5c7f7e7 --- /dev/null +++ b/neuralese/nl4-wolfram-bytes.jsonl @@ -0,0 +1,8 @@ +{"type":"tool_execution_start","toolCallId":"call_30b580a5cc324f6d914bfb9cddd5a93d|fc_0619ad164dcc975d016ae2029f84648192948ec3c8e102b01a","toolName":"read","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator"},"intent":"Reading mounted evaluator schema"} +{"type":"tool_execution_end","toolCallId":"call_30b580a5cc324f6d914bfb9cddd5a93d|fc_0619ad164dcc975d016ae2029f84648192948ec3c8e102b01a","toolName":"read","result":{"content":[{"type":"text","text":"# mcp__wolfram_wolframlanguageevaluator — wolfram/WolframLanguageEvaluator\n\nEvaluates Wolfram Language code for the user in a Wolfram Language kernel.\nIf a formatted result is provided as a markdown link, use that in your response instead of typing out the output.\nParse natural language input with `\\[FreeformPrompt][\"query\"]`, which is analogous to ctrl+= input in notebooks.\nNatural language input is parsed before evaluation, so it works like macro expansion.\nYou should ALWAYS use this natural language input to obtain things like `Quantity`, `DateObject`, `Entity`, etc.\nThis is a stateless kernel, so you cannot reuse definitions from previous evaluations.\n\n## Schema\n```ts\ntype Args = {\n /** The Wolfram Language code to evaluate. */\n code: string;\n /** The time constraint for the evaluation (default is 60 seconds). */\n timeConstraint?: number;\n};\n```\nExecute by writing JSON to xd://mcp__wolfram_wolframlanguageevaluator."}],"details":{"contentType":"text/plain","totalLines":19,"rowPrefixes":false,"displayContent":{"text":"# mcp__wolfram_wolframlanguageevaluator — wolfram/WolframLanguageEvaluator\n\nEvaluates Wolfram Language code for the user in a Wolfram Language kernel.\nIf a formatted result is provided as a markdown link, use that in your response instead of typing out the output.\nParse natural language input with `\\[FreeformPrompt][\"query\"]`, which is analogous to ctrl+= input in notebooks.\nNatural language input is parsed before evaluation, so it works like macro expansion.\nYou should ALWAYS use this natural language input to obtain things like `Quantity`, `DateObject`, `Entity`, etc.\nThis is a stateless kernel, so you cannot reuse definitions from previous evaluations.\n\n## Schema\n```ts\ntype Args = {\n /** The Wolfram Language code to evaluate. */\n code: string;\n /** The time constraint for the evaluation (default is 60 seconds). */\n timeConstraint?: number;\n};\n```\nExecute by writing JSON to xd://mcp__wolfram_wolframlanguageevaluator.","startLine":1,"lineNumbers":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},"meta":{"source":{"type":"internal","value":"xd://mcp__wolfram_wolframlanguageevaluator"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"call_c383e1f44ed647428efbb36f9337183b|fc_0619ad164dcc975d016ae202a1cbb48192b50f40514d7ea411","toolName":"eval","args":{"language":"js","code":"const r = await tool.mcp__wolfram_wolframlanguageevaluator({code:'Module[{w,e,x,h,rows},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];rows=Table[With[{op=x[[i,1]]+2x[[i,2]],a=x[[i,3]]+2x[[i,4]],bytes=Normal[ExportByteArray[N[h[[i]],50],\"Real32\",ByteOrdering->1]]},<|\"bits\"->x[[i]],\"opcode\"->op,\"operand\"->a,\"result\"->Switch[op,0,-1,1,a+1,2,2a,3,a],\"bytes\"->bytes|>],{i,16}];ExportString[rows,\"RawJSON\"]]'}); print(r);","title":"Evaluating exact Wolfram query"},"intent":"Evaluating exact Wolfram query"} +{"type":"tool_execution_end","toolCallId":"call_c383e1f44ed647428efbb36f9337183b|fc_0619ad164dcc975d016ae202a1cbb48192b50f40514d7ea411","toolName":"eval","result":{"content":[{"type":"text","text":"{\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\…\n details: {\n serverName: 'wolfram',\n mcpToolName: 'WolframLanguageEvaluator',\n isError: undefined,\n rawContent: [\n {\n type: 'text',\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\…\n }\n ],\n mcpMeta: undefined,\n provider: 'native',\n providerName: 'OMP'\n }\n}\n\n[Some lines truncated to 768 bytes]"}],"details":{"language":"js","languages":["js"],"cells":[{"index":0,"title":"Evaluating exact Wolfram query","code":"const r = await tool.mcp__wolfram_wolframlanguageevaluator({code:'Module[{w,e,x,h,rows},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];rows=Table[With[{op=x[[i,1]]+2x[[i,2]],a=x[[i,3]]+2x[[i,4]],bytes=Normal[ExportByteArray[N[h[[i]],50],\"Real32\",ByteOrdering->1]]},<|\"bits\"->x[[i]],\"opcode\"->op,\"operand\"->a,\"result\"->Switch[op,0,-1,1,a+1,2,2a,3,a],\"bytes\"->bytes|>],{i,16}];ExportString[rows,\"RawJSON\"]]'}); print(r);","language":"js","output":"{\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\…\n details: {\n serverName: 'wolfram',\n mcpToolName: 'WolframLanguageEvaluator',\n isError: undefined,\n rawContent: [\n {\n type: 'text',\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\…\n }\n ],\n mcpMeta: undefined,\n provider: 'native',\n providerName: 'OMP'\n }\n}","status":"complete","views":[{"text":"{\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":0,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":4,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":6,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":3,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":4,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":0,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":3,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t}\\\\n]\"',\n details: {\n serverName: 'wolfram',\n mcpToolName: 'WolframLanguageEvaluator',\n isError: undefined,\n rawContent: [\n {\n type: 'text',\n text: 'Out[1]= \"[\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":0,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":-1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":0,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":4,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":2,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":6,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":3,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":1,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":4,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":0,\\\\n\\\\t\\\\t\\\\\"result\\\\\":0,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t53,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":2,\\\\n\\\\t\\\\t\\\\\"result\\\\\":2,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t0\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":1,\\\\n\\\\t\\\\t\\\\\"result\\\\\":1,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t62,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t190,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t135,\\\\n\\\\t\\\\t\\\\t195,\\\\n\\\\t\\\\t\\\\t182\\\\n\\\\t\\\\t]\\\\n\\\\t},\\\\n\\\\t{\\\\n\\\\t\\\\t\\\\\"bits\\\\\":[\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1,\\\\n\\\\t\\\\t\\\\t1\\\\n\\\\t\\\\t],\\\\n\\\\t\\\\t\\\\\"opcode\\\\\":3,\\\\n\\\\t\\\\t\\\\\"operand\\\\\":3,\\\\n\\\\t\\\\t\\\\\"result\\\\\":3,\\\\n\\\\t\\\\t\\\\\"bytes\\\\\":[\\\\n\\\\t\\\\t\\\\t63,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t0,\\\\n\\\\t\\\\t\\\\t191,\\\\n\\\\t\\\\t\\\\t181,\\\\n\\\\t\\\\t\\\\t4,\\\\n\\\\t\\\\t\\\\t243\\\\n\\\\t\\\\t]\\\\n\\\\t}\\\\n]\"'\n }\n ],\n mcpMeta: undefined,\n provider: 'native',\n providerName: 'OMP'\n }\n}","view":{"kind":"json","value":{"text":"Out[1]= \"[\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":0,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":4,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":6,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":3,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":4,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":0,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":3,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t}\\n]\"","details":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= \"[\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":0,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":4,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":2,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":6,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":3,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":1,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":4,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":0,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t63,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t53,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":2,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":1,\\n\\t\\t\\\"result\\\":1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t191,\\n\\t\\t\\t135,\\n\\t\\t\\t195,\\n\\t\\t\\t182\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":3,\\n\\t\\t\\\"operand\\\":3,\\n\\t\\t\\\"result\\\":3,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t63,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t191,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243\\n\\t\\t]\\n\\t}\\n]\""}],"provider":"native","providerName":"OMP"}}}}],"statusEvents":[{"op":"mcp__wolfram_wolframlanguageevaluator","chars":8104}],"exitCode":0,"durationMs":3941}],"statusEvents":[{"op":"mcp__wolfram_wolframlanguageevaluator","chars":8104}],"meta":{"limits":{"columnTruncated":{"maxColumn":768,"unit":"bytes"}}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"call_720690f3254d45c5862a2d39a32d8603|fc_0619ad164dcc975d016ae202aca7f081928e48eaed7b58775e","toolName":"eval","args":{"language":"js","code":"print(r.details.rawContent[0].text);","title":"Displaying evaluator output"},"intent":"Displaying evaluator output"} +{"type":"tool_execution_end","toolCallId":"call_720690f3254d45c5862a2d39a32d8603|fc_0619ad164dcc975d016ae202aca7f081928e48eaed7b58775e","toolName":"eval","result":{"content":[{"type":"text","text":"Out[1]= \"[\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t24…\n\n[Some lines truncated to 768 bytes]"}],"details":{"language":"js","languages":["js"],"cells":[{"index":0,"title":"Displaying evaluator output","code":"print(r.details.rawContent[0].text);","language":"js","output":"Out[1]= \"[\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":0,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0\\n\\t\\t]\\n\\t},\\n\\t{\\n\\t\\t\\\"bits\\\":[\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t0,\\n\\t\\t\\t1\\n\\t\\t],\\n\\t\\t\\\"opcode\\\":0,\\n\\t\\t\\\"operand\\\":2,\\n\\t\\t\\\"result\\\":-1,\\n\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t62,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t243,\\n\\t\\t\\t190,\\n\\t\\t\\t181,\\n\\t\\t\\t4,\\n\\t\\t\\t24…","status":"complete","exitCode":0,"durationMs":2}],"meta":{"limits":{"columnTruncated":{"maxColumn":768,"unit":"bytes"}}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"call_ac5d9f1865344f3db6fdc8667e4e6b18|fc_0619ad164dcc975d016ae202b047748192a2aabda7bba0a4a0","toolName":"eval","args":{"language":"js","code":"const raw = r.details.rawContent[0].text; const json = JSON.parse(raw.replace(/^Out\\[1\\]= /,'')); for (const row of JSON.parse(json)) print(JSON.stringify(row));","title":"Displaying returned JSON rows"},"intent":"Displaying returned JSON rows"} +{"type":"tool_execution_end","toolCallId":"call_ac5d9f1865344f3db6fdc8667e4e6b18|fc_0619ad164dcc975d016ae202b047748192a2aabda7bba0a4a0","toolName":"eval","result":{"content":[{"type":"text","text":"{\"bits\":[0,0,0,0],\"opcode\":0,\"operand\":0,\"result\":-1,\"bytes\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}\n{\"bits\":[0,0,0,1],\"opcode\":0,\"operand\":2,\"result\":-1,\"bytes\":[62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243]}\n{\"bits\":[0,0,1,0],\"opcode\":0,\"operand\":1,\"result\":-1,\"bytes\":[62,181,4,243,62,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,190,181,4,243,190,181,4,243]}\n{\"bits\":[0,0,1,1],\"opcode\":0,\"operand\":3,\"result\":-1,\"bytes\":[63,53,4,243,0,0,0,0,0,0,0,0,63,53,4,243,191,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243]}\n{\"bits\":[0,1,0,0],\"opcode\":2,\"operand\":0,\"result\":0,\"bytes\":[62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243]}\n{\"bits\":[0,1,0,1],\"opcode\":2,\"operand\":2,\"result\":4,\"bytes\":[63,53,4,243,0,0,0,0,191,53,4,243,0,0,0,0,0,0,0,0,63,53,4,243,0,0,0,0,191,53,4,243]}\n{\"bits\":[0,1,1,0],\"opcode\":2,\"operand\":1,\"result\":2,\"bytes\":[63,53,4,243,63,53,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,53,4,243,191,53,4,243]}\n{\"bits\":[0,1,1,1],\"opcode\":2,\"operand\":3,\"result\":6,\"bytes\":[63,135,195,182,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,191,135,195,182]}\n{\"bits\":[1,0,0,0],\"opcode\":1,\"operand\":0,\"result\":1,\"bytes\":[62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243]}\n{\"bits\":[1,0,0,1],\"opcode\":1,\"operand\":2,\"result\":3,\"bytes\":[63,53,4,243,191,53,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,53,4,243,191,53,4,243]}\n{\"bits\":[1,0,1,0],\"opcode\":1,\"operand\":1,\"result\":2,\"bytes\":[63,53,4,243,0,0,0,0,63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243,0,0,0,0,191,53,4,243]}\n{\"bits\":[1,0,1,1],\"opcode\":1,\"operand\":3,\"result\":4,\"bytes\":[63,135,195,182,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,0,0],\"opcode\":3,\"operand\":0,\"result\":0,\"bytes\":[63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243,63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243]}\n{\"bits\":[1,1,0,1],\"opcode\":3,\"operand\":2,\"result\":2,\"bytes\":[63,135,195,182,190,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,62,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,1,0],\"opcode\":3,\"operand\":1,\"result\":1,\"bytes\":[63,135,195,182,62,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,1,1],\"opcode\":3,\"operand\":3,\"result\":3,\"bytes\":[63,181,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,181,4,243]}"}],"details":{"language":"js","languages":["js"],"cells":[{"index":0,"title":"Displaying returned JSON rows","code":"const raw = r.details.rawContent[0].text; const json = JSON.parse(raw.replace(/^Out\\[1\\]= /,'')); for (const row of JSON.parse(json)) print(JSON.stringify(row));","language":"js","output":"{\"bits\":[0,0,0,0],\"opcode\":0,\"operand\":0,\"result\":-1,\"bytes\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}\n{\"bits\":[0,0,0,1],\"opcode\":0,\"operand\":2,\"result\":-1,\"bytes\":[62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243]}\n{\"bits\":[0,0,1,0],\"opcode\":0,\"operand\":1,\"result\":-1,\"bytes\":[62,181,4,243,62,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,190,181,4,243,190,181,4,243]}\n{\"bits\":[0,0,1,1],\"opcode\":0,\"operand\":3,\"result\":-1,\"bytes\":[63,53,4,243,0,0,0,0,0,0,0,0,63,53,4,243,191,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243]}\n{\"bits\":[0,1,0,0],\"opcode\":2,\"operand\":0,\"result\":0,\"bytes\":[62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243]}\n{\"bits\":[0,1,0,1],\"opcode\":2,\"operand\":2,\"result\":4,\"bytes\":[63,53,4,243,0,0,0,0,191,53,4,243,0,0,0,0,0,0,0,0,63,53,4,243,0,0,0,0,191,53,4,243]}\n{\"bits\":[0,1,1,0],\"opcode\":2,\"operand\":1,\"result\":2,\"bytes\":[63,53,4,243,63,53,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,53,4,243,191,53,4,243]}\n{\"bits\":[0,1,1,1],\"opcode\":2,\"operand\":3,\"result\":6,\"bytes\":[63,135,195,182,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,191,135,195,182]}\n{\"bits\":[1,0,0,0],\"opcode\":1,\"operand\":0,\"result\":1,\"bytes\":[62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243]}\n{\"bits\":[1,0,0,1],\"opcode\":1,\"operand\":2,\"result\":3,\"bytes\":[63,53,4,243,191,53,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,53,4,243,191,53,4,243]}\n{\"bits\":[1,0,1,0],\"opcode\":1,\"operand\":1,\"result\":2,\"bytes\":[63,53,4,243,0,0,0,0,63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243,0,0,0,0,191,53,4,243]}\n{\"bits\":[1,0,1,1],\"opcode\":1,\"operand\":3,\"result\":4,\"bytes\":[63,135,195,182,190,181,4,243,62,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,0,0],\"opcode\":3,\"operand\":0,\"result\":0,\"bytes\":[63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243,63,53,4,243,0,0,0,0,0,0,0,0,191,53,4,243]}\n{\"bits\":[1,1,0,1],\"opcode\":3,\"operand\":2,\"result\":2,\"bytes\":[63,135,195,182,190,181,4,243,190,181,4,243,190,181,4,243,62,181,4,243,62,181,4,243,62,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,1,0],\"opcode\":3,\"operand\":1,\"result\":1,\"bytes\":[63,135,195,182,62,181,4,243,62,181,4,243,190,181,4,243,62,181,4,243,190,181,4,243,190,181,4,243,191,135,195,182]}\n{\"bits\":[1,1,1,1],\"opcode\":3,\"operand\":3,\"result\":3,\"bytes\":[63,181,4,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,181,4,243]}","status":"complete","exitCode":0,"durationMs":3}]}},"isError":false} diff --git a/neuralese/nl4-wolfram-int8.jsonl b/neuralese/nl4-wolfram-int8.jsonl new file mode 100644 index 000000000..05894db31 --- /dev/null +++ b/neuralese/nl4-wolfram-int8.jsonl @@ -0,0 +1,4 @@ +{"type":"tool_execution_start","toolCallId":"call_48c16e1c8bf94f50908773662d3e2157|fc_0911fbf216c30337016ae20350e3388192a03a07fcdf68d36d","toolName":"read","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator"},"intent":"Reading Wolfram evaluator schema"} +{"type":"tool_execution_end","toolCallId":"call_48c16e1c8bf94f50908773662d3e2157|fc_0911fbf216c30337016ae20350e3388192a03a07fcdf68d36d","toolName":"read","result":{"content":[{"type":"text","text":"# mcp__wolfram_wolframlanguageevaluator — wolfram/WolframLanguageEvaluator\n\nEvaluates Wolfram Language code for the user in a Wolfram Language kernel.\nIf a formatted result is provided as a markdown link, use that in your response instead of typing out the output.\nParse natural language input with `\\[FreeformPrompt][\"query\"]`, which is analogous to ctrl+= input in notebooks.\nNatural language input is parsed before evaluation, so it works like macro expansion.\nYou should ALWAYS use this natural language input to obtain things like `Quantity`, `DateObject`, `Entity`, etc.\nThis is a stateless kernel, so you cannot reuse definitions from previous evaluations.\n\n## Schema\n```ts\ntype Args = {\n /** The Wolfram Language code to evaluate. */\n code: string;\n /** The time constraint for the evaluation (default is 60 seconds). */\n timeConstraint?: number;\n};\n```\nExecute by writing JSON to xd://mcp__wolfram_wolframlanguageevaluator."}],"details":{"contentType":"text/plain","totalLines":19,"rowPrefixes":false,"displayContent":{"text":"# mcp__wolfram_wolframlanguageevaluator — wolfram/WolframLanguageEvaluator\n\nEvaluates Wolfram Language code for the user in a Wolfram Language kernel.\nIf a formatted result is provided as a markdown link, use that in your response instead of typing out the output.\nParse natural language input with `\\[FreeformPrompt][\"query\"]`, which is analogous to ctrl+= input in notebooks.\nNatural language input is parsed before evaluation, so it works like macro expansion.\nYou should ALWAYS use this natural language input to obtain things like `Quantity`, `DateObject`, `Entity`, etc.\nThis is a stateless kernel, so you cannot reuse definitions from previous evaluations.\n\n## Schema\n```ts\ntype Args = {\n /** The Wolfram Language code to evaluate. */\n code: string;\n /** The time constraint for the evaluation (default is 60 seconds). */\n timeConstraint?: number;\n};\n```\nExecute by writing JSON to xd://mcp__wolfram_wolframlanguageevaluator.","startLine":1,"lineNumbers":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},"meta":{"source":{"type":"internal","value":"xd://mcp__wolfram_wolframlanguageevaluator"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"call_90accc8484cf4a5894d5b326e358e6df|fc_0911fbf216c30337016ae2035399408192ba078ea8eef30c3e","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","content":"{\"code\":\"Module[{w,e,x,h,q,d,rows},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];q=Map[Round[16 #]&,h,{2}];d=q.e/16;rows=Table[<|\\\"bits\\\"->x[[i]],\\\"bytes\\\"->Mod[q[[i]],256]|>,{i,16}];ExportString[<|\\\"scale\\\"->1/16,\\\"zero\\\"->0,\\\"maximum_feature_error_exact\\\"->ToString[FullSimplify[Max[Abs[Flatten[d-x]]]],InputForm],\\\"all_bits_recover\\\"->(Map[Which[Abs[#]<=1/16,0,Abs[#-1]<=1/16,1,True,-1]&,d,{2}]===x),\\\"rows\\\"->rows|>,\\\"RawJSON\\\"]]\"}"},"intent":"Evaluating requested Wolfram expression"} +{"type":"tool_execution_end","toolCallId":"call_90accc8484cf4a5894d5b326e358e6df|fc_0911fbf216c30337016ae2035399408192ba078ea8eef30c3e","toolName":"write","result":{"content":[{"type":"text","text":"Out[1]= \"{\\n\\t\\\"scale\\\":6.25e-2,\\n\\t\\\"zero\\\":0,\\n\\t\\\"maximum_feature_error_exact\\\":\\\"-1 + 3\\\\/(2*Sqrt[2])\\\",\\n\\t\\\"all_bits_recover\\\":true,\\n\\t\\\"rows\\\":[\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t23,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t233\\n\\t\\t\\t]\\n\\t\\t}\\n\\t]\\n}\""}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"Module[{w,e,x,h,q,d,rows},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];q=Map[Round[16 #]&,h,{2}];d=q.e/16;rows=Table[<|\"bits\"->x[[i]],\"bytes\"->Mod[q[[i]],256]|>,{i,16}];ExportString[<|\"scale\"->1/16,\"zero\"->0,\"maximum_feature_error_exact\"->ToString[FullSimplify[Max[Abs[Flatten[d-x]]]],InputForm],\"all_bits_recover\"->(Map[Which[Abs[#]<=1/16,0,Abs[#-1]<=1/16,1,True,-1]&,d,{2}]===x),\"rows\"->rows|>,\"RawJSON\"]]"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= \"{\\n\\t\\\"scale\\\":6.25e-2,\\n\\t\\\"zero\\\":0,\\n\\t\\\"maximum_feature_error_exact\\\":\\\"-1 + 3\\\\/(2*Sqrt[2])\\\",\\n\\t\\\"all_bits_recover\\\":true,\\n\\t\\\"rows\\\":[\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245,\\n\\t\\t\\t\\t11,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t245\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t0\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t17,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t6,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t250,\\n\\t\\t\\t\\t239\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"bits\\\":[\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1,\\n\\t\\t\\t\\t1\\n\\t\\t\\t],\\n\\t\\t\\t\\\"bytes\\\":[\\n\\t\\t\\t\\t23,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t0,\\n\\t\\t\\t\\t233\\n\\t\\t\\t]\\n\\t\\t}\\n\\t]\\n}\""}],"provider":"native","providerName":"OMP"}}}},"isError":false} diff --git a/neuralese/nl4-wolfram-oracle.jsonl b/neuralese/nl4-wolfram-oracle.jsonl new file mode 100644 index 000000000..f9a30f436 --- /dev/null +++ b/neuralese/nl4-wolfram-oracle.jsonl @@ -0,0 +1,10 @@ +{"type":"tool_execution_start","toolCallId":"toolu_0152FbLJ8TFccssSF4xCMmjf","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","content":"{\"code\":\"{Integrate[x^2,{x,0,1}], Sqrt[27]/2}\"}"},"intent":"Verifying Integrate and sqrt"} +{"type":"tool_execution_end","toolCallId":"toolu_0152FbLJ8TFccssSF4xCMmjf","toolName":"write","result":{"content":[{"type":"text","text":"Out[1]= {1/3, (3*Sqrt[3])/2}"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"{Integrate[x^2,{x,0,1}], Sqrt[27]/2}"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= {1/3, (3*Sqrt[3])/2}"}],"provider":"native","providerName":"OMP"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"toolu_01PePD4JDFVWeVMNmiTniNgt","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframalpha","content":"{\"input\":\"sqrt(27)/2\"}"},"intent":"Verifying Alpha sqrt"} +{"type":"tool_execution_end","toolCallId":"toolu_01PePD4JDFVWeVMNmiTniNgt","toolName":"write","result":{"content":[{"type":"text","text":"\n\n# Input\n\nsqrt(27)/2\n\n# Result\n\n(3 sqrt(3))/2\n\n# Decimal approximation\n\n2.5980762113533159402911695122588085504142078807155709420837104691...\n\n# Number line\n\n![Number line](https://public6.wolframalpha.com/files/GIF_u99hfypa9h.gif)\n\n# Continued fraction\n\n[2; 1, 1, 2, 20, 2, 1, 1, 4^\\_]\n\n"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframalpha","mode":"execute","args":{"query":"sqrt(27)/2"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframAlpha","rawContent":[{"type":"text","text":"\n\n# Input\n\nsqrt(27)/2\n\n# Result\n\n(3 sqrt(3))/2\n\n# Decimal approximation\n\n2.5980762113533159402911695122588085504142078807155709420837104691...\n\n# Number line\n\n![Number line](https://public6.wolframalpha.com/files/GIF_u99hfypa9h.gif)\n\n# Continued fraction\n\n[2; 1, 1, 2, 20, 2, 1, 1, 4^\\_]\n\n"}],"provider":"native","providerName":"OMP"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"toolu_01GyHT2J8qVco4VZcjhPowG8","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","content":"{\"code\":\"W=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];\\nEm=W[[All,{2,3,5,8}]]/Sqrt[8];\\nX=Tuples[{0,1},4];\\nH=X.Transpose[Em];\\nrec=H.Em-X;\\nbytes=ExportByteArray[N[Flatten[H],50],\\\"Real32\\\"];\\nf32=ImportByteArray[bytes,\\\"Real32\\\"];\\nf32m=Partition[f32,8];\\nf32back=f32m.Em;\\npol[v_]:=If[Abs[v]<=1/16,0,If[Abs[v-1]<=1/16,1,Refuse]];\\nrecov=Map[pol,f32back,{2}];\\nerr=Max[Abs[f32back-X]];\\nerrExactH=Max[Abs[N[H,50].N[Em,50]-N[X,50]]];\\napprox=Round[N[H,50]*2^24]/2^24;\\n{\\\"W\\\"->W,\\\"Em\\\"->Em,\\\"EtE\\\"->Simplify[Transpose[Em].Em],\\\"NH18\\\"->N[H,18],\\\"rec\\\"->rec,\\\"bytesLen\\\"->Length[bytes],\\\"f32\\\"->f32m,\\\"f32 vs N[H,50] max diff\\\"->Max[Abs[f32m-N[H,50]]],\\\"f32back\\\"->f32back,\\\"recovered==X\\\"->(recov===X),\\\"maxRecErr\\\"->{err,N[err,18]},\\\"errExactH\\\"->errExactH,\\\"approxMaxErr\\\"->Max[Abs[approx.N[Em,50]-X]]}\"}"},"intent":"Running main computation"} +{"type":"tool_execution_end","toolCallId":"toolu_01GyHT2J8qVco4VZcjhPowG8","toolName":"write","result":{"content":[{"type":"text","text":"Symbol::undefined2: Warning: Global symbols \"W, Em, W, X, H, X, Em, H, Em, X, H, Em, Refuse, X, H, Em, X, H, W, Em, Em, Em, H, H, X, Em, X\" are undefined.\nGeneral::messages: Messages were generated which may indicate errors.\n\nOut[1]= {\"W\" -> {{1, 1, 1, 1, 1, 1, 1, 1}, {1, -1, 1, -1, 1, -1, 1, -1}, {1, 1, -1, -1, 1, 1, -1, -1}, {1, -1, -1, 1, 1, -1, -1, 1}, {1, 1, 1, 1, -1, -1, -1, -1}, {1, -1, 1, -1, -1, 1, -1, 1}, {1, 1, -1, -1, -1, -1, 1, 1}, {1, -1, -1, 1, -1, 1, 1, -1}}, \"Em\" -> {{1/(2*Sqrt[2]), 1/(2*Sqrt[2]), 1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2]), 1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2], 1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2], 1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/(2*Sqrt[2]), -1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2]), -1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2], -1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2], -1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}}, \"EtE\" -> {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}, \"NH18\" -> {{0, 0, 0, 0, 0, 0, 0, 0}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, -0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0, 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.41421356237309504880168872420969807857`18., 0, 0, 0, 0, 0, 0, -1.41421356237309504880168872420969807857`18.}}, \"rec\" -> {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \"bytesLen\" -> 512, \"f32\" -> {{0., 0., 0., 0., 0., 0., 0., 0.}, {0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., 0., 0.7071067690849304, -0.7071067690849304, 0., 0., -0.7071067690849304}, {0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., -0.7071067690849304, 0., 0., 0.7071067690849304, 0., -0.7071067690849304}, {0.7071067690849304, 0.7071067690849304, 0., 0., 0., 0., -0.7071067690849304, -0.7071067690849304}, {1.0606601238250732, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, -0.7071067690849304, 0., 0., 0., 0., 0.7071067690849304, -0.7071067690849304}, {0.7071067690849304, 0., 0.7071067690849304, 0., 0., -0.7071067690849304, 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {0.7071067690849304, 0., 0., -0.7071067690849304, 0.7071067690849304, 0., 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {1.0606601238250732, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {1.4142135381698608, 0., 0., 0., 0., 0., 0., -1.4142135381698608}}, \"f32 vs N[H,50] max diff\" -> 4.795474795038501*^-8, \"f32back\" -> {{0., 0., 0., 0.}, {-1.6319611741181194*^-18, -1.6319611741181194*^-18, -1.6319611741181194*^-18, 0.9999999828857289}, {-1.6319611741181194*^-18, -1.6319611741181194*^-18, 0.9999999828857289, -1.6319611741181194*^-18}, {-3.2639223482362387*^-18, -3.2639223482362387*^-18, 0.9999999828857288, 0.9999999828857288}, {-1.6319611741181194*^-18, 0.9999999828857289, -1.6319611741181194*^-18, -1.6319611741181194*^-18}, {-3.2639223482362387*^-18, 0.9999999828857288, -3.2639223482362387*^-18, 0.9999999828857288}, {-3.2639223482362387*^-18, 0.9999999828857288, 0.9999999828857288, -3.2639223482362387*^-18}, {-2.107342421879263*^-8, 0.9999999618123047, 0.9999999618123047, 0.9999999618123047}, {0.9999999828857289, -1.6319611741181194*^-18, -1.6319611741181194*^-18, -1.6319611741181194*^-18}, {0.9999999828857288, -3.2639223482362387*^-18, -3.2639223482362387*^-18, 0.9999999828857288}, {0.9999999828857288, -3.2639223482362387*^-18, 0.9999999828857288, -3.2639223482362387*^-18}, {0.9999999618123047, -2.107342421879263*^-8, 0.9999999618123047, 0.9999999618123047}, {0.9999999828857288, 0.9999999828857288, -3.2639223482362387*^-18, -3.2639223482362387*^-18}, {0.9999999618123047, 0.9999999618123047, -2.107342421879263*^-8, 0.9999999618123047}, {0.9999999618123047, 0.9999999618123047, 0.9999999618123047, -2.107342421879263*^-8}, {0.9999999828857289, 0.9999999828857289, 0.9999999828857289, 0.9999999828857289}}, \"recovered==X\" -> True, \"maxRecErr\" -> {3.818769533925348*^-8, 3.818769533925348*^-8}, \"errExactH\" -> 0``49.39794000867204, \"approxMaxErr\" -> 6.717942598598768073409183763625182695653494251044677102016029795448143`42.827236259520475*^-8}"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"W=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];\nEm=W[[All,{2,3,5,8}]]/Sqrt[8];\nX=Tuples[{0,1},4];\nH=X.Transpose[Em];\nrec=H.Em-X;\nbytes=ExportByteArray[N[Flatten[H],50],\"Real32\"];\nf32=ImportByteArray[bytes,\"Real32\"];\nf32m=Partition[f32,8];\nf32back=f32m.Em;\npol[v_]:=If[Abs[v]<=1/16,0,If[Abs[v-1]<=1/16,1,Refuse]];\nrecov=Map[pol,f32back,{2}];\nerr=Max[Abs[f32back-X]];\nerrExactH=Max[Abs[N[H,50].N[Em,50]-N[X,50]]];\napprox=Round[N[H,50]*2^24]/2^24;\n{\"W\"->W,\"Em\"->Em,\"EtE\"->Simplify[Transpose[Em].Em],\"NH18\"->N[H,18],\"rec\"->rec,\"bytesLen\"->Length[bytes],\"f32\"->f32m,\"f32 vs N[H,50] max diff\"->Max[Abs[f32m-N[H,50]]],\"f32back\"->f32back,\"recovered==X\"->(recov===X),\"maxRecErr\"->{err,N[err,18]},\"errExactH\"->errExactH,\"approxMaxErr\"->Max[Abs[approx.N[Em,50]-X]]}"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Symbol::undefined2: Warning: Global symbols \"W, Em, W, X, H, X, Em, H, Em, X, H, Em, Refuse, X, H, Em, X, H, W, Em, Em, Em, H, H, X, Em, X\" are undefined.\nGeneral::messages: Messages were generated which may indicate errors.\n\nOut[1]= {\"W\" -> {{1, 1, 1, 1, 1, 1, 1, 1}, {1, -1, 1, -1, 1, -1, 1, -1}, {1, 1, -1, -1, 1, 1, -1, -1}, {1, -1, -1, 1, 1, -1, -1, 1}, {1, 1, 1, 1, -1, -1, -1, -1}, {1, -1, 1, -1, -1, 1, -1, 1}, {1, 1, -1, -1, -1, -1, 1, 1}, {1, -1, -1, 1, -1, 1, 1, -1}}, \"Em\" -> {{1/(2*Sqrt[2]), 1/(2*Sqrt[2]), 1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2]), 1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2], 1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2], 1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/(2*Sqrt[2]), -1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2]), -1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2], -1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2], -1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}}, \"EtE\" -> {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}, \"NH18\" -> {{0, 0, 0, 0, 0, 0, 0, 0}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, -0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0, 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.41421356237309504880168872420969807857`18., 0, 0, 0, 0, 0, 0, -1.41421356237309504880168872420969807857`18.}}, \"rec\" -> {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \"bytesLen\" -> 512, \"f32\" -> {{0., 0., 0., 0., 0., 0., 0., 0.}, {0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., 0., 0.7071067690849304, -0.7071067690849304, 0., 0., -0.7071067690849304}, {0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., -0.7071067690849304, 0., 0., 0.7071067690849304, 0., -0.7071067690849304}, {0.7071067690849304, 0.7071067690849304, 0., 0., 0., 0., -0.7071067690849304, -0.7071067690849304}, {1.0606601238250732, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, -0.7071067690849304, 0., 0., 0., 0., 0.7071067690849304, -0.7071067690849304}, {0.7071067690849304, 0., 0.7071067690849304, 0., 0., -0.7071067690849304, 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {0.7071067690849304, 0., 0., -0.7071067690849304, 0.7071067690849304, 0., 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {1.0606601238250732, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {1.4142135381698608, 0., 0., 0., 0., 0., 0., -1.4142135381698608}}, \"f32 vs N[H,50] max diff\" -> 4.795474795038501*^-8, \"f32back\" -> {{0., 0., 0., 0.}, {-1.6319611741181194*^-18, -1.6319611741181194*^-18, -1.6319611741181194*^-18, 0.9999999828857289}, {-1.6319611741181194*^-18, -1.6319611741181194*^-18, 0.9999999828857289, -1.6319611741181194*^-18}, {-3.2639223482362387*^-18, -3.2639223482362387*^-18, 0.9999999828857288, 0.9999999828857288}, {-1.6319611741181194*^-18, 0.9999999828857289, -1.6319611741181194*^-18, -1.6319611741181194*^-18}, {-3.2639223482362387*^-18, 0.9999999828857288, -3.2639223482362387*^-18, 0.9999999828857288}, {-3.2639223482362387*^-18, 0.9999999828857288, 0.9999999828857288, -3.2639223482362387*^-18}, {-2.107342421879263*^-8, 0.9999999618123047, 0.9999999618123047, 0.9999999618123047}, {0.9999999828857289, -1.6319611741181194*^-18, -1.6319611741181194*^-18, -1.6319611741181194*^-18}, {0.9999999828857288, -3.2639223482362387*^-18, -3.2639223482362387*^-18, 0.9999999828857288}, {0.9999999828857288, -3.2639223482362387*^-18, 0.9999999828857288, -3.2639223482362387*^-18}, {0.9999999618123047, -2.107342421879263*^-8, 0.9999999618123047, 0.9999999618123047}, {0.9999999828857288, 0.9999999828857288, -3.2639223482362387*^-18, -3.2639223482362387*^-18}, {0.9999999618123047, 0.9999999618123047, -2.107342421879263*^-8, 0.9999999618123047}, {0.9999999618123047, 0.9999999618123047, 0.9999999618123047, -2.107342421879263*^-8}, {0.9999999828857289, 0.9999999828857289, 0.9999999828857289, 0.9999999828857289}}, \"recovered==X\" -> True, \"maxRecErr\" -> {3.818769533925348*^-8, 3.818769533925348*^-8}, \"errExactH\" -> 0``49.39794000867204, \"approxMaxErr\" -> 6.717942598598768073409183763625182695653494251044677102016029795448143`42.827236259520475*^-8}"}],"provider":"native","providerName":"OMP"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"toolu_01Ms9Qyf3PnDhjKGmVTMcHex","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","code":"x","content":"{\"code\":\"W=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];Em=W[[All,{2,3,5,8}]]/Sqrt[8];X=Tuples[{0,1},4];H=X.Transpose[Em];\\nf32m=Partition[ImportByteArray[ExportByteArray[N[Flatten[H],50],\\\"Real32\\\"],\\\"Real32\\\"],8];\\nback=f32m.Em;\\npol[v_]:=If[Abs[v]<=1/16,0,If[Abs[v-1]<=1/16,1,Refuse]];\\nbits=Map[pol,back,{2}];\\ndec[{b0_,b1_,b2_,b3_}]:=Module[{op=b0+2b1,o=b2+2b3},Which[op==0,\\\"REFUSE\\\",op==1,o+1,op==2,o*2,op==3,o]];\\n{\\\"bits==X\\\"->(bits===X),\\\"maxErr\\\"->Max[Abs[back-X]],\\\"table\\\"->Table[{X[[i]],\\\"op\\\"->X[[i,1]]+2X[[i,2]],\\\"operand\\\"->X[[i,3]]+2X[[i,4]],\\\"result\\\"->dec[bits[[i]]]},{i,16}]}\"}"},"intent":"Computing decode table"} +{"type":"tool_execution_end","toolCallId":"toolu_01Ms9Qyf3PnDhjKGmVTMcHex","toolName":"write","result":{"content":[{"type":"text","text":"Symbol::undefined2: Warning: Global symbols \"W, Em, W, X, H, X, Em, H, Em, Refuse, X, X, X, X, X, X, X\" are undefined.\nGeneral::messages: Messages were generated which may indicate errors.\n\nOut[1]= {\"bits==X\" -> True, \"maxErr\" -> 3.818769533925348*^-8, \"table\" -> {{{0, 0, 0, 0}, \"op\" -> 0, \"operand\" -> 0, \"result\" -> \"REFUSE\"}, {{0, 0, 0, 1}, \"op\" -> 0, \"operand\" -> 2, \"result\" -> \"REFUSE\"}, {{0, 0, 1, 0}, \"op\" -> 0, \"operand\" -> 1, \"result\" -> \"REFUSE\"}, {{0, 0, 1, 1}, \"op\" -> 0, \"operand\" -> 3, \"result\" -> \"REFUSE\"}, {{0, 1, 0, 0}, \"op\" -> 2, \"operand\" -> 0, \"result\" -> 0}, {{0, 1, 0, 1}, \"op\" -> 2, \"operand\" -> 2, \"result\" -> 4}, {{0, 1, 1, 0}, \"op\" -> 2, \"operand\" -> 1, \"result\" -> 2}, {{0, 1, 1, 1}, \"op\" -> 2, \"operand\" -> 3, \"result\" -> 6}, {{1, 0, 0, 0}, \"op\" -> 1, \"operand\" -> 0, \"result\" -> 1}, {{1, 0, 0, 1}, \"op\" -> 1, \"operand\" -> 2, \"result\" -> 3}, {{1, 0, 1, 0}, \"op\" -> 1, \"operand\" -> 1, \"result\" -> 2}, {{1, 0, 1, 1}, \"op\" -> 1, \"operand\" -> 3, \"result\" -> 4}, {{1, 1, 0, 0}, \"op\" -> 3, \"operand\" -> 0, \"result\" -> 0}, {{1, 1, 0, 1}, \"op\" -> 3, \"operand\" -> 2, \"result\" -> 2}, {{1, 1, 1, 0}, \"op\" -> 3, \"operand\" -> 1, \"result\" -> 1}, {{1, 1, 1, 1}, \"op\" -> 3, \"operand\" -> 3, \"result\" -> 3}}}"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"W=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];Em=W[[All,{2,3,5,8}]]/Sqrt[8];X=Tuples[{0,1},4];H=X.Transpose[Em];\nf32m=Partition[ImportByteArray[ExportByteArray[N[Flatten[H],50],\"Real32\"],\"Real32\"],8];\nback=f32m.Em;\npol[v_]:=If[Abs[v]<=1/16,0,If[Abs[v-1]<=1/16,1,Refuse]];\nbits=Map[pol,back,{2}];\ndec[{b0_,b1_,b2_,b3_}]:=Module[{op=b0+2b1,o=b2+2b3},Which[op==0,\"REFUSE\",op==1,o+1,op==2,o*2,op==3,o]];\n{\"bits==X\"->(bits===X),\"maxErr\"->Max[Abs[back-X]],\"table\"->Table[{X[[i]],\"op\"->X[[i,1]]+2X[[i,2]],\"operand\"->X[[i,3]]+2X[[i,4]],\"result\"->dec[bits[[i]]]},{i,16}]}"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Symbol::undefined2: Warning: Global symbols \"W, Em, W, X, H, X, Em, H, Em, Refuse, X, X, X, X, X, X, X\" are undefined.\nGeneral::messages: Messages were generated which may indicate errors.\n\nOut[1]= {\"bits==X\" -> True, \"maxErr\" -> 3.818769533925348*^-8, \"table\" -> {{{0, 0, 0, 0}, \"op\" -> 0, \"operand\" -> 0, \"result\" -> \"REFUSE\"}, {{0, 0, 0, 1}, \"op\" -> 0, \"operand\" -> 2, \"result\" -> \"REFUSE\"}, {{0, 0, 1, 0}, \"op\" -> 0, \"operand\" -> 1, \"result\" -> \"REFUSE\"}, {{0, 0, 1, 1}, \"op\" -> 0, \"operand\" -> 3, \"result\" -> \"REFUSE\"}, {{0, 1, 0, 0}, \"op\" -> 2, \"operand\" -> 0, \"result\" -> 0}, {{0, 1, 0, 1}, \"op\" -> 2, \"operand\" -> 2, \"result\" -> 4}, {{0, 1, 1, 0}, \"op\" -> 2, \"operand\" -> 1, \"result\" -> 2}, {{0, 1, 1, 1}, \"op\" -> 2, \"operand\" -> 3, \"result\" -> 6}, {{1, 0, 0, 0}, \"op\" -> 1, \"operand\" -> 0, \"result\" -> 1}, {{1, 0, 0, 1}, \"op\" -> 1, \"operand\" -> 2, \"result\" -> 3}, {{1, 0, 1, 0}, \"op\" -> 1, \"operand\" -> 1, \"result\" -> 2}, {{1, 0, 1, 1}, \"op\" -> 1, \"operand\" -> 3, \"result\" -> 4}, {{1, 1, 0, 0}, \"op\" -> 3, \"operand\" -> 0, \"result\" -> 0}, {{1, 1, 0, 1}, \"op\" -> 3, \"operand\" -> 2, \"result\" -> 2}, {{1, 1, 1, 0}, \"op\" -> 3, \"operand\" -> 1, \"result\" -> 1}, {{1, 1, 1, 1}, \"op\" -> 3, \"operand\" -> 3, \"result\" -> 3}}}"}],"provider":"native","providerName":"OMP"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"call_98cdd8d6599a4976875ac3181156b98c|fc_004a5a6f54db84b3016ae201c2bb708192abce50f7d5aec79e","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","content":"{\"code\":\"Module[{w,e,x,h,q,r,err,p,b,weights},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];q=Partition[ImportByteArray[ExportByteArray[N[Flatten[h],50],\\\"Real32\\\"],\\\"Real32\\\"],8];r=Map[Rationalize[#,0]&,q,{2}].e;err=FullSimplify[Max[Abs[Flatten[r-x]]]];p[v_]:=Which[Abs[v]<=1/16,0,Abs[v-1]<=1/16,1,True,\\\"REFUSE\\\"];b=Map[p,r,{2}];weights=e.{{1,0},{2,0},{0,1},{0,2}};{\\\"NH18\\\"->N[h,18],\\\"EtE\\\"->Transpose[e].e,\\\"HEmMinusX\\\"->h.e-x,\\\"F32Rows\\\"->q,\\\"ExactOracleMaxError\\\"->err,\\\"ExactOracleMaxErrorDecimal\\\"->N[err,18],\\\"RecoveredAll16\\\"->(b===x),\\\"OpcodeOperandAffineWeights\\\"->weights,\\\"ResultAffineWeightsOp1Op2Op3\\\"->Transpose[{weights[[All,2]],2weights[[All,2]],weights[[All,2]]}],\\\"ResultBiases\\\"->{1,0,0}}]\"}"},"intent":"Verifying exact quantized oracle"} +{"type":"tool_execution_end","toolCallId":"call_98cdd8d6599a4976875ac3181156b98c|fc_004a5a6f54db84b3016ae201c2bb708192abce50f7d5aec79e","toolName":"write","result":{"content":[{"type":"text","text":"Out[1]= {\"NH18\" -> {{0, 0, 0, 0, 0, 0, 0, 0}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, -0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0, 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.41421356237309504880168872420969807857`18., 0, 0, 0, 0, 0, 0, -1.41421356237309504880168872420969807857`18.}}, \"EtE\" -> {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}, \"HEmMinusX\" -> {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \"F32Rows\" -> {{0., 0., 0., 0., 0., 0., 0., 0.}, {0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., 0., 0.7071067690849304, -0.7071067690849304, 0., 0., -0.7071067690849304}, {0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., -0.7071067690849304, 0., 0., 0.7071067690849304, 0., -0.7071067690849304}, {0.7071067690849304, 0.7071067690849304, 0., 0., 0., 0., -0.7071067690849304, -0.7071067690849304}, {1.0606601238250732, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, -0.7071067690849304, 0., 0., 0., 0., 0.7071067690849304, -0.7071067690849304}, {0.7071067690849304, 0., 0.7071067690849304, 0., 0., -0.7071067690849304, 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {0.7071067690849304, 0., 0., -0.7071067690849304, 0.7071067690849304, 0., 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {1.0606601238250732, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {1.4142135381698608, 0., 0., 0., 0., 0., 0., -1.4142135381698608}}, \"ExactOracleMaxError\" -> 1 - 47453131/(33554432*Sqrt[2]), \"ExactOracleMaxErrorDecimal\" -> 3.818769529124739873333058246385`18.*^-8, \"RecoveredAll16\" -> True, \"OpcodeOperandAffineWeights\" -> {{3/(2*Sqrt[2]), 3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}, {-3/(2*Sqrt[2]), 3/(2*Sqrt[2])}, {3/(2*Sqrt[2]), -3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/(2*Sqrt[2])}}, \"ResultAffineWeightsOp1Op2Op3\" -> {{3/(2*Sqrt[2]), 3/Sqrt[2], 3/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], -(1/Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -(1/Sqrt[2]), -1/2*1/Sqrt[2]}, {3/(2*Sqrt[2]), 3/Sqrt[2], 3/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/Sqrt[2], -3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/Sqrt[2], 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/Sqrt[2], 1/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/Sqrt[2], -3/(2*Sqrt[2])}}, \"ResultBiases\" -> {1, 0, 0}}"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"Module[{w,e,x,h,q,r,err,p,b,weights},w=Nest[KroneckerProduct[{{1,1},{1,-1}},#]&,{{1}},3];e=w[[All,{2,3,5,8}]]/Sqrt[8];x=Tuples[{0,1},4];h=x.Transpose[e];q=Partition[ImportByteArray[ExportByteArray[N[Flatten[h],50],\"Real32\"],\"Real32\"],8];r=Map[Rationalize[#,0]&,q,{2}].e;err=FullSimplify[Max[Abs[Flatten[r-x]]]];p[v_]:=Which[Abs[v]<=1/16,0,Abs[v-1]<=1/16,1,True,\"REFUSE\"];b=Map[p,r,{2}];weights=e.{{1,0},{2,0},{0,1},{0,2}};{\"NH18\"->N[h,18],\"EtE\"->Transpose[e].e,\"HEmMinusX\"->h.e-x,\"F32Rows\"->q,\"ExactOracleMaxError\"->err,\"ExactOracleMaxErrorDecimal\"->N[err,18],\"RecoveredAll16\"->(b===x),\"OpcodeOperandAffineWeights\"->weights,\"ResultAffineWeightsOp1Op2Op3\"->Transpose[{weights[[All,2]],2weights[[All,2]],weights[[All,2]]}],\"ResultBiases\"->{1,0,0}}]"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= {\"NH18\" -> {{0, 0, 0, 0, 0, 0, 0, 0}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18., 0, 0, 0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, -0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18.}, {0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18., 0, 0, 0, 0, 0.70710678118654752440084436210484903928`18., -0.70710678118654752440084436210484903928`18.}, {0.70710678118654752440084436210484903928`18., 0, 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18., 0.70710678118654752440084436210484903928`18., 0, 0, -0.70710678118654752440084436210484903928`18.}, {1.06066017177982128660126654315727355893`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.06066017177982128660126654315727355893`18., 0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., 0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -0.35355339059327376220042218105242451964`18., -1.06066017177982128660126654315727355893`18.}, {1.41421356237309504880168872420969807857`18., 0, 0, 0, 0, 0, 0, -1.41421356237309504880168872420969807857`18.}}, \"EtE\" -> {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}, \"HEmMinusX\" -> {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \"F32Rows\" -> {{0., 0., 0., 0., 0., 0., 0., 0.}, {0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., 0., 0.7071067690849304, -0.7071067690849304, 0., 0., -0.7071067690849304}, {0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, 0., -0.7071067690849304, 0., 0., 0.7071067690849304, 0., -0.7071067690849304}, {0.7071067690849304, 0.7071067690849304, 0., 0., 0., 0., -0.7071067690849304, -0.7071067690849304}, {1.0606601238250732, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652}, {0.7071067690849304, -0.7071067690849304, 0., 0., 0., 0., 0.7071067690849304, -0.7071067690849304}, {0.7071067690849304, 0., 0.7071067690849304, 0., 0., -0.7071067690849304, 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {0.7071067690849304, 0., 0., -0.7071067690849304, 0.7071067690849304, 0., 0., -0.7071067690849304}, {1.0606601238250732, -0.3535533845424652, -0.3535533845424652, -0.3535533845424652, 0.3535533845424652, 0.3535533845424652, 0.3535533845424652, -1.0606601238250732}, {1.0606601238250732, 0.3535533845424652, 0.3535533845424652, -0.3535533845424652, 0.3535533845424652, -0.3535533845424652, -0.3535533845424652, -1.0606601238250732}, {1.4142135381698608, 0., 0., 0., 0., 0., 0., -1.4142135381698608}}, \"ExactOracleMaxError\" -> 1 - 47453131/(33554432*Sqrt[2]), \"ExactOracleMaxErrorDecimal\" -> 3.818769529124739873333058246385`18.*^-8, \"RecoveredAll16\" -> True, \"OpcodeOperandAffineWeights\" -> {{3/(2*Sqrt[2]), 3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -1/2*1/Sqrt[2]}, {-3/(2*Sqrt[2]), 3/(2*Sqrt[2])}, {3/(2*Sqrt[2]), -3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], 1/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/(2*Sqrt[2])}}, \"ResultAffineWeightsOp1Op2Op3\" -> {{3/(2*Sqrt[2]), 3/Sqrt[2], 3/(2*Sqrt[2])}, {-1/2*1/Sqrt[2], -(1/Sqrt[2]), -1/2*1/Sqrt[2]}, {-1/2*1/Sqrt[2], -(1/Sqrt[2]), -1/2*1/Sqrt[2]}, {3/(2*Sqrt[2]), 3/Sqrt[2], 3/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/Sqrt[2], -3/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/Sqrt[2], 1/(2*Sqrt[2])}, {1/(2*Sqrt[2]), 1/Sqrt[2], 1/(2*Sqrt[2])}, {-3/(2*Sqrt[2]), -3/Sqrt[2], -3/(2*Sqrt[2])}}, \"ResultBiases\" -> {1, 0, 0}}"}],"provider":"native","providerName":"OMP"}}}},"isError":false} diff --git a/neuralese/nl4-wolfram-verification.jsonl b/neuralese/nl4-wolfram-verification.jsonl new file mode 100644 index 000000000..815df29e3 --- /dev/null +++ b/neuralese/nl4-wolfram-verification.jsonl @@ -0,0 +1,4 @@ +{"type":"tool_execution_start","toolCallId":"toolu_01WmSa2JBXVgV7LiyPPwiTHY","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframlanguageevaluator","content":"{\"code\":\"Integrate[x^2,{x,0,1}]\"}"},"intent":"Evaluating integral"} +{"type":"tool_execution_end","toolCallId":"toolu_01WmSa2JBXVgV7LiyPPwiTHY","toolName":"write","result":{"content":[{"type":"text","text":"Out[1]= 1/3"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframlanguageevaluator","mode":"execute","args":{"code":"Integrate[x^2,{x,0,1}]"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframLanguageEvaluator","rawContent":[{"type":"text","text":"Out[1]= 1/3"}],"provider":"native","providerName":"OMP"}}}},"isError":false} +{"type":"tool_execution_start","toolCallId":"toolu_01LrokBieiCFQxtm7EAF9BXR","toolName":"write","args":{"path":"xd://mcp__wolfram_wolframalpha","content":"{\"query\":\"sqrt(27)/2\"}"},"intent":"Querying WolframAlpha"} +{"type":"tool_execution_end","toolCallId":"toolu_01LrokBieiCFQxtm7EAF9BXR","toolName":"write","result":{"content":[{"type":"text","text":"\n\n# Input\n\nsqrt(27)/2\n\n# Result\n\n(3 sqrt(3))/2\n\n# Decimal approximation\n\n2.5980762113533159402911695122588085504142078807155709420837104691...\n\n# Number line\n\n![Number line](https://public6.wolframalpha.com/files/GIF_u7pdy61w3m.gif)\n\n# Continued fraction\n\n[2; 1, 1, 2, 20, 2, 1, 1, 4^\\_]\n\n"}],"details":{"xdev":{"tool":"mcp__wolfram_wolframalpha","mode":"execute","args":{"query":"sqrt(27)/2"},"tier":"write","readOnlyHint":true,"inner":{"serverName":"wolfram","mcpToolName":"WolframAlpha","rawContent":[{"type":"text","text":"\n\n# Input\n\nsqrt(27)/2\n\n# Result\n\n(3 sqrt(3))/2\n\n# Decimal approximation\n\n2.5980762113533159402911695122588085504142078807155709420837104691...\n\n# Number line\n\n![Number line](https://public6.wolframalpha.com/files/GIF_u7pdy61w3m.gif)\n\n# Continued fraction\n\n[2; 1, 1, 2, 20, 2, 1, 1, 4^\\_]\n\n"}],"provider":"native","providerName":"OMP"}}}},"isError":false} diff --git a/neuralese/proposal.om b/neuralese/proposal.om new file mode 100644 index 000000000..212e777c2 --- /dev/null +++ b/neuralese/proposal.om @@ -0,0 +1,155 @@ +note SPDX-License-Identifier: Apache-2.0 +note NL4 consumes NL3 lpvalid and NL1 nddec; neither is execution authority. +note Caller must run lpvalid against receiver-owned context before this decoder. +note No host words, executable payload, capability, allocation from input or effects. +note Concatenate after an om2 debug entry, NL1 hadamard.om and NL3 validator.om. +fn nlencode f view f64 4 wire edit uchar 32 to int +stage = new uint 8 0 +for i ulong 4 +if not and ge get f i 0.0f64 le get f i 1.0f64 +ret 50 +end +end +for i ulong 8 +v = 0.0f64 +for j ulong 4 +v = add v mul get f j ndelem i j +end +put stage i bitcast uint f32 v +end +for i ulong 8 +u = get stage i +off = mul i 4 +for j ulong 4 +sh = mul sub ulong 3 j 8 +c = uchar and shr u sh 255 +put wire add off j c +end +end +ret 0 +end +fn nlbe32 a view uchar * off ulong to uint +v = uint 0 +for i ulong 4 +v = or shl v 8 uint get a add off i +end +ret v +end +fn nlbit v f64 to int +note Closed synthetic codebook tolerance; ambiguous and nonfinite scores refuse. +if and ge v -0.0625f64 le v 0.0625f64 +ret 0 +end +if and ge v 0.9375f64 le v 1.0625f64 +ret 1 +end +ret -1 +end +fn nlproposal a view uchar * p edit uint 16 to int +note This function proposes only; it does not validate context, reserve or execute. +b = new uint 4 0 +if lt len a 1024 +ret 40 +end +if ne get a 5 1 +ret 41 +end +dtype = get a 10 +width = uint 4 +if eq dtype 2 +width = 1 +else +if ne dtype 1 +ret 41 +end +end +if ne len a add ulong 1024 ulong mul width 8 +ret 40 +end +if or ne get a 11 1 ne nlbe32 a 24 8 +ret 42 +end +if or ne nlbe32 a 16 mul width 8 ne nlbe32 a 20 8 +ret 42 +end +if ne get a 101 0 +ret 43 +end +if lt nlbe32 a 104 1 +ret 44 +end +factor = 1.0f64 +zero = int 0 +if eq dtype 2 +scale = nlbe32 a 56 +zero = bitcast int nlbe32 a 60 +if or eq scale 0 ge scale 0x7f800000 +ret 45 +end +if or lt zero -128 gt zero 127 +ret 45 +end +factor = f64 bitcast f32 scale +end +for i ulong 8 +if eq dtype 1 +u = nlbe32 a add 1024 mul i 4 +note Exponent255 includes every NaN and infinity, without floating comparison. +if eq and shr u 23 255 255 +ret 45 +end +put NM i f64 bitcast f32 u +else +q = int get a add 1024 i +if ge q 128 +q = sub q 256 +end +put NM i mul f64 sub q zero factor +end +end +r = nddec 8 +if ne r 0 +ret 46 +end +for i ulong 4 +v = nlbit get NF i +if lt v 0 +ret 47 +end +put b i uint v +end +op = add get b 0 mul get b 1 2 +if eq op 0 +ret 48 +end +arg = add get b 2 mul get b 3 2 +note All checks precede output writes: refusal preserves the caller's proposal. +for i ulong 16 +put p i 0 +end +put p 0 op +put p 1 arg +if eq op 1 +put p 2 1 +end +if eq op 2 +put p 2 2 +end +put p 3 1 +put p 4 1 +put p 5 1 +put p 6 4 +put p 7 1 +put p 8 0 +put p 9 1 +ret 0 +end +fn nlmatch p view uint 16 e view uint 16 to bool +note Independent receiver expectation, never sourced from the numerical message. +for i ulong 16 +if ne get p i get e i +ret false +end +end +ret true +end diff --git a/om/aarch64/README.md b/om/aarch64/README.md new file mode 100644 index 000000000..2825632f4 --- /dev/null +++ b/om/aarch64/README.md @@ -0,0 +1,192 @@ +# om/aarch64: the legacy AArch64 writer, decoder and validator in seeded Omega + +`aarch64.om` ports two C files of the product to seeded Omega (aien-dev/omega-mv#726, +aien-dev/aien-architecture-mv#300/#316): + +| C | what it does | Omega functions | +|---|---|---| +| `src/aarch64_encoder.c` (+ `aarch64_encoder.h`) | the 25 `aarch64_emit_*` writers: range checks, refusal, word formula, little-endian store | `a64addreg` … `a64subsreg` (one per emitter), `a64put` | +| `src/aarch64_decoder.c` (+ `aarch64_decoder.h`) | `aarch64_decode_instruction`, `aarch64_validate_code_buffer` | `a64decode`, `a64validate` | +| `src/aarch64_target.h` | `Aarch64Reg`, `Aarch64Cond`, `AARCH64_MAX_CODE_BYTES` | the same values (tables below) | + +The C is unchanged. This change adds the port and its parity evidence. Removing the C objects goes +through the omega-bridge native call ABI (omega-bridge #8) and is not part of it. + +## Where the task text and the files differ + +- There is no `aarch64_core.h`. The headers are `aarch64_encoder.h`, `aarch64_decoder.h` and + `aarch64_target.h`. +- The decoder file also holds `aarch64_validate_code_buffer`, which callers use (`omega_verify.c`, + `visor_realization.c`); it is ported too, with its `snprintf` messages byte for byte. +- The encoder has no error codes for bad fields. An out-of-range field makes the C print + `A64_LEGACY_FIELD_OUT_OF_RANGE =` on stderr and `abort()`. The only error + result is -1 for a full buffer. The port returns a refusal code instead (see ABI), and the parity + harness prints the C's exact stderr line from it. +- "Round trip encode→decode→encode identical" holds for 14 of the 25 emitters only. The C decoder + drops fields for the other 11: ADR returns only `rd`; LDR/STR return `sf rd rn` but no offset and do + not tell the unsigned-offset form from the post-index form; LDRB/STRB return `rd rn` only; SUBS + returns `sf rd rn rm` and does not tell the immediate form from the register form. For those 11 the + harness checks instead that the decode gives the expected op and every field it carries equals the + emitter input (mark `~`). + +## Enum and numbering tables (value-compatible with the C headers) + +`DecodedOp` (`out 0` of `a64decode`): 0 INVALID, 1 ADD, 2 SUB, 3 MUL, 4 AND, 5 ORR, 6 EOR, 7 MOVZ, +8 RET, 9 B, 10 B_COND, 11 CBZ, 12 CBNZ, 13 MOVK, 14 ADR, 15 LDR, 16 STR, 17 LDRB, 18 STRB, 19 SUBS. + +`Aarch64Cond`: 0 EQ, 1 NE, 2 CS, 3 CC, 4 MI, 5 PL, 6 VS, 7 VC, 8 HI, 9 LS, 10 GE, 11 LT, 12 GT, +13 LE, 14 AL; the emitter also accepts 15 (NV), as the C does (`CHECK_COND` is 0..15). + +`Aarch64Reg`: `REG_X0`..`REG_X30` = 0..30, `REG_XZR` = `REG_SP` = 31. `AARCH64_MAX_CODE_BYTES` = 4096. + +`DecodedInsn` as `out edit ulong 9`, in struct order: 0 `op`, 1 `sf`, 2 `rd`, 3 `rn`, 4 `rm`, +5 `imm16`, 6 `hw`, 7 `branch_imm`, 8 `cond`. + +Emitter form numbers (corpus and harness only; the order of `aarch64_encoder.h`): 1 add_reg, 2 sub_reg, +3 mul_reg, 4 and_reg, 5 orr_reg, 6 eor_reg, 7 mov_reg, 8 movz, 9 ret, 10 b, 11 b_cond, 12 cbz, 13 cbnz, +14 movk, 15 adr, 16 ldr_uoff, 17 str_uoff, 18 ldrb_uoff, 19 strb_uoff, 20 ldr_post, 21 str_post, +22 ldr_x_post, 23 str_x_post, 24 subs_imm, 25 subs_reg. + +## ABI (omega-bridge native call ABI v1) + +Every exported function has at most 6 parameters, each `ulong`/`long` or a fixed-length `view`/`edit` +array of `ulong`/`uchar`, and returns `long`. + +| C | Omega | result | +|---|---|---| +| `aarch64_emit_
(buf, &pos, max_len, fields…)` | `a64 fields…` (fields in C order, after `max_len`) | the 32-bit word (0..2^32-1), or refusal code `-(k+1)` | +| `emit_u32_le` (static) | `a64put b(edit uchar 4096) st(edit ulong 2: pos, max_len) w` | `w` itself when `w < 0` (nothing written), else -1 when `pos + 4 > max_len`, else 0 after the store and `pos += 4` | +| `aarch64_decode_instruction(insn, &d)` | `a64decode insn out(edit ulong 9)` | 0, or -1 with `out` all 0 | +| `aarch64_validate_code_buffer(code, len, msg, ml)` | `a64validate code(view uchar 4096) len msg(edit uchar 256) ml` | 0, or -1 with the C's message in `msg` (snprintf rules) | + +So `aarch64_emit_(buf, &pos, max_len, …)` is `a64put b st (a64 …)`. A refusal code names +the first field that fails, in the C's check order: `k` is the field's 1-based position among the +emitter's fields (for `add_reg`: sf 1, rd 2, rn 3, rm 4, so a bad `rn` gives -4). An adapter that keeps +the C behaviour prints `A64_LEGACY_FIELD_OUT_OF_RANGE aarch64_emit_ =` and aborts +on it; -1 stays "buffer full". Field names: the C parameter names (`rd rn rm rt uoff simm9 imm12 imm16 +shift imm19 imm21 imm26 cond`). + +`parity/unit.py aarch64.om NAME` cuts the function-mode unit for `NAME`. All 28 units compile with the +pinned omc in function mode; the pinned generator (`src/native.om` of omega-bridge `012860db`, sha256 +`2c2c53f6…3940`) accepts them and the C it writes compiles with `-Wall -Wextra -Werror`, exporting +`omega_a64addreg` … `omega_a64validate`. In a separate check (a /tmp driver, not in the tree) every +corpus stream was run through those generated bindings; the output was byte-identical to the C oracle's. + +## What the C does, and the port keeps + +- Each emitter checks its fields before it encodes (`CHECK_REG` 0..31, `CHECK_SIGNED`, `CHECK_UMAX`, + `CHECK_COND` 0..15, `CHECK_HW_SHIFT` shift a multiple of 16 up to 48 (sf) or 16, `CHECK_SCALED` uoff + a multiple of 8 (sf) or 4 with uoff/size ≤ 4095). The check comes before the buffer test, so a bad + field is refused even when the buffer is full. `mov_reg` checks `rd` and `rm` under its own name, then + emits `ORR rd, XZR, rm`. +- The decoder tests its patterns in a fixed order and stops at the first match. Its MUL test + (`0x7FE07C00`) ignores bit 15, so `MNEG` (MSUB with XZR) decodes as MUL; the logical/arithmetic tests + ignore the shift type and amount; `branch_imm` is the raw unsigned field, not sign-extended; RET sets + `rn = 30`. +- The validator: an empty buffer, a length that is not a multiple of 4 (`%zu`), the first word that + does not decode (`0x%08x`, offset `0x%zx`), or a last word that is not RET (`op %d`), each with the C's + exact text, truncated the way `snprintf` truncates (at most `ml - 1` bytes and a NUL; nothing for + `ml = 0`). + +## Parity + +Reproduce from a fresh clone (no C oracle needed; the oracle's output is recorded as sha256 in +`parity/expected.txt`): + +``` +OMEGA_OMC=/path/to/seed/out/omc [OMEGA_BRIDGE=/path/to/omega-bridge] sh om/aarch64/parity/run.sh +``` + +It prints `AARCH64-PARITY PASS` in about 20 s on the Spark. `parity/corpus.py` regenerates the corpus +deterministically (splitmix64, fixed seeds, 3,152,381 records, 55 MB, never committed). + +Oracle: `src/aarch64_encoder.c` (sha256 `b892312e…1a17`) and `src/aarch64_decoder.c` (`d9e4bf06…beac`) +at omega-mv `acb3f15c`, compiled with `gcc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -Isrc` +(the Makefile CFLAGS, gcc 13.3.0, aarch64). `.text` sha256: encoder `13296478…1a03`, decoder +`2d14fdbc…c52d`, the same bytes as the `make`-built objects of other worktrees with the same sources. +A /tmp driver (not committed) feeds each stream to these objects. It catches each refusal's `abort()` +by `SIGABRT` → `siglongjmp`, with stderr on a memfd, and the record is the captured stderr line. + +| stream | inputs | words | refusals | result | +|---|---|---|---|---| +| `add_reg` `sub_reg` `mul_reg` `and_reg` `orr_reg` `eor_reg` `subs_reg` (each) | 76,408: **all** sf × rd × rn × rm (65,536), every register field 32..255, 200 random, 10,000 in range | 75,536-75,538 | 870-872 | identical | +| `mov_reg` | 12,696: all sf × rd × rm, rd/rm 32..255, 200 random, 10,000 in range | 12,051 | 645 | identical | +| `movz` `movk` (each) | 216,608: **all** sf × rd(0..255) × shift(0..255), **all** imm16, 10,000 random over the types, 10,000 in range | 75,747 / 75,744 | 140,861 / 140,864 | identical | +| `ret` | 1 | 1 | 0 | identical | +| `b` | 54,585: edges, every imm26 within 4096 of -2^25, 0, 2^25-1, 10,000 random in range, 10,000 over int32, 10,000 in range | 36,559 | 18,026 | identical | +| `b_cond` | 47,183: cond -3..19, 255, 256, int32 ends × imm19 edges, every cond 0..15 × imm19 -512..512, random | 36,674 | 10,509 | identical | +| `cbz` `cbnz` (each) | 44,848: sf × rt(0..255) × imm19 edges, random | 21,088 | 23,760 | identical | +| `adr` | 45,617: rd(0..255) × imm21 edges, imm21 -4096..4096, random | 28,737 | 16,880 | identical | +| `ldr_uoff` `str_uoff` (each) | 206,608: **all** sf × uoff(0..65535), rt × rn(0..255), 10,000 in range | 19,216 | 187,392 | identical | +| `ldrb_uoff` `strb_uoff` (each) | 141,072: **all** uoff, rt × rn(0..255), 10,000 in range | 14,866 / 14,886 | 126,206 / 126,186 | identical | +| `ldr_post` `str_post` `ldr_x_post` `str_x_post` (each) | 141,072: **all** simm9 over int16, rt × rn(0..255), 10,000 in range | 11,282-11,304 | 129,768-129,790 | identical | +| `subs_imm` | 206,608: **all** sf × imm12(0..65535), rd × rn(0..255), 10,000 in range | 19,216 | 187,392 | identical | +| `buf` | 3,201 sequences (50,436 emitter calls) into one buffer: max_len 0..40 × pos 0..max_len+8, edge fits at 4092..4096, max_len 2^63 and 2^64-1, 2,000 random | 25,130 stored, 25,306 buffer full | — | identical (every result, final pos, every byte) | +| `dec` | 462,893 words: 200,000 random; **all** 2^17 values of the 17 bits the decoder tests (mask `0xFFE07C10`), twice each with random other bits; RET and its 32 one-bit flips; each pattern, its full fill and its 32 one-bit flips | — | — | identical (44,410 decode, 418,483 invalid) | +| `val` | 2,181 buffers: every message at ml 0..100, 128, 255, 256; lengths 1..2^64-1 not a multiple of 4; every op as the last word; huge lengths stopped by a bad first word; 1,500 random programs of 1..1024 words | — | — | identical (801 valid, 1,380 refused, msg bytes 0..99) | + +Every encoder record also decodes the word it wrote. Round trip over the 969,015 words: 732,171 +re-encode from the decoded fields to the same word (the 14 forms whose decode carries every field), +236,844 decode to the expected op with every carried field equal (the 11 lossy forms), 0 wrong. + +GNU `as` (2.42, the Spark's `/usr/bin/as`) cross-check, run by `run.sh` when `as` is there: up to 200 +words per form, 4,801 in total over all 25 forms, are written back as assembly text from their fields +and assembled. Every word is identical to the .om's. + +Twenty-three mutants of `aarch64.om` are part of the verdict. Each must change its stream's hash: + +| mutant | records that change | +|---|---| +| add_reg opcode → AND's | add_reg 75,536 | +| rd accepted up to 32 | add_reg 1 | +| mov_reg reports `rm` as field 2 | mov_reg 242 | +| movz sf=1 shift limit 32 | movz 17,673 | +| movk hw at bit 22 | movk 55,578 | +| b accepts imm26 = 2^25 | b 1 | +| b.cond refuses cond 15 | b_cond 2,780 | +| cbz sf at bit 30 | cbz 10,597 | +| adr immlo at bit 28 | adr 21,483 | +| ldr uoff/size up to 4096 | ldr_uoff 2 | +| ldrb uoff up to 4096 | ldrb_uoff 1 | +| post-index simm9 mask 0xFF | ldr_post 5,625 | +| subs_imm sf=1 base 0xEB000000 | subs_imm 9,591 | +| buffer full at `pos + 4 >= max_len` | buf 146 | +| byte 0 of the store wrong | buf 1,742 | +| MUL test includes bit 15 | dec 8 | +| RET `rn` 0 | dec 1 | +| post-index LDR `sf` from bit 31 | dec 140 | +| b.cond `branch_imm` from bit 4 | dec 957 | +| `%08x` as `%07x` | val 82 | +| snprintf keeps `ml` bytes | val 430 | +| RET test on the second-last word | val 1,115 | +| decimal digit off by one | val 659 | + +## Limits + +- **Parameter types.** A value outside the C parameter's type traps 5: `sf` above 1 (bool), a + register or shift above 255 (`uint8_t`), imm16/uoff/imm12 above 65535 (`uint16_t`), simm9 outside + int16, imm19/imm21/imm26/cond outside int32, a decoded word above 2^32-1. The C cannot receive these + values; it narrows them at the call. +- **Refusal.** The port does not print or abort. It returns `-(k+1)`; printing the line and aborting is + the adapter's job (the harness does the printing). +- **Fixed arrays (ABI v1).** `a64put` stores into a 4096-byte buffer (`AARCH64_MAX_CODE_BYTES`). If a store + would go past it (`max_len` above 4096, or `pos + 4` wrapping), the first byte at index 4096 or beyond + traps 3. The C would write out of bounds there. Bytes below 4096 are written before the trap. Callers with smaller C buffers (128, 512, 1024) or + larger ones need an adapter that copies; it is not written here. `a64validate` reads at most 4096 + bytes of code: a length over 4096 whose first 1024 words all decode traps 3, where the C would read + past its caller's buffer (the product callers check `code_len <= 4096` first). Its `msg` is 256 bytes; + `ml` above 256 traps 3 before anything happens. With `ml = SIZE_MAX` the C's glibc `snprintf` drops + the message's last byte (end pointer wrap, depends on the buffer address), so `ml` above 256 is outside the contract. +- **NULL.** `out_dec == NULL` (C returns -1), `code == NULL` and a NULL `err_msg` cannot be expressed; + the adapter keeps those checks. +- **Lossy decode.** The round trip is a word identity only where the C's decode carries every field + (see above). + +## NOT_RUN + +- No GPU, model or serving test: this is host code. +- No `make test`/`make test-compiler`: the C files and every C caller are unchanged + (`tests/compiler/legacy_a64_allowlist.txt` is untouched). +- The C adapters, and the removal of `aarch64_encoder.o`/`aarch64_decoder.o` through omega-bridge #8, + are not done here. +- Only the pinned omc on Linux arm64 (the Spark) was used. diff --git a/om/aarch64/aarch64.om b/om/aarch64/aarch64.om new file mode 100644 index 000000000..2cde22d89 --- /dev/null +++ b/om/aarch64/aarch64.om @@ -0,0 +1,1215 @@ +note SPDX-License-Identifier: Apache-2.0 +note aarch64.om: seeded Omega port of src/aarch64_encoder.c (the legacy AArch64 instruction writer) +note and src/aarch64_decoder.c (its decoder and code-buffer validator), with the enum numbering of +note src/aarch64_target.h and src/aarch64_decoder.h (aien-dev/omega-mv#726). Same words, same +note decode fields, same refusals, same validator messages as the C built with the Makefile CFLAGS. +note +note Exported functions (omega-bridge native call ABI v1: ulong/long scalars, fixed-length +note ulong/uchar arrays, long result). Each a64 returns the 32-bit instruction word the +note matching aarch64_emit_ writes, or a refusal code where the C prints +note A64_LEGACY_FIELD_OUT_OF_RANGE and aborts: -(k+1) when field k (1-based, in the C parameter order +note after max_len) is out of its architectural range, the first such field in the C's check order. +note a64put b st w is the C's emit_u32_le: a refusal code passes through unwritten, else -1 when +note st 0 + 4 > st 1 (pos, max_len), else the word goes little-endian to b at st 0, st 0 += 4, 0. +note So aarch64_emit_(buf, &pos, max_len, fields) = a64put b st a64 fields. +note a64addreg sf rd rn rm a64subreg a64mulreg a64andreg a64orrreg a64eorreg (same fields) +note a64movreg sf rd rm a64movz sf rd imm16 shift a64movk sf rd imm16 shift +note a64ret a64b imm26 a64bcond cond imm19 +note a64cbz sf rt imm19 a64cbnz sf rt imm19 a64adr rd imm21 +note a64ldruoff sf rt rn uoff a64struoff sf rt rn uoff a64ldrbuoff rt rn uoff a64strbuoff rt rn uoff +note a64ldrpost rt rn simm9 a64strpost a64ldrxpost a64strxpost (same fields) +note a64subsimm sf rd rn imm12 a64subsreg sf rd rn rm +note a64put b st w b edit uchar 4096 (AARCH64_MAX_CODE_BYTES), st edit ulong 2 +note a64decode insn out aarch64_decode_instruction; out edit ulong 9 = DecodedInsn cells +note op sf rd rn rm imm16 hw branch_imm cond; returns 0 or -1 +note a64validate code n msg ml aarch64_validate_code_buffer; code view uchar 4096, msg edit uchar 256 +note A value outside the C parameter's type (bool sf, uint8_t register or shift, uint16_t imm16/uoff/ +note imm12, int16_t simm9, int32_t immediates and cond) traps 5: the C cannot receive it. + +note ---- conversions the C does by parameter type: trap 5 where the value does not fit ---- + +fn nbool v ulong to void +if gt v 1 +trap 5 +end +end + +fn nu8 v ulong to void +if gt v 255 +trap 5 +end +end + +fn nu16 v ulong to void +if gt v 65535 +trap 5 +end +end + +fn ni16 v long to void +if or lt v -32768 gt v 32767 +trap 5 +end +end + +fn ni32 v long to void +if or lt v -2147483648 gt v 2147483647 +trap 5 +end +end + +note ---- encoder: src/aarch64_encoder.c ---- + +note base | sf<<31 | rm<<16 | rn<<5 | rd, after CHECK3(rd, rn, rm); fields sf rd rn rm = 1 2 3 4 +fn a64rrr base ulong sf ulong rd ulong rn ulong rm ulong to long +nbool sf +nu8 rd +nu8 rn +nu8 rm +if gt rd 31 +ret -3 +end +if gt rn 31 +ret -4 +end +if gt rm 31 +ret -5 +end +w = or base shl sf 31 +w = or w shl rm 16 +w = or w shl rn 5 +ret long or w rd +end + +note 0x0B000000 +fn a64addreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 184549376 sf rd rn rm +end + +note 1<<30 | 0x0B000000 +fn a64subreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 1258291200 sf rd rn rm +end + +note MADD Xd, Xn, Xm, XZR: 0x1B000000 | 0x1f<<10 +fn a64mulreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 453016576 sf rd rn rm +end + +note 0x0A000000 +fn a64andreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 167772160 sf rd rn rm +end + +note 0x2A000000 +fn a64orrreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 704643072 sf rd rn rm +end + +note 0x4A000000 +fn a64eorreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 1241513984 sf rd rn rm +end + +note ORR rd, XZR, rm after its own CHECK_REG(rd), CHECK_REG(rm); fields sf rd rm = 1 2 3 +fn a64movreg sf ulong rd ulong rm ulong to long +nbool sf +nu8 rd +nu8 rm +if gt rd 31 +ret -3 +end +if gt rm 31 +ret -4 +end +ret a64orrreg sf rd 31 rm +end + +note MOVZ/MOVK: base | sf<<31 | (shift/16 & 3)<<21 | imm16<<5 | rd; fields sf rd imm16 shift = 1 2 3 4 +fn a64hw base ulong sf ulong rd ulong imm ulong sh ulong to long +nbool sf +nu8 rd +nu16 imm +nu8 sh +if gt rd 31 +ret -3 +end +mx = ulong 16 +if eq sf 1 +mx = 48 +end +if or ne rem sh 16 0 gt sh mx +ret -5 +end +w = or base shl sf 31 +w = or w shl and div sh 16 3 21 +w = or w shl imm 5 +ret long or w rd +end + +note 0x52800000 +fn a64movz sf ulong rd ulong imm ulong sh ulong to long +ret a64hw 1384120320 sf rd imm sh +end + +note 0x72800000 +fn a64movk sf ulong rd ulong imm ulong sh ulong to long +ret a64hw 1920991232 sf rd imm sh +end + +note 0xD65F03C0 +fn a64ret to long +ret 3596551104 +end + +note 0x14000000 | imm26 & 0x03FFFFFF; imm26 in [-2^25, 2^25) is field 1 +fn a64b imm long to long +ni32 imm +if or lt imm -33554432 ge imm 33554432 +ret -2 +end +ret long or 335544320 and bitcast ulong imm 67108863 +end + +note 0x54000000 | (imm19 & 0x7FFFF)<<5 | cond; cond 0..15 field 1, imm19 field 2 +fn a64bcond cond long imm long to long +ni32 cond +ni32 imm +if or lt cond 0 gt cond 15 +ret -2 +end +if or lt imm -262144 ge imm 262144 +ret -3 +end +w = shl and bitcast ulong imm 524287 5 +ret long or or 1409286144 w bitcast ulong cond +end + +note CBZ/CBNZ: base | sf<<31 | (imm19 & 0x7FFFF)<<5 | rt; fields sf rt imm19 = 1 2 3 +fn a64cbx base ulong sf ulong rt ulong imm long to long +nbool sf +nu8 rt +ni32 imm +if gt rt 31 +ret -3 +end +if or lt imm -262144 ge imm 262144 +ret -4 +end +w = or base shl sf 31 +w = or w shl and bitcast ulong imm 524287 5 +ret long or w rt +end + +note 0x34000000 +fn a64cbz sf ulong rt ulong imm long to long +ret a64cbx 872415232 sf rt imm +end + +note 0x35000000 +fn a64cbnz sf ulong rt ulong imm long to long +ret a64cbx 889192448 sf rt imm +end + +note 0x10000000 | (imm21 & 3)<<29 | ((imm21 >> 2) & 0x7FFFF)<<5 | rd; fields rd imm21 = 1 2 +fn a64adr rd ulong imm long to long +nu8 rd +ni32 imm +if gt rd 31 +ret -2 +end +if or lt imm -1048576 ge imm 1048576 +ret -3 +end +x = and bitcast ulong imm 2097151 +w = or 268435456 shl and x 3 29 +w = or w shl shr x 2 5 +ret long or w rd +end + +note LDR/STR (unsigned offset): (sf ? bx : bw) | (uoff >> (sf ? 3 : 2))<<10 | rn<<5 | rt; +note CHECK_SCALED: uoff a multiple of 8 (sf) or 4 with uoff/size <= 4095; fields sf rt rn uoff = 1 2 3 4 +fn a64ls bx ulong bw ulong sf ulong rt ulong rn ulong uo ulong to long +nbool sf +nu8 rt +nu8 rn +nu16 uo +if gt rt 31 +ret -3 +end +if gt rn 31 +ret -4 +end +sc = ulong 2 +sz = ulong 4 +base = bw +if eq sf 1 +sc = 3 +sz = 8 +base = bx +end +if or ne rem uo sz 0 gt div uo sz 4095 +ret -5 +end +w = or base shl and shr uo sc 4095 10 +w = or w shl rn 5 +ret long or w rt +end + +note 0xF9400000 / 0xB9400000 +fn a64ldruoff sf ulong rt ulong rn ulong uo ulong to long +ret a64ls 4181721088 3107979264 sf rt rn uo +end + +note 0xF9000000 / 0xB9000000 +fn a64struoff sf ulong rt ulong rn ulong uo ulong to long +ret a64ls 4177526784 3103784960 sf rt rn uo +end + +note LDRB/STRB (unsigned offset): base | uoff<<10 | rn<<5 | rt; uoff 0..4095; fields rt rn uoff = 1 2 3 +fn a64lsb base ulong rt ulong rn ulong uo ulong to long +nu8 rt +nu8 rn +nu16 uo +if gt rt 31 +ret -2 +end +if gt rn 31 +ret -3 +end +if gt uo 4095 +ret -4 +end +w = or base shl uo 10 +w = or w shl rn 5 +ret long or w rt +end + +note 0x39400000 +fn a64ldrbuoff rt ulong rn ulong uo ulong to long +ret a64lsb 960495616 rt rn uo +end + +note 0x39000000 +fn a64strbuoff rt ulong rn ulong uo ulong to long +ret a64lsb 956301312 rt rn uo +end + +note post-index: base | (simm9 & 0x1FF)<<12 | rn<<5 | rt; simm9 in [-256, 255]; fields rt rn simm9 = 1 2 3 +fn a64post base ulong rt ulong rn ulong imm long to long +nu8 rt +nu8 rn +ni16 imm +if gt rt 31 +ret -2 +end +if gt rn 31 +ret -3 +end +if or lt imm -256 ge imm 256 +ret -4 +end +w = or base shl and bitcast ulong imm 511 12 +w = or w shl rn 5 +ret long or w rt +end + +note 0xB8400400 +fn a64ldrpost rt ulong rn ulong imm long to long +ret a64post 3091203072 rt rn imm +end + +note 0xB8000400 +fn a64strpost rt ulong rn ulong imm long to long +ret a64post 3087008768 rt rn imm +end + +note 0xF8400400 +fn a64ldrxpost rt ulong rn ulong imm long to long +ret a64post 4164944896 rt rn imm +end + +note 0xF8000400 +fn a64strxpost rt ulong rn ulong imm long to long +ret a64post 4160750592 rt rn imm +end + +note SUBS (immediate): (sf ? 0xF1000000 : 0x71000000) | imm12<<10 | rn<<5 | rd; fields sf rd rn imm12 = 1 2 3 4 +fn a64subsimm sf ulong rd ulong rn ulong imm ulong to long +nbool sf +nu8 rd +nu8 rn +nu16 imm +if gt rd 31 +ret -3 +end +if gt rn 31 +ret -4 +end +if gt imm 4095 +ret -5 +end +base = ulong 1895825408 +if eq sf 1 +base = 4043309056 +end +w = or base shl imm 10 +w = or w shl rn 5 +ret long or w rd +end + +note SUBS (shifted register): (sf ? 0xEB000000 : 0x6B000000) | rm<<16 | rn<<5 | rd, which is +note 0x6B000000 | sf<<31 | ... +fn a64subsreg sf ulong rd ulong rn ulong rm ulong to long +ret a64rrr 1795162112 sf rd rn rm +end + +note emit_u32_le over a 4096-byte buffer; st 0 = *pos, st 1 = max_len. Where the C would write past +note a 4096-byte buffer (max_len above 4096, or pos + 4 wrapping), the first byte at index 4096 or +note beyond traps 3; the bytes below 4096 are already written. +fn a64put b edit uchar 4096 st edit ulong 2 w long to long +if lt w 0 +ret w +end +x = ulong uint w +p = get st 0 +if gt add p 4 get st 1 +ret -1 +end +put b p uchar and x 255 +put b add p 1 uchar and shr x 8 255 +put b add p 2 uchar and shr x 16 255 +put b add p 3 uchar shr x 24 +put st 0 add p 4 +ret 0 +end + +note ---- decoder: src/aarch64_decoder.c ---- + +note op; sf = bit sb of insn unless sb is 32; rd; rn when n >= 2; rm when n >= 3 +fn dregs out edit ulong 9 op ulong insn ulong sb ulong n ulong to void +put out 0 op +if lt sb 32 +put out 1 and shr insn sb 1 +end +put out 2 and insn 31 +if ge n 2 +put out 3 and shr insn 5 31 +end +if ge n 3 +put out 4 and shr insn 16 31 +end +end + +note MOVZ/MOVK fields +fn dwide out edit ulong 9 op ulong insn ulong to void +dregs out op insn 31 1 +put out 5 and shr insn 5 65535 +put out 6 and shr insn 21 3 +end + +note the checks of aarch64_decode_instruction 1-9 (RET .. SUB); 0 matched, 1 not +fn dec1 insn ulong out edit ulong 9 to ulong +if eq insn 3596551104 +put out 0 8 +put out 3 30 +ret 0 +end +if eq and insn 4227858432 335544320 +put out 0 9 +put out 7 and insn 67108863 +ret 0 +end +if eq and insn 4278190096 1409286144 +put out 0 10 +put out 8 and insn 15 +put out 7 and shr insn 5 524287 +ret 0 +end +m = and insn 2130706432 +if eq m 872415232 +dregs out 11 insn 31 1 +put out 7 and shr insn 5 524287 +ret 0 +end +if eq m 889192448 +dregs out 12 insn 31 1 +put out 7 and shr insn 5 524287 +ret 0 +end +if eq and insn 2139095040 1384120320 +dwide out 7 insn +ret 0 +end +if eq and insn 2145418240 453016576 +dregs out 3 insn 31 3 +ret 0 +end +m = and insn 2132803584 +if eq m 167772160 +dregs out 4 insn 31 3 +ret 0 +end +if eq m 704643072 +dregs out 5 insn 31 3 +ret 0 +end +if eq m 1241513984 +dregs out 6 insn 31 3 +ret 0 +end +if eq m 184549376 +dregs out 1 insn 31 3 +ret 0 +end +if eq m 1258291200 +dregs out 2 insn 31 3 +ret 0 +end +ret 1 +end + +note the checks 10-15 (MOVK .. SUBS); 0 matched, 1 not +fn dec2 insn ulong out edit ulong 9 to ulong +if eq and insn 2139095040 1920991232 +dwide out 13 insn +ret 0 +end +if eq and insn 2667577344 268435456 +dregs out 14 insn 32 1 +ret 0 +end +m = and insn 3208642560 +if eq m 3107979264 +dregs out 15 insn 30 2 +ret 0 +end +if eq m 3103784960 +dregs out 16 insn 30 2 +ret 0 +end +m = and insn 3219129344 +if eq m 3091203072 +dregs out 15 insn 30 2 +ret 0 +end +if eq m 3087008768 +dregs out 16 insn 30 2 +ret 0 +end +m = and insn 4290772992 +if eq m 960495616 +dregs out 17 insn 32 2 +ret 0 +end +if eq m 956301312 +dregs out 18 insn 32 2 +ret 0 +end +if eq and insn 2139095040 1895825408 +dregs out 19 insn 31 2 +ret 0 +end +if eq and insn 2132803584 1795162112 +dregs out 19 insn 31 3 +ret 0 +end +ret 1 +end + +note aarch64_decode_instruction: out = DecodedInsn (op sf rd rn rm imm16 hw branch_imm cond), all +note zero first; 0, or -1 with op 0 (DECODED_INVALID). branch_imm is the raw field, not sign-extended. +fn a64decode insn ulong out edit ulong 9 to long +nu32 insn +for i ulong 9 +put out i 0 +end +if eq dec1 insn out 0 +ret 0 +end +if eq dec2 insn out 0 +ret 0 +end +put out 0 0 +ret -1 +end + +fn nu32 v ulong to void +if gt v 4294967295 +trap 5 +end +end + +note ---- validator: aarch64_validate_code_buffer and its snprintf messages ---- + +note append the c low bytes of v (little-endian) to t at n; the new length +fn app t edit uchar 128 n ulong v ulong c ulong to ulong +for i ulong c +put t add n i uchar and shr v mul i 8 255 +end +ret add n c +end + +fn hexch v ulong to ulong +if lt v 10 +ret add v 48 +end +ret add v 87 +end + +note %x of v with at least w digits (w >= 1): %08x is w 8, %zx is w 1 +fn apphex t edit uchar 128 n ulong v ulong w ulong to ulong +k = ulong 1 +while lt k 16 bound 16 +if eq shr v mul k 4 0 +break +end +k = add k 1 +end +if lt k w +k = w +end +for i ulong k +put t add n i uchar hexch and shr v mul sub sub k 1 i 4 15 +end +ret add n k +end + +note %zu / %d (nonnegative) of v +fn appdec t edit uchar 128 n ulong v ulong to ulong +k = ulong 1 +q = div v 10 +while gt q 0 bound 20 +k = add k 1 +q = div q 10 +end +q = v +for i ulong k +put t add n sub sub k 1 i uchar add 48 rem q 10 +q = div q 10 +end +ret add n k +end + +note snprintf(msg, ml, ...) of the n bytes in t: at most ml - 1 bytes and a NUL, nothing when ml is 0 +fn snp msg edit uchar 256 ml ulong t view uchar 128 n ulong to void +if eq ml 0 +ret +end +m = n +if gt m sub ml 1 +m = sub ml 1 +end +for i ulong m +put msg i get t i +end +put msg m 0 +end + +note "Empty or null code buffer" +fn msgnull t edit uchar 128 to ulong +n = app t 0 8245845148755324229 8 +n = app t n 8026294610952547872 8 +n = app t n 7306640099798705508 8 +ret app t n 114 1 +end + +note "Code buffer length %zu is not a multiple of 4 bytes" +fn msglen t edit uchar 128 v ulong to ulong +n = app t 0 7382915055423352643 8 +n = app t n 7453005948419990886 8 +n = app t n 2123892 3 +n = appdec t n v +n = app t n 2338616625293650208 8 +n = app t n 8100133413977923681 8 +n = app t n 2320515332325795180 8 +ret app t n 495623371106 5 +end + +note "Undefined/unrecognized AArch64 opcode 0x%08x at offset 0x%zx" +fn msgop t edit uchar 128 w ulong o ulong to ulong +n = app t 0 7308895133777555029 8 +n = app t n 8026370503058206564 8 +n = app t n 4692861198728261223 8 +n = app t n 8007457545748968001 8 +n = app t n 8660457703282271088 8 +n = apphex t n w 8 +n = app t n 8315446389458100512 8 +n = app t n 516203508837 5 +ret apphex t n o 1 +end + +note "Function does not terminate with RET (terminates with op %d)" +fn msgret t edit uchar 128 op ulong to ulong +n = app t 0 7957695015192261958 8 +n = app t n 8029390865643299872 8 +n = app t n 7956010554822500468 8 +n = app t n 7526756837608485985 8 +n = app t n 7310512214447051296 8 +n = app t n 8315180248822541682 8 +n = app t n 8101729887664568096 8 +n = app t n 32 1 +n = appdec t n op +ret app t n 41 1 +end + +fn ld32 a view uchar 4096 o ulong to ulong +x = ulong get a add o 3 +x = or shl x 8 ulong get a add o 2 +x = or shl x 8 ulong get a add o 1 +ret or shl x 8 ulong get a o +end + +note the instruction loop of the validator over c words: 0 when valid, else the message length in t +fn valscan code view uchar 4096 c ulong t edit uchar 128 d edit ulong 9 to ulong +for i ulong c +o = mul i 4 +w = ld32 code o +if or ne a64decode w d 0 eq get d 0 0 +ret msgop t w o +end +if and eq i sub c 1 ne get d 0 8 +ret msgret t get d 0 +end +end +ret 0 +end + +note aarch64_validate_code_buffer(code, n, msg, ml): 0, or -1 with the C's message in msg. +note ml above 256 (more capacity than msg has) traps 3 before anything is read or written. +fn a64validate code view uchar 4096 n ulong msg edit uchar 256 ml ulong to long +if gt ml 256 +trap 3 +end +t = new uchar 128 0 +d = new ulong 9 0 +if eq n 0 +k = msgnull t +snp msg ml t k +ret -1 +end +if ne rem n 4 0 +k = msglen t n +snp msg ml t k +ret -1 +end +k = valscan code div n 4 t d +if gt k 0 +snp msg ml t k +ret -1 +end +ret 0 +end + +note ==== parity harness: program mode only; everything above this line is the library ==== +note Reads corpus records on stdin (om/aarch64/parity/corpus.py), writes one result line per record: +note E form f1 f2 f3 f4 one emitter call (aarch64_emit_ into a fresh 4096-byte buffer), then +note the decode of the written word and the round-trip mark (see README) +note P maxlen pos n calls a sequence of emitter calls into one buffer (buffer-full path) +note D word aarch64_decode_instruction +note V len ml bytes aarch64_validate_code_buffer +note Numbers are lowercase hex without leading zeros (words: 8 digits), refusal values signed decimal. + +text enm "add_reg sub_reg mul_reg and_reg orr_reg eor_reg mov_reg movz ret b b_cond cbz cbnz movk adr ldr_uoff str_uoff ldrb_uoff strb_uoff ldr_post str_post ldr_x_post str_x_post subs_imm subs_reg " +text fnm "sf rd rn rm |sf rd rn rm |sf rd rn rm |sf rd rn rm |sf rd rn rm |sf rd rn rm |sf rd rm |sf rd imm16 shift |- |imm26 |cond imm19 |sf rt imm19 |sf rt imm19 |sf rd imm16 shift |rd imm21 |sf rt rn uoff |sf rt rn uoff |rt rn uoff |rt rn uoff |rt rn simm9 |rt rn simm9 |rt rn simm9 |rt rn simm9 |sf rd rn imm12 |sf rd rn rm |" +text tref "A64_LEGACY_FIELD_OUT_OF_RANGE aarch64_emit_" + +global ib uchar 1048576 +global ist ulong 2 +global ob uchar 1048576 +global obn ulong 1 +global fv ulong 4 + +fn inb to ulong +p = get ist 0 +if ge p get ist 1 +r = read 0 ib 0 1048576 +if le r 0 +ret 256 +end +put ist 1 ulong r +p = 0 +end +put ist 0 add p 1 +ret ulong get ib p +end + +fn obflush to void +n = get obn 0 +if gt n 0 +r = write 1 ob 0 n +end +put obn 0 0 +end + +fn ob1 c ulong to void +n = get obn 0 +if ge n 1048576 +obflush +n = 0 +end +put ob n uchar c +put obn 0 add n 1 +end + +fn ohx v ulong to void +ob1 32 +k = ulong 1 +while lt k 16 bound 16 +if eq shr v mul k 4 0 +break +end +k = add k 1 +end +for i ulong k +ob1 hexch and shr v mul sub sub k 1 i 4 15 +end +end + +fn ohx8 v ulong to void +ob1 32 +for i ulong 8 +ob1 hexch and shr v mul sub 7 i 4 15 +end +end + +fn ohxb b ulong to void +ob1 hexch shr b 4 +ob1 hexch and b 15 +end + +fn odec v long to void +if lt v 0 +ob1 45 +end +u = ulong 0 +if lt v 0 +u = add not bitcast ulong v 1 +else +u = ulong v +end +t = new uchar 24 0 +k = ulong 0 +while true bound 21 +put t k uchar add 48 rem u 10 +k = add k 1 +u = div u 10 +if eq u 0 +break +end +end +for i ulong k +ob1 ulong get t sub sub k 1 i +end +end + +fn hexval c ulong to ulong +if and ge c 48 le c 57 +ret sub c 48 +end +if and ge c 97 le c 102 +ret sub c 87 +end +ret 16 +end + +fn rdcode to ulong +c = inb +while or eq c 10 eq c 32 bound 999999 +c = inb +end +ret c +end + +fn rdhex to ulong +c = inb +while eq c 32 bound 999999 +c = inb +end +v = ulong 0 +while lt hexval c 16 bound 17 +v = or shl v 4 hexval c +c = inb +end +ret v +end + +fn sgnl v ulong to long +if ge v 9223372036854775808 +ret neg long add not v 1 +end +ret long v +end + +note the word of emitter form f (1..25, the order of aarch64_encoder.h) on the fields in fv +fn enca f ulong to long +a = get fv 0 +b = get fv 1 +c = get fv 2 +d = get fv 3 +if eq f 1 +ret a64addreg a b c d +end +if eq f 2 +ret a64subreg a b c d +end +if eq f 3 +ret a64mulreg a b c d +end +if eq f 4 +ret a64andreg a b c d +end +if eq f 5 +ret a64orrreg a b c d +end +if eq f 6 +ret a64eorreg a b c d +end +if eq f 7 +ret a64movreg a b c +end +if eq f 8 +ret a64movz a b c d +end +if eq f 9 +ret a64ret +end +if eq f 10 +ret a64b sgnl a +end +if eq f 11 +ret a64bcond sgnl a sgnl b +end +if eq f 12 +ret a64cbz a b sgnl c +end +ret encb f +end + +fn encb f ulong to long +a = get fv 0 +b = get fv 1 +c = get fv 2 +d = get fv 3 +if eq f 13 +ret a64cbnz a b sgnl c +end +if eq f 14 +ret a64movk a b c d +end +if eq f 15 +ret a64adr a sgnl b +end +if eq f 16 +ret a64ldruoff a b c d +end +if eq f 17 +ret a64struoff a b c d +end +if eq f 18 +ret a64ldrbuoff a b c +end +if eq f 19 +ret a64strbuoff a b c +end +if eq f 20 +ret a64ldrpost a b sgnl c +end +if eq f 21 +ret a64strpost a b sgnl c +end +if eq f 22 +ret a64ldrxpost a b sgnl c +end +if eq f 23 +ret a64strxpost a b sgnl c +end +if eq f 24 +ret a64subsimm a b c d +end +if eq f 25 +ret a64subsreg a b c d +end +trap 9 +end + +note print the k-th (from 1) space-ended word of the f-th |-ended entry of fnm +fn ofield f ulong k ulong to void +e = ulong 1 +w = ulong 1 +for i ulong len fnm +c = ulong get fnm i +if eq c 124 +e = add e 1 +w = 1 +continue +end +if eq c 32 +w = add w 1 +continue +end +if and eq e f eq w k +ob1 c +end +end +end + +fn oname f ulong to void +e = ulong 1 +for i ulong len enm +c = ulong get enm i +if eq c 32 +e = add e 1 +continue +end +if eq e f +ob1 c +end +end +end + +note the C's stderr line for a refusal code r of form f +fn orefuse f ulong r long to void +for i ulong len tref +ob1 ulong get tref i +end +oname f +ob1 32 +k = ulong sub neg r 1 +ofield f k +ob1 61 +odec sgnl get fv sub k 1 +end + +fn sx v ulong bits ulong to long +h = shl ulong 1 sub bits 1 +if ge v h +ret sub long v long shl h 1 +end +ret long v +end + +note re-encode a decoded word whose op carries every field (-100 for the others) +fn reenc d edit ulong 9 to long +op = get d 0 +if and ge op 1 le op 6 +ret enc4 op get d 1 get d 2 get d 3 get d 4 +end +if eq op 7 +ret a64movz get d 1 get d 2 get d 5 mul get d 6 16 +end +if eq op 13 +ret a64movk get d 1 get d 2 get d 5 mul get d 6 16 +end +if eq op 8 +ret a64ret +end +if eq op 9 +ret a64b sx get d 7 26 +end +if eq op 10 +ret a64bcond long get d 8 sx get d 7 19 +end +if eq op 11 +ret a64cbz get d 1 get d 2 sx get d 7 19 +end +if eq op 12 +ret a64cbnz get d 1 get d 2 sx get d 7 19 +end +ret -100 +end + +fn enc4 op ulong a ulong b ulong c ulong d ulong to long +if eq op 1 +ret a64addreg a b c d +end +if eq op 2 +ret a64subreg a b c d +end +if eq op 3 +ret a64mulreg a b c d +end +if eq op 4 +ret a64andreg a b c d +end +if eq op 5 +ret a64orrreg a b c d +end +ret a64eorreg a b c d +end + +note for a form whose decode drops fields: does the decode show the expected op and the input fields? +fn lossok f ulong d edit ulong 9 to bool +op = get d 0 +if eq f 15 +ret and eq op 14 eq get d 2 get fv 0 +end +if and ge f 20 le f 23 +ret lospost f d +end +if and ge f 18 le f 19 +ok = and eq op sub f 1 eq get d 2 get fv 0 +ret and ok eq get d 3 get fv 1 +end +if or lt f 16 gt f 25 +ret false +end +note forms 16 17 24 25: op, sf, rd, rn; and rm (0 for subs_imm) for 24 25 +eop = sub f 1 +if ge f 24 +eop = 19 +end +ok = and eq op eop eq get d 1 get fv 0 +ok = and ok eq get d 2 get fv 1 +ok = and ok eq get d 3 get fv 2 +if eq f 24 +ok = and ok eq get d 4 0 +end +if eq f 25 +ok = and ok eq get d 4 get fv 3 +end +ret ok +end + +fn lospost f ulong d edit ulong 9 to bool +eop = ulong 15 +if or eq f 21 eq f 23 +eop = 16 +end +esf = ulong 0 +if ge f 22 +esf = 1 +end +ok = and eq get d 0 eop eq get d 1 esf +ok = and ok eq get d 2 get fv 0 +ret and ok eq get d 3 get fv 1 +end + +note E form f1 f2 f3 f4 +fn doenc to void +b = new uchar 4096 170 +st = new ulong 2 0 +d = new ulong 9 0 +f = rdhex +for i ulong 4 +put fv i rdhex +end +put st 1 4096 +w = enca f +if lt w 0 +orefuse f w +ret +end +r = a64put b st w +x = ld32 b 0 +ob1 69 +ohx8 x +ohx bitcast ulong a64decode x d +for i ulong 9 +ohx get d i +end +ob1 32 +e = reenc d +if ge e 0 +if eq ulong e x +ob1 61 +else +ob1 33 +end +ret +end +if lossok f d +ob1 126 +else +ob1 33 +end +end + +note P maxlen pos n, then n times form f1 f2 f3 f4 +fn dobuf to void +b = new uchar 4096 170 +st = new ulong 2 0 +put st 1 rdhex +p0 = rdhex +put st 0 p0 +n = rdhex +ob1 80 +for j ulong n +f = rdhex +for i ulong 4 +put fv i rdhex +end +ob1 32 +odec a64put b st enca f +end +ohx get st 0 +ob1 32 +e = add p0 mul n 4 +if gt e 4096 +e = 4096 +end +for i ulong sub e p0 +ohxb ulong get b add p0 i +end +end + +fn dodec to void +d = new ulong 9 0 +w = rdhex +ob1 68 +ohx bitcast ulong a64decode w d +for i ulong 9 +ohx get d i +end +end + +note V len ml bytes: bytes is one hex token of len bytes ("-" when empty) +fn doval to void +code = new uchar 4096 0 +msg = new uchar 256 170 +n = rdhex +ml = rdhex +c = inb +while eq c 32 bound 999999 +c = inb +end +k = ulong 0 +while lt hexval c 16 bound 999999 +e = inb +put code k uchar or shl hexval c 4 hexval e +k = add k 1 +c = inb +end +r = a64validate code n msg ml +ob1 86 +ob1 32 +odec r +ob1 32 +for i ulong 100 +ohxb ulong get msg i +end +end + +fn main to int +for q ulong 4294967296 +c = rdcode +if eq c 256 +break +end +if eq c 69 +doenc +end +if eq c 80 +dobuf +end +if eq c 68 +dodec +end +if eq c 86 +doval +end +ob1 10 +end +obflush +ret 0 +end diff --git a/om/aarch64/parity/corpus.py b/om/aarch64/parity/corpus.py new file mode 100755 index 000000000..ba6a9d262 --- /dev/null +++ b/om/aarch64/parity/corpus.py @@ -0,0 +1,426 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""corpus.py DIR: write the deterministic parity corpus of om/aarch64/aarch64.om into DIR, one file per +stream (STREAM.txt), and print "STREAM RECORDS" per stream on stdout. + +Record formats (all numbers lowercase hex; a signed field is its 64-bit two's complement): + E form f1 f2 f3 f4 one aarch64_emit_ call; form 1..25 in the order of aarch64_encoder.h, + fields in the C parameter order after max_len, unused fields 0 + P maxlen pos n {form f1 f2 f3 f4}*n a sequence of emitter calls into one 4096-byte buffer + D word aarch64_decode_instruction + V len ml bytes aarch64_validate_code_buffer(bytes, len, msg, ml); bytes one hex token, "-" empty + +Every field value is inside its C parameter type (bool, uint8_t, uint16_t, int16_t, int32_t), so the C +receives it unchanged; values outside the architectural ranges inside those types are swept on purpose +(the C refuses them). Generators are splitmix64 with fixed seeds; nothing here reads the C or the .om. +""" +import os +import sys + +M64 = (1 << 64) - 1 + +# form: (C name, field kinds); kinds: b bool, r uint8_t register, u8 uint8_t, u16 uint16_t, +# s16 int16_t, s32 int32_t +FORMS = [ + None, + ("add_reg", "b r r r"), ("sub_reg", "b r r r"), ("mul_reg", "b r r r"), ("and_reg", "b r r r"), + ("orr_reg", "b r r r"), ("eor_reg", "b r r r"), ("mov_reg", "b r r"), ("movz", "b r u16 u8"), + ("ret", ""), ("b", "s32"), ("b_cond", "s32 s32"), ("cbz", "b r s32"), ("cbnz", "b r s32"), + ("movk", "b r u16 u8"), ("adr", "r s32"), ("ldr_uoff", "b r r u16"), ("str_uoff", "b r r u16"), + ("ldrb_uoff", "r r u16"), ("strb_uoff", "r r u16"), ("ldr_post", "r r s16"), ("str_post", "r r s16"), + ("ldr_x_post", "r r s16"), ("str_x_post", "r r s16"), ("subs_imm", "b r r u16"), ("subs_reg", "b r r r"), +] + + +class Rng: + def __init__(self, seed): + self.s = seed & M64 + + def next(self): + self.s = (self.s + 0x9E3779B97F4A7C15) & M64 + z = self.s + z = ((z ^ (z >> 30)) * 0xBF58476D1CE4E5B9) & M64 + z = ((z ^ (z >> 27)) * 0x94D049BB133111EB) & M64 + return z ^ (z >> 31) + + def below(self, n): + return self.next() % n + + def range(self, lo, hi): + """uniform in [lo, hi]""" + return lo + self.below(hi - lo + 1) + + +TYPE = {"b": (0, 1), "r": (0, 255), "u8": (0, 255), "u16": (0, 65535), "s16": (-32768, 32767), + "s32": (-(1 << 31), (1 << 31) - 1)} + + +def h(v): + return "%x" % (v & M64) + + +def rec_e(form, fields): + kinds = FORMS[form][1].split() + assert len(fields) == len(kinds), (form, fields) + for k, v in zip(kinds, fields): + lo, hi = TYPE[k] + assert lo <= v <= hi, (form, fields) + f = list(fields) + [0] * (4 - len(fields)) + return "E %x %s" % (form, " ".join(h(v) for v in f)) + + +# in-range field values per form, for the P stream and the fillers of the sweeps +def valid_fields(rng, form): + name, kinds = FORMS[form] + sf = rng.below(2) + r = lambda: rng.below(32) + if kinds == "b r r r": + return [sf, r(), r(), r()] + if form == 7: + return [sf, r(), r()] + if form in (8, 14): + return [sf, r(), rng.below(65536), 16 * rng.below(4 if sf else 2)] + if form == 9: + return [] + if form == 10: + return [rng.range(-(1 << 25), (1 << 25) - 1)] + if form == 11: + return [rng.below(16), rng.range(-(1 << 18), (1 << 18) - 1)] + if form in (12, 13): + return [sf, r(), rng.range(-(1 << 18), (1 << 18) - 1)] + if form == 15: + return [r(), rng.range(-(1 << 20), (1 << 20) - 1)] + if form in (16, 17): + return [sf, r(), r(), rng.below(4096) * (8 if sf else 4)] + if form in (18, 19): + return [r(), r(), rng.below(4096)] + if form in (20, 21, 22, 23): + return [r(), r(), rng.range(-256, 255)] + if form == 24: + return [sf, r(), r(), rng.below(4096)] + raise AssertionError(form) + + +def full_random(rng, form): + """every field uniform over its whole C type""" + out = [] + for k in FORMS[form][1].split(): + lo, hi = TYPE[k] + out.append(rng.range(lo, hi)) + return out + + +def edge_set(bits): + """signed boundaries of a bits-wide immediate and of int32""" + lo, hi = -(1 << (bits - 1)), (1 << (bits - 1)) - 1 + s = set() + for c in (lo, hi, 0, -1, 1): + for d in range(-3, 4): + s.add(c + d) + s.update([-(1 << 31), (1 << 31) - 1, -(1 << 31) + 1, (1 << 31) - 2, 1 << bits, -(1 << bits)]) + return sorted(v for v in s if -(1 << 31) <= v < (1 << 31)) + + +def gen_rrr(form, rng): + out = [] + for sf in range(2): + for rd in range(32): + for rn in range(32): + for rm in range(32): + out.append([sf, rd, rn, rm]) + for pos in (1, 2, 3): + for v in range(32, 256): + f = valid_fields(rng, form) + f[pos] = v + out.append(f) + for _ in range(200): + out.append(full_random(rng, form)) + return out + + +def gen_movreg(rng): + out = [[sf, rd, rm] for sf in range(2) for rd in range(32) for rm in range(32)] + for pos in (1, 2): + for v in range(32, 256): + f = valid_fields(rng, 7) + f[pos] = v + out.append(f) + for _ in range(200): + out.append(full_random(rng, 7)) + return out + + +def gen_wide(form, rng): + out = [] + for sf in range(2): + for rd in range(256): + for sh in range(256): + out.append([sf, rd, rng.below(65536), sh]) + for imm in range(65536): + out.append([1, rng.below(32), imm, 16 * (imm % 4)]) + for _ in range(10000): + out.append(full_random(rng, form)) + return out + + +def gen_imm_only(form, bits, rng): + """b: every edge, three exhaustive windows, 10,000 in range, 10,000 over int32""" + lo, hi = -(1 << (bits - 1)), (1 << (bits - 1)) - 1 + vals = set(edge_set(bits)) + for c in (lo, 0, hi): + vals.update(range(c - 4096, c + 4097)) + out = [[v] for v in sorted(vals)] + for _ in range(10000): + out.append([rng.range(lo, hi)]) + for _ in range(10000): + out.append(full_random(rng, form)) + return out + + +def gen_bcond(rng): + conds = list(range(-3, 20)) + [255, 256, -(1 << 31), (1 << 31) - 1] + out = [[c, v] for c in conds for v in edge_set(19)] + for c in range(16): + for v in range(-512, 513): + out.append([c, v]) + for _ in range(10000): + out.append(valid_fields(rng, 11)) + for _ in range(10000): + out.append([rng.range(-2, 17), rng.range(-(1 << 31), (1 << 31) - 1)]) + return out + + +def gen_cb(form, rng): + out = [[sf, rt, v] for sf in range(2) for rt in range(256) for v in edge_set(19)] + for _ in range(10000): + out.append(valid_fields(rng, form)) + for _ in range(10000): + out.append(full_random(rng, form)) + return out + + +def gen_adr(rng): + out = [[rd, v] for rd in range(256) for v in edge_set(21)] + for v in range(-4096, 4097): + out.append([rng.below(32), v]) + for _ in range(10000): + out.append(valid_fields(rng, 15)) + for _ in range(10000): + out.append(full_random(rng, 15)) + return out + + +def gen_ls(form, rng): + out = [[sf, rng.below(32), rng.below(32), u] for sf in range(2) for u in range(65536)] + for rt in range(256): + for rn in range(256): + sf = rng.below(2) + out.append([sf, rt, rn, rng.below(4096) * (8 if sf else 4)]) + return out + + +def gen_lsb(form, rng): + out = [[rng.below(32), rng.below(32), u] for u in range(65536)] + for rt in range(256): + for rn in range(256): + u = rng.below(4096) if rng.below(4) else rng.below(65536) + out.append([rt, rn, u]) + return out + + +def gen_post(form, rng): + out = [[rng.below(32), rng.below(32), v] for v in range(-32768, 32768)] + for rt in range(256): + for rn in range(256): + v = rng.range(-256, 255) if rng.below(4) else rng.range(-32768, 32767) + out.append([rt, rn, v]) + return out + + +def gen_subsimm(rng): + out = [[sf, rng.below(32), rng.below(32), u] for sf in range(2) for u in range(65536)] + for rd in range(256): + for rn in range(256): + out.append([rng.below(2), rd, rn, rng.below(4096)]) + return out + + +def enc_stream(form): + rng = Rng(0xA64E0000 + form) + if FORMS[form][1] == "b r r r": + rows = gen_rrr(form, rng) + elif form == 7: + rows = gen_movreg(rng) + elif form in (8, 14): + rows = gen_wide(form, rng) + elif form == 9: + rows = [[]] + elif form == 10: + rows = gen_imm_only(form, 26, rng) + elif form == 11: + rows = gen_bcond(rng) + elif form in (12, 13): + rows = gen_cb(form, rng) + elif form == 15: + rows = gen_adr(rng) + elif form in (16, 17): + rows = gen_ls(form, rng) + elif form in (18, 19): + rows = gen_lsb(form, rng) + elif form in (20, 21, 22, 23): + rows = gen_post(form, rng) + else: + rows = gen_subsimm(rng) + if form != 9: + # 10,000 more calls with every field in range (words for the decode and round-trip checks) + rows += [valid_fields(rng, form) for _ in range(10000)] + return [rec_e(form, r) for r in rows] + + +def buf_stream(): + rng = Rng(0xA64B0F) + out = [] + + def calls(n): + parts = [] + for _ in range(n): + form = rng.range(1, 25) + f = valid_fields(rng, form) + parts.append(rec_e(form, f)[2:]) + return parts + + for maxlen in range(0, 41): + for pos in range(0, maxlen + 9): + n = rng.range(1, 12) + out.append("P %x %x %x %s" % (maxlen, pos, n, " ".join(calls(n)))) + for maxlen, pos, n in ((4096, 4092, 1), (4096, 4088, 2), (4096, 4093, 1), (4096, 4096, 1), (4095, 4092, 1), + (4096, 0, 1024), (4096, 2048, 512), (M64, 0, 64), (M64, 4092, 1), (1 << 63, 4000, 24), + (4097, 4092, 1), (5000, 4090, 1)): + out.append("P %x %x %x %s" % (maxlen, pos, n, " ".join(calls(n)))) + for _ in range(2000): + n = rng.range(1, 40) + pos = rng.range(0, 4096 - 4 * n) + maxlen = rng.range(0, 4096) + out.append("P %x %x %x %s" % (maxlen, pos, n, " ".join(calls(n)))) + return out + + +# the decoder's checks, only to place corpus words in or near its classes (not an oracle) +PATTERNS = [(0xFC000000, 0x14000000), (0xFF000010, 0x54000000), (0x7F000000, 0x34000000), + (0x7F000000, 0x35000000), (0x7F800000, 0x52800000), (0x7FE07C00, 0x1B007C00), + (0x7F200000, 0x0A000000), (0x7F200000, 0x2A000000), (0x7F200000, 0x4A000000), + (0x7F200000, 0x0B000000), (0x7F200000, 0x4B000000), (0x7F800000, 0x72800000), + (0x9F000000, 0x10000000), (0xBF400000, 0xB9400000), (0xBF400000, 0xB9000000), + (0xBFE00400, 0xB8400400), (0xBFE00400, 0xB8000400), (0xFFC00000, 0x39400000), + (0xFFC00000, 0x39000000), (0x7F800000, 0x71000000), (0x7F200000, 0x6B000000)] +RET = 0xD65F03C0 + + +def classed(w): + return w == RET or any((w & m) == p for m, p in PATTERNS) + + +def dec_stream(): + rng = Rng(0xA64D0C) + words = [] + for _ in range(200000): + words.append(rng.next() & 0xFFFFFFFF) + # every value of the bits the decoder tests (mask 0xFFE07C10, 17 bits), twice, other bits random + disc = [b for b in range(32) if (0xFFE07C10 >> b) & 1] + assert len(disc) == 17 + for v in range(1 << 17): + base = 0 + for i, b in enumerate(disc): + if (v >> i) & 1: + base |= 1 << b + for _ in range(2): + words.append(base | (rng.next() & ~0xFFE07C10 & 0xFFFFFFFF)) + words.append(RET) + for b in range(32): + words.append(RET ^ (1 << b)) + for m, p in PATTERNS: + words.append(p) + words.append(p | (~m & 0xFFFFFFFF)) + for b in range(32): + words.append(p ^ (1 << b)) + words += [0, 0xFFFFFFFF] + return ["D %x" % w for w in words] + + +def val_stream(): + rng = Rng(0xA64FA1) + out = [] + + def good(): + while True: + m, p = PATTERNS[rng.below(len(PATTERNS))] + w = p | (rng.next() & ~m & 0xFFFFFFFF) + if classed(w): + return w + + def bad(): + while True: + w = rng.next() & 0xFFFFFFFF + if not classed(w): + return w + + def code(ws): + return "".join("%02x" % ((w >> (8 * i)) & 255) for w in ws for i in range(4)) or "-" + + def rec(n, ml, ws): + out.append("V %x %x %s" % (n, ml, code(ws))) + + # ml is at most 256, the msg array of a64validate (above it the port traps 3; with ml = SIZE_MAX the + # glibc snprintf of the C drops the last byte, an address-dependent wrap, so it is no contract) + mls = list(range(0, 101)) + [128, 255, 256] + for ml in mls: + rec(0, ml, []) + rec(6, ml, [RET, RET]) + rec(0xFFFFFFFFFFFFFFFF, ml, []) + rec(8, ml, [RET, 0]) + rec(8, ml, [0xF2FFFFE1 | 0, RET]) + rec(8, ml, [good(), 0x8B030041]) + for n in (1, 2, 3, 5, 7, 4095, 4097, 1 << 63, (1 << 63) + 2, M64 - 2, 12345678901234567): + rec(n, 256, []) + # every op as the terminal word (the "terminates with op %d" message), and RET + for m, p in PATTERNS: + rec(4, 256, [p]) + rec(12, 256, [RET, good(), p | (~m & 0xFFFFFFFF)]) + rec(4, 256, [RET]) + # huge lengths stopped by a bad first word (the C reads only that word) + for n in (1 << 62, M64 - 3, 4100): + rec(n, 256, [bad()]) + for _ in range(1500): + k = rng.range(1, 1024 if rng.below(8) == 0 else 64) + ws = [good() for _ in range(k - 1)] + [RET] + kind = rng.below(4) + if kind == 1: + ws[rng.below(k)] = bad() + elif kind == 2: + ws[-1] = good() + elif kind == 3 and k > 1: + ws[rng.below(k - 1)] = RET + n = 4 * k + if rng.below(10) == 0: + n -= rng.range(1, 3) + ml = rng.below(101) if rng.below(3) == 0 else 256 + rec(n, ml, ws) + return out + + +def main(): + if len(sys.argv) != 2: + sys.exit(__doc__) + d = sys.argv[1] + os.makedirs(d, exist_ok=True) + streams = [("e%02d_%s" % (f, FORMS[f][0]), lambda f=f: enc_stream(f)) for f in range(1, 26)] + streams += [("buf", buf_stream), ("dec", dec_stream), ("val", val_stream)] + for name, fn in streams: + rows = fn() + with open(os.path.join(d, name + ".txt"), "w") as fh: + fh.write("\n".join(rows) + "\n") + print(name, len(rows)) + + +if __name__ == "__main__": + main() diff --git a/om/aarch64/parity/expected.txt b/om/aarch64/parity/expected.txt new file mode 100644 index 000000000..cbc7daa3d --- /dev/null +++ b/om/aarch64/parity/expected.txt @@ -0,0 +1,31 @@ +# sha256 of the C oracle's output for each corpus stream (parity/corpus.py): src/aarch64_encoder.c and +# src/aarch64_decoder.c built with the Makefile CFLAGS (gcc 13.3.0, -std=gnu11 -O2, aarch64; .text identical +# to a make build of the same sources). stream records sha256 +e01_add_reg 76408 d34f82afae7f04363f922608021bc85608b73c982ff035565f9460249b59ba97 +e02_sub_reg 76408 fff06e70d6c865015670eb2727523ff1e25793fcc9edd79c5584737720c30e3c +e03_mul_reg 76408 965ff324d088dfc28c703164684071db956b9464141ef1375c3950cc080e90d9 +e04_and_reg 76408 7d34ac9c744d219b49c336abf3decf36c6cbfc408d0f3f96a493ebcc0d31b3fb +e05_orr_reg 76408 0198a060ac0c3c6a0179bc8270f5565e66aea13ab2d2ad96b6d61c728b847044 +e06_eor_reg 76408 83f723f4312fcb71624e08c4df636be0f93c87e28aa09da5c9aa7074892c4b07 +e07_mov_reg 12696 580d85f97aa2d95d41619af760143fc438468c479351e739087aa62009bc7a2f +e08_movz 216608 936060e606bbf44121b8ab84947fbd90827450b7754f4920eaebb2a1e9880ce3 +e09_ret 1 52ec7aa3ade2fd7a988b425ce4b74338587d51f10840494fab9dd39dcc12645f +e10_b 54585 5d9922ca82e8d6bde280880372ca05159d7cdbf4488e5e2a8735bc44922abe3d +e11_b_cond 47183 04e02ee33c23975a5fcfb287f5152cdbe496243ba36a1c543b7ed3e2789b3241 +e12_cbz 44848 72b99c9068a1200fcc1cfe195f363b38c3674e0891fd89275432f3989a39e686 +e13_cbnz 44848 f6b1baeca74286e32c7c436054f1882990ad3d9b9b4bf1ef6a61a515e2f6a995 +e14_movk 216608 95748b573ce561bc3c3261932f58dc26aa3547e8600d0e8884e8fe8b50417836 +e15_adr 45617 a5ae0b97ca642c3b860b2df63db0263b8e8d6e36da949b827337beaedfff7cd1 +e16_ldr_uoff 206608 5df1e1425a5ac84daa6d113a22691457e5292d305d9e6d6193996ceeb12c80ea +e17_str_uoff 206608 2c11ff4ecc6ac49b3c95af94e2febfdebf5595ad236a57b96cb0e4be79091243 +e18_ldrb_uoff 141072 ddf5d88e4d6774cca14534952fa11094e8635226f0e4a1320f10c2ca9917bc1b +e19_strb_uoff 141072 39a52e3e7a25a5c45022870dd8709d959ff08845b4f7e9d3248fe5ce4ef02595 +e20_ldr_post 141072 0d5895a35210033fb45d5d2483b568c2b7bd29b95db16472442e0a8a0d5168aa +e21_str_post 141072 237763c2ccec5dc03003f492fca92d444602a9ade8830b02c61273a8fb439d2c +e22_ldr_x_post 141072 8519f999d58e4c4313c347e973492173f85f989cae3bd22f562b3ef597b40825 +e23_str_x_post 141072 354a722c4b475c2d71fd622fb777a0c4bf0a6487a344f95a25dc26fe5623ff66 +e24_subs_imm 206608 ac2f395e5a48888b923a8e17c814d71b42f2968f92c10a60f5dbfada1422e77d +e25_subs_reg 76408 fa0826544bfc8e4c30388ab42ed65c4cdf62bc28fad136cbc901525339c29397 +buf 3201 c97b4729161159534c559e36fad8d73536d5be00012463ea573ebac6231892fc +dec 462893 7d59dab47925545fbca6e220b717dae84a8667eb496be5668eb8520768edef58 +val 2181 2df636069195c7f64d7ecb4e3baa388408adadd1442cf7a8aa2cb08be488cb4d diff --git a/om/aarch64/parity/gas.py b/om/aarch64/parity/gas.py new file mode 100755 index 000000000..69ac27ca5 --- /dev/null +++ b/om/aarch64/parity/gas.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""gas.py CORPDIR OUTDIR WORKDIR: cross-check words that aarch64.om wrote against GNU as. + +For each encoder stream eNN_*, up to 200 records whose .om output is a word (evenly spaced over the +stream) are written back as assembly text from their fields, assembled with `as`, and the .text words +must equal the .om words. A 31 register is written as xzr/wzr where the form reads ZR and sp where it +reads SP. Exit 0 and one summary line when every word is identical, 1 otherwise. Needs `as` and +`objcopy` for AArch64 on PATH. +""" +import os +import subprocess +import sys + +CC = "eq ne cs cc mi pl vs vc hi ls ge lt gt le al nv".split() + + +def sgn(v): + return v - (1 << 64) if v >> 63 else v + + +def zr(r, sf): + if r == 31: + return "xzr" if sf else "wzr" + return ("x%d" if sf else "w%d") % r + + +def sp(r, sf=1): + if r == 31: + return "sp" if sf else "wsp" + return ("x%d" if sf else "w%d") % r + + +def rel(n): + return ". + %d" % n if n >= 0 else ". - %d" % -n + + +def text(form, f): + a, b, c, d = f + if 1 <= form <= 6 or form == 25: + op = ["", "add", "sub", "mul", "and", "orr", "eor"][form] if form != 25 else "subs" + return "%s %s, %s, %s" % (op, zr(b, a), zr(c, a), zr(d, a)) + if form == 7: + return "orr %s, %s, %s" % (zr(b, a), zr(31, a), zr(c, a)) + if form in (8, 14): + return "%s %s, #%d, lsl #%d" % ("movz" if form == 8 else "movk", zr(b, a), c, d) + if form == 9: + return "ret" + if form == 10: + return "b %s" % rel(4 * sgn(a)) + if form == 11: + return "b.%s %s" % (CC[a], rel(4 * sgn(b))) + if form in (12, 13): + return "%s %s, %s" % ("cbz" if form == 12 else "cbnz", zr(b, a), rel(4 * sgn(c))) + if form == 15: + return "adr %s, %s" % (zr(a, 1), rel(sgn(b))) + if form in (16, 17): + return "%s %s, [%s, #%d]" % ("ldr" if form == 16 else "str", zr(b, a), sp(c), d) + if form in (18, 19): + return "%s %s, [%s, #%d]" % ("ldrb" if form == 18 else "strb", zr(a, 0), sp(b), c) + if 20 <= form <= 23: + op = "ldr" if form in (20, 22) else "str" + return "%s %s, [%s], #%d" % (op, zr(a, form >= 22), sp(b), sgn(c)) + if form == 24: + return "subs %s, %s, #%d" % (zr(b, a), sp(c, a), d) + raise AssertionError(form) + + +def main(): + if len(sys.argv) != 4: + sys.exit(__doc__) + corp, outd, work = sys.argv[1:] + lines, want = [], [] + forms = set() + for name in sorted(os.listdir(corp)): + if not (name.startswith("e") and name.endswith(".txt")): + continue + s = name[:-4] + recs = open(os.path.join(corp, name)).read().split("\n") + outs = open(os.path.join(outd, s + ".out")).read().split("\n") + ok = [i for i, o in enumerate(outs) if o.startswith("E ")] + step = max(1, len(ok) // 200) + for i in ok[::step][:200]: + w = recs[i].split() + form, f = int(w[1], 16), [int(x, 16) for x in w[2:6]] + lines.append(text(form, f)) + want.append(int(outs[i].split()[1], 16)) + forms.add(form) + src = os.path.join(work, "gas.s") + obj = os.path.join(work, "gas.o") + binf = os.path.join(work, "gas.bin") + open(src, "w").write("\n".join(lines) + "\n") + subprocess.run(["as", src, "-o", obj], check=True, stderr=subprocess.DEVNULL) + subprocess.run(["objcopy", "-O", "binary", "--only-section=.text", obj, binf], check=True) + data = open(binf, "rb").read() + got = [int.from_bytes(data[4 * i:4 * i + 4], "little") for i in range(len(data) // 4)] + bad = [i for i in range(len(want)) if i >= len(got) or got[i] != want[i]] + if len(got) != len(want) or bad: + for i in bad[:20]: + print("gas MISMATCH %s: as %s, om %08x" % (lines[i], "%08x" % got[i] if i < len(got) else "-", want[i])) + print("gas FAIL: %d of %d differ" % (len(bad), len(want))) + sys.exit(1) + print("gas: %d words over %d forms identical to GNU as" % (len(want), len(forms))) + + +if __name__ == "__main__": + main() diff --git a/om/aarch64/parity/run.sh b/om/aarch64/parity/run.sh new file mode 100755 index 000000000..51776125f --- /dev/null +++ b/om/aarch64/parity/run.sh @@ -0,0 +1,124 @@ +#!/bin/sh +# SPDX-License-Identifier: Apache-2.0 +# Parity of om/aarch64/aarch64.om against the C it ports (src/aarch64_encoder.c, src/aarch64_decoder.c), +# by RECORDED C output: corpus.py regenerates the corpus, the .om harness runs every stream, and each +# stream's output must hash to parity/expected.txt, the sha256 of the C oracle's output for the same +# stream (recorded when the port was made; the C oracle driver itself is not in the tree, so this script +# does not run any C). Then 23 small mutants of aarch64.om must each change their stream's hash, and +# six inputs outside the C parameter types or the fixed arrays must trap with the named code. +# With `as` and `objcopy` on PATH, up to 200 words per form (4,801) are also assembled from their fields by GNU as and +# compared. With OMEGA_BRIDGE set, the 28 exported functions are cut into function-mode units +# (unit.py), bound by the pinned omega-bridge generator and compiled as C (bindability). +# OMEGA_OMC seed-born omc, sha256 pinned below (exit 3 NOT_RUN without it) +# OMEGA_BRIDGE optional: an aien-dev/omega-bridge checkout whose src/native.om matches the pin +set -eu +OMC_PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b +NATIVE_PIN=2c2c53f61d4ab302f1a2092c3c32189335dd53f6cf2b388f47a475f99f2c3940 +P=$(cd "$(dirname "$0")" && pwd) +OM=$P/../aarch64.om +[ -n "${OMEGA_OMC:-}" ] || { echo "AARCH64-PARITY NOT_RUN: set OMEGA_OMC"; exit 3; } +[ "$(sha256sum < "$OMEGA_OMC" | cut -c1-64)" = "$OMC_PIN" ] || { echo "AARCH64-PARITY NOT_RUN: omc is not the pinned compiler"; exit 3; } +command -v python3 > /dev/null || { echo "AARCH64-PARITY NOT_RUN: python3 missing"; exit 3; } +T=$(mktemp -d); trap 'rm -rf "$T"' EXIT +python3 "$P/corpus.py" "$T/corp" > "$T/counts" +"$OMEGA_OMC" < "$OM" > "$T/am"; chmod +x "$T/am" +grep -v '^#' "$P/expected.txt" | while read -r s n want; do + "$T/am" < "$T/corp/$s.txt" > "$T/$s.out" + got=$(sha256sum < "$T/$s.out" | cut -c1-64) + lines=$(wc -l < "$T/$s.out") + inputs=$(grep "^$s " "$T/counts" | cut -d' ' -f2) + if [ "$got" = "$want" ] && [ "$lines" = "$n" ] && [ "$inputs" = "$n" ]; then + echo "PASS $s: $n records, output identical to the recorded C oracle output" + else + echo "FAIL $s: $lines records of $inputs inputs, sha256 $got (want $n, $want)"; echo x >> "$T/failed" + fi +done +[ ! -e "$T/failed" ] || { echo "AARCH64-PARITY FAIL"; exit 1; } +[ "$(grep -vc '^#' "$P/expected.txt")" = "$(wc -l < "$T/counts")" ] || { echo "AARCH64-PARITY FAIL: stream lists differ"; exit 1; } +cat "$T"/e*.out | awk '/^E /{w++; m[$NF]++} /^A64_LEGACY/{r++} + END {printf "encoder: %d words (round trip: %d re-encode identical, %d lossy decode with every carried field equal, %d wrong), %d refusals\n", w, m["="], m["~"], m["!"], r; if (m["!"] > 0) exit 1}' \ + || { echo "AARCH64-PARITY FAIL: round trip"; exit 1; } + +# Mutants: name | stream | exact text in aarch64.om (\n for a newline) | replacement +cat > "$T/mutants" <<'EOF' +add_opcode|e01_add_reg|ret a64rrr 184549376 sf rd rn rm|ret a64rrr 167772160 sf rd rn rm +rd_range|e01_add_reg|nu8 rn\nnu8 rm\nif gt rd 31|nu8 rn\nnu8 rm\nif gt rd 32 +movreg_field|e07_mov_reg|if gt rm 31\nret -4|if gt rm 31\nret -3 +movz_shift48|e08_movz|mx = 48|mx = 32 +hw_position|e14_movk|w = or w shl and div sh 16 3 21|w = or w shl and div sh 16 3 22 +b_range|e10_b|if or lt imm -33554432 ge imm 33554432|if or lt imm -33554432 gt imm 33554432 +bcond_cond15|e11_b_cond|if or lt cond 0 gt cond 15|if or lt cond 0 gt cond 14 +cbx_sf|e12_cbz|w = or base shl sf 31\nw = or w shl and bitcast ulong imm 524287 5|w = or base shl sf 30\nw = or w shl and bitcast ulong imm 524287 5 +adr_immlo|e15_adr|w = or 268435456 shl and x 3 29|w = or 268435456 shl and x 3 28 +scaled_max|e16_ldr_uoff|if or ne rem uo sz 0 gt div uo sz 4095|if or ne rem uo sz 0 gt div uo sz 4096 +ldrb_max|e18_ldrb_uoff|if gt uo 4095\nret -4|if gt uo 4096\nret -4 +post_mask|e20_ldr_post|w = or base shl and bitcast ulong imm 511 12|w = or base shl and bitcast ulong imm 255 12 +subs_base|e24_subs_imm|base = 4043309056|base = 3942645760 +put_full|buf|if gt add p 4 get st 1|if ge add p 4 get st 1 +put_byte0|buf|put b p uchar and x 255|put b p uchar and shr x 8 255 +dec_mul_o0|dec|if eq and insn 2145418240 453016576|if eq and insn 2145451008 453016576 +dec_ret_rn|dec|put out 3 30|put out 3 0 +dec_post_sf|dec|if eq m 3091203072\ndregs out 15 insn 30 2|if eq m 3091203072\ndregs out 15 insn 31 2 +dec_bcond_imm|dec|put out 7 and shr insn 5 524287\nret 0\nend\nm = and insn 2130706432|put out 7 and shr insn 4 524287\nret 0\nend\nm = and insn 2130706432 +val_hex8|val|n = apphex t n w 8|n = apphex t n w 7 +val_trunc|val|m = sub ml 1|m = ml +val_last|val|if and eq i sub c 1 ne get d 0 8|if and eq i sub c 2 ne get d 0 8 +val_digit|val|put t add n sub sub k 1 i uchar add 48 rem q 10|put t add n sub sub k 1 i uchar add 49 rem q 10 +EOF +while IFS='|' read -r name s old new; do + python3 - "$OM" "$T/m.om" "$old" "$new" <<'PY' +import sys +src, dst, old, new = sys.argv[1], sys.argv[2], sys.argv[3].replace("\\n", "\n"), sys.argv[4].replace("\\n", "\n") +s = open(src).read() +assert s.count(old + "\n") == 1, "mutant text not found exactly once: " + old +open(dst, "w").write(s.replace(old + "\n", new + "\n")) +PY + "$OMEGA_OMC" < "$T/m.om" > "$T/m"; chmod +x "$T/m" + rc=0; "$T/m" < "$T/corp/$s.txt" > "$T/m.out" 2> /dev/null || rc=$? + got=$(sha256sum < "$T/m.out" | cut -c1-64) + want=$(grep "^$s " "$P/expected.txt" | cut -d' ' -f3) + if [ "$got" = "$want" ]; then echo "mutant $name NOT killed on $s"; echo x >> "$T/failed"; continue; fi + d=$(paste -d'|' "$T/m.out" "$T/$s.out" | awk -F'|' '$1 != $2' | wc -l) + echo "mutant $name killed on $s ($d records differ, exit $rc)" +done < "$T/mutants" +[ ! -e "$T/failed" ] || { echo "AARCH64-PARITY FAIL"; exit 1; } + +# Named limits: record | expected exit (100 + trap code) +cat > "$T/traps" <<'EOF' +E 1 0 100 0 0|105|register 256 is outside uint8_t +E 1 2 0 0 0|105|sf 2 is outside bool +E a 80000000 0 0 0|105|imm26 2^31 is outside int32_t +D 100000000|105|word 2^32 is outside uint32_t +V 4 101 c0035fd6|103|ml 257 is more than the 256-byte msg array +P 2000 ffd 1 9 0 0 0 0|103|a write past the 4096-byte buffer (pos 4093, max_len 8192) +EOF +while IFS='|' read -r rec want why; do + rc=0; printf '%s\n' "$rec" | "$T/am" > /dev/null 2>&1 || rc=$? + if [ "$rc" = "$want" ]; then echo "limit trapped (exit $rc): $why"; else echo "limit FAIL (exit $rc, want $want): $why"; echo x >> "$T/failed"; fi +done < "$T/traps" +[ ! -e "$T/failed" ] || { echo "AARCH64-PARITY FAIL"; exit 1; } + +if command -v as > /dev/null && command -v objcopy > /dev/null && [ "$(uname -m)" = aarch64 ]; then + mkdir "$T/gas" + python3 "$P/gas.py" "$T/corp" "$T" "$T/gas" || { echo "AARCH64-PARITY FAIL: GNU as cross-check"; exit 1; } +else + echo "gas cross-check NOT_RUN: no AArch64 as/objcopy" +fi + +if [ -z "${OMEGA_BRIDGE:-}" ]; then + echo "AARCH64-PARITY PASS (bindability NOT_RUN: set OMEGA_BRIDGE)"; exit 0 +fi +[ "$(sha256sum < "$OMEGA_BRIDGE/src/native.om" | cut -c1-64)" = "$NATIVE_PIN" ] || { echo "AARCH64-PARITY PASS (bindability NOT_RUN: native.om is not the pinned generator)"; exit 0; } +"$OMEGA_OMC" < "$OMEGA_BRIDGE/src/native.om" > "$T/native"; chmod +x "$T/native" +: > "$T/units" +for u in a64addreg a64subreg a64mulreg a64andreg a64orrreg a64eorreg a64movreg a64movz a64ret a64b a64bcond \ + a64cbz a64cbnz a64movk a64adr a64ldruoff a64struoff a64ldrbuoff a64strbuoff a64ldrpost a64strpost \ + a64ldrxpost a64strxpost a64subsimm a64subsreg a64put a64decode a64validate; do + python3 "$P/unit.py" "$OM" "$u" > "$T/u.om" + "$OMEGA_OMC" < "$T/u.om" > "$T/u.bin" + { cat "$T/u.om"; printf '\0'; printf '%08d' "$(wc -c < "$T/u.bin")"; cat "$T/u.bin"; } >> "$T/units" +done +"$T/native" < "$T/units" > "$T/units.c" +cc -std=gnu11 -O2 -Wall -Wextra -Werror -c "$T/units.c" -o "$T/units.o" +echo "bindability: 28 function-mode units accepted by native.om and compiled ($(grep -c ') uint32_t omega_[a-z0-9]*(uint64_t \*result' "$T/units.c") exported functions)" +echo "AARCH64-PARITY PASS" diff --git a/om/aarch64/parity/unit.py b/om/aarch64/parity/unit.py new file mode 100755 index 000000000..29675b4a2 --- /dev/null +++ b/om/aarch64/parity/unit.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""unit.py AARCH64.om NAME: print the function-mode unit that exports NAME. + +The unit is NAME and every library function it reaches through calls (the part of aarch64.om +before the parity-harness marker), in file order, with NAME moved to the end: the seeded compiler +enters a function-mode unit at its last function and the omega-bridge native call ABI v1 binds that +one; the others stay private helpers. Note lines before a kept function travel with it. +""" +import sys + +MARK = "note ==== parity harness" + + +def functions(lib): + """[(name, first line incl. leading notes, end line)] of the library.""" + out = [] + i = 0 + while i < len(lib): + w = lib[i].split() + if w[:1] == ["fn"]: + j = i + while j > 0 and lib[j - 1].startswith("note") and not lib[j - 1].startswith("note ----"): + j -= 1 + depth = 0 + for k in range(i, len(lib)): + t = lib[k].split()[:1] + if t and t[0] in ("fn", "if", "while", "for"): + depth += 1 + elif t == ["end"]: + depth -= 1 + if depth == 0: + break + else: + sys.exit("unit.py: %s has no closing end" % w[1]) + out.append((w[1], j, k)) + i = k + 1 + else: + i += 1 + return out + + +def main(): + if len(sys.argv) != 3: + sys.exit(__doc__) + src, name = sys.argv[1], sys.argv[2] + lines = open(src).read().split("\n") + lib = lines[:next(i for i, l in enumerate(lines) if l.startswith(MARK))] + fns = functions(lib) + span = {n: (a, b) for n, a, b in fns} + if name not in span: + sys.exit("unit.py: no function %s" % name) + calls = {} + for n, a, b in fns: + words = set() + for l in lib[a:b + 1]: + if not l.startswith("note"): + words.update(l.split()) + calls[n] = {m for m in words if m in span and m != n} + keep = {name} + todo = [name] + while todo: + for m in calls[todo.pop()]: + if m not in keep: + keep.add(m) + todo.append(m) + order = [n for n, _, _ in fns if n in keep and n != name] + [name] + parts = [] + for n in order: + a, b = span[n] + parts.append("\n".join(lib[a:b + 1])) + sys.stdout.write("note SPDX-License-Identifier: Apache-2.0\nnote generated from om/aarch64/aarch64.om by parity/unit.py %s\n\n" % name) + sys.stdout.write("\n\n".join(parts) + "\n") + + +if __name__ == "__main__": + main() diff --git a/om/blake3/README.md b/om/blake3/README.md index 659be6244..d972db1f2 100644 --- a/om/blake3/README.md +++ b/om/blake3/README.md @@ -9,7 +9,7 @@ aien-dev/aien-architecture-mv#300 (zero-legacy migration). ## Build ``` -OMC=/path/to/seed/out/omc # pinned: sha256 734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61 +OMC=/path/to/seed/out/omc # born by: sh seed/omega-from-seed.sh $OMC < om/blake3/blake3.om > blake3 && chmod +x blake3 ./blake3 FILE # or: ./blake3 < FILE ``` @@ -18,6 +18,32 @@ Exit codes: 0 hash written; 65 input cannot be read (missing file, no permission directory, read error); 66 input longer than 16 MiB (16,777,216 bytes is accepted, 16,777,217 is refused). Messages go to stderr. +Returned stdout write errors or zero-progress writes exit 74. Positive short writes +resume at the next byte; returned negative results, including interrupted writes, +fail closed. Signal termination (for example the default SIGPIPE action) is not +reported as exit 74. + +Run the output-contract regression against a freshly compiled binary: + +``` +sh om/blake3/test-output.sh ./blake3 +``` + +The fixture compares the complete empty-input digest, including its newline, and +checks /dev/full and closed-stdout failures. Positive short writes and EINTR are not +forced by this fixture. `bash tests/gates/run.sh om-units` compiles `blake3.om` with the +seed-born omc and runs this fixture, so the om-units CI check covers it. + +Native run on the Spark (arm64 host, 2026-10-25), omc 734f0a39…6b61 built by +`sh seed/omega-from-seed.sh`: this source (sha256 c7c96a26…a150) compiles to an +8,664-byte binary, sha256 f3e343d2…2dbd. `test-output.sh` exits 0 on it and 1 on the +PR #732 binary (c51199a3…f77b), which exits 0 for /dev/full (ENOSPC) and closed +stdout (EBADF). A forced positive short write (`ulimit -f 1`, SIGXFSZ ignored, 994-byte +file opened for append) shows `write(1, …, 65) = 30` then `write(1, …+30, 35) = -1 +EFBIG` and exit 74. The 64-case corpus below, rerun against this binary with a fresh +-O2 build of `src/omega_blake3.c` as oracle, gives 64/64, and the binary matches +`tests/resolve/blake3_vectors.txt` 35/35. + ## Construction Same as the C: 1024-byte chunks of 64-byte blocks, CHUNK_START on a chunk's first block, @@ -28,7 +54,7 @@ reference holds trivially), ROOT on the single final compression. 32-bit words l split into words 12 and 13 of the state. The message permutation runs 7 times per compression, as in the C. -## Oracle and parity +## Historical oracle and parity (PR #732) Oracle: `src/omega_blake3.c` compiled with gcc -O2 behind a 12-line C driver (file → hex, kept out of the tree). The driver was first checked against the official @@ -37,6 +63,10 @@ match, and the file is identical to the repo's `tests/resolve/blake3_vectors.txt Two single-line mutants of the C (the B3M:root and B3M:merge tags) are caught by the vector set (35/35 and 16/35 vectors differ), so the corpus discriminates. +The following corpus and hashes belong to the original source at commit +`c2156c7069df619797a113582fa6ad658c3db999`, before the output-handling fix. +They are not verification of the revised source or binary. + Corpus run with omc 734f0a39…6b61, `blake3.om` sha256 79857ee8…baa3, output binary sha256 c51199a3…f77b (8,660 bytes). Every row compares the .om output byte for byte to the oracle (or the exit status where that is the contract). @@ -51,7 +81,7 @@ the oracle (or the exit status where that is the contract). | Missing file, mode-000 file, directory | 3 | exit 65 all | | **Total** | **64** | **64/64** | -Timing on the Spark (arm64): 16 MiB in 0.33 s for the .om versus 0.05 s for the -O2 C. +Historical timing of the original PR #732 source on the Spark (arm64): 16 MiB in 0.33 s for the .om versus 0.05 s for the -O2 C. ## Limits diff --git a/om/blake3/blake3.om b/om/blake3/blake3.om index e5983a13c..ea768a7fc 100644 --- a/om/blake3/blake3.om +++ b/om/blake3/blake3.om @@ -9,7 +9,6 @@ note usage: blake3 [FILE] text tbad "blake3: cannot read input\n" text tbig "blake3: input over 16 MiB\n" -text tnl "\n" global inp uchar 16777216 global n ulong 1 @@ -26,7 +25,7 @@ global cvr ulong 8 global stk ulong 512 global sp ulong 1 global name uchar 4096 -global hex uchar 64 +global hex uchar 65 global tiny uchar 1 const mask ulong 4294967295 @@ -226,7 +225,7 @@ ret uchar add v 87 end note little-endian bytes of co 0..7 as 64 hex digits -fn emit to void +fn emit to int for i ulong 8 v = get co i for k ulong 4 @@ -236,8 +235,16 @@ put hex p hexd shr bt 4 put hex add p 1 hexd and bt 15 end end -r = write 1 hex 0 64 -r = write 1 tnl 0 1 +put hex 64 10 +off = ulong 0 +while lt off 65 bound 65 +r = write 1 hex off sub 65 off +if le r 0 +ret 74 +end +off = add off ulong r +end +ret 0 end note read the whole descriptor into inp; 0 ok, 65 read error, 66 over capacity @@ -325,6 +332,5 @@ r = write 2 tbig 0 len tbig ret 66 end hashall -emit -ret 0 +ret emit end diff --git a/om/blake3/test-output.sh b/om/blake3/test-output.sh new file mode 100644 index 000000000..d4d56964a --- /dev/null +++ b/om/blake3/test-output.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Host output-contract regression. Pass a freshly compiled blake3.om binary. +# Does not compile, access the GPU, or change the live server. +set -eu +[ "$#" -eq 1 ] || { echo 'usage: test-output.sh /path/to/blake3' >&2; exit 2; } +B=$1 +[ -x "$B" ] || { echo 'FAIL: binary is not executable' >&2; exit 1; } +[ -c /dev/full ] || { echo 'NOT_RUN: /dev/full unavailable' >&2; exit 77; } +T=$(mktemp -d) +trap 'rm -rf "$T"' EXIT HUP INT TERM +bad() { printf 'FAIL: %s\n' "$*" >&2; exit 1; } +"$B" "$T/out" || bad 'empty-input control failed' +printf '%s\n' af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262 >"$T/want" +cmp "$T/want" "$T/out" || bad 'empty-input digest or newline differs' +rc=0 +"$B" /dev/full || rc=$? +[ "$rc" -eq 74 ] || bad "/dev/full returned $rc, wanted 74" +rc=0 +"$B" &- || rc=$? +[ "$rc" -eq 74 ] || bad "closed stdout returned $rc, wanted 74" +printf '%s\n' 'PASS: empty digest, /dev/full and closed stdout' diff --git a/om/codec/README.md b/om/codec/README.md new file mode 100644 index 000000000..bee28975c --- /dev/null +++ b/om/codec/README.md @@ -0,0 +1,244 @@ +# om/codec: the graph codec, canonical form and validator in Omega + +`codec.om` ports `src/omega_codec.c`, `src/omega_canonical.c` and `src/omega_validate.c` (with +`omega_codec.h`, `omega_canonical.h`, `omega_validate.h`, `omega_types.h`) to seeded Omega, for +aien-dev/omega-mv#726. It also ports the parts of `src/omega_core.c` that those files call: the +effect payload decode (`omega_effect_read`) and the four builders that `omega_graph_parse_text` +uses. No C file changes. Nothing is linked into the product yet. + +| file | role | +|---|---| +| `codec.om` | the library (12 exported functions) and, after the `note ==== parity harness` line, a program-mode harness | +| `parity/corpus.py` | deterministic corpus generator (wire graphs, text inputs, hex-id records) | +| `parity/expected.txt` | sha256 of each output stream as the C oracle wrote it | +| `parity/run.sh` | compiles `codec.om`, regenerates the corpus, compares every stream with `expected.txt`; `--mutants` adds 21 mutants | +| `parity/unit.py` | cuts the function-mode unit of one exported function (for omega-bridge ABI v1) | + +## What the C files contain (and where the task text differs) + +The task text speaks of "programs/ops/operands" and "decode bytes into a program record". The C has +no program or op list. It has an `OmegaGraph` of up to 256 semantic objects. Each object has a kind, +up to 32 attributes (key and value), 64 relations (kind and target id), 32 constraints and a +1024-byte payload. The payload bytes are read through host structs (`TypePayload`, `ValuePayload`, +`OperationPayload`, `ApplyPayload`). The port follows the files: + +- `omega_graph_deserialize_binary`: the `OMGG` wire format becomes a graph, and every object gets + its semantic id. +- `omega_graph_serialize_binary`, `omega_canonical_encode`, `omega_compute_semantic_id`: the + canonical encoding with sorted attributes, relations and constraints, and its sha256. +- `omega_validate_graph` and `omega_validate_object`: the C returns only `-1` for every failure. + What tells the failures apart is the message the C writes into `err_msg`, so the port writes the + same message byte for byte. +- `omega_graph_format_text` and `omega_graph_parse_text`. Both are in `omega_codec.c`, though the + task text does not name them. +- `omega_hex_semantic_id`, `omega_parse_hex_semantic_id`, `omega_compare_semantic_id`, + `omega_canonical_object_version`, `omega_canonical_check_header`. + +**The task corpus does not exist.** The task asked for every `.omega`/`.osc`/`.bin` file under +`tests/` and `examples/` that the C decoder accepts: +- There is no `examples/` directory. +- `tests/` has 248 such files (246 `.osc` source texts and 2 unrelated `.bin`). The C decoder + accepts none of them, because none starts with `OMGG`. The port refuses the same 248, and + `run.sh` reports this. + +The accepted graphs therefore come from two sources: +- **The product's own builders.** These are the `omegatool --dump-test-vectors` graphs, the + physics law graph, and one graph that uses every builder. `corpus.py` rebuilds them, and + `--check-product` checks that they are byte-equal to what the C builders write. +- **Generated graphs** (below). + +## Design: a graph is a wire image plus an index + +The C `OmegaGraph` is 6,648,836 bytes of fixed records. Omega has no structs that could be passed +across the ABI, no heap, and no globals in function mode. So the port never builds the struct. +Instead, a graph is two arrays: + +- **W** (`uchar`, 2,097,152 bytes) is the `OMGG` wire image the graph was decoded from. +- **X** (`ulong`, 20,544) is an index. `X[0]` is the object count. Object `j` has 80 cells at + `64 + 80 j`: + - cbuf offset, clen, kind, attribute count, relation count, offset of the first relation, + constraint count, payload length, payload offset, `has_id`; + - the id as 4 big-endian words; + - 32 attribute key offsets (each key length is the byte just before its key); + - 32 constraint record offsets. + +Every field of the C object is a function of W and X. Relations are fixed-size records, so one +offset locates all of them. `cparse` uses the C builders' record layout to write the objects it +builds into W as an `OMGG` image. Then it indexes W with the same decoder. A builder object has no +attributes, so its canonical encoding is exactly its record, and re-decoding it gives the same +object. + +`sbyte` returns any byte of the C struct image of object `j`, using the aarch64 LP64 layout measured +with `offsetof`: +- `OmegaObject` is 25,972 bytes, with the payload at offset 24,948; +- multi-byte fields are host little-endian; +- padding is zero; +- objects at or past the count are zero, because the C memsets the graph. + +The C reads past an object's 1024-byte payload in two places, and the port reproduces both: +- `format_text` folds `bytes[byte_len]` of a `KIND_VALUE`, with a `byte_len` of up to 65,535. +- The cycle walk reads `operands[operand_count]` through `ApplyPayload` for any `KIND_OPERATION` + whose payload is at least 161 bytes, with an `operand_count` of up to 255. + +C behaviours the port keeps: +- The decoded attribute key is a C string, so the canonical form and the sort use the key up to its + first NUL, not `klen`. +- An object whose canonical form exceeds 4,096 bytes gets no id (`has_id` 0, id zero). It is + invisible to id lookups, and `serialize` fails on it. +- `format_text` keeps the stale `w` when an operation's payload is shorter than an `ApplyPayload`: + it advances `pos` without writing. The C's `w >= max_len - pos` check runs at equality. +- `parse_text` runs `strstr`/`strchr` over the whole rest of the string, not just the current line. + It re-assigns pointers on every matching line. When the graph is full, builders return NULL, so + `val_a` can stay NULL and `op_add` can become NULL. +- The product compiles with `-D_GNU_SOURCE` against glibc 2.39, so `strtoul` binds to + `__isoc23_strtoul` (checked with `nm`) and accepts `0b`/`0B` binary. Overflow gives `ULONG_MAX` + whatever the sign. +- glibc aarch64 `memcmp` returns -1/0/1 (measured), and so does `cidcmp`. + +The cycle walk does not recurse, because function mode forbids call cycles. It keeps an explicit +stack of frames (object, phase, step, next j) and visits objects in the C's order. That order +includes duplicate objects with equal ids. Cycles are reachable only through the operand read past +the payload, when it lands on an id stored in the next object's attribute value. The corpus builds +such cycles on purpose. + +## Oracle + +- **Source.** omega-mv `acb3f15c`, sha256: + - `40dbd8d3…e07a` omega_codec.c + - `a15848c3…65c0` omega_canonical.c + - `5d2472ec…c3ec` omega_validate.c + - `e00b7830…4752` omega_core.c + - `ea8ae1c8…ed15` sha256.c + - `61d35344…392c` omega_om_units.inc + - `c058a742…395c` omega_types.h +- **Build.** gcc 13.3.0 with the Makefile CFLAGS `-std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE + -O2 -Isrc`. The `.text` of each of the four codec objects is byte-identical to a `make` build of + the same sources (`omega-blake3-abi/build`). +- **Driver.** It lives outside the tree, in `/tmp/turx/CodecPort-oracle/`: `oracle.c` sha256 + `1b0eed89…fa26` and `oracle.sh` `eb3d5918…417c`. One command rebuilds the C from a checkout's + `src/`, regenerates the corpus with this `corpus.py`, writes the streams and compares their + sha256 with `parity/expected.txt`: + `sh /tmp/turx/CodecPort-oracle/oracle.sh CHECKOUT`. +- **Memory past the graph.** The driver puts the graph in a zeroed allocation with 128 KiB of + slack after `OmegaGraph`, so the C's reads past the last object see zeros. +- **sha256.** The ids come from the product's `sha256.c`, which is itself the `om/sha256` unit. The + port uses its own SHA-256 (the FIPS code of `tools/zero-legacy/sha256.om`). The driver also + checks every serialized graph's sha256 against Python's hashlib. + +## Parity (pinned omc `62775d2a…712b`) + +`codec.om` sha256 is `c8e93310…a2e8`. It compiles to a 95,048-byte program. The corpus is +generated on every run: +- `decode.pack`: 4,564 wire inputs, 13.6 MB; +- `text.pack`: 1,612 text inputs; +- `hexid.pack`: 6,000 records. + +| stream | what it records | lines | result | +|---|---|---|---| +| decode | rc, count, `has_id` and id of every object | 4,564 (2,908 decoded) | equal to C | +| validate | rc and message (23 distinct message forms seen, including 8 cycles) | 2,908 | equal | +| serialize | rc, length, bytes, sha256 at max_len 1,049,606; rc and length at 8,192 | 2,908 | equal | +| format | rc and text at cap 4,096 and at cap 200 | 2,908 | equal | +| parse | parse_text rc, ids, then the validate, serialize and format lines of the graph it built | 6,448 | equal | +| hexid | parse_hex rc and output bytes, hex of an id, compare of two ids and of an id with itself | 6,000 | equal | +| header | object_version and check_header for all 65,536 (version, kind) pairs | 65,536 | equal | + +The decode inputs are: +- the 3 product vectors; +- 57 edge cases; +- the 12 cycle graphs, built through the operand read past the payload; +- 21 overread graphs, whose `format_text` reads past the payload, one up to the end of a 256-object + graph; +- 353 targeted graphs: every validate branch at its boundaries, a walk 200 deep, and a walk over 120 + duplicates; +- 18 boundary graphs: serialize totals 8,186 to 8,199, and format where the stale length equals the + room left; +- 300 clean graphs and 700 structured random graphs; +- 2,000 single-byte mutants and 300 truncations of valid graphs; +- 500 random byte strings, and 300 random strings behind an `OMGG` header. + +The text inputs cover: +- number forms: decimal, hex, octal, binary, sign, overflow, and `0x`/`0b` with no digits; +- C-locale whitespace, NUL inside the text, CRLF; +- graphs of 256 objects and more; +- random bytes. + +**Mutants.** `run.sh --mutants` makes 21 single edits. Each one must change the stream it names, +and it must run to completion: a trap does not count as killed. All 21 are killed: +- attribute sort, key past its NUL, relation order, constraint length tie; +- klen 64, effect padding, id limit, unsigned width, value byte rounding; +- operand window offset, struct value offset, serialize length check, stale line length, value last + 8 bytes; +- binary prefix, strtoul overflow, line end, negative hex pair, memcmp sign, v1 effect code, a + SHA-256 constant. + +Reproduce from a fresh clone; the default omc is the checkout's `seed/out/omc`, which is the pinned one: + + sh om/codec/parity/run.sh --mutants + +## ABI note (bindable functions) + +The pinned omc refuses `const` in function mode (error 9), so array lengths are written as numbers. +`parity/unit.py` cuts each exported function with its helpers. Every one of the 12 units compiles +in function mode. The pinned `native.om` (omega-bridge `012860db`, sha256 `2c2c53f6…3940`) accepts +them all, and its generated C compiles with `-Wall -Wextra -Werror`. Signatures: + +- `omega_cdecode(r, w[2097152 B], n, x[20544])` +- `omega_cserial(r, w, x, mx, o[1049606 B])` +- `omega_cvalid(r, w, x, e[256 B])` +- `omega_cvobject(r, w, x, j, e[256 B])` +- `omega_cformat(r, w, x, cap, t[65536 B])` +- `omega_cparse(r, s[262144 B], n, w, x)` +- `omega_ccanon(r, w, x, j, cb[4096 B])` +- `omega_chexparse(r, h[65 B], o[32 B])` +- `omega_chexid(r, a[32 B], o[65 B])` +- `omega_cidcmp(r, a[32 B], b[32 B])` +- `omega_cobjver(r, k)` +- `omega_cchkhdr(r, v, k)` + +There is also a check run outside the tree. A `/tmp` driver (`abi.c` sha256 `e2f31ab1…6a6f`) ran +all 7 streams through the generated bindings, and the output was byte-identical to the C oracle's. + +## Limits + +1. **WCAP.** `cdecode` returns `-2` instead of continuing when it would read a wire byte at or past + 2,097,152. The C has no such limit. `run.sh` shows a 2,097,174-byte graph that the C decodes + (rc 0) and the port refuses (rc -2). + Every graph that `serialize` can write is at most 1,049,606 bytes, and the product's callers use + 4,096 to 8,192-byte buffers. +2. **SCAP.** `cparse` returns `-2` when the input is longer than 262,144 bytes. The C has no limit. + The string ends at its first NUL or at `n`. +3. **TCAP.** `cformat` returns `-1` for `cap` > 65,536, which the C would format. The product's + caller uses 4,096. +4. **The error buffer is 256 bytes, and there is no length parameter.** The C callers pass 256 + (`omega_verify.c`, `omegatool.c`, `visor_verify.c`) or 160 (`visor_effect_request.c`). The + longest message is 99 bytes (a dangling-relation message with its 64 hex digits), so the C's + snprintf never truncates for these callers. A caller that passes fewer than 100 bytes would see + truncation in the C and not here. An adapter for a 160-byte caller copies the message out. +5. **Reads past the object.** Inside the graph, the port reproduces the C struct image exactly. + Past the end of `OmegaGraph`, the C reads memory it does not own (undefined behaviour), and the + port returns zero there. That matches the oracle only because the oracle's graph sits in zeroed + slack. Another caller's memory past the graph could differ. +6. **`omega_validate_object`.** The C also takes an object that is not in the graph. `cvobject` + validates X's object `j`. +7. **Arguments.** `j` must be below 256 (`ccanon`, `cvobject`), or the call traps 3. W and X must + come from `cdecode` or `cparse`: an arbitrary index can trap (out of range). +8. **`ccanon` on failure.** When the encoding exceeds 4,096 bytes, `ccanon` writes nothing. The C + writes a prefix before it fails. No caller reads the buffer after a failure. `cserial` writes the + same prefix as the C. +9. **Unreachable C paths are not ported:** + - NULL-argument checks and their messages (`Null graph pointer`, `Null object pointer`); + - `Graph object count %u exceeds maximum` (X never holds more than 256); + - the C's `omega_graph_find_object*` and the other builders in `omega_core.c`, which are out of + scope. + + The effect-refusal message in validate is ported but not covered: a decoded graph's effects have + already passed the same check, and parse_text builds no effects. +10. **Platform.** Parity holds for the product's platform: aarch64 LP64 struct offsets, glibc 2.39 + strtoul/strtol/memcmp, and the C locale. It is not claimed for another libc or ABI. + +## NOT_RUN + +- No C adapter, no change to `src/`, no unit in `om/units.sh` or `src/omega_om_units.inc`. +- No deletion of the C objects from `libomega_gpu.a` (that goes through omega-bridge #8). +- No `make test`, no gate suite, no GPU. diff --git a/om/codec/codec.om b/om/codec/codec.om new file mode 100644 index 000000000..63afcd4bf --- /dev/null +++ b/om/codec/codec.om @@ -0,0 +1,3053 @@ +note SPDX-License-Identifier: Apache-2.0 +note codec.om: seeded Omega port of src/omega_codec.c, src/omega_canonical.c and src/omega_validate.c +note (aien-dev/omega-mv#726), with the parts of src/omega_core.c they call (effect payload decode and +note the four builders omega_graph_parse_text uses). Parity is on bytes and status codes against the C +note as the product builds it (gcc -std=gnu11 -O2, the Makefile CFLAGS, aarch64). See README.md. +note +note A graph is two arrays: W, the OMGG wire image it was decoded from (uchar, WCAP bytes), and X, +note an index of ulongs (XLEN). The C OmegaGraph (6,648,836 bytes) is never materialised: every +note OmegaObject field is a function of W and X, and sbyte below gives any byte of the C struct image +note (the C reads past an object's 1024-byte payload in format_text and in the cycle walk). +note X 0 object count +note X ob(j) + 0..13 cbuf offset, clen, kind, attr count, rel count, first rel offset, +note const count, payload_len, payload offset, has_id, id as 4 big-endian ulongs +note X ob(j) + 14..45 offset of attribute a's key bytes (klen is the byte before) +note X ob(j) + 46..77 offset of constraint c's record (kind, payload_len, payload) +note +note Exported functions (omega-bridge native call ABI v1: ulong scalars, fixed-length uchar/ulong +note arrays, long result): +note cdecode w n x omega_graph_deserialize_binary: 0, -1 as the C; -2 = needs a byte past WCAP +note cserial w x mx o omega_graph_serialize_binary: the length written, or -1 +note cvalid w x e omega_validate_graph: 0 or -1, message + NUL in e as the C's snprintf +note cvobject w x j e omega_validate_object of object j: 0 or -1, message as cvalid +note cformat w x cap t omega_graph_format_text: 0 or -1, t as the C leaves it +note cparse s n w x omega_graph_parse_text: 0 (-2: n > SCAP); the graph is left in w, x +note ccanon w x j cb omega_canonical_encode of object j with max_len 4096: length or -1 +note chexparse h o omega_parse_hex_semantic_id on the first 65 bytes of the C string +note chexid i o omega_hex_semantic_id: 64 hex digits and a NUL +note cidcmp a b omega_compare_semantic_id: -1, 0, 1 (glibc aarch64 memcmp gives the sign) +note cobjver k omega_canonical_object_version +note cchkhdr v k omega_canonical_check_header + +note Fixed sizes (written as numbers: the pinned omc refuses `const` in function mode, error 9): +note 2097152 W, the wire image (WCAP) 20544 X, the index: 64 + 80 * 256 (XLEN) +note 1049606 serialize output: 6 + 256 * (4 + 4096), the most omega_graph_serialize_binary writes +note 65536 format_text buffer (TCAP) 262144 parse_text input (SCAP) +note 256 error message / text line 4294967295 the 32-bit mask in SHA-256 + +note ---- small helpers ---- + +fn ob j ulong to ulong +ret add 64 mul j 80 +end + +fn be16 w view uchar 2097152 i ulong to ulong +ret or shl ulong get w i 8 ulong get w add i 1 +end + +fn be32 w view uchar 2097152 i ulong to ulong +v = be16 w i +ret or shl v 16 be16 w add i 2 +end + +fn be64 w view uchar 2097152 i ulong to ulong +v = be32 w i +ret or shl v 32 be32 w add i 4 +end + +fn cobjver k ulong to ulong +if eq k 8 +ret 2 +end +ret 1 +end + +fn cchkhdr v ulong k ulong to long +if and eq k 8 eq v 1 +ret -2 +end +if ne v cobjver k +ret -1 +end +ret 0 +end + +note ---- the C struct image (aarch64 LP64 offsets, measured with offsetof) ---- +note OmegaObject 25972 bytes: id 0, has_id 32, kind 36, attr_count 40, attributes 42 (578 each: +note key 64, value 512, val_len 576), rel_count 18538, relations 18540 (34 each), const_count +note 20716, constraints 20718 (132 each), payload_len 24944, payload 24948. Host order little-endian. + +note payload byte p (< 1024) of the object at X base b; 0 past payload_len (the decoder memsets) +fn plb w view uchar 2097152 x view ulong 20544 b ulong p ulong to ulong +if lt p get x add b 7 +ret ulong get w add get x add b 8 p +end +ret 0 +end + +fn sattr w view uchar 2097152 x view ulong 20544 b ulong q ulong to ulong +a = div q 578 +r = rem q 578 +if ge a get x add b 3 +ret 0 +end +o = get x add add b 14 a +kl = ulong get w sub o 1 +if lt r 64 +if lt r kl +ret ulong get w add o r +end +ret 0 +end +vl = be16 w add o kl +if lt r 576 +v = sub r 64 +if lt v vl +ret ulong get w add add o kl add 2 v +end +ret 0 +end +if eq r 576 +ret and vl 255 +end +ret shr vl 8 +end + +fn srel w view uchar 2097152 x view ulong 20544 b ulong q ulong to ulong +r = div q 34 +s = rem q 34 +if ge r get x add b 4 +ret 0 +end +o = add get x add b 5 mul r 34 +if eq s 0 +ret ulong get w add o 1 +end +if eq s 1 +ret ulong get w o +end +ret ulong get w add o s +end + +fn sconst w view uchar 2097152 x view ulong 20544 b ulong q ulong to ulong +c = div q 132 +s = rem q 132 +if ge c get x add b 6 +ret 0 +end +o = get x add add b 46 c +if lt s 4 +if eq s 0 +ret ulong get w add o 1 +end +if eq s 1 +ret ulong get w o +end +if eq s 2 +ret ulong get w add o 3 +end +ret ulong get w add o 2 +end +p = sub s 4 +if lt p be16 w add o 2 +ret ulong get w add add o 4 p +end +ret 0 +end + +note byte o of OmegaObject j as the C holds it; objects at or past the count are zero (memset, and the +note oracle's graph has zero bytes after it: see README "Reads past the object") +fn sbyte w view uchar 2097152 x view ulong 20544 j ulong o ulong to ulong +if ge j get x 0 +ret 0 +end +b = ob j +if lt o 32 +q = get x add add b 10 div o 8 +ret and shr q mul sub 7 rem o 8 8 255 +end +if eq o 32 +ret get x add b 9 +end +if eq o 36 +ret get x add b 2 +end +if eq o 40 +ret and get x add b 3 255 +end +if eq o 41 +ret shr get x add b 3 8 +end +if lt o 42 +ret 0 +end +if lt o 18538 +ret sattr w x b sub o 42 +end +if eq o 18538 +ret and get x add b 4 255 +end +if eq o 18539 +ret shr get x add b 4 8 +end +if lt o 20716 +ret srel w x b sub o 18540 +end +if eq o 20716 +ret and get x add b 6 255 +end +if eq o 20717 +ret shr get x add b 6 8 +end +if lt o 24942 +ret sconst w x b sub o 20718 +end +if lt o 24944 +ret 0 +end +if lt o 24948 +ret and shr get x add b 7 mul sub o 24944 8 255 +end +ret plb w x b sub o 24948 +end + +note payload byte p of object j, also past the 1024-byte payload (into the following objects) +fn pbyte w view uchar 2097152 x view ulong 20544 j ulong p ulong to ulong +if lt p 1024 +ret plb w x ob j p +end +g = add 24948 p +ret sbyte w x add j div g 25972 rem g 25972 +end + +note 8 payload bytes from p, big-endian (an id word) +fn pw64 w view uchar 2097152 x view ulong 20544 j ulong p ulong to ulong +v = ulong 0 +for i ulong 8 +v = or shl v 8 pbyte w x j add p i +end +ret v +end + +fn pu16 w view uchar 2097152 x view ulong 20544 b ulong p ulong to ulong +ret or plb w x b p shl plb w x b add p 1 8 +end + +fn pu32 w view uchar 2097152 x view ulong 20544 b ulong p ulong to ulong +v = pu16 w x b add p 2 +ret or shl v 16 pu16 w x b p +end + +note ---- SHA-256 (FIPS 180-4; from tools/zero-legacy/sha256.om, state in arrays) ---- + +fn shak k edit ulong 64 to void +put k 0 1116352408 +put k 1 1899447441 +put k 2 3049323471 +put k 3 3921009573 +put k 4 961987163 +put k 5 1508970993 +put k 6 2453635748 +put k 7 2870763221 +put k 8 3624381080 +put k 9 310598401 +put k 10 607225278 +put k 11 1426881987 +put k 12 1925078388 +put k 13 2162078206 +put k 14 2614888103 +put k 15 3248222580 +put k 16 3835390401 +put k 17 4022224774 +put k 18 264347078 +put k 19 604807628 +put k 20 770255983 +put k 21 1249150122 +put k 22 1555081692 +put k 23 1996064986 +put k 24 2554220882 +put k 25 2821834349 +put k 26 2952996808 +put k 27 3210313671 +put k 28 3336571891 +put k 29 3584528711 +put k 30 113926993 +put k 31 338241895 +put k 32 666307205 +put k 33 773529912 +put k 34 1294757372 +put k 35 1396182291 +put k 36 1695183700 +put k 37 1986661051 +put k 38 2177026350 +put k 39 2456956037 +put k 40 2730485921 +put k 41 2820302411 +put k 42 3259730800 +put k 43 3345764771 +put k 44 3516065817 +put k 45 3600352804 +put k 46 4094571909 +put k 47 275423344 +put k 48 430227734 +put k 49 506948616 +put k 50 659060556 +put k 51 883997877 +put k 52 958139571 +put k 53 1322822218 +put k 54 1537002063 +put k 55 1747873779 +put k 56 1955562222 +put k 57 2024104815 +put k 58 2227730452 +put k 59 2361852424 +put k 60 2428436474 +put k 61 2756734187 +put k 62 3204031479 +put k 63 3329325298 +end + +fn shainit h edit ulong 8 to void +put h 0 1779033703 +put h 1 3144134277 +put h 2 1013904242 +put h 3 2773480762 +put h 4 1359893119 +put h 5 2600822924 +put h 6 528734635 +put h 7 1541459225 +end + +fn rotr x ulong r ulong to ulong +ret and or shr x r shl x sub 32 r 4294967295 +end + +fn bsig0 x ulong to ulong +ret xor rotr x 2 xor rotr x 13 rotr x 22 +end + +fn bsig1 x ulong to ulong +ret xor rotr x 6 xor rotr x 11 rotr x 25 +end + +fn ssig0 x ulong to ulong +ret xor rotr x 7 xor rotr x 18 shr x 3 +end + +fn ssig1 x ulong to ulong +ret xor rotr x 17 xor rotr x 19 shr x 10 +end + +fn shach x ulong y ulong z ulong to ulong +ret xor and x y and and not x 4294967295 z +end + +fn shamaj x ulong y ulong z ulong to ulong +ret xor and x y xor and x z and y z +end + +fn shard st edit ulong 8 ki ulong wi ulong to void +a = get st 0 +e = get st 4 +t1 = add get st 7 bsig1 e +t1 = add t1 shach e get st 5 get st 6 +t1 = and add add t1 ki wi 4294967295 +t2 = and add bsig0 a shamaj a get st 1 get st 2 4294967295 +put st 7 get st 6 +put st 6 get st 5 +put st 5 e +put st 4 and add get st 3 t1 4294967295 +put st 3 get st 2 +put st 2 get st 1 +put st 1 a +put st 0 and add t1 t2 4294967295 +end + +fn shablk h edit ulong 8 m view uchar 64 k view ulong 64 to void +w = new ulong 64 0 +for i ulong 16 +o = mul i 4 +v = ulong get m o +v = or shl v 8 ulong get m add o 1 +v = or shl v 8 ulong get m add o 2 +v = or shl v 8 ulong get m add o 3 +put w i v +end +for j ulong 48 +i = add j 16 +s = add ssig1 get w sub i 2 get w sub i 7 +s = add s ssig0 get w sub i 15 +s = add s get w sub i 16 +put w i and s 4294967295 +end +st = new ulong 8 0 +for i ulong 8 +put st i get h i +end +for i ulong 64 +shard st get k i get w i +end +for i ulong 8 +put h i and add get h i get st i 4294967295 +end +end + +note pad block m (r message bytes already in it) and finish; shaget gives the digest as 4 big-endian ulongs +fn shafin h edit ulong 8 m edit uchar 64 k view ulong 64 r ulong n ulong to void +put m r 128 +for i ulong 64 +if gt i r +put m i 0 +end +end +if ge r 56 +shablk h m k +for i ulong 64 +put m i 0 +end +end +bits = mul n 8 +for i ulong 8 +sh = mul sub 7 i 8 +put m add 56 i uchar and shr bits sh 255 +end +shablk h m k +end + +fn shaget h view ulong 8 d edit ulong 4 to void +for i ulong 4 +put d i or shl get h mul i 2 32 get h add mul i 2 1 +end +end + +fn sha4k b view uchar 4096 n ulong d edit ulong 4 to void +k = new ulong 64 0 +shak k +h = new ulong 8 0 +shainit h +m = new uchar 64 0 +nb = div n 64 +for bi ulong nb +o = mul bi 64 +for i ulong 64 +put m i get b add o i +end +shablk h m k +end +tb = mul nb 64 +r = sub n tb +for i ulong r +put m i get b add tb i +end +shafin h m k r n +shaget h d +end + +note ---- decode (omega_graph_deserialize_binary) ---- + +note the C's check `cpos + k > clen` (-1), then the port's capacity: a byte at or past WCAP (-2) +fn cneed cp ulong k ulong cl ulong c2 ulong to long +if gt add cp k cl +ret -1 +end +if gt add cp k c2 +ret -2 +end +ret 0 +end + +fn cap2 cs ulong cl ulong to ulong +r = sub 2097152 cs +if lt cl r +ret cl +end +ret r +end + +fn dattrs w view uchar 2097152 x edit ulong 20544 b ulong cs ulong cl ulong to long +c2 = cap2 cs cl +cp = ulong 6 +r = cneed cp 2 cl c2 +if ne r 0 +ret r +end +na = be16 w add cs cp +cp = add cp 2 +if gt na 32 +ret -1 +end +put x add b 3 na +for a ulong na +r = cneed cp 1 cl c2 +if ne r 0 +ret r +end +kl = ulong get w add cs cp +cp = add cp 1 +if ge kl 64 +ret -1 +end +r = cneed cp add kl 2 cl c2 +if ne r 0 +ret r +end +put x add add b 14 a add cs cp +cp = add cp kl +vl = be16 w add cs cp +cp = add cp 2 +if gt vl 512 +ret -1 +end +r = cneed cp vl cl c2 +if ne r 0 +ret r +end +cp = add cp vl +end +ret long cp +end + +fn drels w view uchar 2097152 x edit ulong 20544 b ulong cs ulong cl ulong cp ulong to long +c2 = cap2 cs cl +r = cneed cp 2 cl c2 +if ne r 0 +ret r +end +nr = be16 w add cs cp +cp = add cp 2 +if gt nr 64 +ret -1 +end +put x add b 4 nr +put x add b 5 add cs cp +for i ulong nr +r = cneed cp 34 cl c2 +if ne r 0 +ret r +end +cp = add cp 34 +end +ret long cp +end + +fn dconsts w view uchar 2097152 x edit ulong 20544 b ulong cs ulong cl ulong cp ulong to long +c2 = cap2 cs cl +r = cneed cp 2 cl c2 +if ne r 0 +ret r +end +nc = be16 w add cs cp +cp = add cp 2 +if gt nc 32 +ret -1 +end +put x add b 6 nc +for c ulong nc +r = cneed cp 4 cl c2 +if ne r 0 +ret r +end +put x add add b 46 c add cs cp +pl = be16 w add add cs cp 2 +cp = add cp 4 +if gt pl 128 +ret -1 +end +r = cneed cp pl cl c2 +if ne r 0 +ret r +end +cp = add cp pl +end +ret long cp +end + +fn dpay w view uchar 2097152 x edit ulong 20544 b ulong cs ulong cl ulong cp ulong to long +c2 = cap2 cs cl +r = cneed cp 4 cl c2 +if ne r 0 +ret r +end +pl = be32 w add cs cp +cp = add cp 4 +if gt pl 1024 +ret -1 +end +r = cneed cp pl cl c2 +if ne r 0 +ret r +end +put x add b 7 pl +put x add b 8 add cs cp +ret long add cp pl +end + +note omega_effect_read of a KIND_EFFECT object (omega_core.c): 0 or OMEGA_EFFECT_ERR_* +fn effchk w view uchar 2097152 x view ulong 20544 b ulong to long +pl = get x add b 7 +if eq pl 176 +ret -3 +end +if ne pl 178 +ret -2 +end +res = or shl plb w x b 0 8 plb w x b 1 +if eq res 0 +ret -4 +end +prm = or shl plb w x b 48 8 plb w x b 49 +if gt prm 128 +ret -5 +end +for i ulong 128 +if ge i prm +if ne plb w x b add 50 i 0 +ret -6 +end +end +end +ret 0 +end + +note omega_compute_semantic_id: sha256 of the canonical encoding in a 4096-byte buffer; a longer +note encoding leaves has_id 0 and the id zero +fn semid w view uchar 2097152 x edit ulong 20544 j ulong to void +cb = new uchar 4096 0 +n = ccanon w view x j cb +if lt n 0 +ret +end +d = new ulong 4 0 +sha4k cb ulong n d +b = ob j +put x add b 9 1 +for i ulong 4 +put x add add b 10 i get d i +end +end + +fn dobj w view uchar 2097152 x edit ulong 20544 j ulong cs ulong cl ulong to long +b = ob j +put x 0 add j 1 +c2 = cap2 cs cl +if lt c2 6 +ret -2 +end +if or ne get w cs 79 ne get w add cs 1 77 +ret -1 +end +if or ne get w add cs 2 71 ne get w add cs 3 48 +ret -1 +end +k = ulong get w add cs 5 +if ne cchkhdr ulong get w add cs 4 k 0 +ret -1 +end +put x b cs +put x add b 1 cl +put x add b 2 k +r = dattrs w x b cs cl +if lt r 0 +ret r +end +r = drels w x b cs cl ulong r +if lt r 0 +ret r +end +r = dconsts w x b cs cl ulong r +if lt r 0 +ret r +end +r = dpay w x b cs cl ulong r +if lt r 0 +ret r +end +if eq k 8 +if ne effchk w view x b 0 +ret -1 +end +end +semid w x j +ret 0 +end + +fn cdecode w view uchar 2097152 n ulong x edit ulong 20544 to long +if lt n 6 +ret -1 +end +if or ne get w 0 79 ne get w 1 77 +ret -1 +end +if or ne get w 2 71 ne get w 3 71 +ret -1 +end +cnt = be16 w 4 +if gt cnt 256 +ret -1 +end +for i ulong 20544 +put x i 0 +end +pos = ulong 6 +for i ulong cnt +if gt add pos 4 n +ret -1 +end +if gt add pos 4 2097152 +ret -2 +end +cl = be32 w pos +pos = add pos 4 +if or gt add pos cl n lt cl 6 +ret -1 +end +r = dobj w x i pos cl +if ne r 0 +ret r +end +pos = add pos cl +end +ret 0 +end + +note ---- canonical encoding (omega_canonical_encode) ---- + +note strlen of attribute key at offset o, klen bytes stored (the C key ends at its first NUL) +fn ekl w view uchar 2097152 o ulong kl ulong to ulong +for i ulong kl +if eq get w add o i 0 +ret i +end +end +ret kl +end + +fn canlen w view uchar 2097152 x view ulong 20544 b ulong to ulong +n = ulong 8 +na = get x add b 3 +for a ulong na +o = get x add add b 14 a +kl = ulong get w sub o 1 +n = add n add add 3 ekl w o kl be16 w add o kl +end +n = add n add 4 mul 34 get x add b 4 +nc = get x add b 6 +for c ulong nc +o = get x add add b 46 c +n = add n add 4 be16 w add o 2 +end +ret add n add 4 get x add b 7 +end + +note strcmp sign of attribute keys i and j (unsigned bytes; a key ends at klen or its first NUL) +fn acmp w view uchar 2097152 x view ulong 20544 b ulong i ulong j ulong to long +oi = get x add add b 14 i +oj = get x add add b 14 j +ki = ulong get w sub oi 1 +kj = ulong get w sub oj 1 +for t ulong 65 +ci = ulong 0 +if lt t ki +ci = ulong get w add oi t +end +cj = ulong 0 +if lt t kj +cj = ulong get w add oj t +end +if lt ci cj +ret -1 +end +if gt ci cj +ret 1 +end +if eq ci 0 +ret 0 +end +end +ret 0 +end + +fn memcmpw w view uchar 2097152 a ulong c ulong n ulong to long +for i ulong n +p = ulong get w add a i +q = ulong get w add c i +if lt p q +ret -1 +end +if gt p q +ret 1 +end +end +ret 0 +end + +fn rcmp w view uchar 2097152 x view ulong 20544 b ulong i ulong j ulong to long +rb = get x add b 5 +oi = add rb mul i 34 +oj = add rb mul j 34 +ki = be16 w oi +kj = be16 w oj +if lt ki kj +ret -1 +end +if gt ki kj +ret 1 +end +ret memcmpw w add oi 2 add oj 2 32 +end + +fn ccmp w view uchar 2097152 x view ulong 20544 b ulong i ulong j ulong to long +oi = get x add add b 46 i +oj = get x add add b 46 j +ki = be16 w oi +kj = be16 w oj +if lt ki kj +ret -1 +end +if gt ki kj +ret 1 +end +li = be16 w add oi 2 +lj = be16 w add oj 2 +m = li +if lt lj li +m = lj +end +r = memcmpw w add oi 4 add oj 4 m +if ne r 0 +ret r +end +if lt li lj +ret -1 +end +if gt li lj +ret 1 +end +ret 0 +end + +note the C's insertion sorts (stable): kind 0 attributes (strcmp), 1 relations, 2 constraints +fn cmpk w view uchar 2097152 x view ulong 20544 b ulong t ulong i ulong j ulong to long +if eq t 0 +ret acmp w x b i j +end +if eq t 1 +ret rcmp w x b i j +end +ret ccmp w x b i j +end + +fn isort w view uchar 2097152 x view ulong 20544 b ulong t ulong ix edit ulong 64 n ulong to void +for i ulong n +put ix i i +end +for u ulong n +if gt u 0 +key = get ix u +j = sub long u 1 +while ge j 0 bound 64 +if le cmpk w x b t get ix j key 0 +break +end +put ix add j 1 get ix j +j = sub j 1 +end +put ix add j 1 key +end +end +end + +fn put16 cb edit uchar 4096 p ulong v ulong to ulong +put cb p uchar shr v 8 +put cb add p 1 uchar and v 255 +ret add p 2 +end + +note copy n wire bytes from o to cb at p; returns p + n +fn wcopy w view uchar 2097152 cb edit uchar 4096 p ulong o ulong n ulong to ulong +for t ulong n +put cb add p t get w add o t +end +ret add p n +end + +fn canone w view uchar 2097152 x view ulong 20544 b ulong cb edit uchar 4096 p ulong a ulong to ulong +o = get x add add b 14 a +kl = ulong get w sub o 1 +ek = ekl w o kl +put cb p uchar ek +p = wcopy w cb add p 1 o ek +vl = be16 w add o kl +p = put16 cb p vl +ret wcopy w cb p add add o kl 2 vl +end + +fn canattr w view uchar 2097152 x view ulong 20544 b ulong cb edit uchar 4096 p ulong to ulong +ix = new ulong 64 0 +na = get x add b 3 +isort w x b 0 ix na +p = put16 cb p na +for i ulong na +p = canone w x b cb p get ix i +end +ret p +end + +fn canrel w view uchar 2097152 x view ulong 20544 b ulong cb edit uchar 4096 p ulong to ulong +ix = new ulong 64 0 +nr = get x add b 4 +isort w x b 1 ix nr +p = put16 cb p nr +rb = get x add b 5 +for i ulong nr +p = wcopy w cb p add rb mul get ix i 34 34 +end +ret p +end + +fn cancon w view uchar 2097152 x view ulong 20544 b ulong cb edit uchar 4096 p ulong to ulong +ix = new ulong 64 0 +nc = get x add b 6 +isort w x b 2 ix nc +p = put16 cb p nc +for i ulong nc +o = get x add add b 46 get ix i +p = wcopy w cb p o add 4 be16 w add o 2 +end +ret p +end + +fn ccanon w view uchar 2097152 x view ulong 20544 j ulong cb edit uchar 4096 to long +b = ob j +n = canlen w x b +if gt n 4096 +ret -1 +end +k = get x add b 2 +put cb 0 79 +put cb 1 77 +put cb 2 71 +put cb 3 48 +put cb 4 uchar cobjver k +put cb 5 uchar k +p = canattr w x b cb 6 +p = canrel w x b cb p +p = cancon w x b cb p +pl = get x add b 7 +p = put16 cb p shr pl 16 +p = put16 cb p and pl 65535 +ret long wcopy w cb p get x add b 8 pl +end + +note ---- serialize (omega_graph_serialize_binary) ---- + +note one record: u32 big-endian length, then the canonical bytes; returns the new position +fn serone o edit uchar 1049606 pos ulong cb view uchar 4096 n ulong to ulong +for t ulong 4 +sh = mul sub 3 t 8 +put o add pos t uchar and shr n sh 255 +end +p = add pos 4 +for t ulong n +put o add p t get cb t +end +ret add p n +end + +fn cserial w view uchar 2097152 x view ulong 20544 mx ulong o edit uchar 1049606 to long +if gt 6 mx +ret -1 +end +put o 0 79 +put o 1 77 +put o 2 71 +put o 3 71 +cnt = get x 0 +put o 4 uchar shr cnt 8 +put o 5 uchar and cnt 255 +pos = ulong 6 +cb = new uchar 4096 0 +for i ulong cnt +n = ccanon w x i cb +if lt n 0 +ret -1 +end +L = ulong n +if gt add add pos 4 L mx +ret -1 +end +pos = serone o pos cb L +end +ret long pos +end + +note ---- message and line texts (each note quotes the bytes it writes) ---- + +note "Invalid semantic kind tag 0x" +fn mkind l edit uchar 256 p ulong to ulong +p = sput l p 2334106421097295433 8 +p = sput l p 7163384699739268467 8 +p = sput l p 7022273334698666784 8 +p = sput l p 2016419943 4 +ret p +end + +note "Empty attribute key at index " +fn mattr l edit uchar 256 p ulong to ulong +p = sput l p 8386019687157230917 8 +p = sput l p 2334400029372543604 8 +p = sput l p 7575182533742650731 8 +p = sput l p 139458864238 5 +ret p +end + +note "Invalid relation kind 0x" +fn mrelk l edit uchar 256 p ulong to ulong +p = sput l p 2334106421097295433 8 +p = sput l p 7957695015158572402 8 +p = sput l p 8660457699154684704 8 +ret p +end + +note " at index " +fn matidx l edit uchar 256 p ulong to ulong +p = sput l p 7306085893296906528 8 +p = sput l p 8312 2 +ret p +end + +note "Dangling relation target reference " +fn mdang l edit uchar 256 p ulong to ulong +p = sput l p 7453010347657421124 8 +p = sput l p 8028075772543857184 8 +p = sput l p 8387223622006349934 8 +p = sput l p 7954890096655036960 8 +p = sput l p 2123107 3 +ret p +end + +note "Invalid constraint kind 0x" +fn mconk l edit uchar 256 p ulong to ulong +p = sput l p 2334106421097295433 8 +p = sput l p 7593476291201757027 8 +p = sput l p 2334111905932670062 8 +p = sput l p 30768 2 +ret p +end + +note "Type payload length too short (" +fn mtshort l edit uchar 256 p ulong to ulong +p = sput l p 8746395235773348180 8 +p = sput l p 7954883203198709612 8 +p = sput l p 2337209276179182695 8 +p = sput l p 11294683576625267 7 +ret p +end + +note " bytes)" +fn mbytes l edit uchar 256 p ulong to ulong +p = sput l p 11667353628140064 7 +ret p +end + +note "Invalid type tag 0x" +fn mtag l edit uchar 256 p ulong to ulong +p = sput l p 2334106421097295433 8 +p = sput l p 7449362941137156468 8 +p = sput l p 7876640 3 +ret p +end + +note "Unsigned integer width " +fn muint l edit uchar 256 p ulong to ulong +p = sput l p 7234309766870429269 8 +p = sput l p 8243108378414311712 8 +p = sput l p 9122048364869408 7 +ret p +end + +note " out of bounds [1..256]" +fn mob1 l edit uchar 256 p ulong to ulong +p = sput l p 2334675642021670688 8 +p = sput l p 6566375131893296994 8 +p = sput l p 26236774937144881 7 +ret p +end + +note "Signed integer width " +fn msint l edit uchar 256 p ulong to ulong +p = sput l p 7575164960043919699 8 +p = sput l p 8583986669620130926 8 +p = sput l p 139191411817 5 +ret p +end + +note " out of bounds [2..256]" +fn mob2 l edit uchar 256 p ulong to ulong +p = sput l p 2334675642021670688 8 +p = sput l p 6566375131893296994 8 +p = sput l p 26236774937144882 7 +ret p +end + +note "FP32 width " +fn mfp32 l edit uchar 256 p ulong to ulong +p = sput l p 7235445256512294982 8 +p = sput l p 2123892 3 +ret p +end + +note " is not 32" +fn mnot32 l edit uchar 256 p ulong to ulong +p = sput l p 2338616625293650208 8 +p = sput l p 12851 2 +ret p +end + +note "Bitvector width " +fn mbitv l edit uchar 256 p ulong to ulong +p = sput l p 8031153322938624322 8 +p = sput l p 2335244381406568562 8 +ret p +end + +note "Sequence length " +fn mseql l edit uchar 256 p ulong to ulong +p = sput l p 7305804402566194515 8 +p = sput l p 2335244394374196256 8 +ret p +end + +note " exceeds 65535" +fn mexc l edit uchar 256 p ulong to ulong +p = sput l p 8314882298167715104 8 +p = sput l p 58494052283936 6 +ret p +end + +note "Sequence element type unresolved or not KIND_TYPE" +fn mseqe l edit uchar 256 p ulong to ulong +p = sput l p 7305804402566194515 8 +p = sput l p 8389754676365255968 8 +p = sput l p 7959303536498013216 8 +p = sput l p 7234318584538948978 8 +p = sput l p 2338616625293586208 8 +p = sput l p 5789751564106090827 8 +p = sput l p 69 1 +ret p +end + +note "Value payload length too short (" +fn mvshort l edit uchar 256 p ulong to ulong +p = sput l p 7021147439204426070 8 +p = sput l p 7308251910818983033 8 +p = sput l p 8029764343165118318 8 +p = sput l p 2891438995616068384 8 +ret p +end + +note "Value type_id unresolved or not KIND_TYPE" +fn mvtype l edit uchar 256 p ulong to ulong +p = sput l p 8751655596021539158 8 +p = sput l p 7959303532083897712 8 +p = sput l p 7234318584538948978 8 +p = sput l p 2338616625293586208 8 +p = sput l p 5789751564106090827 8 +p = sput l p 69 1 +ret p +end + +note "Value byte length " +fn mvlen1 l edit uchar 256 p ulong to ulong +p = sput l p 8746589046440747350 8 +p = sput l p 8387794212885652852 8 +p = sput l p 8296 2 +ret p +end + +note " does not match declared type width " +fn mvlen2 l edit uchar 256 p ulong to ulong +p = sput l p 8029390865643299872 8 +p = sput l p 2335225758293500020 8 +p = sput l p 7234314139196417380 8 +p = sput l p 7599578516261794848 8 +p = sput l p 543716452 4 +ret p +end + +note " (expected " +fn mvlen3 l edit uchar 256 p ulong to ulong +p = sput l p 8386658464824633376 8 +p = sput l p 2122853 3 +ret p +end + +note "Invalid opcode 0x" +fn mopc l edit uchar 256 p ulong to ulong +p = sput l p 2334106421097295433 8 +p = sput l p 3467883195115204719 8 +p = sput l p 120 1 +ret p +end + +note "Operation overflow policy not explicitly declared" +fn movf l edit uchar 256 p ulong to ulong +p = sput l p 8028075772644520015 8 +p = sput l p 7811056383824961646 8 +p = sput l p 7163375908187830127 8 +p = sput l p 8675375941656911993 8 +p = sput l p 8749496172062272624 8 +p = sput l p 7310012263327687712 8 +p = sput l p 100 1 +ret p +end + +note "Apply op_id unresolved or not KIND_OPERATION" +fn mapop l edit uchar 256 p ulong to ulong +p = sput l p 8101729960545251393 8 +p = sput l p 7310026594509416799 8 +p = sput l p 8007510524406034291 8 +p = sput l p 5281350672479821938 8 +p = sput l p 4706900771786933326 8 +p = sput l p 1313818964 4 +ret p +end + +note "Apply operand " +fn maparg l edit uchar 256 p ulong to ulong +p = sput l p 8101729960545251393 8 +p = sput l p 35615720698469 6 +ret p +end + +note " unresolved or invalid kind" +fn maparg2 l edit uchar 256 p ulong to ulong +p = sput l p 7813590758059832608 8 +p = sput l p 7575180394847561078 8 +p = sput l p 7719280165265700462 8 +p = sput l p 6581865 3 +ret p +end + +note "Effect payload refused: " +fn meff l edit uchar 256 p ulong to ulong +p = sput l p 8079585701754463813 8 +p = sput l p 8223683289222510945 8 +p = sput l p 2322278944754460261 8 +ret p +end + +note " (" +fn mparen l edit uchar 256 p ulong to ulong +p = sput l p 10272 2 +ret p +end + +note "effect payload length is not 178 bytes" +fn mefflen l edit uchar 256 p ulong to ulong +p = sput l p 8079585701754463845 8 +p = sput l p 7791337724994943329 8 +p = sput l p 8316213819917954661 8 +p = sput l p 4050760405305224736 8 +p = sput l p 126879583003168 6 +ret p +end + +note "legacy v1 effect payload (32-bit generation) refused" +fn meffv1 l edit uchar 256 p ulong to ulong +p = sput l p 8511936763473126764 8 +p = sput l p 8386658421572968497 8 +p = sput l p 7233184988217307168 8 +p = sput l p 8388343727209523232 8 +p = sput l p 8386109761109976864 8 +p = sput l p 7378429046976049001 8 +p = sput l p 1684370293 4 +ret p +end + +note "effect resource class is 0 (invalid resource)" +fn meffres l edit uchar 256 p ulong to ulong +p = sput l p 8223700889830319717 8 +p = sput l p 2334381325109130085 8 +p = sput l p 8316213867145423971 8 +p = sput l p 7022922066854686752 8 +p = sput l p 8030874101375854956 8 +p = sput l p 177794675317 5 +ret p +end + +note "effect param_len exceeds 128" +fn meffprm l edit uchar 256 p ulong to ulong +p = sput l p 8079585701754463845 8 +p = sput l p 7954883473932644961 8 +p = sput l p 8314882298167715104 8 +p = sput l p 942813472 4 +ret p +end + +note "effect parameter padding is not zero" +fn meffpad l edit uchar 256 p ulong to ulong +p = sput l p 8079585701754463845 8 +p = sput l p 8243122671947182689 8 +p = sput l p 7453010313246502944 8 +p = sput l p 2338616625293650208 8 +p = sput l p 1869768058 4 +ret p +end + +note "unknown effect error" +fn meffunk l edit uchar 256 p ulong to ulong +p = sput l p 2336936577129475701 8 +p = sput l p 7286952167337256549 8 +p = sput l p 1919906418 4 +ret p +end + +note "Empty graph (0 objects)" +fn mempty l edit uchar 256 p ulong to ulong +p = sput l p 8243593348941638981 8 +p = sput l p 8007453086365282401 8 +p = sput l p 11667417766128226 7 +ret p +end + +note "Structural cycle detected involving " +fn mcyc l edit uchar 256 p ulong to ulong +p = sput l p 8247626263119950931 8 +p = sput l p 7308325668320734305 8 +p = sput l p 7310577382524806176 8 +p = sput l p 8533317948409454692 8 +p = sput l p 543649385 4 +ret p +end + +note "relation target at object index " +fn mcycr l edit uchar 256 p ulong to ulong +p = sput l p 7957695015158572402 8 +p = sput l p 2338605601487156256 8 +p = sput l p 7162247753406379105 8 +p = sput l p 2339731488442490996 8 +ret p +end + +note "operand target at object index " +fn mcyco l edit uchar 256 p ulong to ulong +p = sput l p 2334111871694893167 8 +p = sput l p 6998721799809818996 8 +p = sput l p 8386658438686384244 8 +p = sput l p 9139576126728480 7 +ret p +end + +note "// OMEGA NON-CANONICAL TEXTUAL FORM\n// Objects: " +fn fhead1 l edit uchar 256 p ulong to ulong +p = sput l p 4703804534154080047 8 +p = sput l p 5638862070310981152 8 +p = sput l p 6061928941626150479 8 +p = sput l p 5053122625397872709 8 +p = sput l p 5701609007333855823 8 +p = sput l p 2322295501583903330 8 +ret p +end + +note "\n\n" +fn fnl2 l edit uchar 256 p ulong to ulong +p = sput l p 2570 2 +ret p +end + +note "; // id=" +fn fidsuf l edit uchar 256 p ulong to ulong +p = sput l p 4423776320936157243 8 +ret p +end + +note "type U" +fn ftypu l edit uchar 256 p ulong to ulong +p = sput l p 93597629184372 6 +ret p +end + +note " = UNSIGNED_INTEGER(" +fn ftypu2 l edit uchar 256 p ulong to ulong +p = sput l p 5136728445893492000 8 +p = sput l p 4995703963698611534 8 +p = sput l p 676480327 4 +ret p +end + +note ")" +fn fparsc l edit uchar 256 p ulong to ulong +p = sput l p 41 1 +ret p +end + +note "type Bool = BOOL" +fn ftbool l edit uchar 256 p ulong to ulong +p = sput l p 8029709367533140340 8 +p = sput l p 5498700815469977708 8 +ret p +end + +note "type Tag" +fn ftag l edit uchar 256 p ulong to ulong +p = sput l p 7449327756765067636 8 +ret p +end + +note "val v_" +fn fval l edit uchar 256 p ulong to ulong +p = sput l p 104960954753398 6 +ret p +end + +note " = " +fn feq l edit uchar 256 p ulong to ulong +p = sput l p 2112800 3 +ret p +end + +note "op " +fn fop l edit uchar 256 p ulong to ulong +p = sput l p 2125935 3 +ret p +end + +note "[WRAP]" +fn fwrap l edit uchar 256 p ulong to ulong +p = sput l p 102599274682203 6 +ret p +end + +note "apply app_" +fn fapply l edit uchar 256 p ulong to ulong +p = sput l p 8097789310871302241 8 +p = sput l p 24432 2 +ret p +end + +note "object kind=" +fn fobj l edit uchar 256 p ulong to ulong +p = sput l p 7719297731565085295 8 +p = sput l p 1029992041 4 +ret p +end + +note ---- text building in a 256-byte line (messages and format_text lines) ---- + +note k (<= 8) bytes of the little-endian packed word v at p; returns p + k +fn sput l edit uchar 256 p ulong v ulong k ulong to ulong +for i ulong k +put l add p i uchar and shr v mul i 8 255 +end +ret add p k +end + +fn sdec l edit uchar 256 p ulong v ulong to ulong +d = new uchar 20 0 +n = ulong 0 +while true bound 21 +put d n uchar add rem v 10 48 +n = add n 1 +v = div v 10 +if eq v 0 +break +end +end +for i ulong n +put l add p i get d sub sub n 1 i +end +ret add p n +end + +fn hexdig v ulong to ulong +if lt v 10 +ret add v 48 +end +ret add v 87 +end + +note %0x +fn shex l edit uchar 256 p ulong v ulong m ulong to ulong +n = ulong 1 +while lt n 16 bound 16 +if eq shr v mul n 4 0 +break +end +n = add n 1 +end +if lt n m +n = m +end +for i ulong n +sh = mul sub sub n 1 i 4 +put l add p i uchar hexdig and shr v sh 15 +end +ret add p n +end + +note 64 hex digits of the id of the object at X base b (zero when it has none) +fn sid l edit uchar 256 p ulong x view ulong 20544 b ulong to ulong +for i ulong 4 +v = get x add add b 10 i +for t ulong 16 +sh = mul sub 15 t 4 +put l add p t uchar hexdig and shr v sh 15 +end +p = add p 16 +end +ret p +end + +note 64 hex digits of 32 wire bytes at o +fn swhex l edit uchar 256 p ulong w view uchar 2097152 o ulong to ulong +for i ulong 32 +c = ulong get w add o i +put l p uchar hexdig shr c 4 +put l add p 1 uchar hexdig and c 15 +p = add p 2 +end +ret p +end + +fn snul l edit uchar 256 p ulong to void +put l p 0 +end + +note ---- validate (omega_validate_object / omega_validate_graph) ---- + +note find_object_by_id: the first object with has_id whose id is t; -1 when none +fn findid x view ulong 20544 t0 ulong t1 ulong t2 ulong t3 ulong to long +n = get x 0 +for j ulong n +b = ob j +if eq get x add b 9 1 +if eq get x add b 10 t0 +if eq get x add b 11 t1 +if eq get x add b 12 t2 +if eq get x add b 13 t3 +ret long j +end +end +end +end +end +end +ret -1 +end + +note find by the id stored in the payload of object j at byte p (C reads it through the payload struct) +fn findp w view uchar 2097152 x view ulong 20544 j ulong p ulong to long +t0 = pw64 w x j p +t1 = pw64 w x j add p 8 +t2 = pw64 w x j add p 16 +t3 = pw64 w x j add p 24 +ret findid x t0 t1 t2 t3 +end + +fn findw w view uchar 2097152 x view ulong 20544 o ulong to long +t0 = be64 w o +t1 = be64 w add o 8 +t2 = be64 w add o 16 +t3 = be64 w add o 24 +ret findid x t0 t1 t2 t3 +end + +note kind of the found object; 256 when not found (and/or evaluate both sides, so callers test f < 0 +note and the kind in one condition) +fn kindof x view ulong 20544 f long to ulong +if lt f 0 +ret 256 +end +ret get x add ob ulong f 2 +end + +fn vfail e edit uchar 256 p ulong to long +snul e p +ret -1 +end + +fn vattr w view uchar 2097152 x view ulong 20544 b ulong e edit uchar 256 to long +na = get x add b 3 +for i ulong na +o = get x add add b 14 i +if eq ekl w o ulong get w sub o 1 0 +p = mattr e 0 +ret vfail e sdec e p i +end +end +ret 0 +end + +fn vrels w view uchar 2097152 x view ulong 20544 b ulong e edit uchar 256 to long +nr = get x add b 4 +for i ulong nr +o = add get x add b 5 mul i 34 +k = be16 w o +if or eq k 0 gt k 9 +p = mrelk e 0 +p = shex e p k 4 +p = matidx e p +ret vfail e sdec e p i +end +if lt findw w x add o 2 0 +p = mdang e 0 +ret vfail e swhex e p w add o 2 +end +end +ret 0 +end + +fn vcons w view uchar 2097152 x view ulong 20544 b ulong e edit uchar 256 to long +nc = get x add b 6 +for i ulong nc +k = be16 w get x add add b 46 i +if or eq k 0 gt k 9 +p = mconk e 0 +p = shex e p k 4 +p = matidx e p +ret vfail e sdec e p i +end +end +ret 0 +end + +note "
%u" for a width message: 0 unsigned, 1 signed, 2 bitvector, 3 fp32, 4 sequence length
+fn vwmsg e edit uchar 256 t ulong v ulong to long
+p = ulong 0
+if eq t 0
+p = muint e 0
+end
+if eq t 1
+p = msint e 0
+end
+if eq t 2
+p = mbitv e 0
+end
+if eq t 3
+p = mfp32 e 0
+end
+if eq t 4
+p = mseql e 0
+end
+p = sdec e p v
+if eq t 1
+p = mob2 e p
+end
+if eq t 3
+p = mnot32 e p
+end
+if eq t 4
+p = mexc e p
+end
+if or eq t 0 eq t 2
+p = mob1 e p
+end
+ret vfail e p
+end
+
+fn vtype w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+b = ob j
+pl = get x add b 7
+if lt pl 44
+p = mtshort e 0
+p = sdec e p pl
+ret vfail e mbytes e p
+end
+tag = pu32 w x b 0
+if or eq tag 0 gt tag 14
+p = mtag e 0
+ret vfail e shex e p tag 2
+end
+wd = pu16 w x b 4
+if and eq tag 3 or lt wd 1 gt wd 256
+ret vwmsg e 0 wd
+end
+if and eq tag 4 or lt wd 2 gt wd 256
+ret vwmsg e 1 wd
+end
+if and eq tag 14 ne wd 32
+ret vwmsg e 3 wd
+end
+if and eq tag 5 or lt wd 1 gt wd 256
+ret vwmsg e 2 wd
+end
+if eq tag 7
+ln = pu32 w x b 8
+if gt ln 65535
+ret vwmsg e 4 ln
+end
+f = findp w x j 12
+if or lt f 0 ne kindof x f 2
+p = mseqe e 0
+ret vfail e p
+end
+end
+ret 0
+end
+
+fn vvalue w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+b = ob j
+pl = get x add b 7
+if lt pl 98
+p = mvshort e 0
+p = sdec e p pl
+ret vfail e mbytes e p
+end
+f = findp w x j 0
+if or lt f 0 ne kindof x f 2
+p = mvtype e 0
+ret vfail e p
+end
+tb = ob ulong f
+tag = pu32 w x tb 0
+if or or eq tag 3 eq tag 4 eq tag 5
+wd = pu16 w x tb 4
+ex = div add wd 7 8
+bl = pu16 w x b 32
+if ne bl ex
+p = mvlen1 e 0
+p = sdec e p bl
+p = mvlen2 e p
+p = sdec e p wd
+p = mvlen3 e p
+p = sdec e p ex
+ret vfail e mbytes e p
+end
+end
+ret 0
+end
+
+fn voper w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+b = ob j
+pl = get x add b 7
+if ge pl 204
+opc = pu32 w x b 0
+if or eq opc 0 gt opc 16
+p = mopc e 0
+ret vfail e shex e p opc 2
+end
+ov = pu32 w x b 4
+if or eq ov 0 gt ov 3
+p = movf e 0
+ret vfail e p
+end
+ret 0
+end
+if lt pl 161
+ret 0
+end
+f = findp w x j 0
+if or lt f 0 ne kindof x f 3
+p = mapop e 0
+ret vfail e p
+end
+n = plb w x b 32
+for i ulong n
+f = findp w x j add 33 mul i 32
+if lt f 0
+p = maparg e 0
+p = sdec e p i
+ret vfail e maparg2 e p
+end
+k = kindof x f
+if and ne k 1 ne k 3
+p = maparg e 0
+p = sdec e p i
+ret vfail e maparg2 e p
+end
+end
+ret 0
+end
+
+fn veff w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+b = ob j
+r = effchk w x b
+if eq r 0
+ret 0
+end
+p = meff e 0
+if eq r -2
+p = mefflen e p
+end
+if eq r -3
+p = meffv1 e p
+end
+if eq r -4
+p = meffres e p
+end
+if eq r -5
+p = meffprm e p
+end
+if eq r -6
+p = meffpad e p
+end
+p = mparen e p
+p = sdec e p get x add b 7
+ret vfail e mbytes e p
+end
+
+fn vobj w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+b = ob j
+k = get x add b 2
+if or eq k 0 gt k 11
+p = mkind e 0
+ret vfail e shex e p k 2
+end
+r = vattr w x b e
+if ne r 0
+ret r
+end
+r = vrels w x b e
+if ne r 0
+ret r
+end
+r = vcons w x b e
+if ne r 0
+ret r
+end
+if eq k 2
+ret vtype w x j e
+end
+if eq k 1
+ret vvalue w x j e
+end
+if eq k 3
+ret voper w x j e
+end
+if eq k 8
+ret veff w x j e
+end
+ret 0
+end
+
+note target of step a of the walk from object i into fr 1280..1283: phase 0 relation a, phase 1
+note apply operand a (read through the 161-byte ApplyPayload view, past the payload when a > 29).
+note false when that phase has no step a.
+fn dtgt w view uchar 2097152 x view ulong 20544 i ulong ph ulong a ulong fr edit ulong 1284 to bool
+b = ob i
+if eq ph 0
+if ge a get x add b 4
+ret false
+end
+o = add add get x add b 5 mul a 34 2
+for t ulong 4
+put fr add 1280 t be64 w add o mul t 8
+end
+ret true
+end
+if or ne get x add b 2 3 lt get x add b 7 161
+ret false
+end
+if ge a plb w x b 32
+ret false
+end
+p = add 33 mul a 32
+for t ulong 4
+put fr add 1280 t pw64 w x i add p mul t 8
+end
+ret true
+end
+
+note the first j >= j0 whose id equals the target in fr 1280..1283; -1 when none
+fn dscan x view ulong 20544 fr view ulong 1284 j0 ulong to long
+n = get x 0
+j = j0
+while lt j n bound 257
+b = ob j
+if eq get x add b 9 1
+if eq get x add b 10 get fr 1280
+if eq get x add b 11 get fr 1281
+if eq get x add b 12 get fr 1282
+if eq get x add b 13 get fr 1283
+ret long j
+end
+end
+end
+end
+end
+j = add j 1
+end
+ret -1
+end
+
+note one step of check_cycle_dfs without recursion. fr: frames (object, phase, step, next j) at
+note 4 per depth, object states at 1024 + i (0 unvisited, 1 on the stack, 2 done), the target at
+note 1280. Returns the new depth, or -(1 + 2 * j + phase) for a cycle through object j. Matches
+note already done (state 2) are skipped inside one step, so the caller's loop runs at most
+note 512 + 256 * 321 steps.
+fn dstep w view uchar 2097152 x view ulong 20544 fr edit ulong 1284 sp ulong to long
+f = mul sub sp 1 4
+i = get fr f
+ph = get fr add f 1
+a = get fr add f 2
+if not dtgt w x i ph a fr
+if eq ph 0
+put fr add f 1 1
+put fr add f 2 0
+put fr add f 3 0
+ret long sp
+end
+put fr add 1024 i 2
+ret long sub sp 1
+end
+r = dscan x fr get fr add f 3
+while ge r 0 bound 257
+if ne get fr add 1024 ulong r 2
+break
+end
+r = dscan x fr add ulong r 1
+end
+if lt r 0
+put fr add f 2 add a 1
+put fr add f 3 0
+ret long sp
+end
+j = ulong r
+put fr add f 3 add j 1
+s = get fr add 1024 j
+if eq s 0
+put fr add 1024 j 1
+g = mul sp 4
+put fr g j
+put fr add g 1 0
+put fr add g 2 0
+put fr add g 3 0
+ret long add sp 1
+end
+ret neg long add add mul j 2 ph 1
+end
+
+fn dfs w view uchar 2097152 x view ulong 20544 root ulong fr edit ulong 1284 e edit uchar 256 to long
+put fr add 1024 root 1
+put fr 0 root
+put fr 1 0
+put fr 2 0
+put fr 3 0
+sp = ulong 1
+while gt sp 0 bound 999999
+r = dstep w x fr sp
+if lt r 0
+c = sub ulong neg r 1
+p = mcyc e 0
+if eq rem c 2 0
+p = mcycr e p
+else
+p = mcyco e p
+end
+ret vfail e sdec e p div c 2
+end
+sp = ulong r
+end
+ret 0
+end
+
+note omega_validate_object for object j of the graph (the C also takes an object outside any graph;
+note here the object is always X's object j)
+fn cvobject w view uchar 2097152 x view ulong 20544 j ulong e edit uchar 256 to long
+ret vobj w x j e
+end
+
+fn cvalid w view uchar 2097152 x view ulong 20544 e edit uchar 256 to long
+n = get x 0
+if eq n 0
+p = mempty e 0
+ret vfail e p
+end
+for i ulong n
+r = vobj w x i e
+if ne r 0
+ret r
+end
+end
+fr = new ulong 1284 0
+for i ulong n
+if eq get fr add 1024 i 0
+r = dfs w x i fr e
+if ne r 0
+ret r
+end
+end
+end
+ret 0
+end
+
+note ---- format_text (omega_graph_format_text, NON-CANONICAL text) ----
+
+fn fsuf l edit uchar 256 p ulong x view ulong 20544 b ulong to ulong
+p = fidsuf l p
+p = sid l p x b
+ret sput l p 10 1
+end
+
+fn fopname l edit uchar 256 p ulong opc ulong to ulong
+if eq opc 3
+ret sput l p 4473921 3
+end
+if eq opc 4
+ret sput l p 4347219 3
+end
+ret sput l p 20559 2
+end
+
+note one object line into l: its length, or -1 when the C writes nothing (an OPERATION payload
+note shorter than ApplyPayload leaves w as the previous line's length)
+fn fline w view uchar 2097152 x view ulong 20544 i ulong l edit uchar 256 to long
+b = ob i
+k = get x add b 2
+p = ulong 0
+if eq k 2
+tag = pu32 w x b 0
+if eq tag 3
+wd = pu16 w x b 4
+p = ftypu l 0
+p = sdec l p wd
+p = ftypu2 l p
+p = sdec l p wd
+p = fparsc l p
+ret long fsuf l p x b
+end
+if eq tag 2
+p = ftbool l 0
+ret long fsuf l p x b
+end
+p = ftag l 0
+p = sdec l p tag
+ret long fsuf l p x b
+end
+if eq k 1
+bl = pu16 w x b 32
+s = ulong 0
+if gt bl 8
+s = sub bl 8
+end
+v = ulong 0
+while lt s bl bound 9
+v = or shl v 8 pbyte w x i add 34 s
+s = add s 1
+end
+p = fval l 0
+p = sdec l p i
+p = feq l p
+p = sdec l p v
+ret long fsuf l p x b
+end
+if eq k 3
+pl = get x add b 7
+if ge pl 204
+opc = pu32 w x b 0
+p = fop l 0
+p = fopname l p opc
+p = feq l p
+p = fopname l p opc
+p = fwrap l p
+ret long fsuf l p x b
+end
+if ge pl 161
+p = fapply l 0
+p = sdec l p i
+ret long fsuf l p x b
+end
+ret -1
+end
+p = fobj l 0
+p = sdec l p k
+ret long fsuf l p x b
+end
+
+note snprintf(t + pos, cap - pos, line) then the C's check: -1 when the line did not fit
+fn femit t edit uchar 65536 cap ulong pos ulong l view uchar 256 n ulong to long
+room = sub cap pos
+m = n
+if ge n room
+m = sub room 1
+end
+for i ulong m
+put t add pos i get l i
+end
+put t add pos m 0
+if ge n room
+ret -1
+end
+ret 0
+end
+
+fn cformat w view uchar 2097152 x view ulong 20544 cap ulong t edit uchar 65536 to long
+if or eq cap 0 gt cap 65536
+ret -1
+end
+l = new uchar 256 0
+cnt = get x 0
+p = fhead1 l 0
+p = sdec l p cnt
+p = fnl2 l p
+if lt femit t cap 0 l p 0
+ret -1
+end
+pos = p
+wv = p
+for i ulong cnt
+m = fline w x i l
+if ge m 0
+wv = ulong m
+if lt femit t cap pos l wv 0
+ret -1
+end
+else
+if ge wv sub cap pos
+ret -1
+end
+end
+pos = add pos wv
+end
+ret 0
+end
+
+note ---- parse_text (omega_graph_parse_text) and the omega_core.c builders it calls ----
+note sv: 0 u32 type, 1 val a, 2 val b, 3 op add, 4 op sub (object index + 1, 0 = NULL),
+note 5 object count, 6 wire write position; ids: 4 big-endian ulongs per object
+
+fn sch s view uchar 262144 sl ulong i ulong to ulong
+if lt i sl
+ret ulong get s i
+end
+ret 0
+end
+
+note isspace in the C locale
+fn isspc c ulong to bool
+ret or eq c 32 and ge c 9 le c 13
+end
+
+note the pattern bytes: 0 type, 1 val, 2 op, 3 apply, 4 UNSIGNED_INTEGER(32), 5 ADD, 6 SUB; length
+fn setpat pt edit uchar 24 c ulong to ulong
+l = new uchar 256 0
+n = ulong 0
+if eq c 0
+n = sput l 0 1701869940 4
+end
+if eq c 1
+n = sput l 0 7102838 3
+end
+if eq c 2
+n = sput l 0 28783 2
+end
+if eq c 3
+n = sput l 0 521510350945 5
+end
+if eq c 4
+n = sput l 0 4919424236051975765 8
+n = sput l n 5928222847595858271 8
+n = sput l n 691155752 4
+end
+if eq c 5
+n = sput l 0 4473921 3
+end
+if eq c 6
+n = sput l 0 4347219 3
+end
+for i ulong n
+put pt i get l i
+end
+ret n
+end
+
+note strncmp(s + i, pattern, n) == 0 (the string ends at sl)
+fn smat s view uchar 262144 sl ulong i ulong pt view uchar 24 n ulong to bool
+for t ulong n
+if ne sch s sl add i t ulong get pt t
+ret false
+end
+end
+ret true
+end
+
+note strstr(s + i, pattern) != NULL
+fn sfind s view uchar 262144 sl ulong i ulong pt view uchar 24 n ulong to bool
+while le add i n sl bound 999999
+if smat s sl i pt n
+ret true
+end
+i = add i 1
+end
+ret false
+end
+
+fn seol s view uchar 262144 sl ulong i ulong to ulong
+while lt i sl bound 999999
+if eq get s i 10
+ret i
+end
+i = add i 1
+end
+ret i
+end
+
+fn digv c ulong to ulong
+if and ge c 48 le c 57
+ret sub c 48
+end
+if and ge c 97 le c 122
+ret sub c 87
+end
+if and ge c 65 le c 90
+ret sub c 55
+end
+ret 99
+end
+
+note glibc 2.39 strtoul(s + i, NULL, 0) under _GNU_SOURCE is __isoc23_strtoul: 0b/0B is binary.
+note spref: skip spaces, sign and prefix; returns i | base << 40 | negative << 48
+fn spref s view uchar 262144 sl ulong i ulong to ulong
+while isspc sch s sl i bound 999999
+i = add i 1
+end
+ng = ulong 0
+c = sch s sl i
+if eq c 45
+ng = 1
+i = add i 1
+else
+if eq c 43
+i = add i 1
+end
+end
+bs = ulong 10
+if eq sch s sl i 48
+c = sch s sl add i 1
+if or eq c 120 eq c 88
+bs = 16
+i = add i 2
+else
+if or eq c 98 eq c 66
+bs = 2
+i = add i 2
+else
+bs = 8
+end
+end
+end
+ret or i or shl bs 40 shl ng 48
+end
+
+note the digits into r: r 0 the value, r 1 = 1 on overflow (glibc then returns ULONG_MAX whatever the sign)
+fn sdig s view uchar 262144 sl ulong i ulong bs ulong r edit ulong 2 to void
+cut = div 18446744073709551615 bs
+lim = rem 18446744073709551615 bs
+v = ulong 0
+while lt digv sch s sl i bs bound 999999
+d = digv sch s sl i
+if or gt v cut and eq v cut gt d lim
+put r 1 1
+else
+v = add mul v bs d
+end
+i = add i 1
+end
+put r 0 v
+end
+
+fn stoul s view uchar 262144 sl ulong i ulong to ulong
+q = spref s sl i
+r = new ulong 2 0
+sdig s sl and q 1099511627775 and shr q 40 255 r
+if eq get r 1 1
+ret 18446744073709551615
+end
+if eq shr q 48 1
+ret neg get r 0
+end
+ret get r 0
+end
+
+fn putid w edit uchar 2097152 o ulong ids view ulong 1024 k ulong to void
+for t ulong 32
+q = get ids add mul k 4 div t 8
+sh = mul sub 7 rem t 8 8
+put w add o t uchar and shr q sh 255
+end
+end
+
+note omega_graph_add_object + record header: the payload's wire offset (payload zeroed), 0 when full
+fn bstart w edit uchar 2097152 sv edit ulong 8 kind ulong pl ulong to ulong
+if ge get sv 5 256
+ret 0
+end
+o = get sv 6
+cl = add 16 pl
+for t ulong 4
+sh = mul sub 3 t 8
+put w add o t uchar and shr cl sh 255
+end
+put w add o 4 79
+put w add o 5 77
+put w add o 6 71
+put w add o 7 48
+put w add o 8 1
+put w add o 9 uchar kind
+for t ulong 6
+put w add add o 10 t 0
+end
+put w add o 16 uchar shr pl 24
+put w add o 17 uchar and shr pl 16 255
+put w add o 18 uchar and shr pl 8 255
+put w add o 19 uchar and pl 255
+for t ulong pl
+put w add add o 20 t 0
+end
+ret add o 20
+end
+
+note omega_compute_semantic_id of the record just written: sha256 of its bytes after the length
+fn bfin w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 to ulong
+o = get sv 6
+cl = be32 view w o
+cb = new uchar 4096 0
+for t ulong cl
+put cb t get w add add o 4 t
+end
+d = new ulong 4 0
+sha4k cb cl d
+n = get sv 5
+for t ulong 4
+put ids add mul n 4 t get d t
+end
+put sv 5 add n 1
+put sv 6 add add o 4 cl
+ret add n 1
+end
+
+fn btype w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 to ulong
+o = bstart w sv 2 44
+if eq o 0
+ret 0
+end
+put w o 3
+put w add o 4 32
+ret bfin w sv ids
+end
+
+fn bval w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 v ulong to ulong
+o = bstart w sv 1 98
+if eq o 0
+ret 0
+end
+putid w o ids sub get sv 0 1
+put w add o 32 4
+for t ulong 4
+sh = mul sub 3 t 8
+put w add add o 34 t uchar and shr v sh 255
+end
+ret bfin w sv ids
+end
+
+fn bop w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 opc ulong to ulong
+o = bstart w sv 3 204
+if eq o 0
+ret 0
+end
+k = sub get sv 0 1
+put w o uchar opc
+put w add o 4 1
+putid w add o 8 ids k
+put w add o 40 2
+putid w add o 41 ids k
+putid w add o 73 ids k
+putid w add o 169 ids k
+ret bfin w sv ids
+end
+
+fn bapply w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 op ulong to ulong
+o = bstart w sv 3 161
+if eq o 0
+ret 0
+end
+putid w o ids sub op 1
+put w add o 32 2
+putid w add o 33 ids sub get sv 1 1
+putid w add o 65 ids sub get sv 2 1
+ret bfin w sv ids
+end
+
+note one line whose first word starts at i (after the C's whitespace skip)
+fn pline s view uchar 262144 sl ulong i ulong w edit uchar 2097152 sv edit ulong 8 ids edit ulong 1024 to void
+pt = new uchar 24 0
+n = setpat pt 0
+if smat s sl i pt n
+n = setpat pt 4
+if sfind s sl i pt n
+put sv 0 btype w sv ids
+end
+ret
+end
+n = setpat pt 1
+if smat s sl i pt n
+q = ulong 0
+while lt add i q sl bound 999999
+if eq get s add i q 61
+break
+end
+q = add q 1
+end
+if and lt add i q sl ne get sv 0 0
+v = stoul s sl add add i q 1
+if eq get sv 1 0
+put sv 1 bval w sv ids v
+else
+if eq get sv 2 0
+put sv 2 bval w sv ids v
+end
+end
+end
+ret
+end
+n = setpat pt 2
+if smat s sl i pt n
+n = setpat pt 5
+if and sfind s sl i pt n ne get sv 0 0
+put sv 3 bop w sv ids 3
+ret
+end
+n = setpat pt 6
+if and sfind s sl i pt n ne get sv 0 0
+put sv 4 bop w sv ids 4
+end
+ret
+end
+n = setpat pt 3
+if smat s sl i pt n
+ok = and ne get sv 1 0 ne get sv 2 0
+if and ok ne get sv 3 0
+r = bapply w sv ids get sv 3
+ret
+end
+if and ok ne get sv 4 0
+r = bapply w sv ids get sv 4
+end
+end
+end
+
+fn cparse s view uchar 262144 n ulong w edit uchar 2097152 x edit ulong 20544 to long
+if gt n 262144
+ret -2
+end
+sl = n
+for i ulong n
+if eq get s i 0
+sl = i
+break
+end
+end
+sv = new ulong 8 0
+ids = new ulong 1024 0
+put sv 6 6
+p = ulong 0
+while lt p sl bound 999999
+while and lt p sl isspc sch s sl p bound 999999
+p = add p 1
+end
+if ge p sl
+break
+end
+if and eq get s p 47 eq sch s sl add p 1 47
+p = seol s sl p
+continue
+end
+pline s sl p w sv ids
+p = seol s sl p
+end
+put w 0 79
+put w 1 77
+put w 2 71
+put w 3 71
+c = get sv 5
+put w 4 uchar shr c 8
+put w 5 uchar and c 255
+r = cdecode view w get sv 6 x
+if ne r 0
+trap 9
+end
+ret 0
+end
+
+note ---- ids as text (omega_canonical.c) ----
+
+note strtol({c0, c1, 0}, &end, 16) consuming both characters: the byte value, or -1
+fn hx2 c0 ulong c1 ulong to long
+i = ulong 0
+if isspc c0
+i = 1
+end
+c = c0
+if eq i 1
+c = c1
+end
+ng = false
+if and eq i 0 or eq c 45 eq c 43
+ng = eq c 45
+i = 1
+c = c1
+end
+if eq i 1
+if gt digv c 15
+ret -1
+end
+v = long digv c
+if ng
+ret and neg v 255
+end
+ret v
+end
+if or gt digv c0 15 gt digv c1 15
+ret -1
+end
+if and eq c0 48 or eq c1 120 eq c1 88
+ret -1
+end
+ret long or shl digv c0 4 digv c1
+end
+
+fn chexparse h view uchar 65 o edit uchar 32 to long
+for i ulong 64
+if eq get h i 0
+ret -1
+end
+end
+if ne get h 64 0
+ret -1
+end
+for i ulong 32
+v = hx2 ulong get h mul i 2 ulong get h add mul i 2 1
+if lt v 0
+ret -1
+end
+put o i uchar v
+end
+ret 0
+end
+
+fn chexid a view uchar 32 o edit uchar 65 to void
+for i ulong 32
+c = ulong get a i
+put o mul i 2 uchar hexdig shr c 4
+put o add mul i 2 1 uchar hexdig and c 15
+end
+put o 64 0
+end
+
+fn cidcmp a view uchar 32 c view uchar 32 to long
+for i ulong 32
+p = get a i
+q = get c i
+if lt p q
+ret -1
+end
+if gt p q
+ret 1
+end
+end
+ret 0
+end
+
+note ==== parity harness: program mode only; everything above this line is the library ====
+note usage: codec decode|text|hexid < PACK, or codec header. Writes the stream files into the current
+note directory in exactly the C oracle's line formats (see parity/run.sh).
+
+text tdec "decode.out"
+text tval "validate.out"
+text tser "serialize.out"
+text tfmt "format.out"
+text tpar "parse.out"
+text thex "hexid.out"
+text thdr "header.out"
+text tuse "usage: codec decode|text|hexid < PACK | codec header\n"
+text tbad "codec: cannot open an output file\n"
+
+global ib uchar 1048576
+global ist ulong 2
+global obuf uchar 4194304
+global obn ulong 4
+global ofd long 4
+global arg uchar 64
+
+fn inb to ulong
+p = get ist 0
+if ge p get ist 1
+r = read 0 ib 0 1048576
+if le r 0
+ret 256
+end
+put ist 1 ulong r
+p = 0
+end
+put ist 0 add p 1
+ret ulong get ib p
+end
+
+note u32 little-endian record length; 2^32 at end of input
+fn rdlen to ulong
+c = inb
+if eq c 256
+ret 4294967296
+end
+v = c
+for i ulong 3
+v = or v shl inb mul add i 1 8
+end
+ret v
+end
+
+note n record bytes into a (the first 2097152; the rest is read and dropped). A `for` with a
+note counted value traps 4 past 1000000 passes, so long runs go in pieces of at most 4096.
+fn rdw a edit uchar 2097152 n ulong to void
+i = ulong 0
+while lt i n bound 999999
+m = sub n i
+if gt m 4096
+m = 4096
+end
+for t ulong m
+c = inb
+if lt add i t 2097152
+put a add i t uchar c
+end
+end
+i = add i m
+end
+end
+
+fn rds a edit uchar 262144 n ulong to void
+i = ulong 0
+while lt i n bound 999999
+m = sub n i
+if gt m 4096
+m = 4096
+end
+for t ulong m
+c = inb
+if lt add i t 262144
+put a add i t uchar c
+end
+end
+i = add i m
+end
+end
+
+fn ohexs f ulong o view uchar 1049606 n ulong to void
+i = ulong 0
+while lt i n bound 999999
+m = sub n i
+if gt m 4096
+m = 4096
+end
+for t ulong m
+ohexb f ulong get o add i t
+end
+i = add i m
+end
+end
+
+fn oflush f ulong to void
+n = get obn f
+if gt n 0
+r = write int get ofd f obuf mul f 1048576 n
+end
+put obn f 0
+end
+
+fn ob1 f ulong c ulong to void
+n = get obn f
+if ge n 1048576
+oflush f
+n = 0
+end
+put obuf add mul f 1048576 n uchar c
+put obn f add n 1
+end
+
+fn odec f ulong v ulong to void
+d = new uchar 20 0
+n = ulong 0
+while true bound 21
+put d n uchar add rem v 10 48
+n = add n 1
+v = div v 10
+if eq v 0
+break
+end
+end
+for i ulong n
+ob1 f ulong get d sub sub n 1 i
+end
+end
+
+fn osdec f ulong v long to void
+if lt v 0
+ob1 f 45
+odec f ulong neg v
+ret
+end
+odec f ulong v
+end
+
+fn ohexb f ulong c ulong to void
+ob1 f hexdig shr c 4
+ob1 f hexdig and c 15
+end
+
+fn ohexw f ulong v ulong to void
+for t ulong 16
+sh = mul sub 15 t 4
+ob1 f hexdig and shr v sh 15
+end
+end
+
+fn oopen f ulong name view uchar 32 n ulong to bool
+fd = fopen name 0 n 577 420
+if lt fd 0
+ret false
+end
+put ofd f fd
+ret true
+end
+
+fn opn f ulong c ulong to bool
+nm = new uchar 32 0
+if eq c 0
+for i ulong len tdec
+put nm i get tdec i
+end
+ret oopen f nm len tdec
+end
+if eq c 1
+for i ulong len tval
+put nm i get tval i
+end
+ret oopen f nm len tval
+end
+if eq c 2
+for i ulong len tser
+put nm i get tser i
+end
+ret oopen f nm len tser
+end
+if eq c 3
+for i ulong len tfmt
+put nm i get tfmt i
+end
+ret oopen f nm len tfmt
+end
+if eq c 4
+for i ulong len tpar
+put nm i get tpar i
+end
+ret oopen f nm len tpar
+end
+if eq c 5
+for i ulong len thex
+put nm i get thex i
+end
+ret oopen f nm len thex
+end
+for i ulong len thdr
+put nm i get thdr i
+end
+ret oopen f nm len thdr
+end
+
+fn shaout b view uchar 1049606 n ulong d edit ulong 4 to void
+k = new ulong 64 0
+shak k
+h = new ulong 8 0
+shainit h
+m = new uchar 64 0
+nb = div n 64
+for bi ulong nb
+o = mul bi 64
+for i ulong 64
+put m i get b add o i
+end
+shablk h m k
+end
+tb = mul nb 64
+r = sub n tb
+for i ulong r
+put m i get b add tb i
+end
+shafin h m k r n
+shaget h d
+end
+
+note "  : ..." as the oracle's ids()
+fn oids f ulong x view ulong 20544 to void
+n = get x 0
+ob1 f 32
+odec f n
+for j ulong n
+b = ob j
+ob1 f 32
+odec f get x add b 9
+ob1 f 58
+for t ulong 4
+ohexw f get x add add b 10 t
+end
+end
+end
+
+fn gval w view uchar 2097152 x view ulong 20544 e edit uchar 256 f ulong k ulong to void
+r = cvalid w x e
+odec f k
+ob1 f 32
+osdec f r
+if ne r 0
+ob1 f 32
+for i ulong 256
+c = get e i
+if eq c 0
+break
+end
+ob1 f ulong c
+end
+end
+ob1 f 10
+end
+
+fn gser w view uchar 2097152 x view ulong 20544 o edit uchar 1049606 f ulong k ulong to void
+d = new ulong 4 0
+r = cserial w x 1049606 o
+odec f k
+if ge r 0
+ob1 f 32
+ob1 f 48
+ob1 f 32
+n = ulong r
+odec f n
+ob1 f 32
+ohexs f o n
+ob1 f 32
+shaout o n d
+for i ulong 4
+ohexw f get d i
+end
+else
+ob1 f 32
+osdec f r
+end
+r = cserial w x 8192 o
+ob1 f 32
+if ge r 0
+ob1 f 48
+ob1 f 32
+odec f ulong r
+else
+osdec f r
+end
+ob1 f 10
+end
+
+fn otxt f ulong t view uchar 65536 to void
+for i ulong 65536
+c = get t i
+if eq c 0
+ret
+end
+ohexb f ulong c
+end
+end
+
+fn gfmt w view uchar 2097152 x view ulong 20544 t edit uchar 65536 f ulong k ulong to void
+r = cformat w x 4096 t
+odec f k
+ob1 f 32
+osdec f r
+ob1 f 32
+otxt f t
+r = cformat w x 200 t
+ob1 f 32
+osdec f r
+ob1 f 32
+otxt f t
+ob1 f 10
+end
+
+fn dodec to int
+w = new uchar 2097152 0
+x = new ulong 20544 0
+o = new uchar 1049606 0
+t = new uchar 65536 0
+e = new uchar 256 0
+for f ulong 4
+if not opn f f
+ret 2
+end
+end
+k = ulong 0
+while true bound 999999
+n = rdlen
+if eq n 4294967296
+break
+end
+rdw w n
+r = cdecode w n x
+odec 0 k
+ob1 0 32
+osdec 0 r
+if eq r 0
+oids 0 x
+gval w x e 1 k
+gser w x o 2 k
+gfmt w x t 3 k
+end
+ob1 0 10
+k = add k 1
+end
+for f ulong 4
+oflush f
+end
+ret 0
+end
+
+fn dotext to int
+s = new uchar 262144 0
+w = new uchar 2097152 0
+x = new ulong 20544 0
+o = new uchar 1049606 0
+t = new uchar 65536 0
+e = new uchar 256 0
+if not opn 0 4
+ret 2
+end
+k = ulong 0
+while true bound 999999
+n = rdlen
+if eq n 4294967296
+break
+end
+rds s n
+r = cparse s n w x
+odec 0 k
+ob1 0 32
+osdec 0 r
+oids 0 x
+ob1 0 10
+gval w x e 0 k
+gser w x o 0 k
+gfmt w x t 0 k
+k = add k 1
+end
+oflush 0
+ret 0
+end
+
+fn dohex to int
+h = new uchar 65 0
+a = new uchar 32 0
+c = new uchar 32 0
+o = new uchar 32 0
+hx = new uchar 65 0
+a2 = new uchar 32 0
+if not opn 0 5
+ret 2
+end
+k = ulong 0
+while true bound 999999
+n = rdlen
+if eq n 4294967296
+break
+end
+if ne n 129
+ret 3
+end
+for i ulong 65
+put h i uchar inb
+end
+for i ulong 32
+put a i uchar inb
+end
+for i ulong 32
+put c i uchar inb
+end
+for i ulong 32
+put a2 i get a i
+end
+for i ulong 32
+put o i 0
+end
+r = chexparse h o
+odec 0 k
+ob1 0 32
+osdec 0 r
+ob1 0 32
+for i ulong 32
+ohexb 0 ulong get o i
+end
+ob1 0 32
+chexid a hx
+for i ulong 64
+ob1 0 ulong get hx i
+end
+ob1 0 32
+osdec 0 cidcmp a c
+ob1 0 32
+osdec 0 cidcmp a a2
+ob1 0 10
+k = add k 1
+end
+oflush 0
+ret 0
+end
+
+fn dohdr to int
+if not opn 0 6
+ret 2
+end
+for v ulong 256
+for k ulong 256
+odec 0 v
+ob1 0 32
+odec 0 k
+ob1 0 32
+odec 0 cobjver k
+ob1 0 32
+osdec 0 cchkhdr v k
+ob1 0 10
+end
+end
+oflush 0
+ret 0
+end
+
+fn main to int
+if lt argcnt 2
+r = write 2 tuse 0 len tuse
+ret 2
+end
+n = argread 1 arg 0 63
+if lt n 4
+r = write 2 tuse 0 len tuse
+ret 2
+end
+c0 = get arg 0
+c2 = get arg 2
+rc = int 9
+if eq c0 100
+rc = dodec
+end
+if eq c0 116
+rc = dotext
+end
+if and eq c0 104 eq c2 120
+rc = dohex
+end
+if and eq c0 104 eq c2 97
+rc = dohdr
+end
+if eq rc 9
+r = write 2 tuse 0 len tuse
+ret 2
+end
+if eq rc 2
+r = write 2 tbad 0 len tbad
+end
+ret rc
+end
diff --git a/om/codec/parity/corpus.py b/om/codec/parity/corpus.py
new file mode 100755
index 000000000..7d22816fa
--- /dev/null
+++ b/om/codec/parity/corpus.py
@@ -0,0 +1,676 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""corpus.py OUTDIR [--check-product DIR]: write the codec parity corpus (deterministic).
+corpus.py OUTDIR --tree ROOT: tree.pack and tree.list, every .omega/.osc/.bin file under ROOT/tests
+and ROOT/examples (not part of expected.txt: it follows the tree).
+
+Packs (records of u32 little-endian length + bytes):
+  decode.pack  wire graphs for omega_graph_deserialize_binary: the product builder vectors, structured
+               graphs (every kind, payload shape, sort order, refusal and overread path), single-byte
+               mutants and truncations of valid graphs, random byte strings
+  text.pack    inputs for omega_graph_parse_text
+  hexid.pack   129-byte records: a 65-byte window of a C string for omega_parse_hex_semantic_id, then
+               two 32-byte ids for omega_hex_semantic_id / omega_compare_semantic_id
+
+The graphs are built here from the C struct layouts (aarch64 LP64, see README); semantic ids are
+sha256 of the canonical encoding, following omega_canonical.c. --check-product DIR compares the
+three product-builder vectors with the files the C oracle's `emit` wrote into DIR.
+"""
+import hashlib
+import os
+import random
+import struct
+import sys
+
+KIND_VALUE, KIND_TYPE, KIND_OPERATION, KIND_RELATION, KIND_CONSTRAINT = 1, 2, 3, 4, 5
+KIND_MEMORY, KIND_EFFECT = 6, 8
+
+
+def u16be(v):
+    return struct.pack(">H", v & 0xFFFF)
+
+
+def u32be(v):
+    return struct.pack(">I", v & 0xFFFFFFFF)
+
+
+class Obj:
+    def __init__(self, kind, attrs=(), rels=(), consts=(), payload=b"", ver=None, extra=b"", magic=b"OMG0"):
+        self.kind = kind
+        self.attrs = list(attrs)    # (raw key bytes, value bytes)
+        self.rels = list(rels)      # (kind, 32-byte target)
+        self.consts = list(consts)  # (kind, payload bytes)
+        self.payload = payload
+        self.ver = ver
+        self.extra = extra
+        self.magic = magic
+
+    def wire(self):
+        ver = self.ver if self.ver is not None else (2 if self.kind == KIND_EFFECT else 1)
+        b = bytearray(self.magic + bytes([ver & 255, self.kind & 255]))
+        b += u16be(len(self.attrs))
+        for k, v in self.attrs:
+            b += bytes([len(k)]) + k + u16be(len(v)) + v
+        b += u16be(len(self.rels))
+        for k, t in self.rels:
+            b += u16be(k) + t
+        b += u16be(len(self.consts))
+        for k, p in self.consts:
+            b += u16be(k) + u16be(len(p)) + p
+        b += u32be(len(self.payload)) + self.payload + self.extra
+        return bytes(b)
+
+    def canonical(self):
+        """omega_canonical_encode of the decoded object (keys end at their first NUL)."""
+        kind = self.kind & 255
+        b = bytearray(b"OMG0" + bytes([2 if kind == KIND_EFFECT else 1, kind]))
+        keys = [(k.split(b"\0")[0], v) for k, v in self.attrs]
+        keys = sorted(keys, key=lambda kv: kv[0])
+        b += u16be(len(keys))
+        for k, v in keys:
+            b += bytes([len(k)]) + k + u16be(len(v)) + v
+        rels = sorted(self.rels, key=lambda r: (r[0], r[1]))
+        b += u16be(len(rels))
+        for k, t in rels:
+            b += u16be(k) + t
+        cs = sorted(self.consts, key=lambda c: (c[0], c[1]))
+        b += u16be(len(cs))
+        for k, p in cs:
+            b += u16be(k) + u16be(len(p)) + p
+        b += u32be(len(self.payload)) + self.payload
+        return bytes(b)
+
+    def id(self):
+        c = self.canonical()
+        return hashlib.sha256(c).digest() if len(c) <= 4096 else bytes(32)
+
+
+def graph(objs, count=None, magic=b"OMGG", tail=b""):
+    b = bytearray(magic + u16be(len(objs) if count is None else count))
+    for o in objs:
+        w = o if isinstance(o, (bytes, bytearray)) else o.wire()
+        b += u32be(len(w)) + w
+    return bytes(b + tail)
+
+
+# ---- payload images (aarch64 LP64 layouts of omega_types.h) ----
+Z = bytes(32)
+
+
+def type_pl(tag, width=0, length=0, elem=Z):
+    return struct.pack("HHIQ", res, opc, slot, gen) + cref + struct.pack(">H", plen) + (params + bytes(128))[:128]
+
+
+# ---- product builders (omega_core.c) ----
+def b_type(tag, width=0, length=0, elem=Z):
+    return Obj(KIND_TYPE, payload=type_pl(tag, width, length, elem))
+
+
+def b_val_uint(tid, width, val):
+    n = min(max((width + 7) // 8, 1), 64)
+    data = bytes(((val >> ((n - 1 - i) * 8)) & 255) if (n - 1 - i) * 8 < 64 else 0 for i in range(n))
+    return Obj(KIND_VALUE, payload=value_pl(tid, n, data))
+
+
+def b_op(opc, ov, tid):
+    return Obj(KIND_OPERATION, payload=op_pl(opc, ov, tid, 2, (tid, tid, Z, Z), tid))
+
+
+def b_apply(op, a, b):
+    return Obj(KIND_OPERATION, payload=apply_pl(op, 2, (a, b)))
+
+
+def product_vectors():
+    t = b_type(3, 32)
+    va, vb = b_val_uint(t.id(), 32, 7), b_val_uint(t.id(), 32, 11)
+    op = b_op(3, 1, t.id())
+    add = graph([t, va, vb, op, b_apply(op.id(), va.id(), vb.id())])
+    law = graph([Obj(KIND_CONSTRAINT, consts=[(6, bytes([0x40, 0, 0, 0, 0, 1, 0, 0]) + bytes(8)),
+                                              (9, bytes([0, 0, 0, 7]) + bytes(4))])])
+    u32 = b_type(3, 32)
+    bt = b_type(2)
+    sub = b_op(4, 3, u32.id())
+    v1 = b_val_uint(u32.id(), 32, 0xDEADBEEF)
+    allb = graph([u32, b_type(4, 16), b_type(5, 8), b_type(7, 0, 10, u32.id()), b_type(1), b_type(2),
+                  b_type(14, 32), b_type(6, 8), b_type(11), bt,
+                  Obj(KIND_VALUE, payload=value_pl(bt.id(), 1, b"\x01")),
+                  Obj(KIND_VALUE, attrs=[(b"omega.param", b"\x00\x03")], payload=value_pl(u32.id(), 0)),
+                  sub, v1, b_apply(sub.id(), v1.id(), v1.id()),
+                  Obj(KIND_EFFECT, payload=effect_pl(1, 2, 3, 0x0123456789ABCDEF)),
+                  Obj(KIND_RELATION, attrs=[(b"a_key", b"2"), (b"z_key", b"1")],
+                      rels=[(8, u32.id()), (9, u32.id())])])
+    return {"u32_add_graph.bin": add, "physics_m3_law.bin": law, "builders_all.bin": allb}
+
+
+# ---- structured random graphs ----
+def rkey(r):
+    c = r.random()
+    if c < 0.05:
+        return b""
+    if c < 0.10:
+        return bytes([0]) + r.randbytes(r.randint(0, 5))
+    if c < 0.18:
+        n = r.randint(1, 8)
+        k = bytearray(r.randbytes(n))
+        k[r.randrange(n)] = 0
+        return bytes(k)
+    if c < 0.22:
+        return r.randbytes(63)
+    if c < 0.40:
+        return bytes(r.choice(b"abcz") for _ in range(r.randint(1, 3)))
+    if c < 0.50:
+        return bytes(r.randint(128, 255) for _ in range(r.randint(1, 4)))
+    return bytes(r.choice(b"abcdefghijklmnopqrstuvwxyz._0123456789") for _ in range(r.randint(1, 12)))
+
+
+def rattrs(r, big=False):
+    n = r.choice([0, 0, 1, 2, 3, 5, 8, 32]) if not big else r.randint(4, 32)
+    out = []
+    for _ in range(n):
+        vl = r.choice([0, 1, 2, 7, 64, 512]) if not big else r.randint(100, 512)
+        out.append((rkey(r), r.randbytes(vl)))
+    if out and r.random() < 0.3:
+        out.append(out[0])
+    return out[:32]
+
+
+def rrels(r, ids):
+    n = r.choice([0, 0, 0, 1, 2, 3, 6, 64])
+    out = []
+    for _ in range(n):
+        k = r.choice([1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 6, 0, 10, 65535, r.randrange(65536)]) if r.random() < 0.2 else r.randint(1, 9)
+        t = r.choice(ids) if ids and r.random() < 0.85 else r.randbytes(32)
+        out.append((k, t))
+    return out
+
+
+def rconsts(r):
+    n = r.choice([0, 0, 0, 1, 2, 4, 32])
+    out = []
+    for _ in range(n):
+        k = r.randint(1, 9) if r.random() < 0.9 else r.choice([0, 10, 255, 65535])
+        p = r.choice([b"", b"\x01", b"\x01\x02", r.randbytes(r.randint(0, 128)), b"\x01\x02\x03"])
+        out.append((k, p))
+    return out
+
+
+def rtype(r, ids, tids):
+    tag = r.choice([1, 2, 3, 3, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 0, 15, 255, 0x100, 0x80000003])
+    width = r.choice([0, 1, 2, 7, 8, 16, 31, 32, 33, 64, 255, 256, 257, 65535, r.randrange(65536)])
+    length = r.choice([0, 1, 10, 65535, 65536, 0xFFFFFFFF])
+    elem = r.choice(tids + ids + [r.randbytes(32)]) if (tids or ids) else r.randbytes(32)
+    pl = type_pl(tag, width, length, elem)
+    if r.random() < 0.08:
+        pl = pl[:r.randint(0, 43)]
+    elif r.random() < 0.05:
+        pl = pl + r.randbytes(r.randint(1, 50))
+    return pl
+
+
+def rvalue(r, ids, tids, wid):
+    tid = r.choice(tids) if tids and r.random() < 0.85 else (r.choice(ids) if ids and r.random() < 0.5 else r.randbytes(32))
+    w = wid.get(tid)
+    bl = (w + 7) // 8 if w is not None and r.random() < 0.7 else r.choice([0, 1, 2, 4, 8, 9, 64, 65, 1000, 65535])
+    pl = value_pl(tid, bl, r.randbytes(64))
+    if r.random() < 0.06:
+        pl = pl[:r.randint(0, 97)]
+    elif r.random() < 0.1:
+        pl = pl + r.randbytes(r.randint(1, 300))
+    return pl
+
+
+def rop(r, ids, tids):
+    opc = r.randint(1, 16) if r.random() < 0.85 else r.choice([0, 17, 255, 0x10000])
+    ov = r.randint(1, 3) if r.random() < 0.85 else r.choice([0, 4, 0xFFFFFFFF])
+    t = r.choice(tids) if tids else Z
+    pl = op_pl(opc, ov, t, r.randint(0, 4), tuple(r.choice(tids or [Z]) for _ in range(4)), t)
+    if r.random() < 0.1:
+        pl = pl + r.randbytes(r.randint(1, 820))
+    return pl
+
+
+def rapply(r, ids, ops, vals):
+    op = r.choice(ops) if ops and r.random() < 0.85 else (r.choice(ids) if ids and r.random() < 0.5 else r.randbytes(32))
+    n = r.choice([0, 1, 2, 2, 2, 3, 4, 5, 255]) if r.random() < 0.9 else r.randrange(256)
+    pool = vals + ops
+    operands = [r.choice(pool) if pool and r.random() < 0.9 else r.randbytes(32) for _ in range(4)]
+    pl = apply_pl(op, n, operands)
+    if r.random() < 0.2:
+        pl = pl + r.randbytes(r.randint(1, 42))
+    return pl
+
+
+def reffect(r):
+    c = r.random()
+    if c < 0.75:
+        pl = r.randint(0, 128)
+        return effect_pl(r.randint(1, 65535), r.randrange(65536), r.randrange(1 << 32), r.randrange(1 << 64), r.randbytes(32), r.randbytes(pl))
+    if c < 0.80:
+        return effect_pl(0, 1, 1, 1)
+    if c < 0.85:
+        return effect_pl(1, 1, 1, 1, plen=r.randint(129, 65535))
+    if c < 0.90:
+        e = bytearray(effect_pl(1, 1, 1, 1, params=b"ab"))
+        e[50 + r.randint(2, 127)] = r.randint(1, 255)
+        return bytes(e)
+    if c < 0.95:
+        return r.randbytes(176)
+    return r.randbytes(r.choice([0, 1, 177, 179, 1024]))
+
+
+def structured(r, nobj):
+    objs, ids, tids, ops, vals, wid = [], [], [], [], [], {}
+    for _ in range(nobj):
+        c = r.random()
+        if c < 0.25:
+            o = Obj(KIND_TYPE, payload=rtype(r, ids, tids))
+        elif c < 0.45:
+            o = Obj(KIND_VALUE, payload=rvalue(r, ids, tids, wid))
+        elif c < 0.58:
+            o = Obj(KIND_OPERATION, payload=rop(r, ids, tids))
+        elif c < 0.70:
+            o = Obj(KIND_OPERATION, payload=rapply(r, ids, ops, vals))
+        elif c < 0.76:
+            o = Obj(KIND_EFFECT, payload=reffect(r))
+        elif c < 0.95:
+            o = Obj(r.choice([4, 5, 6, 7, 9, 10, 11]), payload=r.randbytes(r.choice([0, 0, 3, 44, 98, 161, 204, 1024])))
+        else:
+            o = Obj(r.choice([0, 12, 13, 200, 255]), payload=r.randbytes(r.randint(0, 50)))
+        if r.random() < 0.6:
+            o.attrs = rattrs(r)
+        if r.random() < 0.5:
+            o.rels = rrels(r, ids)
+        if r.random() < 0.3:
+            o.consts = rconsts(r)
+        if r.random() < 0.03:
+            o.attrs = rattrs(r, big=True)
+        if r.random() < 0.05:
+            o.extra = r.randbytes(r.randint(1, 20))
+        i = o.id()
+        objs.append(o)
+        if i != Z:
+            ids.append(i)
+            if o.kind == KIND_TYPE:
+                tids.append(i)
+                tag, w = struct.unpack("[WRAP]\n"
+            "apply res = add(a, b)\n")
+    out = [base.encode(), base.replace("ADD", "SUB").encode(), b"", b"\n", b"// only\n"]
+    nums = ["7", "0", "11", "0x1f", "0X1F", "0x", "0xg", "017", "08", "09", "-1", "-0x10", "+5", " \t\v\f\r\n 42",
+            "18446744073709551615", "18446744073709551616", "-18446744073709551616", "99999999999999999999999",
+            "4294967296", "4294967295", "0xffffffffffffffff1", "abc", "", "=3", "0777777777777777777777",
+            "01777777777777777777777", "02000000000000000000000", "- 5", "--5", "+-5", "0x7fffffff", "\x80",
+            "0b101", "0B11", "0b", "0b2", "-0b1", "0b" + "1" * 64, "0b1" + "0" * 64, "0b" + "1" * 33]
+    words = ["type", "val", "op", "apply", "types", "value", "opaque", "applyx", "//", "/", "x", "  ", "\t"]
+    for _ in range(1200):
+        lines = []
+        for _ in range(r.randint(0, 14)):
+            w = r.choice(words)
+            c = r.random()
+            if w.startswith("type"):
+                lines.append(w + r.choice([" U32 = UNSIGNED_INTEGER(32)", " X = UNSIGNED_INTEGER(16)", "", " UNSIGNED_INTEGER(32"]))
+            elif w.startswith("val"):
+                lines.append(w + r.choice([" a : U32 = ", " = ", " b ", " c := "]) + r.choice(nums))
+            elif w.startswith("op"):
+                lines.append(w + r.choice([" add = ADD[WRAP]", " sub = SUB[WRAP]", " mul = MUL", " ADDSUB", ""]))
+            elif w.startswith("apply"):
+                lines.append(w + r.choice([" res = add(a, b)", "", " r"]))
+            else:
+                lines.append(w + r.choice(["comment", " UNSIGNED_INTEGER(32)", " ADD", " SUB", " = 9", ""]))
+            if c < 0.1:
+                lines[-1] = r.choice([" ", "\t", "\r", "\v", "\f", "  \n"]) + lines[-1]
+        sep = r.choice(["\n", "\n", "\r\n", "\n\n"])
+        s = sep.join(lines)
+        if r.random() < 0.5:
+            s += "\n"
+        b = s.encode("latin-1")
+        if r.random() < 0.05 and b:
+            i = r.randrange(len(b))
+            b = b[:i] + b"\0" + b[i:]
+        out.append(b)
+    for n in [255, 256, 257, 300]:
+        out.append((base + "val c : U32 = 5\n" * n + "op ADD\n" * 3 + "apply x\n" * n).encode())
+    out.append(("type U32 = UNSIGNED_INTEGER(32)\n" * 300 + "val a = 1\nval b = 2\nop ADD\napply\n").encode())
+    out.append(("type U32 = UNSIGNED_INTEGER(32)\n" * 254 + "val a = 1\nval b = 2\nop ADD\nop SUB\napply\n").encode())
+    out.append(("type U32 = UNSIGNED_INTEGER(32)\n" * 253 + "val a = 1\nval b = 2\nop ADD\nop ADD\napply\napply\n").encode())
+    for _ in range(300):
+        out.append(r.randbytes(r.randint(0, 200)))
+    for _ in range(100):
+        out.append(bytes(r.choice(b"tyvalopplyADSUBN(32)=x0123456789 \n/") for _ in range(r.randint(0, 300))))
+    return out
+
+
+def hexid_corpus(r):
+    out = []
+    hx = "0123456789abcdefABCDEF"
+    pairs = [" 0", "+f", "-f", "-0", "+0", "0x", "0X", " -", " +", "  ", "x1", "g0", "0g", "\t1", "\n2", "\v3", "\f4",
+             "\r5", "1 ", "+-", "-+", "- ", "\x801", "1\x80"]
+    for _ in range(6000):
+        c = r.random()
+        if c < 0.35:
+            s = "".join(r.choice(hx) for _ in range(64)).encode()
+        elif c < 0.75:
+            s = bytearray("".join(r.choice(hx) for _ in range(64)).encode("latin-1"))
+            for _ in range(r.randint(1, 3)):
+                i = r.randrange(32) * 2
+                p = r.choice(pairs).encode("latin-1")
+                s[i:i + 2] = p
+            s = bytes(s)
+        elif c < 0.85:
+            s = bytes(r.randint(1, 255) for _ in range(64))
+        else:
+            s = "".join(r.choice(hx) for _ in range(r.choice([0, 1, 62, 63, 65, 66, 100]))).encode()
+            if r.random() < 0.3 and s:
+                i = r.randrange(len(s))
+                s = s[:i] + b"\0" + s[i + 1:]
+        win = (s + b"\0" * 65)[:65]
+        a = r.randbytes(32)
+        d = r.random()
+        if d < 0.3:
+            b = a
+        elif d < 0.8:
+            b = bytearray(a)
+            b[r.randrange(32)] = r.randrange(256)
+            b = bytes(b)
+        else:
+            b = r.randbytes(32)
+        out.append(win + a + b)
+    return out
+
+
+def targeted(r):
+    """Every validate branch at its boundaries, and walks that are deep or revisit many duplicates."""
+    out = []
+    t32 = b_type(3, 32)
+    v32 = b_val_uint(t32.id(), 32, 5)
+    for tag in range(16):
+        for wd in [0, 1, 2, 31, 32, 33, 255, 256, 257]:
+            out.append(graph([b_type(tag, wd, 0, t32.id()), t32]))
+    for ln in [0, 65535, 65536]:
+        for elem in [t32.id(), v32.id(), r.randbytes(32)]:
+            out.append(graph([t32, v32, b_type(7, 0, ln, elem)]))
+    for tag in [1, 2, 3, 4, 5, 6, 14]:
+        for wd in [1, 7, 8, 9, 64, 256, 65535]:
+            t = b_type(tag, wd)
+            for bl in sorted({(wd + 7) // 8, (wd + 7) // 8 + 1, 0}):
+                out.append(graph([t, Obj(KIND_VALUE, payload=value_pl(t.id(), bl))]))
+    for opc in [0, 1, 16, 17]:
+        for ov in [0, 1, 3, 4]:
+            out.append(graph([t32, b_op(opc, ov, t32.id())]))
+    op = b_op(3, 1, t32.id())
+    rel = Obj(KIND_RELATION, rels=[(1, t32.id())])
+    for n in range(6):
+        for other in [v32.id(), op.id(), t32.id(), rel.id(), r.randbytes(32)]:
+            ops = [v32.id(), other, op.id(), other][:4]
+            out.append(graph([t32, v32, op, rel, Obj(KIND_OPERATION, payload=apply_pl(op.id(), n, ops))]))
+    for opid in [t32.id(), v32.id(), r.randbytes(32)]:
+        out.append(graph([t32, v32, Obj(KIND_OPERATION, payload=apply_pl(opid, 1, [v32.id()]))]))
+    chain = [Obj(KIND_RELATION, attrs=[(b"n", b"0")])]
+    for i in range(1, 200):
+        chain.append(Obj(KIND_RELATION, rels=[(6, chain[-1].id())], attrs=[(b"n", str(i).encode())]))
+    out.append(graph(list(reversed(chain))))
+    out.append(graph(chain))
+    xd = Obj(KIND_MEMORY, payload=b"dup")
+    rels = [Obj(KIND_RELATION, rels=[(r.randint(1, 9), xd.id()) for _ in range(64)], attrs=[(b"i", bytes([i]))]) for i in range(100)]
+    root = Obj(KIND_RELATION, rels=[(7, o.id()) for o in rels[:64]])
+    out.append(graph([root] + rels + [xd] * 120))
+    out.append(graph([xd] * 120 + rels + [root]))
+    return out
+
+
+def filler(n):
+    """A KIND_MEMORY object whose canonical encoding is exactly n bytes (16 <= n <= 4096)."""
+    attrs, left = [], n - 16
+    i = 0
+    while left > 518 + 1028:
+        attrs.append((b"a%02d" % i, bytes([i]) * 512))
+        left -= 518
+        i += 1
+    if left > 1024:
+        attrs.append((b"z", bytes(left - 1028)))
+        left = 1024
+    return Obj(KIND_MEMORY, attrs=attrs, payload=bytes(left))
+
+
+def boundary(r):
+    """Serialize totals around the 8192-byte product buffer, and format_text where a stale line length
+    equals the room left (the C's `w >= max_len - pos` at equality)."""
+    out = []
+    for total in range(8186, 8200):
+        a = 4089
+        b = total - 6 - 8 - a
+        g = graph([filler(a), filler(b)])
+        assert len(g) == total and len(filler(a).canonical()) == a and len(filler(b).canonical()) == b
+        out.append(g)
+    t = b_type(3, 32)
+    for m, val in [(45, 500), (45, 99), (45, 1000), (44, 500)]:
+        objs = [Obj(KIND_MEMORY) for _ in range(m)]
+        objs.append(Obj(KIND_VALUE, payload=value_pl(t.id(), 2, bytes([val >> 8 & 255, val & 255]))))
+        objs.append(Obj(KIND_OPERATION, payload=r.randbytes(r.choice([0, 160]))))
+        out.append(graph(objs))
+    return out
+
+
+def tree_files(root):
+    """Every .omega/.osc/.bin file under ROOT/tests and ROOT/examples, sorted by path."""
+    out = []
+    for top in ("tests", "examples"):
+        for dp, dn, fn in os.walk(os.path.join(root, top)):
+            for f in fn:
+                if f.endswith((".omega", ".osc", ".bin")):
+                    out.append(os.path.relpath(os.path.join(dp, f), root))
+    return sorted(out)
+
+
+def pack(path, recs):
+    with open(path, "wb") as f:
+        for b in recs:
+            f.write(struct.pack("/dev/null || { echo "NOT_RUN: python3 missing"; exit 3; }
+T=$(mktemp -d); trap 'rm -rf "$T"' EXIT
+STREAMS="decode validate serialize format parse hexid header"
+
+# run SRC OUTDIR: compile SRC and write every stream into OUTDIR
+run() {
+  mkdir -p "$2"
+  nice -n 19 "$OMC" < "$1" > "$2/codec" || { echo "FAIL: omc refused $1"; return 1; }
+  chmod +x "$2/codec"
+  ( cd "$2" && nice -n 19 ./codec decode < "$T/corpus/decode.pack" && nice -n 19 ./codec text < "$T/corpus/text.pack" \
+    && nice -n 19 ./codec hexid < "$T/corpus/hexid.pack" && nice -n 19 ./codec header ) || { echo "FAIL: codec exited $?"; return 1; }
+  for s in $STREAMS; do printf '%s  %s\n' "$(sha256sum < "$2/$s.out" | cut -c1-64)" "$s"; done > "$2/got.txt"
+}
+
+nice -n 19 python3 "$HERE/corpus.py" "$T/corpus" > "$T/corpus.log"
+cat "$T/corpus.log"
+run "$ROOT/om/codec/codec.om" "$T/om"
+fail=0
+for s in $STREAMS; do
+  want=$(awk -v s="$s" '$2 == s { print $1 }' "$HERE/expected.txt")
+  got=$(awk -v s="$s" '$2 == s { print $1 }' "$T/om/got.txt")
+  n=$(wc -l < "$T/om/$s.out")
+  if [ "$want" = "$got" ]; then echo "PASS $s ($n lines) equals the recorded C hash"; else echo "FAIL $s ($n lines): $got, C recorded $want"; fail=1; fi
+done
+echo "records: $(wc -l < "$T/om/decode.out") wire inputs ($(awk '$2 == 0' "$T/om/decode.out" | wc -l) decoded), $(grep -c '^[0-9]* [0-9-]* [0-9]*\( [01]:[0-9a-f]*\)*$' "$T/om/parse.out") text inputs, $(wc -l < "$T/om/hexid.out") hexid records, 65536 header pairs"
+
+# The WCAP limit (README): a graph whose bytes run past 2 MiB. The C decodes it; the port refuses with -2.
+python3 - "$T/big.pack" <<'EOF'
+import struct, sys
+o0 = b"OMG0\x01\x06" + bytes(14)  # KIND_MEMORY, no fields, then junk inside clen
+o0 += bytes(2097140 - len(o0))
+o1 = b"OMG0\x01\x06" + bytes(14)
+g = b"OMGG\x00\x02" + struct.pack(">I", len(o0)) + o0 + struct.pack(">I", len(o1)) + o1
+open(sys.argv[1], "wb").write(struct.pack(" /dev/null
+mkdir -p "$T/tree" && ( cd "$T/tree" && nice -n 19 "$T/om/codec" decode < "$T/corpus/tree.pack" )
+echo "tree: $(wc -l < "$T/tree/decode.out") files under tests/ and examples/, accepted by the port: $(awk '$2 == 0' "$T/tree/decode.out" | wc -l)"
+
+if [ "${1:-}" = --mutants ]; then
+  # Each mutant is one edit inside one function of codec.om; it must change its stream's hash.
+  python3 - "$ROOT/om/codec/codec.om" "$T" > "$T/mlist" <<'EOF'
+import sys
+src, t = sys.argv[1], sys.argv[2]
+s = open(src).read()
+M = [  # name, function, old, new, stream that must change
+    ("attr sort reversed", "acmp", "if lt ci cj\nret -1", "if lt ci cj\nret 1", "decode"),
+    ("key past its NUL", "ekl", "ret i\n", "ret kl\n", "decode"),
+    ("relation kind order reversed", "rcmp", "if lt ki kj\nret -1", "if lt ki kj\nret 1", "decode"),
+    ("constraint length tie reversed", "ccmp", "if lt li lj\nret -1", "if lt li lj\nret 1", "decode"),
+    ("klen 64 accepted", "dattrs", "if ge kl 64", "if gt kl 64", "decode"),
+    ("effect padding unchecked", "effchk", "if ge i prm", "if gt i prm", "decode"),
+    ("id limit 4000", "ccanon", "if gt n 4096", "if gt n 4000", "decode"),
+    ("unsigned width 255", "vtype", "if and eq tag 3 or lt wd 1 gt wd 256", "if and eq tag 3 or lt wd 1 gt wd 255", "validate"),
+    ("value bytes rounding", "vvalue", "ex = div add wd 7 8", "ex = div add wd 8 8", "validate"),
+    ("operand window offset", "dtgt", "p = add 33 mul a 32", "p = add 32 mul a 32", "validate"),
+    ("struct value offset", "sattr", "ret ulong get w add add o kl add 2 v", "ret ulong get w add add o kl add 3 v", "validate"),
+    ("serialize length check", "cserial", "if gt add add pos 4 L mx", "if gt add pos L mx", "serialize"),
+    ("stale line length", "cformat", "if ge wv sub cap pos\nret -1", "if gt wv sub cap pos\nret -1", "format"),
+    ("value last 8 bytes", "fline", "s = sub bl 8", "s = sub bl 7", "format"),
+    ("no binary prefix", "spref", "bs = 2\n", "bs = 8\n", "parse"),
+    ("overflow ignored", "sdig", "put r 1 1\n", "put r 1 0\n", "parse"),
+    ("strstr to line end", "seol", "if eq get s i 10", "if eq get s i 11", "parse"),
+    ("negative pair", "hx2", "ret and neg v 255", "ret v", "hexid"),
+    ("memcmp sign", "cidcmp", "if lt p q\nret -1", "if lt p q\nret 1", "hexid"),
+    ("v1 effect code", "cchkhdr", "ret -2", "ret -1", "header"),
+    ("sha K[63]", "shak", "put k 63 3329325298", "put k 63 3329325299", "decode"),
+]
+for i, (name, fn, old, new, stream) in enumerate(M):
+    a = s.index("\nfn %s " % fn)
+    b = s.index("\nfn ", a + 1)
+    body = s[a:b]
+    if body.count(old) != 1:
+        sys.exit("mutant %s: '%s' is not unique in %s" % (name, old, fn))
+    open("%s/m%d.om" % (t, i), "w").write(s[:a] + body.replace(old, new) + s[b:])
+    print("%d %s %s" % (i, stream, name))
+EOF
+  mfail=0
+  n=0
+  while read -r i stream name; do
+    n=$((n + 1))
+    if ! run "$T/m$i.om" "$T/mo" > /dev/null; then echo "FAIL mutant $i ($name): did not build or run"; mfail=1; continue; fi
+    changed=""
+    for s in $STREAMS; do
+      a=$(awk -v s="$s" '$2 == s { print $1 }' "$T/om/got.txt"); b=$(awk -v s="$s" '$2 == s { print $1 }' "$T/mo/got.txt")
+      [ "$a" = "$b" ] || changed="$changed $s"
+    done
+    case " $changed " in
+      *" $stream "*) echo "killed mutant $i ($name): changes$changed" ;;
+      *) echo "FAIL mutant $i ($name): $stream unchanged (changes:${changed:- nothing})"; mfail=1 ;;
+    esac
+    rm -rf "$T/mo"
+  done < "$T/mlist"
+  [ $mfail -eq 0 ] && echo "PASS all $n mutants change their stream's hash" || { echo "FAIL a mutant changed no stream"; fail=1; }
+fi
+[ $fail -eq 0 ] && echo "PASS om/codec parity: every stream equals the C oracle's recorded hash" || { echo "FAIL om/codec parity"; exit 1; }
diff --git a/om/codec/parity/unit.py b/om/codec/parity/unit.py
new file mode 100755
index 000000000..3e829ef84
--- /dev/null
+++ b/om/codec/parity/unit.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""unit.py CODEC.om NAME: print the function-mode unit that exports NAME.
+
+The unit is NAME and every library function it reaches through
+calls (the part of codec.om before the parity-harness marker), in file order, with NAME moved to the
+end: the seeded compiler enters a function-mode unit at its last function and the omega-bridge native
+call ABI v1 binds that one; the others stay private helpers. Note lines directly before a kept
+function travel with it. (Adapted from om/gpumath/parity/unit.py, aien-dev/omega-mv#751.)
+"""
+import sys
+
+MARK = "note ==== parity harness"
+
+
+def functions(lib):
+    """[(name, first line incl. leading notes, end line)]: a function runs to the line before the next
+    fn (or the note block that precedes it)."""
+    starts = [i for i, l in enumerate(lib) if l.startswith("fn ")]
+    out = []
+    for n, i in enumerate(starts):
+        j = i
+        while j > 0 and lib[j - 1].startswith("note"):
+            j -= 1
+        nxt = starts[n + 1] if n + 1 < len(starts) else len(lib)
+        k = nxt - 1
+        while k > i and (lib[k].strip() == "" or lib[k].startswith("note")):
+            k -= 1
+        if lib[k] != "end":
+            sys.exit("unit.py: %s does not close with end" % lib[i].split()[1])
+        out.append((lib[i].split()[1], j, k))
+    return out
+
+
+def main():
+    if len(sys.argv) != 3:
+        sys.exit(__doc__)
+    src, name = sys.argv[1], sys.argv[2]
+    lines = open(src).read().split("\n")
+    lib = lines[:next(i for i, l in enumerate(lines) if l.startswith(MARK))]
+    fns = functions(lib)
+    span = {n: (a, b) for n, a, b in fns}
+    if name not in span:
+        sys.exit("unit.py: no function %s" % name)
+    calls = {}
+    for n, a, b in fns:
+        words = set()
+        for l in lib[a:b + 1]:
+            if not l.startswith("note"):
+                words.update(l.split())
+        calls[n] = {m for m in words if m in span and m != n}
+    keep = {name}
+    todo = [name]
+    while todo:
+        for m in calls[todo.pop()]:
+            if m not in keep:
+                keep.add(m)
+                todo.append(m)
+    order = [n for n, _, _ in fns if n in keep and n != name] + [name]
+    parts = []
+    for n in order:
+        a, b = span[n]
+        parts.append("\n".join(lib[a:b + 1]))
+    sys.stdout.write("note SPDX-License-Identifier: Apache-2.0\nnote generated from om/codec/codec.om by parity/unit.py %s\n\n" % name)
+    sys.stdout.write("\n\n".join(parts) + "\n")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/om/gpumath/README.md b/om/gpumath/README.md
new file mode 100644
index 000000000..9e4ee0468
--- /dev/null
+++ b/om/gpumath/README.md
@@ -0,0 +1,169 @@
+# om/gpumath: host math, FP8 packing and message formatting in seeded Omega
+
+`gpumath.om` ports three C files of `libomega_gpu.a` to seeded Omega (aien-dev/omega-mv#726,
+aien-dev/aien-architecture-mv#300/#316):
+
+| C | what it does | Omega functions |
+|---|---|---|
+| `src/omega_gpu_hostmath.c` | libm-free double `log`, `exp`, `pow`, `sincos`; `pow2f` | `hmlog` `hmexp` `hmpow` `hmsincos` `hmpow2f` |
+| `src/omega_gpu_fp8_pack.c` | e4m3 decode, kernel bits, NaN test and scan; bf16 scale and x packing; the f64 GEMV reference | `e4m3ref` `e4m3kbits` `e4m3isnan` `f8scannan` `f8packscales` `f8packxf32` `f8packxbf16` `f8gemvblock` |
+| `src/omega_gpu_fmt.c` | the bounded `printf`-style formatter the session and tensor APIs use for error stages | `gpufmt` `gpufmtkinds` |
+
+The task description for this port spoke of bf16/e5m2 conversions and a format descriptor table. The
+files contain neither. There is no e5m2 code, and `omega_gpu_fmt` is a formatter (`%s %c %d %u %x`, the
+`l`/`ll`/`z` modifiers, `%%`). This port follows the files.
+
+The C is unchanged. This change adds the port and its parity evidence. Removing the C objects from
+`libomega_gpu.a` goes through the omega-bridge native call ABI (omega-bridge #8) and is not part of it.
+
+## How the port matches the C bit for bit
+
+The contract is the C as the product builds it: the Makefile CFLAGS (`-std=gnu11 -O2`, gcc 13.3.0,
+aarch64). The oracle objects built from these sources have the same `.text` bytes as a `make` build in
+another worktree (`omega-blake3-abi/build`, same source sha256s). In detail:
+
+- **Same IEEE operations, same order.** Where the C computes in `float` or `double`, the port uses the
+  same single Omega float operation (`f32`/`f64`; omc emits one FP instruction per operator and never
+  writes FPCR). It does not substitute integer code that "should" agree. Operand order follows the
+  compiled object, not the C source, because it decides which NaN payload survives. gcc emits
+  `fmul d0, x, ref` in the GEMV reference (`x` first) and `fmul log(b), e` in `pow`, and the port does
+  the same.
+- **Fused multiply-add.** `gnu11` implies `-ffp-contract=fast`, so gcc fused nine `a*b+c` in hostmath into
+  FMADD/FMSUB: the `log` series step `s*t2 + 1/k`, its two final steps, the two `exp` reduction steps and
+  the four `sincos` reduction steps. Omega has no fused operation, so `fma64` computes the fused result
+  exactly in integer arithmetic. It forms the 106-bit product in a 128-bit frame and aligns the addend
+  with a sticky bit. It rounds once to nearest even, with subnormal results rounded directly at
+  2^-1074 and overflow going to infinity. It follows ARM's FPProcessNaNs3 order (addend, then the
+  operands) and gives the default NaN for a quiet-NaN addend with ∞·0. FMSUB is `fma64` with the
+  multiplicand's sign flipped, as the ARM pseudocode does. The `fma` stream checks `fma64` against the
+  hardware `fmadd` instruction.
+- **Integer bit patterns** where the C works on integers: `pow2f`, `pow2i`, the e4m3 kernel bits and NaN
+  test, the scan, and the whole formatter.
+
+## ABI (bindable by omega-bridge native call ABI v1)
+
+Every exported function has at most 6 parameters, each `ulong`/`long` or a fixed-length `view`/`edit` array of
+`ulong`/`uchar`, and returns `ulong`, `long` or nothing. A double or float travels as its bit pattern, and
+arrays hold little-endian element bytes exactly as the C arrays hold them in memory. ABI v1 arrays have a fixed length, so the variable-length C
+functions become pieces that an adapter loops over, the way `om/sha256` and `om/blake3` do:
+
+| C | Omega | piece |
+|---|---|---|
+| `omega_fp8_pack_scan_nan(w, count, &first)` | `f8scannan w(view uchar 4096) n base st(edit ulong 2)` | 4096 bytes; `st` = count, first (written only while the count is 0) |
+| `omega_fp8_pack_scales(bf16, count, out, nofold)` | `f8packscales in(8192 B) n out(16384 B) nofold → long` | 4096 elements; 0 or -1 after writing the earlier outputs |
+| `omega_fp8_pack_x_f32` / `_x_bf16` | `f8packxf32` / `f8packxbf16 in n out` | 4096 elements |
+| `omega_fp8_gemv_oracle(w, s, n, k, x, y, yscale)` | `f8gemvblock w(128 B) x(512 B) sb acc(edit ulong 2)` | one 128-column block of one row; acc/mag start at 0 per row, blocks in order |
+| `omega_gpu_fmt(out, cap, fmt, ...)` | `gpufmt out(1024 B) cap fmt(1024 B) args(16 ulong) pool(4096 B) → ulong` and `gpufmtkinds fmt kinds(64 ulong) → ulong` | see below |
+
+Varargs cannot cross the ABI. Each argument a conversion consumes is one 64-bit word in `args`. An
+`int`-sized kind uses the low 32 bits, which is what AAPCS64 `va_arg(ap, int)` reads, and `%c` uses the
+low 8 bits. A `%s` argument is an offset into `pool`, where the string is NUL-terminated;
+`2^64-1` stands for NULL and prints `(null)`. `gpufmtkinds` lists the `va_arg` type of each consuming
+conversion: 1 int, 2 long, 3 long long, 4 ptrdiff_t, 5 unsigned, 6 unsigned long, 7 unsigned long long,
+8 size_t, 9 const char *. With that list a C adapter only calls `va_arg` with the listed types and
+never parses the format string. Both functions use the same scanner (`fscan`).
+
+`parity/unit.py gpumath.om NAME` cuts the function-mode unit for `NAME`: the function and every library
+function it calls, with `NAME` last. All 15 units compile with the pinned omc in function mode. The pinned
+generator (`src/native.om` of omega-bridge `012860db`, sha256 `2c2c53f6…3940`) accepts them, and the C it
+writes compiles with `-Wall -Wextra -Werror`, exporting `omega_hmlog` … `omega_gpufmtkinds`. In a
+separate check (a /tmp driver, not in the tree), every corpus stream except the internal `fma` stream was
+run through those generated bindings. The output was byte-identical to the C oracle's.
+
+## Parity
+
+Reproduce from a fresh clone (no C oracle needed; the oracle's output is recorded as sha256 in
+`parity/expected.txt`):
+
+```
+OMEGA_OMC=/path/to/seed/out/omc [OMEGA_BRIDGE=/path/to/omega-bridge] sh om/gpumath/parity/run.sh
+```
+
+`parity/corpus.py` regenerates the corpus deterministically (splitmix64, fixed seeds, about 48 MB, never
+committed). The run takes about 12 s on the Spark; the .om harness needs 2.5 s for all streams, the -O2 C
+0.5 s.
+
+Oracle: the three C files above at omega-mv `acb3f15c` (sha256 `4ee994d7…f1eb` hostmath.c, `10ae3b45…0d4b`
+hostmath.h, `881daeaf…fe79` fp8_pack.c, `795e9620…1efa` fmt.c, `dd9f13c1…2ba8` fmt.h, `ddebec31…b668`
+fp8_api.h, `7e3c1779…105a` codegen_moe.h) compiled with
+`gcc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -Isrc`. `omega_bf16_to_fp32` is the same text cut
+from `src/omega_blackwell_matmul.c` and built with the same flags. `.text` sha256: hostmath
+`4061ecf7…6e2c`, fp8_pack `1cd43d3f…7cc3`, fmt `d06b83b7…92b7`. A /tmp driver feeds the corpus to
+these objects. `fma` records use the hardware `fmadd` (inline asm), and the fmt records are typed C
+calls that `corpus.py --c-cases` generates. Compiler: omc sha256 `62775d2a…712b`; `gpumath.om` at this
+commit compiles to a 29,836-byte program.
+
+| stream | function(s) | inputs | result |
+|---|---|---|---|
+| fma | `fma64` (internal, vs hardware FMADD) | 326,561 triples: every pair of 27 special doubles with every third special as addend (`D_SPECIAL[::3]`, 9 addends, 6,561 triples), class mix, near-cancellation, exact ties, sticky-only ties, subnormal and overflow products, hostmath shapes | 326,561/326,561 identical |
+| log | `hmlog` | 226,442: specials, every power of two 2^-1074..2^1023, 100,000 random bit patterns, 100,000 positive finite, near 1, around √2, 2^e(1+tiny) | 226,442/226,442 |
+| exp | `hmexp` | 221,309: specials, 100,000 random bits, 100,000 in [-750, 712], ±200 ulps around both cutoffs, around k·ln2 for k = -1080..1024 | 221,309/221,309 |
+| pow | `hmpow` | 100,097: RoPE θ^(±2i/d) for 7 θ × 5 d, random base/exponent, random bit pairs, special×special | 100,097/100,097 |
+| sincos | `hmsincos` | 340,027: specials, 100,000 random bits, 100,000 with abs(a) < 2^20·π/2, 100,000 RoPE angles (pos < 65536), 30,000 within 4 ulps of nπ/2, small | 340,027/340,027 (sin and cos) |
+| pow2f | `hmpow2f` | 12,006: every e in [-1000, 1000], the int extremes, 10,000 random ints | 12,006/12,006 |
+| e4m3 | `e4m3ref` `e4m3kbits` `e4m3isnan` | all 256 bytes | 256/256 (×3 outputs) |
+| scales | `f8packscales` | **all 65,536 bf16 × fold/no-fold** (131,072 single-element calls) + 60 pieces of 0..4096 with NaN/inf/overflowing scales (240,978 elements in total) | 131,132/131,132 calls, return value and every output word |
+| xf32 | `f8packxf32` | 100,025 f32 (25 specials + 100,000 class mix: NaN payloads, ±inf, ±0, subnormals, random bits) + 777 again as an odd piece; 0-length piece | 100,802/100,802 |
+| xbf16 | `f8packxbf16` | **all 65,536 bf16** + an odd piece of 333; 0-length piece | 65,869/65,869 |
+| scan | `f8scannan` (4096-byte pieces) | 400 arrays, 0..20,000 bytes (3,889,100 bytes), NaN density 0 to all | 400/400 (count and first) |
+| gemv | `f8gemvblock` (row × block) | 13 matrices, 2,432 rows, k up to 2048, NaN codes, special x and scales, a NaN×NaN-payload collision at every row's first NaN | 2,432/2,432 rows (y and yscale) |
+| fmt | `gpufmt` `gpufmtkinds` | 28,688 calls: every format of length 1..4 over `%lzdusxcA` (two caps each), every modifier × conversion pair (`""` `l` `ll` `lll` `z` `zl` `lz` `zz` × `duxsc%qXi.5-`), 12,000 random mixes, caps 0..1024, NULL `%s`, int words with garbage upper halves | 28,688/28,688 (return, bytes up to the NUL + 1, va_arg kinds) |
+
+Thirteen small mutants of `gpumath.om` are part of the verdict. The script applies each one, and each
+must change its stream's output:
+
+| mutant | records that change |
+|---|---|
+| ties round up instead of to even | fma 16,209 |
+| sticky bit dropped | fma 15 |
+| NaN priority of operands swapped | fma 1,332 |
+| exact-zero sum keeps the sign | fma 10 |
+| unfused `s * 2t + e*ln2lo` | log 134 |
+| unfused first `sincos` reduction step | sincos 1,917 |
+| `pow` multiply order swapped | pow 209 |
+| `pow2f` normal-range bias off by one | pow2f 254 |
+| e4m3 subnormal scale off by one | e4m3 14 |
+| scale fold 2^55 | scales 51,175 |
+| scan first index without the piece base | scan 15 |
+| GEMV multiply order swapped | gemv 1 (the collision matrix) |
+| `%c` prints `?` | fmt 2,008 |
+
+Fused steps that did not affect any output on this corpus: `exp`'s `- k*ln2lo` step, `log`'s final
+`e*ln2hi` step (the product is exact, since ln2hi has 33 significant bits), the last `sincos` step
+(`n*pio2_3t`), and the `log` series step (one `pow` result changes, no `log` result). They stay fused
+because the object fuses them.
+
+## Limits
+
+- The parity contract is the current object. If the C were built without contraction
+  (`-ffp-contract=off`), its own results would change, and this port would keep matching today's
+  object, not the new one.
+- Fixed pieces, set by the ABI v1 array rule: 4096 elements for scan/scales/x packing, one 128-column
+  block for the GEMV reference. The C adapter that loops over them is not written here. A NULL
+  `yscale` is the adapter ignoring `acc 1`, and a k that is not a multiple of 128 is the adapter
+  running only the k/128 whole blocks, as the C does. The committed corpus has neither case: both
+  were checked once in a /tmp run against the C (k = 200, 328 and 127 with `yscale` NULL and
+  non-NULL; y and yscale identical), not by `parity/run.sh`.
+- `gpufmt` limits are limits of the .om, not cases where the C goes out of bounds: `fmt` at most
+  1023 bytes plus its NUL inside 1024, at most 16 consuming conversions, `%s` strings inside a
+  4096-byte pool, a 1024-byte `out`. Past the first three the .om traps 3 where the C keeps working
+  (it takes as many varargs and as long strings as the caller passes). A `cap` above 1024 traps only
+  when an output write actually passes index 1023 of `out`; shorter output with a larger `cap` runs
+  normally. The committed corpus stays within 16 conversions; the exact 16-conversion boundary
+  (cap 1024 and cap 40: identical to the C) and the 17-conversion trap were exercised only in a /tmp
+  run, not by `parity/run.sh`. A NULL `out` or `fmt` cannot be expressed; the adapter keeps the C's
+  `!out || cap == 0` and `fmt == NULL` checks.
+- Narrowing that the C does by parameter type traps instead: an e4m3 byte above 255 traps 5, and so
+  does a bf16 scale above 65535. `hmpow2f` takes a `long` where the C takes an `int`.
+- `fma64` is internal and assumes 53-bit significands (`mul128`).
+- Two omc gaps shaped the code: a function cannot return `f32` (error 5), so f32 helpers return their
+  bits, and `const` is refused in function mode (error 9), so constants are written as their bit
+  patterns inline with a note.
+
+## NOT_RUN
+
+- No GPU, model or serving test: nothing here runs on the device.
+- No `make test`. The C files and every C caller are unchanged.
+- The C adapters, and the removal of the three objects from `libomega_gpu.a` through omega-bridge #8, are
+  not done here.
+- Only the pinned omc on Linux arm64 (the Spark) was used.
diff --git a/om/gpumath/gpumath.om b/om/gpumath/gpumath.om
new file mode 100644
index 000000000..c364d1a26
--- /dev/null
+++ b/om/gpumath/gpumath.om
@@ -0,0 +1,1244 @@
+note SPDX-License-Identifier: Apache-2.0
+note gpumath.om: seeded Omega port of src/omega_gpu_hostmath.c, src/omega_gpu_fp8_pack.c and
+note src/omega_gpu_fmt.c (aien-dev/omega-mv#726). Parity is on bit patterns against the C as the
+note product builds it (gcc -std=gnu11 -O2, the Makefile CFLAGS, aarch64). Where the C does float
+note arithmetic this file does the same IEEE operation in the same operand order (the operand order
+note decides which NaN payload survives). gcc contracts some of the C's a*b+c into one fused
+note FMADD/FMSUB (gnu11 implies -ffp-contract=fast); Omega has no fused operation, so fma64 below
+note computes the fused result exactly in integer arithmetic.
+note
+note Exported functions (omega-bridge native call ABI v1: ulong/long scalars, fixed-length
+note ulong/uchar arrays, ulong/long/void result). A double or float travels as its bit pattern.
+note   hmlog x                 omega_hostmath_log, f64 bits in and out
+note   hmexp y                 omega_hostmath_exp
+note   hmpow b e               omega_hostmath_pow
+note   hmsincos a o            omega_hostmath_sincos: o 0 sin bits, o 1 cos bits
+note   hmpow2f e               omega_hostmath_pow2f: f32 bits
+note   e4m3ref b               omega_fp8_e4m3_ref: f32 bits (b 0..255, else trap 5)
+note   e4m3kbits b             omega_fp8_e4m3_kernel_bits
+note   e4m3isnan b             omega_fp8_e4m3_is_nan: 1 or 0
+note   f8scannan w n base st   omega_fp8_pack_scan_nan over a 4096-byte piece (see the function)
+note   f8packscales i n o nf   omega_fp8_pack_scales over a 4096-element piece
+note   f8packxf32 i n o        omega_fp8_pack_x_f32 over a 4096-element piece
+note   f8packxbf16 i n o       omega_fp8_pack_x_bf16 over a 4096-element piece
+note   f8gemvblock w x sb acc  one 128-column block of one row of omega_fp8_gemv_oracle
+note   gpufmt o cap f args pl  omega_gpu_fmt with the varargs as 64-bit words (see the function)
+note   gpufmtkinds f kinds     the va_arg type of every conversion gpufmt consumes
+note Arrays carry little-endian element bytes exactly as the C arrays hold them in memory.
+
+note ---- 128-bit helpers and the exact fused multiply-add ----
+
+note index of the highest set bit of x (x > 0)
+fn msb64 x ulong to ulong
+n = ulong 0
+if ge x 4294967296
+x = shr x 32
+n = add n 32
+end
+if ge x 65536
+x = shr x 16
+n = add n 16
+end
+if ge x 256
+x = shr x 8
+n = add n 8
+end
+if ge x 16
+x = shr x 4
+n = add n 4
+end
+if ge x 4
+x = shr x 2
+n = add n 2
+end
+if ge x 2
+n = add n 1
+end
+ret n
+end
+
+fn isnan64 x ulong to bool
+ret gt and x 9223372036854775807 9218868437227405312
+end
+
+fn issnan64 x ulong to bool
+ret and isnan64 x eq and x 2251799813685248 0
+end
+
+fn isinf64 x ulong to bool
+ret eq and x 9223372036854775807 9218868437227405312
+end
+
+fn iszero64 x ulong to bool
+ret eq and x 9223372036854775807 0
+end
+
+note significand of a finite nonzero double, shifted so that bit 52 is its top bit
+fn mantn x ulong to ulong
+ex = and shr x 52 2047
+m = and x 4503599627370495
+if gt ex 0
+ret or m 4503599627370496
+end
+ret shl m sub 52 msb64 m
+end
+
+note exponent matching mantn: value = mantn x * 2^expn x
+fn expn x ulong to long
+ex = and shr x 52 2047
+if gt ex 0
+ret sub long ex 1075
+end
+m = and x 4503599627370495
+ret sub -1074 long sub 52 msb64 m
+end
+
+note t 0, t 1 = high, low words of a * b (a, b < 2^53)
+fn mul128 a ulong b ulong t edit ulong 8 to void
+al = and a 4294967295
+ah = shr a 32
+bl = and b 4294967295
+bh = shr b 32
+ll = mul al bl
+mid = add add mul al bh mul ah bl shr ll 32
+put t 1 or shl mid 32 and ll 4294967295
+put t 0 add mul ah bh shr mid 32
+end
+
+note shift the 128-bit value t k (high), t k+1 (low) right by n, OR-ing every lost bit into bit 0
+fn srj t edit ulong 8 k ulong n ulong to void
+if eq n 0
+ret
+end
+hi = get t k
+lo = get t add k 1
+if ge n 128
+put t k 0
+if eq or hi lo 0
+put t add k 1 0
+else
+put t add k 1 1
+end
+ret
+end
+st = ulong 0
+if ge n 64
+m = sub n 64
+nlo = hi
+if gt m 0
+nlo = shr hi m
+if ne shl hi sub 64 m 0
+st = 1
+end
+end
+if ne lo 0
+st = 1
+end
+put t k 0
+put t add k 1 or nlo st
+ret
+end
+if ne shl lo sub 64 n 0
+st = 1
+end
+put t add k 1 or or shr lo n shl hi sub 64 n st
+put t k shr hi n
+end
+
+note t 4, t 5 = (t 0, t 1) + (t 2, t 3)
+fn add128 t edit ulong 8 to void
+lo = add get t 1 get t 3
+cy = ulong 0
+if lt lo get t 1
+cy = 1
+end
+put t 5 lo
+put t 4 add add get t 0 get t 2 cy
+end
+
+note t 4, t 5 = (t a, t a+1) - (t b, t b+1), the first not below the second
+fn sub128 t edit ulong 8 a ulong b ulong to void
+l1 = get t add a 1
+l2 = get t add b 1
+bw = ulong 0
+if lt l1 l2
+bw = 1
+end
+put t 5 sub l1 l2
+put t 4 sub sub get t a get t b bw
+end
+
+fn ge128 t edit ulong 8 to bool
+if ne get t 0 get t 2
+ret gt get t 0 get t 2
+end
+ret ge get t 1 get t 3
+end
+
+note bit k of the 128-bit value hi, lo
+fn bit128 hi ulong lo ulong k ulong to ulong
+if ge k 64
+ret and shr hi sub k 64 1
+end
+ret and shr lo k 1
+end
+
+note any bit of hi, lo below bit k
+fn low128 hi ulong lo ulong k ulong to bool
+if ge k 64
+ret or ne lo 0 ne and hi sub shl ulong 1 sub k 64 1 0
+end
+ret ne and lo sub shl ulong 1 k 1 0
+end
+
+note round S = (t 4, t 5) * 2^x (S > 0) to nearest even as a double with sign sg; subnormal
+note results round once at 2^-1074, overflow gives infinity (ARM FPRound, FPCR at its Linux default)
+fn fround t edit ulong 8 x long sg ulong to ulong
+hi = get t 4
+lo = get t 5
+h = msb64 lo
+if ne hi 0
+h = add msb64 hi 64
+end
+s = sub long h 52
+mn = sub -1074 x
+if lt s mn
+s = mn
+end
+sgn = shl sg 63
+if ge s 128
+ret sgn
+end
+q = ulong 0
+if gt s 0
+us = ulong s
+if ge us 64
+q = shr hi sub us 64
+else
+q = or shr lo us shl hi sub 64 us
+end
+if eq bit128 hi lo sub us 1 1
+if or low128 hi lo sub us 1 eq and q 1 1
+q = add q 1
+end
+end
+else
+q = shl lo ulong neg s
+end
+bits = add shl ulong add add x s 1074 52 q
+if ge bits 9218868437227405312
+ret or sgn 9218868437227405312
+end
+ret or sgn bits
+end
+
+note the NaN result of c + a * b when an operand is NaN (FPProcessNaNs3, addend first; a quiet NaN
+note addend with infinity times zero gives the default NaN)
+fn fmanan a ulong b ulong c ulong to ulong
+if issnan64 c
+ret or c 2251799813685248
+end
+if issnan64 a
+ret or a 2251799813685248
+end
+if issnan64 b
+ret or b 2251799813685248
+end
+if isnan64 c
+if or and isinf64 a iszero64 b and iszero64 a isinf64 b
+ret 9221120237041090560
+end
+ret c
+end
+if isnan64 a
+ret a
+end
+ret b
+end
+
+note c + a * b with infinities or zeros among the operands (no NaN operand)
+fn fmaspec a ulong b ulong c ulong to ulong
+sp = xor shr a 63 shr b 63
+sc = shr c 63
+infp = or isinf64 a isinf64 b
+infc = isinf64 c
+if or and isinf64 a iszero64 b and iszero64 a isinf64 b
+ret 9221120237041090560
+end
+if and and infc infp ne sc sp
+ret 9221120237041090560
+end
+if or and infc eq sc 0 and infp eq sp 0
+ret 9218868437227405312
+end
+if or infc infp
+ret 18442240474082181120
+end
+if iszero64 c
+if eq sc sp
+ret c
+end
+ret 0
+end
+ret c
+end
+
+note the exact product a * b (a, b finite nonzero) and the addend c placed in t 0..1 and t 2..3,
+note both with their top bit at bit 124 or 125, the smaller shifted right with a sticky bit to the
+note larger's scale; returns that scale x (value = t * 2^x)
+fn fmaalign a ulong b ulong c ulong t edit ulong 8 to long
+mul128 mantn a mantn b t
+ph = get t 0
+pl = get t 1
+put t 0 or shl ph 20 shr pl 44
+put t 1 shl pl 20
+xp = sub add expn a expn b 20
+if iszero64 c
+ret xp
+end
+put t 2 shl mantn c 9
+xc = sub expn c 73
+d = sub xc xp
+if gt d 0
+srj t 0 ulong d
+ret xc
+end
+srj t 2 ulong neg d
+ret xp
+end
+
+note c + a * b, finite, a and b nonzero: the exact sum rounded once
+fn fmafin a ulong b ulong c ulong to ulong
+t = new ulong 8 0
+x = fmaalign a b c t
+sp = xor shr a 63 shr b 63
+sc = shr c 63
+sg = sp
+if or iszero64 c eq sp sc
+add128 t
+else
+if ge128 t
+sub128 t 0 2
+else
+sub128 t 2 0
+sg = sc
+end
+end
+if eq or get t 4 get t 5 0
+ret 0
+end
+ret fround t x sg
+end
+
+note AArch64 FMADD d = c + a * b (one rounding, ARM NaN rules); FMSUB d = c - a * b is
+note fma64 with the sign of a flipped
+fn fma64 a ulong b ulong c ulong to ulong
+if or or isnan64 a isnan64 b isnan64 c
+ret fmanan a b c
+end
+if or or or isinf64 a isinf64 b isinf64 c or iszero64 a iszero64 b
+ret fmaspec a b c
+end
+ret fmafin a b c
+end
+
+note ---- omega_gpu_hostmath.c ----
+
+note pow2i: 2^k as a double, -1074 <= k <= 1023, 0 below, +inf above
+fn pow2i k long to f64
+if gt k 1023
+ret bitcast f64 ulong 9218868437227405312
+end
+if lt k -1074
+ret 0.0f64
+end
+if ge k -1022
+ret bitcast f64 shl ulong add k 1023 52
+end
+ret mul bitcast f64 ulong 4503599627370496 bitcast f64 shl ulong add k 2045 52
+end
+
+note log(x): the s * t2 + 1/k step and the two final steps are fused in the C object
+fn hmlog xb ulong to ulong
+x = bitcast f64 xb
+if or not gt x 0.0f64 gt x bitcast f64 ulong 9218868437227405311
+ret 9221120237041090560
+end
+e = long 0
+if lt x bitcast f64 ulong 4503599627370496
+x = mul x bitcast f64 ulong 4850376798678024192
+e = -54
+end
+u = bitcast ulong x
+e = add e sub long and shr u 52 2047 1023
+m = bitcast f64 or and u 4503599627370495 4607182418800017408
+if gt m bitcast f64 ulong 4609047870845172685
+m = mul m 0.5f64
+e = add e 1
+end
+t = div sub m 1.0f64 add m 1.0f64
+t2 = bitcast ulong mul t t
+s = ulong 0
+k = long 25
+while ge k 1 bound 13
+s = fma64 s t2 bitcast ulong div 1.0f64 f64 k
+k = sub k 2
+end
+ed = f64 e
+lo = bitcast ulong mul ed bitcast f64 ulong 4461442080421002358
+lo = fma64 s bitcast ulong add t t lo
+ret fma64 bitcast ulong ed 4604418534311723008 lo
+end
+
+note exp(y): r = (y - k * ln2hi) - k * ln2lo is two FMSUBs in the C object
+fn hmexp yb ulong to ulong
+y = bitcast f64 yb
+if ne y y
+ret yb
+end
+if gt y bitcast f64 ulong 4649454506724284170
+ret 9218868437227405312
+end
+if lt y bitcast f64 ulong 13873138101193906586
+ret 0
+end
+fk = mul y bitcast f64 ulong 4609176140021203710
+h = -0.5f64
+if ge fk 0.0f64
+h = 0.5f64
+end
+k = long add fk h
+nk = bitcast ulong neg f64 k
+r = fma64 nk 4604418534311723008 yb
+r = fma64 nk 4461442080421002358 r
+rd = bitcast f64 r
+p = 1.0f64
+n = long 17
+while ge n 1 bound 17
+p = add div mul rd p f64 n 1.0f64
+n = sub n 1
+end
+if lt k -1020
+ret bitcast ulong mul mul p pow2i -1020 pow2i add k 1020
+end
+ret bitcast ulong mul p pow2i k
+end
+
+fn hmpow bb ulong eb ulong to ulong
+b = bitcast f64 bb
+e = bitcast f64 eb
+if or eq b 1.0f64 eq e 0.0f64
+ret 4607182418800017408
+end
+ret hmexp bitcast ulong mul bitcast f64 hmlog bb e
+end
+
+note sin r = r * ps, cos r = pc (w = r * r), the two series of the C
+fn sinser w f64 to f64
+ps = 1.0f64
+k = long 15
+while ge k 3 bound 7
+ps = sub 1.0f64 div mul w ps f64 mul k sub k 1
+k = sub k 2
+end
+ret ps
+end
+
+fn cosser w f64 to f64
+pc = 1.0f64
+k = long 16
+while ge k 2 bound 8
+pc = sub 1.0f64 div mul w pc f64 mul k sub k 1
+k = sub k 2
+end
+ret pc
+end
+
+note sincos(a): o 0 = sin bits, o 1 = cos bits; the four reduction steps are FMSUBs in the C object
+fn hmsincos ab ulong o edit ulong 2 to void
+a = bitcast f64 ab
+fq = mul a bitcast f64 ulong 4603909380684499075
+h = -0.5f64
+if ge fq 0.0f64
+h = 0.5f64
+end
+n = long add fq h
+nn = bitcast ulong neg f64 n
+r = fma64 nn 4609753056924401664 ab
+r = fma64 nn 4454258360616747008 r
+r = fma64 nn 4297306550709518336 r
+r = fma64 nn 4142048980368378305 r
+rd = bitcast f64 r
+w = mul rd rd
+sr = mul rd sinser w
+cr = cosser w
+q = and n 3
+if eq q 0
+put o 0 bitcast ulong sr
+put o 1 bitcast ulong cr
+ret
+end
+if eq q 1
+put o 0 bitcast ulong cr
+put o 1 bitcast ulong neg sr
+ret
+end
+if eq q 2
+put o 0 bitcast ulong neg sr
+put o 1 bitcast ulong neg cr
+ret
+end
+put o 0 bitcast ulong neg cr
+put o 1 bitcast ulong sr
+end
+
+note 2^e as f32 bits, exact for -149 <= e <= 127; 0 below, +inf above
+fn hmpow2f e long to ulong
+if gt e 127
+ret 2139095040
+end
+if ge e -126
+ret shl ulong add e 127 23
+end
+if ge e -149
+ret shl ulong 1 add e 149
+end
+ret 0
+end
+
+note ---- omega_gpu_fp8_pack.c ----
+
+note f32 helpers return the bit pattern (omc refuses an f32 result type, error 5)
+fn p2f e long to uint
+u = hmpow2f e
+ret uint u
+end
+
+fn e4m3ref bb ulong to ulong
+b = uchar bb
+ex = and shr b 3 15
+mf = f32 and b 7
+sg = 1.0f32
+if ne and b 128 0
+sg = -1.0f32
+end
+if and eq ex 15 eq and b 7 7
+ret 2143289344
+end
+if eq ex 0
+ret ulong bitcast uint mul mul sg mf bitcast f32 p2f -9
+end
+v = mul add 1.0f32 div mf 8.0f32 sg
+ret ulong bitcast uint mul v bitcast f32 p2f sub long ex 7
+end
+
+fn e4m3kbits bb ulong to ulong
+b = ulong uchar bb
+ret or shl and b 127 20 shl and b 128 24
+end
+
+fn e4m3isnan bb ulong to ulong
+b = uchar bb
+if eq and b 127 127
+ret 1
+end
+ret 0
+end
+
+note one piece of omega_fp8_pack_scan_nan(w, count, first): scans w 0 .. n-1 (n <= 4096), the
+note piece starting at element base of the whole array. st 0 is the NaN count so far (0 before the
+note first piece), st 1 the index of the first NaN, written only when the count was 0 (as the C
+note writes *first). Returns st 0.
+fn f8scannan w view uchar 4096 n ulong base ulong st edit ulong 2 to ulong
+for i ulong n
+if eq and get w i 127 127
+if eq get st 0 0
+put st 1 add base i
+end
+put st 0 add get st 0 1
+end
+end
+ret get st 0
+end
+
+fn ldbf16 v view uchar 8192 i ulong to uint
+lo = uint get v mul i 2
+hi = uint get v add mul i 2 1
+ret shl or lo shl hi 8 16
+end
+
+fn ldf32 v view uchar 16384 i ulong to uint
+o = mul i 4
+x = uint get v add o 3
+x = or shl x 8 uint get v add o 2
+x = or shl x 8 uint get v add o 1
+x = or shl x 8 uint get v o
+ret x
+end
+
+fn stf32 v edit uchar 16384 i ulong f f32 to void
+o = mul i 4
+x = bitcast uint f
+put v o uchar and x 255
+put v add o 1 uchar and shr x 8 255
+put v add o 2 uchar and shr x 16 255
+put v add o 3 uchar shr x 24
+end
+
+note one piece of omega_fp8_pack_scales: in holds n bf16 (n <= 4096), out gets n f32; nofold
+note nonzero is the C's mutant_no_fold. 0, or -1 at the first NaN/inf scale or fold overflow with
+note the earlier outputs written, as the C.
+fn f8packscales in view uchar 8192 n ulong out edit uchar 16384 nofold ulong to long
+fold = 1.0f32
+if eq nofold 0
+fold = bitcast f32 p2f 56
+end
+lim = bitcast f32 uint 2137108966
+for i ulong n
+s = bitcast f32 ldbf16 in i
+if not le fabs s lim
+ret -1
+end
+f = mul fold s
+if not le fabs f lim
+ret -1
+end
+stf32 out i f
+end
+ret 0
+end
+
+note one piece of omega_fp8_pack_x_f32: out = in * 2^64, n <= 4096 f32
+fn f8packxf32 in view uchar 16384 n ulong out edit uchar 16384 to void
+fold = bitcast f32 p2f 64
+for i ulong n
+stf32 out i mul bitcast f32 ldf32 in i fold
+end
+end
+
+note one piece of omega_fp8_pack_x_bf16: out = bf16 in * 2^64, n <= 4096
+fn f8packxbf16 in view uchar 8192 n ulong out edit uchar 16384 to void
+fold = bitcast f32 p2f 64
+for i ulong n
+stf32 out i mul bitcast f32 ldbf16 in i fold
+end
+end
+
+fn ldx v view uchar 512 i ulong to uint
+o = mul i 4
+x = uint get v add o 3
+x = or shl x 8 uint get v add o 2
+x = or shl x 8 uint get v add o 1
+x = or shl x 8 uint get v o
+ret x
+end
+
+note one 128-column block of one row of omega_fp8_gemv_oracle: w the row's 128 e4m3 bytes, x the
+note 128 f32 of x, sb the bf16 scale of the block, acc 0 / acc 1 the row's acc / mag (f64 bits,
+note 0 before the row's first block). The caller runs the blocks of a row in order, as the C.
+fn f8gemvblock w view uchar 128 x view uchar 512 sb ulong acc edit ulong 2 to void
+s = f64 bitcast f32 shl uint ushort sb 16
+a = bitcast f64 get acc 0
+mg = bitcast f64 get acc 1
+for c ulong 128
+rf = f64 bitcast f32 uint e4m3ref ulong get w c
+p = mul mul f64 bitcast f32 ldx x c rf s
+a = add a p
+mg = add mg fabs p
+end
+put acc 0 bitcast ulong a
+put acc 1 bitcast ulong mg
+end
+
+note ---- omega_gpu_fmt.c ----
+
+note the sink: sn 0 = characters written, sn 1 = cap
+fn fput out edit uchar 1024 sn edit ulong 2 c uchar to void
+n = get sn 0
+if lt add n 1 get sn 1
+put out n c
+put sn 0 add n 1
+end
+end
+
+note a %s argument: an offset into the string pool pl (NUL-terminated there), or 2^64-1 for NULL
+fn fputs out edit uchar 1024 sn edit ulong 2 pl view uchar 4096 off ulong to void
+if eq off 18446744073709551615
+fput out sn 40
+fput out sn 110
+fput out sn 117
+fput out sn 108
+fput out sn 108
+fput out sn 41
+ret
+end
+i = off
+while ne get pl i 0 bound 4096
+fput out sn get pl i
+i = add i 1
+end
+end
+
+fn fputu out edit uchar 1024 sn edit ulong 2 v ulong base ulong to void
+tmp = new uchar 24 0
+i = ulong 0
+while true bound 24
+d = rem v base
+if lt d 10
+put tmp i uchar add d 48
+else
+put tmp i uchar add d 87
+end
+i = add i 1
+v = div v base
+if eq v 0
+break
+end
+end
+while gt i 0 bound 24
+i = sub i 1
+fput out sn get tmp i
+end
+end
+
+fn fputd out edit uchar 1024 sn edit ulong 2 v long to void
+if lt v 0
+fput out sn 45
+fputu out sn add ulong neg add v 1 1 10
+ret
+end
+fputu out sn ulong v 10
+end
+
+note the low 32 bits of w as a signed int
+fn sx32 w ulong to long
+v = and w 4294967295
+if ge v 2147483648
+ret sub long v 4294967296
+end
+ret long v
+end
+
+note the conversion at fmt p (fmt p is '%'): r 0 = index of the conversion byte, r 1 = the va_arg
+note kind it consumes (0 none; 1 int, 2 long, 3 long long, 4 ptrdiff_t, 5 unsigned int,
+note 6 unsigned long, 7 unsigned long long, 8 size_t, 9 const char *)
+fn fscan fmt view uchar 1024 p ulong r edit ulong 4 to void
+q = add p 1
+z = false
+l = ulong 0
+if eq get fmt q 122
+z = true
+q = add q 1
+else
+while and eq get fmt q 108 lt l 2 bound 3
+l = add l 1
+q = add q 1
+end
+end
+ch = get fmt q
+k = ulong 0
+if eq ch 115
+k = 9
+end
+if eq ch 99
+k = 1
+end
+if eq ch 100
+k = 1
+if eq l 1
+k = 2
+end
+if eq l 2
+k = 3
+end
+if z
+k = 4
+end
+end
+if or eq ch 117 eq ch 120
+k = 5
+if eq l 1
+k = 6
+end
+if eq l 2
+k = 7
+end
+if z
+k = 8
+end
+end
+put r 0 q
+put r 1 k
+end
+
+note one consuming conversion: argument word w of kind k, conversion byte cc
+fn fconv out edit uchar 1024 sn edit ulong 2 w ulong k ulong cc uchar pl view uchar 4096 to void
+if eq k 9
+fputs out sn pl w
+ret
+end
+if eq cc 99
+fput out sn uchar and w 255
+ret
+end
+if eq k 1
+fputd out sn sx32 w
+ret
+end
+if lt k 5
+fputd out sn bitcast long w
+ret
+end
+base = ulong 10
+if eq cc 120
+base = 16
+end
+if eq k 5
+fputu out sn and w 4294967295 base
+ret
+end
+fputu out sn w base
+end
+
+note one '%' conversion (r 0, r 1 from fscan, r 2 the next argument, r 3 the '%' index)
+fn fone out edit uchar 1024 sn edit ulong 2 fmt view uchar 1024 args view ulong 16 pl view uchar 4096 r edit ulong 4 to void
+q = get r 0
+k = get r 1
+cc = get fmt q
+if gt k 0
+fconv out sn get args get r 2 k cc pl
+put r 2 add get r 2 1
+ret
+end
+if eq cc 37
+fput out sn 37
+ret
+end
+note unsupported conversion: copied literally, nothing consumed
+j = get r 3
+while le j q bound 5
+if eq get fmt j 0
+break
+end
+fput out sn get fmt j
+j = add j 1
+end
+end
+
+note omega_gpu_fmt(out, cap, fmt, ...): fmt NUL-terminated inside its 1024 bytes; the i-th consuming
+note conversion takes args i (16 at most): an int-sized kind uses the low 32 bits (the AAPCS64
+note va_arg of an int), %c the low 8; %s takes a pool offset (2^64-1 = NULL, printed "(null)").
+note Writes at most cap - 1 characters and the NUL (cap <= 1024, else out-of-range trap 3 once
+note the output reaches 1024); cap 0 writes nothing. Returns the characters written.
+fn gpufmt out edit uchar 1024 cap ulong fmt view uchar 1024 args view ulong 16 pl view uchar 4096 to ulong
+if eq cap 0
+ret 0
+end
+sn = new ulong 2 0
+r = new ulong 4 0
+put sn 1 cap
+p = ulong 0
+while ne get fmt p 0 bound 1024
+if ne get fmt p 37
+fput out sn get fmt p
+p = add p 1
+continue
+end
+fscan fmt p r
+put r 3 p
+fone out sn fmt args pl r
+q = get r 0
+p = add q 1
+if eq get fmt q 0
+p = q
+end
+end
+put out get sn 0 0
+ret get sn 0
+end
+
+note the va_arg kinds (fscan codes) of fmt's consuming conversions, in order; returns their count
+fn gpufmtkinds fmt view uchar 1024 kinds edit ulong 64 to ulong
+r = new ulong 4 0
+p = ulong 0
+nk = ulong 0
+while ne get fmt p 0 bound 1024
+if ne get fmt p 37
+p = add p 1
+continue
+end
+fscan fmt p r
+q = get r 0
+k = get r 1
+if gt k 0
+put kinds nk k
+nk = add nk 1
+end
+p = add q 1
+if eq get fmt q 0
+p = q
+end
+end
+ret nk
+end
+
+note ==== parity harness: program mode only; everything above this line is the library ====
+note Reads corpus records on stdin (om/gpumath/parity/corpus.py), writes one result line per record.
+note Numbers are lowercase hex, byte strings one hex token ("-" when empty).
+
+global ib uchar 1048576
+global ist ulong 2
+global ob uchar 1048576
+global obn ulong 1
+global tb uchar 262144
+global gw uchar 262144
+global gsc uchar 8192
+global gx uchar 131072
+
+fn inb to ulong
+p = get ist 0
+if ge p get ist 1
+r = read 0 ib 0 1048576
+if le r 0
+ret 256
+end
+put ist 1 ulong r
+p = 0
+end
+put ist 0 add p 1
+ret ulong get ib p
+end
+
+fn obflush to void
+n = get obn 0
+if gt n 0
+r = write 1 ob 0 n
+end
+put obn 0 0
+end
+
+fn ob1 c ulong to void
+n = get obn 0
+if ge n 1048576
+obflush
+n = 0
+end
+put ob n uchar c
+put obn 0 add n 1
+end
+
+fn hexdig v ulong to ulong
+if lt v 10
+ret add v 48
+end
+ret add v 87
+end
+
+fn ohex v ulong to void
+ob1 32
+for i ulong 16
+ob1 hexdig and shr v mul sub 15 i 4 15
+end
+end
+
+fn ohexb b ulong to void
+ob1 hexdig shr b 4
+ob1 hexdig and b 15
+end
+
+fn hexval c ulong to ulong
+if and ge c 48 le c 57
+ret sub c 48
+end
+if and ge c 97 le c 102
+ret sub c 87
+end
+ret 16
+end
+
+fn rdcode to ulong
+c = inb
+while or eq c 10 eq c 32 bound 999999
+c = inb
+end
+ret c
+end
+
+fn rdhex to ulong
+c = inb
+while eq c 32 bound 999999
+c = inb
+end
+v = ulong 0
+while lt hexval c 16 bound 17
+v = or shl v 4 hexval c
+c = inb
+end
+ret v
+end
+
+note one hex byte-string token into tb; returns the byte count ("-" is empty)
+fn rdbytes to ulong
+c = inb
+while eq c 32 bound 999999
+c = inb
+end
+if eq c 45
+c = inb
+ret 0
+end
+n = ulong 0
+while lt hexval c 16 bound 999999
+d = inb
+put tb n uchar or shl hexval c 4 hexval d
+n = add n 1
+c = inb
+end
+ret n
+end
+
+fn sgnl v ulong to long
+if ge v 9223372036854775808
+ret neg long add not v 1
+end
+ret long v
+end
+
+fn u32at v view uchar 16384 i ulong to ulong
+o = mul i 4
+x = ulong get v add o 3
+x = or shl x 8 ulong get v add o 2
+x = or shl x 8 ulong get v add o 1
+ret or shl x 8 ulong get v o
+end
+
+fn doz to void
+a = rdhex
+b = rdhex
+c = rdhex
+ob1 90
+ohex fma64 a b c
+end
+
+fn dosc to void
+o = new ulong 2 0
+a = rdhex
+hmsincos a o
+ob1 68
+ohex get o 0
+ohex get o 1
+end
+
+fn dof to void
+b = rdhex
+ob1 70
+ohex e4m3ref b
+ohex e4m3kbits b
+ohex e4m3isnan b
+end
+
+note G nofold bf16-bytes / H f32-bytes / I bf16-bytes: one piece of the pack functions
+fn dopack c ulong to void
+in = new uchar 8192 0
+inf = new uchar 16384 0
+out = new uchar 16384 170
+nf = ulong 0
+if eq c 71
+nf = rdhex
+end
+nb = rdbytes
+n = div nb 2
+if eq c 72
+n = div nb 4
+end
+for i ulong nb
+if eq c 72
+put inf i get tb i
+else
+put in i get tb i
+end
+end
+ob1 c
+if eq c 71
+ohex bitcast ulong f8packscales in n out nf
+end
+if eq c 72
+f8packxf32 inf n out
+end
+if eq c 73
+f8packxbf16 in n out
+end
+for i ulong n
+ohex u32at out i
+end
+end
+
+note N bytes: omega_fp8_pack_scan_nan over the whole array, in 4096-byte pieces
+fn doscan to void
+w = new uchar 4096 0
+st = new ulong 2 0
+put st 1 12297829382473034410
+nb = rdbytes
+base = ulong 0
+while lt base nb bound 64
+m = sub nb base
+if gt m 4096
+m = 4096
+end
+for i ulong m
+put w i get tb add base i
+end
+r = f8scannan w m base st
+base = add base m
+end
+ob1 78
+ohex get st 0
+ohex get st 1
+end
+
+fn ldblk wb edit uchar 128 xb edit uchar 512 wo ulong xo ulong to void
+for c ulong 128
+put wb c get gw add wo c
+end
+for c ulong 512
+put xb c get gx add xo c
+end
+end
+
+fn gsb i ulong to ulong
+si = mul i 2
+ret or ulong get gsc si shl ulong get gsc add si 1 8
+end
+
+note one row r of the gemv held in gw, gsc, gx: the adapter's block loop (acc and mag start at 0)
+fn gemvrow wb edit uchar 128 xb edit uchar 512 acc edit ulong 2 r ulong k ulong to void
+kb = div k 128
+so = mul div r 128 kb
+put acc 0 0
+put acc 1 0
+for b ulong kb
+ldblk wb xb add mul r k mul b 128 mul b 512
+f8gemvblock wb xb gsb add so b acc
+end
+end
+
+note Q n k w-bytes scale-bytes x-bytes: omega_fp8_gemv_oracle row by row, block by block
+fn dogemv to void
+wb = new uchar 128 0
+xb = new uchar 512 0
+acc = new ulong 2 0
+n = rdhex
+k = rdhex
+nb = rdbytes
+for i ulong nb
+put gw i get tb i
+end
+nb = rdbytes
+for i ulong nb
+put gsc i get tb i
+end
+nb = rdbytes
+for i ulong nb
+put gx i get tb i
+end
+ob1 81
+for r ulong n
+gemvrow wb xb acc r k
+ohex get acc 0
+ohex get acc 1
+end
+end
+
+note M cap fmt-bytes nargs args... pool-bytes: omega_gpu_fmt and its va_arg kinds
+fn dofmt to void
+out = new uchar 1024 170
+fm = new uchar 1024 0
+args = new ulong 16 0
+pl = new uchar 4096 0
+kd = new ulong 64 0
+cap = rdhex
+nb = rdbytes
+for i ulong nb
+put fm i get tb i
+end
+na = rdhex
+for i ulong na
+put args i rdhex
+end
+nb = rdbytes
+for i ulong nb
+put pl i get tb i
+end
+n = gpufmt out cap fm args pl
+nk = gpufmtkinds fm kd
+ob1 77
+ohex n
+ob1 32
+if eq nk 0
+ob1 45
+end
+for i ulong nk
+ob1 hexdig get kd i
+end
+ob1 32
+m = add n 2
+if gt m cap
+m = cap
+end
+if eq m 0
+ob1 45
+end
+for i ulong m
+ohexb ulong get out i
+end
+end
+
+fn main to int
+while true bound 999999
+c = rdcode
+if eq c 256
+break
+end
+if eq c 90
+doz
+end
+if eq c 65
+ob1 65
+ohex hmlog rdhex
+end
+if eq c 66
+ob1 66
+ohex hmexp rdhex
+end
+if eq c 67
+ob1 67
+b = rdhex
+ohex hmpow b rdhex
+end
+if eq c 68
+dosc
+end
+if eq c 69
+ob1 69
+ohex hmpow2f sgnl rdhex
+end
+if eq c 70
+dof
+end
+if and ge c 71 le c 73
+dopack c
+end
+if eq c 78
+doscan
+end
+if eq c 81
+dogemv
+end
+if eq c 77
+dofmt
+end
+ob1 10
+end
+obflush
+ret 0
+end
diff --git a/om/gpumath/parity/corpus.py b/om/gpumath/parity/corpus.py
new file mode 100755
index 000000000..33bd31e42
--- /dev/null
+++ b/om/gpumath/parity/corpus.py
@@ -0,0 +1,570 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""Deterministic parity corpus for om/gpumath/gpumath.om (aien-dev/omega-mv#726).
+
+usage: corpus.py OUTDIR [--c-cases FILE]
+
+Writes one record file per stream into OUTDIR (record formats: the harness section of gpumath.om).
+Every random value comes from splitmix64 with a fixed seed per stream, so the files are the same
+on every run and every Python 3. --c-cases also writes the typed omega_gpu_fmt calls a C oracle
+needs for the fmt stream (one `case` per M record, in order).
+"""
+import math
+import os
+import struct
+import sys
+
+M64 = (1 << 64) - 1
+
+
+class Rng:
+    def __init__(self, seed):
+        self.s = seed & M64
+
+    def u64(self):
+        self.s = (self.s + 0x9E3779B97F4A7C15) & M64
+        z = self.s
+        z = ((z ^ (z >> 30)) * 0xBF58476D1CE4E5B9) & M64
+        z = ((z ^ (z >> 27)) * 0x94D049BB133111EB) & M64
+        return z ^ (z >> 31)
+
+    def below(self, n):
+        return self.u64() % n
+
+    def unit(self):
+        return (self.u64() >> 11) / float(1 << 53)
+
+    def pick(self, seq):
+        return seq[self.below(len(seq))]
+
+
+def dbits(x):
+    return struct.unpack("= 1 << 53:
+                break
+        ea = r.below(600) - 300
+        eb = r.below(600) - 300
+        a = math.ldexp(ma, ea) * (1 if r.below(2) else -1)
+        b = math.ldexp(mb, eb) * (1 if r.below(2) else -1)
+        low = ea + eb  # exponent of the product's lowest (tie) bit
+        c = math.ldexp(1.0 + r.unit(), max(-1074, low - 2 - r.below(900))) * (1 if r.below(2) else -1)
+        rec(dbits(a), dbits(b), r.pick([dbits(c), dbits(c), dbits(c), 0, 1 << 63]))
+    with open(os.path.join(out, "fma.txt"), "w") as f:
+        f.writelines(lines)
+    return len(lines)
+
+
+def gen_log(out):
+    r = Rng(0x6C6F67)
+    L = []
+    for v in D_SPECIAL:
+        L.append(v)
+    for e in range(-1074, 1024):
+        L.append(dbits(math.ldexp(1.0, e)))
+    for _ in range(100000):
+        L.append(r.u64())
+    for _ in range(100000):
+        if r.below(20) == 0:
+            L.append(1 + (r.u64() & 0x000FFFFFFFFFFFFE))
+        else:
+            L.append(((1 + r.below(2046)) << 52) | (r.u64() & 0x000FFFFFFFFFFFFF))
+    for _ in range(20000):
+        L.append(dbits(1.0 + (r.unit() - 0.5) * 2.0 ** -(r.below(50))))
+    for d in range(-64, 65):
+        L.append(0x3FF6A09E667F3BCD + d)
+    for e in range(-1070, 1024, 3):  # x = 2^e (1 + tiny): t is small, the fused s * 2t + e * ln2lo matters
+        for _ in range(6):
+            L.append(dbits(math.ldexp(1.0 + r.unit() * 2.0 ** -(1 + r.below(45)), e)))
+    with open(os.path.join(out, "log.txt"), "w") as f:
+        f.writelines("A %s\n" % h(v) for v in L)
+    return len(L)
+
+
+def gen_exp(out):
+    r = Rng(0x657870)
+    L = list(D_SPECIAL)
+    for _ in range(100000):
+        L.append(r.u64())
+    for _ in range(100000):
+        L.append(dbits(-750.0 + 1462.0 * r.unit()))
+    for edge in (709.78, -745.2):
+        for d in range(-200, 201):
+            L.append(dbits(edge) + d)
+    ln2 = math.log(2.0)
+    for k in list(range(-1080, -1015)) + list(range(1018, 1025)) + list(range(-5, 6)):
+        for _ in range(60):
+            L.append(dbits(k * ln2 + (r.unit() - 0.5) * 1.4))
+    for _ in range(5000):
+        L.append(dbits((r.unit() - 0.5) * 2.0 ** -(r.below(60))))
+    for k in range(-1075, 1025):  # y within a few ulps of k * ln2: r is small, the fused reduction matters
+        y = dbits(k * ln2)
+        for d in (-3, -1, 0, 1, 2):
+            L.append((y + d) & M64)
+    with open(os.path.join(out, "exp.txt"), "w") as f:
+        f.writelines("B %s\n" % h(v) for v in L)
+    return len(L)
+
+
+def gen_pow(out):
+    r = Rng(0x706F77)
+    P = []
+    thetas = [10000.0, 500000.0, 1000000.0, 5000000.0, 10000000.0, 1000.0, 50000.0]
+    for th in thetas:
+        for d in (64, 80, 96, 128, 256):
+            for i in range(d // 2):
+                P.append((dbits(th), dbits(-(2.0 * i) / d)))
+                P.append((dbits(th), dbits((2.0 * i) / d)))
+    for _ in range(40000):
+        P.append((dbits(math.exp((r.unit() - 0.5) * 40.0)), dbits((r.unit() - 0.5) * 20.0)))
+    for _ in range(30000):
+        P.append((r.u64(), r.u64()))
+    for _ in range(25000):
+        P.append((rand_double(r), rand_double(r)))
+    for a in D_SPECIAL:
+        for b in D_SPECIAL:
+            P.append((a, b))
+    with open(os.path.join(out, "pow.txt"), "w") as f:
+        f.writelines("C %s %s\n" % (h(a), h(b)) for a, b in P)
+    return len(P)
+
+
+def gen_sincos(out):
+    r = Rng(0x73696E)
+    L = list(D_SPECIAL)
+    for _ in range(100000):
+        L.append(r.u64())
+    lim = 2.0 ** 20 * math.pi / 2
+    for _ in range(100000):
+        L.append(dbits((2.0 * r.unit() - 1.0) * lim))
+    for _ in range(100000):  # RoPE angles: pos * theta^(-2i/d), pos < 65536
+        th = r.pick([10000.0, 500000.0, 1000000.0, 10000000.0])
+        d = r.pick([64, 128, 256])
+        i = r.below(d // 2)
+        inv = th ** (-(2.0 * i) / d)
+        L.append(dbits(float(r.below(65536)) * inv))
+    for _ in range(30000):  # near multiples of pi/2: the reduction cancels
+        n = r.below(1 << 21) - (1 << 20)
+        L.append((dbits(n * (math.pi / 2)) + r.below(9) - 4) & M64)
+    for _ in range(10000):
+        L.append(dbits((r.unit() - 0.5) * 2.0 ** -(r.below(70))))
+    with open(os.path.join(out, "sincos.txt"), "w") as f:
+        f.writelines("D %s\n" % h(v) for v in L)
+    return len(L)
+
+
+def gen_pow2f(out):
+    r = Rng(0x703266)
+    L = list(range(-1000, 1001)) + [-(1 << 31), (1 << 31) - 1, -(1 << 31) + 1, 1 << 30, -(1 << 30)]
+    for _ in range(10000):
+        L.append(r.below(1 << 32) - (1 << 31))
+    with open(os.path.join(out, "pow2f.txt"), "w") as f:
+        f.writelines("E %s\n" % h(v & M64) for v in L)
+    return len(L)
+
+
+def gen_e4m3(out):
+    with open(os.path.join(out, "e4m3.txt"), "w") as f:
+        f.writelines("F %s\n" % h(b) for b in range(256))
+    return 256
+
+
+def le16(vals):
+    return b"".join(struct.pack(" 4000:
+                    w, ce = b"x", cstr(b"x")
+                words.append(len(pool))
+                pool += w + b"\0"
+        else:
+            words.append(w)
+        cargs.append(ce)
+    if not pool:
+        pool = bytearray(b"\0")
+    ks = "".join(str(k) for k, _ in kinds) or "-"
+    parts = ["M", h(cap), hb(fb), h(len(words))] + [h(w) for w in words] + [hb(bytes(pool))]
+    lines.append(" ".join(parts) + "\n")
+    cases.append("case %d: kinds = \"%s\"; n = omega_gpu_fmt(out, %d, %s%s); break;\n"
+                 % (len(cases), ks, cap, cstr(fb), "".join(", " + a for a in cargs)))
+
+
+def gen_fmt(out, cfile):
+    r = Rng(0x666D74)
+    lines = []
+    cases = []
+    alpha = b"%lzdusxcA"
+    import itertools
+    for L in (1, 2, 3, 4):
+        for t in itertools.product(alpha, repeat=L):
+            fb = bytes(t)
+            if len(fmt_kinds(fb)) > 16:
+                continue
+            fmt_record(r, fb, 1024, lines, cases)
+            fmt_record(r, fb, r.below(len(fb) + 30), lines, cases)
+    mods = [b"", b"l", b"ll", b"lll", b"z", b"zl", b"lz", b"zz"]
+    convs = b"duxsc%qXi.5-"
+    for m in mods:
+        for c in convs:
+            for _ in range(20):
+                fb = b"<" + b"%" + m + bytes([c]) + b">"
+                fmt_record(r, fb, r.pick([1024, 1024, 0, 1, 2, 3, 5, 8]), lines, cases)
+        fmt_record(r, b"tail %" + m, 1024, lines, cases)
+    pieces = [b"%d", b"%ld", b"%lld", b"%zd", b"%u", b"%lu", b"%llu", b"%zu", b"%x", b"%lx", b"%llx", b"%zx",
+              b"%s", b"%c", b"%%", b"%q", b"%5d", b"%", b"%l", b"%z", b"stage ", b": ", b"=", b" rc ", b"\xff"]
+    for _ in range(12000):
+        fb = bytearray()
+        for _ in range(r.below(14)):
+            fb += r.pick(pieces)
+        fb = bytes(fb)
+        if len(fmt_kinds(fb)) > 16 or len(fb) > 1000:
+            continue
+        cap = r.pick([1024, 1024, 1024, r.below(80), r.below(8), 1, 0])
+        fmt_record(r, fb, cap, lines, cases)
+    with open(os.path.join(out, "fmt.txt"), "w") as f:
+        f.writelines(lines)
+    if cfile:
+        with open(cfile, "w") as f:
+            f.write("/* generated by om/gpumath/parity/corpus.py: one typed omega_gpu_fmt call per M record */\n")
+            f.write("static int fmt_case(long idx, char *out, const char **kindsp) {\n  int n = -1; const char *kinds = 0;\n  switch (idx) {\n")
+            f.writelines("  " + c for c in cases)
+            f.write("  default: break;\n  }\n  *kindsp = kinds;\n  return n;\n}\n")
+    return len(lines)
+
+
+def main():
+    if len(sys.argv) not in (2, 4) or (len(sys.argv) == 4 and sys.argv[2] != "--c-cases"):
+        sys.exit(__doc__)
+    out = sys.argv[1]
+    cfile = sys.argv[3] if len(sys.argv) == 4 else None
+    os.makedirs(out, exist_ok=True)
+    counts = [
+        ("fma", gen_fma(out)), ("log", gen_log(out)), ("exp", gen_exp(out)), ("pow", gen_pow(out)),
+        ("sincos", gen_sincos(out)), ("pow2f", gen_pow2f(out)), ("e4m3", gen_e4m3(out)),
+        ("scales", gen_scales(out)), ("xf32", gen_xf32(out)), ("xbf16", gen_xbf16(out)),
+        ("scan", gen_scan(out)), ("gemv", gen_gemv(out)), ("fmt", gen_fmt(out, cfile)),
+    ]
+    for name, n in counts:
+        print("%s %d" % (name, n))
+
+
+if __name__ == "__main__":
+    main()
diff --git a/om/gpumath/parity/expected.txt b/om/gpumath/parity/expected.txt
new file mode 100644
index 000000000..76e7e99ea
--- /dev/null
+++ b/om/gpumath/parity/expected.txt
@@ -0,0 +1,16 @@
+# sha256 of the C oracle's output for each corpus stream (parity/corpus.py), the product C compiled with the
+# Makefile CFLAGS (gcc 13.3.0, -std=gnu11 -O2, aarch64; .text identical to a `make` build of the same sources).
+# stream records sha256
+fma 326561 f1ec4a4e11e60bb24033705fe90e185d9849a110e0e8c402edd3504e202fd8b3
+log 226442 02a5ccfdfff416cd8d39fb31a82e620238b12f70af8642134392cc291f90a581
+exp 221309 9204889d46d3180f716098f33e2244f58aad13b5a95d9094ed0ccbdbec2567e1
+pow 100097 7303f36415d2969829aa491a694ce06617ec05a667ce70b5ae30c8d0ddffc0a4
+sincos 340027 7ab82242bf634a76c2f6f9c859543aea329dd73098800aed5143268c1fdbf393
+pow2f 12006 9a46b5f84e7f888afee50a49786cad8dca8bbb1e44f4a33d78e1758a4cabae8b
+e4m3 256 08e48570cba3480d5b9984a85d8624fb5b8bea26ccb77bc8942e5cd54ae92c92
+scales 131132 406998c5552787a53b89aba45547d5bea4ce0c56dfb89ba3599c7e39499ac072
+xf32 27 b45fdfdb739f1566229afe3157f35f495144686c0b6a5e7c962222a4b0c2fce6
+xbf16 18 7927d98546cbadf07f720155c9a3ba3e12065e8a019f7295dd6805b8cf3f0921
+scan 400 cbc2c9641803b600e3b191cf5bdc752bf89db2379a8fe6e31d378868dd6e50ab
+gemv 13 a29a7ca1f0f151c206372d2ce48b8c1d5c0a7c65a86c741a640f838d8c7b8cd3
+fmt 28688 be0e44674280a630eb4ae2c20be4fe828f1cfa2cfb0c204ce0b053416c663fad
diff --git a/om/gpumath/parity/run.sh b/om/gpumath/parity/run.sh
new file mode 100755
index 000000000..cbb7f73be
--- /dev/null
+++ b/om/gpumath/parity/run.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+# Parity of om/gpumath/gpumath.om against the C it ports (src/omega_gpu_hostmath.c, src/omega_gpu_fp8_pack.c,
+# src/omega_gpu_fmt.c), by recorded oracle output: corpus.py regenerates the corpus, the .om harness runs every
+# stream, and each stream's output must hash to parity/expected.txt (the C oracle's output, recorded when the
+# port was made; the oracle driver itself is not in the tree). Then thirteen small mutants of gpumath.om
+# must each change their stream's hash (the corpus discriminates). With OMEGA_BRIDGE set, the 15 exported
+# functions are also cut into function-mode units (unit.py), bound by the pinned omega-bridge generator and
+# compiled as C (bindability).
+#   OMEGA_OMC     seed-born omc, sha256 pinned below (exit 3 NOT_RUN without it)
+#   OMEGA_BRIDGE  optional: an aien-dev/omega-bridge checkout whose src/native.om matches the pin
+set -eu
+OMC_PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+NATIVE_PIN=2c2c53f61d4ab302f1a2092c3c32189335dd53f6cf2b388f47a475f99f2c3940
+P=$(cd "$(dirname "$0")" && pwd)
+OM=$P/../gpumath.om
+[ -n "${OMEGA_OMC:-}" ] || { echo "GPUMATH-PARITY NOT_RUN: set OMEGA_OMC"; exit 3; }
+[ "$(sha256sum < "$OMEGA_OMC" | cut -c1-64)" = "$OMC_PIN" ] || { echo "GPUMATH-PARITY NOT_RUN: omc is not the pinned compiler"; exit 3; }
+command -v python3 > /dev/null || { echo "GPUMATH-PARITY NOT_RUN: python3 missing"; exit 3; }
+T=$(mktemp -d); trap 'rm -rf "$T"' EXIT
+python3 "$P/corpus.py" "$T/corp" > "$T/counts"
+"$OMEGA_OMC" < "$OM" > "$T/gm"; chmod +x "$T/gm"
+fail=0
+grep -v '^#' "$P/expected.txt" | while read -r s n want; do
+  "$T/gm" < "$T/corp/$s.txt" > "$T/$s.out"
+  got=$(sha256sum < "$T/$s.out" | cut -c1-64)
+  lines=$(wc -l < "$T/$s.out")
+  if [ "$got" = "$want" ] && [ "$lines" = "$n" ]; then
+    echo "PASS $s: $n records, output identical to the C oracle ($(grep "^$s " "$T/counts" | cut -d' ' -f2) inputs)"
+  else
+    echo "FAIL $s: $lines records, sha256 $got (want $n, $want)"; echo x >> "$T/failed"
+  fi
+done
+[ ! -e "$T/failed" ] || { echo "GPUMATH-PARITY FAIL"; exit 1; }
+
+# Mutants: name | stream | exact text in gpumath.om (\n for a newline) | replacement
+cat > "$T/mutants" <<'EOF'
+tie_up|fma|if or low128 hi lo sub us 1 eq and q 1 1|if true
+sticky_off|fma|put t add k 1 or nlo st|put t add k 1 nlo
+nan_order|fma|if issnan64 a\nret or a 2251799813685248\nend\nif issnan64 b|if issnan64 b\nret or b 2251799813685248\nend\nif issnan64 a
+zero_sign|fma|if eq or get t 4 get t 5 0\nret 0|if eq or get t 4 get t 5 0\nret shl sg 63
+log_unfused|log|lo = fma64 s bitcast ulong add t t lo|lo = bitcast ulong add mul bitcast f64 s add t t bitcast f64 lo
+sincos_unfused|sincos|r = fma64 nn 4609753056924401664 ab|r = bitcast ulong sub a mul f64 n bitcast f64 ulong 4609753056924401664
+pow_order|pow|ret hmexp bitcast ulong mul bitcast f64 hmlog bb e|ret hmexp bitcast ulong mul e bitcast f64 hmlog bb
+pow2f_bias|pow2f|ret shl ulong add e 127 23|ret shl ulong add e 126 23
+e4m3_sub|e4m3|ret ulong bitcast uint mul mul sg mf bitcast f32 p2f -9|ret ulong bitcast uint mul mul sg mf bitcast f32 p2f -10
+scales_fold|scales|fold = bitcast f32 p2f 56|fold = bitcast f32 p2f 55
+scan_first|scan|put st 1 add base i|put st 1 i
+gemv_order|gemv|p = mul mul f64 bitcast f32 ldx x c rf s|p = mul mul rf f64 bitcast f32 ldx x c s
+fmt_char|fmt|fput out sn uchar and w 255|fput out sn 63
+EOF
+while IFS='|' read -r name s old new; do
+  python3 - "$OM" "$T/m.om" "$old" "$new" <<'PY'
+import sys
+src, dst, old, new = sys.argv[1], sys.argv[2], sys.argv[3].replace("\\n", "\n"), sys.argv[4].replace("\\n", "\n")
+s = open(src).read()
+assert s.count(old + "\n") == 1, "mutant text not found exactly once: " + old
+open(dst, "w").write(s.replace(old + "\n", new + "\n"))
+PY
+  "$OMEGA_OMC" < "$T/m.om" > "$T/m"; chmod +x "$T/m"
+  rc=0; "$T/m" < "$T/corp/$s.txt" > "$T/m.out" 2> /dev/null || rc=$?
+  got=$(sha256sum < "$T/m.out" | cut -c1-64)
+  want=$(grep "^$s " "$P/expected.txt" | cut -d' ' -f3)
+  if [ "$got" = "$want" ]; then echo "mutant $name NOT killed on $s"; echo x >> "$T/failed"; continue; fi
+  d=$(paste -d'|' "$T/m.out" "$T/$s.out" | awk -F'|' '$1 != $2' | wc -l)
+  echo "mutant $name killed on $s ($d records differ, exit $rc)"
+done < "$T/mutants"
+[ ! -e "$T/failed" ] || { echo "GPUMATH-PARITY FAIL"; exit 1; }
+
+if [ -z "${OMEGA_BRIDGE:-}" ]; then
+  echo "GPUMATH-PARITY PASS (bindability NOT_RUN: set OMEGA_BRIDGE)"; exit 0
+fi
+[ "$(sha256sum < "$OMEGA_BRIDGE/src/native.om" | cut -c1-64)" = "$NATIVE_PIN" ] || { echo "GPUMATH-PARITY PASS (bindability NOT_RUN: native.om is not the pinned generator)"; exit 0; }
+"$OMEGA_OMC" < "$OMEGA_BRIDGE/src/native.om" > "$T/native"; chmod +x "$T/native"
+: > "$T/units"
+for u in hmlog hmexp hmpow hmsincos hmpow2f e4m3ref e4m3kbits e4m3isnan f8scannan f8packscales f8packxf32 \
+         f8packxbf16 f8gemvblock gpufmt gpufmtkinds; do
+  python3 "$P/unit.py" "$OM" "$u" > "$T/u.om"
+  "$OMEGA_OMC" < "$T/u.om" > "$T/u.bin"
+  { cat "$T/u.om"; printf '\0'; printf '%08d' "$(wc -c < "$T/u.bin")"; cat "$T/u.bin"; } >> "$T/units"
+done
+"$T/native" < "$T/units" > "$T/units.c"
+cc -std=gnu11 -O2 -Wall -Wextra -Werror -c "$T/units.c" -o "$T/units.o"
+echo "bindability: 15 function-mode units accepted by native.om and compiled ($(grep -c ') uint32_t omega_[a-z0-9]*(uint64_t \*result' "$T/units.c") exported functions)"
+echo "GPUMATH-PARITY PASS"
diff --git a/om/gpumath/parity/unit.py b/om/gpumath/parity/unit.py
new file mode 100755
index 000000000..91f64494d
--- /dev/null
+++ b/om/gpumath/parity/unit.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""unit.py GPUMATH.om NAME: print the function-mode unit that exports NAME.
+
+The unit is NAME and every library function it reaches through calls (the part of gpumath.om
+before the parity-harness marker), in file order, with NAME moved to the end: the seeded compiler
+enters a function-mode unit at its last function and the omega-bridge native call ABI v1 binds that
+one; the others stay private helpers. Note lines before a kept function travel with it.
+"""
+import sys
+
+MARK = "note ==== parity harness"
+
+
+def functions(lib):
+    """[(name, first line incl. leading notes, end line)] of the library."""
+    out = []
+    i = 0
+    while i < len(lib):
+        w = lib[i].split()
+        if w[:1] == ["fn"]:
+            j = i
+            while j > 0 and lib[j - 1].startswith("note") and not lib[j - 1].startswith("note ----"):
+                j -= 1
+            depth = 0
+            for k in range(i, len(lib)):
+                t = lib[k].split()[:1]
+                if t and t[0] in ("fn", "if", "while", "for"):
+                    depth += 1
+                elif t == ["end"]:
+                    depth -= 1
+                    if depth == 0:
+                        break
+            else:
+                sys.exit("unit.py: %s has no closing end" % w[1])
+            out.append((w[1], j, k))
+            i = k + 1
+        else:
+            i += 1
+    return out
+
+
+def main():
+    if len(sys.argv) != 3:
+        sys.exit(__doc__)
+    src, name = sys.argv[1], sys.argv[2]
+    lines = open(src).read().split("\n")
+    lib = lines[:next(i for i, l in enumerate(lines) if l.startswith(MARK))]
+    fns = functions(lib)
+    span = {n: (a, b) for n, a, b in fns}
+    if name not in span:
+        sys.exit("unit.py: no function %s" % name)
+    calls = {}
+    for n, a, b in fns:
+        words = set()
+        for l in lib[a:b + 1]:
+            if not l.startswith("note"):
+                words.update(l.split())
+        calls[n] = {m for m in words if m in span and m != n}
+    keep = {name}
+    todo = [name]
+    while todo:
+        for m in calls[todo.pop()]:
+            if m not in keep:
+                keep.add(m)
+                todo.append(m)
+    order = [n for n, _, _ in fns if n in keep and n != name] + [name]
+    parts = []
+    for n in order:
+        a, b = span[n]
+        parts.append("\n".join(lib[a:b + 1]))
+    sys.stdout.write("note SPDX-License-Identifier: Apache-2.0\nnote generated from om/gpumath/gpumath.om by parity/unit.py %s\n\n" % name)
+    sys.stdout.write("\n\n".join(parts) + "\n")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/om/receipt/README.md b/om/receipt/README.md
new file mode 100644
index 000000000..bc0e01de1
--- /dev/null
+++ b/om/receipt/README.md
@@ -0,0 +1,161 @@
+# receipt.om: the EvidenceReceiptV1 reader in seeded Omega
+
+`receipt.om` ports `src/omega_receipt.c` and `src/omega_receipt.h` to seeded Omega. These files are the
+C reader of the aien-proof EvidenceReceiptV1 wire contract (VC1 stage 4). The port does what the C
+does:
+
+- parses the receipt JSON with serde's shape rules (no unknown fields, the same required and
+  defaulted fields);
+- applies every `canonical_bytes` validation in the C order;
+- builds the canonical byte encoding;
+- computes the id as BLAKE3 over those bytes;
+- `verify_bytes` requires the `id` field to equal that BLAKE3 value, in either hex case.
+
+It also covers `omega_tier_rank` and `omega_tier_satisfies`. Part of #726,
+aien-dev/aien-architecture-mv#300 and #316. No C file is changed or removed by this port.
+
+## Layout
+
+The library is everything above the line `note ==== parity harness`. It uses no globals and no
+`text`, and every array length is a literal, because function-mode units refuse `const` (error 9).
+`parity/unit.py` can cut any entry point into a function-mode unit for the omega-bridge native call
+ABI v1:
+
+| entry | signature (ABI v1) | C counterpart |
+|---|---|---|
+| `rcparse js n wk` | `js view uchar 4194304`, `wk edit ulong 65536` → long | `omega_receipt_parse` |
+| `rccanon js n wk out pos` | `out edit uchar 1049632` → ulong (total length) | `omega_receipt_canonical` + `omega_receipt_compute_id` |
+| `rcverify js n wk out` | → long | `omega_receipt_verify_bytes` |
+| `rctier s n wk` | → long | `omega_tier_rank` |
+| `rcsat need have` | → long | `omega_tier_satisfies` |
+
+`rcparse` and `rcverify` return 0 or -1, as the C does. A refusal is stored as three numbers:
+
+- `wk[0]`: a reason code, 1..69, one for each distinct C message;
+- `wk[1]`: a field-name index, for messages that name a field;
+- `wk[2]`: the byte offset, for JSON syntax messages.
+
+The program-mode harness renders these numbers as the exact C message text. `rccanon` streams the
+canonical bytes:
+
+- bytes `[pos, pos + 1 MiB)` go to `out[0..]`;
+- the 32-byte id goes to `out[1049600..]`;
+- the return value is the total length.
+
+Canonical bytes over 1 MiB need one call per window, and each call re-encodes the whole receipt.
+
+There is no DOM. Pass 1 checks the JSON syntax with the C reader's exact rules, errors and byte
+offsets. It is iterative, because function mode refuses call cycles. Pass 2 reads fields by walking
+the validated text, and decodes strings on the fly for comparisons, sorting and output. The whole
+`wk` layout is documented at the top of `receipt.om`.
+
+BLAKE3 is copied from `om/blake3/b3unit.om`, because Omegese has no `import`. The task named
+`blake3.om`, but that file uses globals, so it cannot become a function-mode unit; `b3unit.om` is the
+array-parameter form from the same merged work. Three locations changed; the compression code is
+unchanged:
+
+- the chaining-value stack lives in `wk` at 512 (depth 952, chunk count 953);
+- the chunk is read from `out` at 1048576;
+- the root is written to `out` at 1049600.
+
+## Build and run
+
+```
+OMC=/path/to/seed/out/omc   # pinned: sha256 62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+$OMC < om/receipt/receipt.om > receipt && chmod +x receipt
+python3 om/receipt/parity/corpus.py /tmp/corp && ./receipt < /tmp/corp/rust.bin
+```
+
+The harness reads records from stdin and writes one line per record. The record format and the
+line format are described in the notes at the end of `receipt.om`. Exit 65 means a short record.
+
+## Parity
+
+`OMEGA_OMC=$OMC [OMEGA_BRIDGE=] sh om/receipt/parity/run.sh`
+
+This command compares the .om output with **recorded** C oracle hashes in `parity/expected.txt`. It
+does not build or run any C. It then applies 20 mutants to `receipt.om`. Each mutant must run to exit
+0 and change its stream's sha256. With `OMEGA_BRIDGE` set, it also cuts the five entry points into
+units, binds them with the pinned `native.om`, and compiles the generated C.
+
+**Oracle.** `src/omega_receipt.c` (sha256 `88cfe0c5…1651`) and `omega_receipt.h` (`d8043519…1cbf`) at
+omega-mv `acb3f15c`. Built with gcc 13.3.0 and `-std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2`,
+the Makefile CFLAGS that apply to these files. It is linked with the product BLAKE3
+(`src/omega_blake3.c` + `src/sha256.c`, which is itself the bound `b3unit.om`). A second build with
+the pre-port C BLAKE3 (`633a1735:src/omega_blake3.c`, sha256 `c89ef819…0f21`) gave byte-identical
+output for every stream. The three receipts written by the Rust implementation verify to their
+file-name ids. The driver is kept out of the tree.
+
+**Corpus.** `parity/corpus.py` is deterministic. It has 9,261 records (45 MB) and is regenerated on
+every run.
+
+| stream | records | content | result |
+|---|---|---|---|
+| rust | 18 | the 3 Rust receipts, each with an upper-case id, compact, indented, keys reversed, and a `\u` escape | 18/18 lines identical |
+| shapes | 96 | every receipt shape of `tests/test_omega_resolve.c` `t_receipts`, plus one receipt that uses every field; each as R (placeholder id), M (id computed, then verified) and M with an upper-case id | 96/96 |
+| fields | 1,634 | each top-level key missing or given 17 wrong values; escapes and UTF-8 in every string; version and timestamp edges; commit, tier, result and digest forms; the full declared × observed mutation × tier matrix (648); ledger, lease and assertion shapes; production authority spellings; sorting and dedup with multi-byte and escaped strings; formatting variants | 1,634/1,634 |
+| json | 3,412 | 110 handwritten syntax cases (every JSON message), 1,500 grammar-fuzz documents and a one-byte corruption of each, 300 random byte strings, a 3,000-key object and its duplicate-key twin | 3,412/3,412 |
+| mutants | 4,062 | mutated serialised receipts: every byte of Rust receipt 1 with bit 0x20 flipped (1,168), every truncation of Rust receipt 2 (1,094), 600 random byte flips of the Rust receipts, and 1,200 flips or truncations of receipts built with computed ids | 4,062/4,062 |
+| big | 21 | lists of 4,096 entries and 4,097 entries (each list field), 4,096 and 4,097 assertions, 4.1 MB canonical bytes (5 windows), a 1 MiB authority, 3 MB UTF-8 and 3.6 MB `\u` strings, inputs of exactly 4 MiB and 4 MiB + 1, empty input, a 2,000,000-digit timestamp, a 3 MB array | 21/21 |
+| tier | 18 | `omega_tier_rank` for 17 strings and the `omega_tier_satisfies` table over -3, -1, 0..8 | 18/18 |
+
+Every line holds:
+
+- the parse return code, and the C error message or the canonical bytes in hex;
+- the computed id;
+- the verify return code, and the message or the id.
+
+All 69 C messages are covered except three that are unreachable (see below). The mutants stream
+alone has 59 receipts that still verify, 211 that parse but fail the id check, and 3,792 that are
+refused.
+
+**Mutants.** Twenty mutants: five JSON (duplicate key, depth, surrogate UTF-8, pair offset, leading
+zero) and eleven receipt rules (deny unknown, schema, env_class, PASS needs an assertion, test-only
+authority, canonical sort, id compare, `\f` decoding, set dedup, mutation order, u64 overflow). Four
+more cover upper-case hex, the BLAKE3 root flag, the canonical window edge and the test-only tier
+rule. Every one is killed.
+
+**ABI check.** This was run outside the tree, by a /tmp driver linking the generated bindings. It ran
+every stream through the five bound units and rendered messages from the reason codes. The output
+hashed to `expected.txt`.
+
+On the Spark (arm64), the whole corpus takes 8.7 s for the .om harness and about 1.5 s for the -O2
+C driver.
+
+## Where the C and the task text differ
+
+- The task asks to port "receipt building, serialisation, parsing and verification". The C has no
+  JSON writer and no receipt builder. It parses, validates, builds the canonical bytes, hashes and
+  verifies. The port follows the C. "Building" in the corpus is the test's `rj_make` step (placeholder
+  id, compute, patch), done by the harness's M records in the same way as the C driver.
+- The C reports errors as `-1` plus a text message, with no numeric error codes. Parity therefore
+  compares the return code and the full message text, including JSON byte offsets.
+- Some code cannot run:
+  - "a read-only run cannot claim that mutation" is unreachable in the C. At tier rank 4, any
+    observed mutation with index ≥ 4 has severity ≥ 4 and is refused one line earlier.
+  - The `need >= 4 && have < 4` clause of `omega_tier_satisfies` is implied by the final
+    `have >= need`, so removing it changes nothing.
+  - "out of memory" and "cannot compute canonical identity" occur only when the C's malloc fails.
+    The port has no heap.
+
+  The port keeps all of these as written.
+
+## Limits
+
+- **Struct not exposed.** The parsed `OmegaReceipt` is not returned. Callers get the return code, the
+  reason, the canonical bytes and the id. `wk` holds offsets into `js`, not decoded strings.
+  `omega_resolve.c` and `omega_vc_bridge.c` read struct fields: tier_rank, dependencies in input
+  order, and others. An adapter therefore still needs field accessors before any C can be deleted.
+  `omega_receipt_free` has no counterpart.
+- **Message text.** Function-mode units cannot hold `text`, so units return reason codes. Today the
+  69-message table lives only in the harness, and a C adapter would need the same table.
+- **Capacities match the C.** Input is limited to 4 MiB (`OMEGA_RECEIPT_MAX_BYTES`), lists and
+  assertions to 4,096 entries, and nesting to depth 6. Callers provide scratch: `wk` is 512 KiB and
+  `out` is 1 MiB + 1 KiB. The harness program needs about 5.7 MiB of its 8 MiB stack.
+- **Duplicate-key cost.** The duplicate-key check rescans earlier members of the object, which costs
+  O(keys × object bytes). The C costs O(keys²) strcmp calls. Both are quadratic, and only
+  pathological objects notice.
+- **Tier names.** `rctier` compares all n bytes. The C stops at a NUL, so an adapter passes
+  `strlen`.
+- **Message truncation.** The C truncates messages to `errcap`. The harness and the oracle use 256,
+  and no message is longer than 160 bytes.
diff --git a/om/receipt/parity/corpus.py b/om/receipt/parity/corpus.py
new file mode 100755
index 000000000..88098e836
--- /dev/null
+++ b/om/receipt/parity/corpus.py
@@ -0,0 +1,386 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""corpus.py OUTDIR: write the receipt parity corpus, one record stream per file (OUTDIR/.bin),
+and print " " per stream.
+
+A record is an op byte, then the payload length, a and b as 8 decimal digits each, then the payload
+(see the harness notes at the end of om/receipt/receipt.om). Everything is deterministic: the
+random parts use fixed seeds, so the same corpus comes out on every run. The three Rust-written
+receipts are read from tests/resolve/receipts/ of the checkout this file lives in.
+"""
+import json
+import os
+import random
+import sys
+
+ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", ".."))
+ZERO = "0" * 64
+RUST = ["54f597d22b3753e47d6bd7706b6a7a422c189024912ec4626347e860b5f44a8c",
+        "7fdff014cb20a0af5b5a5b377532292be29fc15da36d434944ad4521e69de5b3",
+        "8e885832de2e7123555c47803547161c02196646b270d41078d8b16d4beaf765"]
+TIERS = ["TEST_ONLY_TRUST", "HOST_TEST", "QEMU", "QEMU_SECURITY", "MACHINE1_READ_ONLY", "MACHINE1_ATTENDED",
+         "MACHINE1_MUTATING", "PRODUCTION"]
+MUTS = ["NONE", "VOLATILE_ONLY", "REMOVABLE_MEDIA_ONLY", "ONE_TIME_BOOT_SELECTION", "BOUNDED_TEST_REGION_WRITE",
+        "BOOT_CONFIGURATION_CHANGE", "TRUST_ROOT_CHANGE", "TPM_POLICY_CHANGE", "DESTRUCTIVE_STORAGE"]
+MAX = 4 * 1024 * 1024
+
+
+def rec(op, payload, a=0, b=0):
+    if isinstance(payload, str):
+        payload = payload.encode()
+    return op.encode() + b"%08d%08d%08d" % (len(payload), a, b) + payload
+
+
+def js(s):
+    """a JSON string literal for s (ASCII escapes for non-ASCII, like serde would accept)"""
+    return json.dumps(s)
+
+
+# ---- the receipt shape of tests/test_omega_resolve.c (rj_emit), as an ordered list of (key, raw JSON)
+def rj(kind="host-v1", tier="HOST_TEST", env_class=None, result="PASS", schema="EvidenceReceiptV1",
+       decl="NONE", obs="NONE", procedure="fixture", reserved="", feature=None, version=1, inputs=(),
+       deps=(), root="6" * 64, assert_pass=True, extra=False, dup=False, lease=False, no_assertion=False,
+       dirty=False, authority="", idhex=ZERO):
+    f = [("schema", js(schema)), ("version", str(version)), ("id", js(idhex)), ("kind", js(kind))]
+    if dup:
+        f.append(("kind", js(kind)))
+    if extra:
+        f.append(("surprise", "1"))
+    f += [("tier", js(tier)), ("result", js(result)), ("timestamp", "1786000000"), ("repo", js("fixture")),
+          ("commit", js("a" * 40)), ("dirty", "true" if dirty else "false"), ("toolchain", js("fixture")),
+          ("procedure", js(procedure)), ("machine", js("host")), ("env_class", js(env_class or tier)),
+          ("input_artifacts", "[" + ", ".join(js(x) for x in inputs) + "]"), ("output_artifacts", "[]")]
+    if no_assertion:
+        f.append(("assertions", "[]"))
+    else:
+        f.append(("assertions", '[{"id": "fixture_check", "expected": "pass", "observed": "%s", "pass": %s, '
+                  '"source": "test", "note": ""}]' % ("pass" if assert_pass else "fail",
+                                                       "true" if assert_pass else "false")))
+    f += [("dependencies", "[" + ", ".join(js(x) for x in deps) + "]"), ("declared_mutation", js(decl)),
+          ("observed_mutation", js(obs)), ("authority", js(authority)), ("output_digest", js(root)),
+          ("external_refs", "[]"), ("ledger", "null"),
+          ("lease", '{"hold_id": "%s", "resource": "fixture-lease"}' % ("1" * 64) if lease else "null"),
+          ("required_features", "[%s]" % js(feature) if feature is not None else "[]"),
+          ("reserved", js(reserved))]
+    return f
+
+
+def emit(fields, sep=",\n", kv=": ", head="{\n", tail="\n}\n"):
+    return head + sep.join(js(k) + kv + v for k, v in fields) + tail
+
+
+def setf(fields, key, raw):
+    return [(k, raw if k == key else v) for k, v in fields]
+
+
+def dropf(fields, key):
+    return [(k, v) for k, v in fields if k != key]
+
+
+def sha(c):
+    return "sha256:" + c * 64
+
+
+def full():
+    """a receipt that uses every field: ledger, lease, lists, several assertions, unicode"""
+    f = rj(inputs=[sha("1"), sha("2"), "blake3:" + "ab" * 32, "C" * 64],
+           deps=["8e885832de2e7123555c47803547161c02196646b270d41078d8b16d4beaf765",
+                 "54F597D22B3753E47D6BD7706B6A7A422C189024912EC4626347E860B5F44A8C"])
+    f = setf(f, "output_artifacts", "[%s, %s]" % (js("sha512:" + "e" * 128), js("blake3:" + "0f" * 16)))
+    f = setf(f, "assertions", '[{"id": "zeta", "expected": "1", "observed": "1", "pass": true, "source": "s", '
+             '"note": "n\\u00e9"}, {"id": "alpha", "pass": false}, {"id": "\\u03b1lpha", "expected": "x", '
+             '"pass": true, "note": "\\ud83d\\ude00"}]')
+    f = setf(f, "external_refs", '["https://example.invalid/b", "https://example.invalid/a", '
+             '"https://example.invalid/a"]')
+    f = setf(f, "ledger", '{"index": 18446744073709551615, "hash": "%s"}' % ("Ab" * 32))
+    f = setf(f, "lease", '{"resource": " r ", "hold_id": "%s"}' % ("c" * 64))
+    f = setf(f, "required_features", '["v1-base", "v1-base"]')
+    f = setf(f, "kind", js("kind \u00e9\u4e2d\U0001F600 \"q\" \\ / \b\f\n\r\t"))
+    return f
+
+
+def s_rust():
+    out = []
+    for h in RUST:
+        raw = open(os.path.join(ROOT, "tests", "resolve", "receipts", h + ".json"), "rb").read()
+        out.append(rec("R", raw))
+        out.append(rec("R", raw.replace(h.encode(), h.upper().encode())))
+        doc = json.loads(raw)
+        out.append(rec("R", json.dumps(doc, separators=(",", ":"))))
+        out.append(rec("R", json.dumps(doc, indent=4)))
+        out.append(rec("R", json.dumps(dict(reversed(list(doc.items()))))))
+        out.append(rec("R", json.dumps(doc, ensure_ascii=True).replace('"PASS"', '"P\\u0041SS"')))
+    return out
+
+
+def shape_variants():
+    v = [rj(), rj(dup=True), rj(extra=True), rj(schema="EvidenceReceiptV2"), rj(version=2),
+         rj(feature="v2-extension"), rj(feature="v1-base"), rj(reserved="x"), rj(env_class="QEMU"),
+         rj(obs="VOLATILE_ONLY"), rj(decl="VOLATILE_ONLY", obs="VOLATILE_ONLY"), rj(no_assertion=True),
+         rj(no_assertion=True, result="FAIL"), rj(tier="PRODUCTION", kind="production-v1", authority="release-key-1"),
+         rj(lease=True), rj(dirty=True), rj(assert_pass=False, result="FAIL"),
+         rj(inputs=[sha("1"), sha("2")]), rj(inputs=[sha("2"), sha("1")]), rj(inputs=[sha("1"), sha("2")], procedure="another procedure"),
+         rj(deps=RUST[:2]), rj(deps=[RUST[1], RUST[0], RUST[1]])]
+    for a in ["", " ", "   ", "\t", "TEST-ONLY signer", "a test_only key", "TestOnly", "test-only", "TEST_ONLY"]:
+        v.append(rj(tier="PRODUCTION", kind="production-v1", authority=a))
+    return v
+
+
+def s_shapes():
+    out = []
+    for f in shape_variants():
+        d = emit(f)
+        out += [rec("R", d), rec("M", d), rec("M", d, 0, 257)]
+    d = emit(full())
+    out += [rec("R", d), rec("M", d), rec("M", d, 0, 257)]
+    return out
+
+
+BADVALS = ["1", "-1", "1.5", "1e3", "\"x\"", "\"\"", "[]", "[1]", "[\"x\"]", "{}", "null", "true", "false",
+           "18446744073709551615", "18446744073709551616", "0", "-0"]
+
+
+def s_fields():
+    out = []
+    base = rj()
+    keys = [k for k, _ in base]
+    for k in keys:
+        out.append(rec("M", emit(dropf(base, k))))
+        for bv in BADVALS:
+            out.append(rec("M", emit(setf(base, k, bv))))
+    for k in ["schema", "kind", "tier", "repo", "commit", "toolchain", "procedure", "machine", "env_class",
+              "authority", "reserved"]:
+        for s in ["", " ", "\\u0041", "h\\u00e9llo", "\\ud83d\\ude00", "\\/\\\\\\\"", "raw \u00e9\u4e2d\U0001F600"]:
+            out.append(rec("M", emit(setf(base, k, '"%s"' % s))))
+    for n in ["0", "1", "2", "01", "00", "4294967295", "4294967296", "18446744073709551615",
+              "18446744073709551616", "99999999999999999999", "100000000000000000000", "1.0", "1e0", "1E0",
+              "-1", "-0", "1x", "1.", "1e+-.5", "  7  "]:
+        out.append(rec("M", emit(setf(base, "version", n))))
+        out.append(rec("M", emit(setf(base, "timestamp", n))))
+    for c in ["a" * 40, "a" * 64, "a" * 39, "a" * 41, "A" * 40, "g" * 40, "0123456789abcdef" * 4, "\\u0061" * 40, "a" * 63]:
+        out.append(rec("M", emit(setf(base, "commit", js(c) if "\\" not in c else '"%s"' % c))))
+    for t in TIERS + ["host_test", "HOST_TEST ", "", "PRODUCTIO", "PRODUCTIONS"]:
+        out.append(rec("M", emit(setf(setf(base, "tier", js(t)), "env_class", js(t)))))
+        out.append(rec("M", emit(setf(base, "tier", js(t)))))
+    for r in ["PASS", "FAIL", "BLOCKED", "INCOMPLETE", "SKIPPED", "pass", "", "PASSED"]:
+        out.append(rec("M", emit(setf(base, "result", js(r)))))
+        out.append(rec("M", emit(setf(setf(base, "result", js(r)), "assertions", "[]"))))
+    # the mutation and tier rules: every declared x observed x tier
+    for t in TIERS:
+        for d in MUTS:
+            for o in MUTS:
+                f = rj(tier=t, decl=d, obs=o, authority="release-key" if t == "PRODUCTION" else "")
+                out.append(rec("M", emit(f)))
+    for m in ["none", "", "NONE ", "DESTRUCTIVE"]:
+        out.append(rec("M", emit(setf(base, "declared_mutation", js(m)))))
+        out.append(rec("M", emit(setf(base, "observed_mutation", js(m)))))
+    digests = [sha("1"), "sha512:" + "a" * 128, "blake3:" + "a" * 32, "blake3:" + "a" * 31, "blake3:" + "a" * 33,
+               "blake3:" + "A" * 34, "blake3:", "blake3:" + "g" * 32, "blake3:" + "a" * 32 + ":", "md5:" + "a" * 32,
+               "sha256x:" + "a" * 64, "sha25:" + "a" * 64, ":" + "a" * 64, "a" * 64, "A" * 64, "a" * 63, "a" * 65,
+               "g" * 64, "", "BLAKE3:" + "a" * 64, "sha256::" + "a" * 64, "\\u0073ha256:" + "a" * 64]
+    for d in digests:
+        lit = '"%s"' % d
+        out.append(rec("M", emit(setf(base, "input_artifacts", "[%s]" % lit))))
+        out.append(rec("M", emit(setf(base, "output_artifacts", "[%s, %s]" % (js(sha("3")), lit)))))
+    for h in ["a" * 64, "A" * 64, "a" * 63, "a" * 65, "g" * 64, "", "\\u0061" * 64]:
+        lit = '"%s"' % h
+        out.append(rec("M", emit(setf(base, "output_digest", lit))))
+        out.append(rec("M", emit(setf(base, "dependencies", "[%s]" % lit))))
+        out.append(rec("M", emit(setf(base, "ledger", '{"index": 3, "hash": %s}' % lit))))
+        out.append(rec("M", emit(setf(base, "lease", '{"hold_id": %s, "resource": "x"}' % lit))))
+    # the id field itself (R: the placeholder stays, verify reports the mismatch or the parse error)
+    for h in ["a" * 63, "a" * 65, "g" * 64, "", "A" * 64]:
+        out.append(rec("R", emit(setf(base, "id", '"%s"' % h))))
+    for lg in ["null", "1", "\"x\"", "[]", "{}", '{"index": 1}', '{"hash": "%s"}' % ("a" * 64),
+               '{"index": -1, "hash": "%s"}' % ("a" * 64), '{"index": 1, "hash": 5}',
+               '{"index": 1, "hash": "%s", "x": 1}' % ("a" * 64), '{"index": 0, "hash": "%s"}' % ("a" * 64)]:
+        out.append(rec("M", emit(setf(base, "ledger", lg))))
+    for ls in ["null", "1", "[]", "{}", '{"hold_id": "%s"}' % ("1" * 64), '{"resource": "x"}',
+               '{"hold_id": "%s", "resource": ""}' % ("1" * 64), '{"hold_id": "%s", "resource": " \\t\\n\\r"}' % ("1" * 64),
+               '{"hold_id": "%s", "resource": " x"}' % ("1" * 64), '{"hold_id": "%s", "resource": 1}' % ("1" * 64),
+               '{"hold_id": 1, "resource": "x"}', '{"hold_id": "%s", "resource": "x", "y": 2}' % ("1" * 64)]:
+        out.append(rec("M", emit(setf(base, "lease", ls))))
+    for a in ['[]', '[1]', '"x"', '{}', '[{}]', '[{"id": "a"}]', '[{"pass": true}]', '[{"id": "", "pass": true}]',
+              '[{"id": "a", "pass": true}, {"id": "a", "pass": false}]', '[{"id": "a", "pass": 1}]',
+              '[{"id": 1, "pass": true}]', '[{"id": "a", "pass": true, "extra": 1}]',
+              '[{"id": "a", "pass": true, "note": null}]', '[{"id": "b", "pass": true}, {"id": "a", "pass": true}]',
+              '[{"id": "a", "pass": true}, {"id": "\\u0061", "pass": true}]', '[{"id": "a", "pass": true}, 7]',
+              '[{"id": "a", "pass": true, "expected": "e", "observed": "o", "source": "s", "note": "n"}]',
+              '[{"note": "n", "source": "s", "pass": false, "observed": "o", "expected": "e", "id": "z"}]',
+              '[{"id": "a", "pass": true, "expected": 1}]', '[{"id": "a", "pass": true, "observed": []}]',
+              '[{"id": "a", "pass": true, "source": {}}]', '[{"id": "a", "pass": null}]']:
+        out.append(rec("M", emit(setf(base, "assertions", a))))
+        out.append(rec("M", emit(setf(setf(base, "assertions", a), "result", '"FAIL"'))))
+    for fl in ['[]', '["v1-base"]', '["v1-base", "x"]', '["x"]', '[1]', '["v1-bas"]', '["v1-base "]', '"v1-base"']:
+        out.append(rec("M", emit(setf(base, "required_features", fl))))
+    for ex in ['[]', '["b", "a", "b", "", "\\u00e9", "\\u00e8", "z"]', '[1]', '"x"', 'null']:
+        out.append(rec("M", emit(setf(base, "external_refs", ex))))
+    # sorting: byte order of the decoded strings, multi-byte UTF-8 and escapes, duplicates
+    rnd = random.Random(7)
+    alpha = ["a", "b", "A", "Z", "0", ":", "~", "\u00e9", "\u4e2d", "\U0001F600", "\\u0062", "\\/"]
+    for i in range(40):
+        items = []
+        for j in range(rnd.randint(0, 12)):
+            items.append("".join(rnd.choice(alpha) for _ in range(rnd.randint(0, 5))))
+        lit = "[" + ", ".join('"%s"' % x for x in items) + "]"
+        out.append(rec("M", emit(setf(base, "external_refs", lit))))
+        deps = [rnd.choice(RUST) for _ in range(rnd.randint(0, 6))]
+        deps = [d.upper() if rnd.random() < 0.4 else d for d in deps]
+        out.append(rec("M", emit(setf(base, "dependencies", "[" + ", ".join(js(d) for d in deps) + "]"))))
+        asr = ", ".join('{"id": "%s", "pass": true, "note": "%d"}' % (x, k) for k, x in enumerate(dict.fromkeys(items)))
+        out.append(rec("M", emit(setf(base, "assertions", "[" + asr + "]"))))
+    for a in ["release-key", "", " ", " \t\r\n", "x", "test-only", "TEST-ONLY", "Test_Only", "testonly", "TESTONLY",
+              "my-test-onl", "test only", "testonl", "xtest-onlyx", "\\u0074est-only", "t\\u0045st_only",
+              "aaaaaaaaaatestonly", "tes\u00e9tonly", "\u00e9testonly"]:
+        out.append(rec("M", emit(rj(tier="PRODUCTION", authority=a))))
+        out.append(rec("M", emit(rj(tier="MACHINE1_MUTATING", authority=a))))
+    out.append(rec("M", emit(dropf(rj(tier="PRODUCTION"), "authority"))))
+    # formatting: compact, other whitespace, key order (canonical bytes do not depend on them)
+    for f in [base, full()]:
+        out.append(rec("M", emit(f, sep=",", kv=":", head="{", tail="}")))
+        out.append(rec("M", emit(f, sep=" ,\r\n\t", kv=" :\t", head=" \n\t{ ", tail=" } \r\n ")))
+        out.append(rec("M", emit(list(reversed(f)))))
+    out.append(rec("M", emit(base) + " x"))
+    out.append(rec("M", emit(base, tail="\n}\n,")))
+    return out
+
+
+JSON_CASES = [
+    "", " ", "{", "}", "[", "]", "{}", "[]", "null", "true", "false", "nul", "tru", "fals", "0", "-", "-0", "01", "-01",
+    "1.", "1e", "1x", "\"", "\"abc", "\"a\\", "\"\\x\"", "\"\\u12\"", "\"\\u12g4\"", "\"\\ud800\"", "\"\\ud800\\u0041\"",
+    "\"\\ud800\\udc00\"", "\"\\udc00\"", "\"\\u0000\"", "\"\\ud800x\"", "\"\\ud800\\\"", "\"\\ud800\\udbff\"",
+    "\"\\ud800\\ue000\"", "\"\x01\"", "\"\x1f\"", "\"\x7f\"", "\"\xc0\x80\"", "\"\xc2\x80\"", "\"\xc2\"", "\"\xe0\x80\x80\"",
+    "\"\xe0\xa0\x80\"", "\"\xed\xa0\x80\"", "\"\xef\xbf\xbf\"", "\"\xf0\x80\x80\x80\"", "\"\xf0\x90\x80\x80\"",
+    "\"\xf4\x8f\xbf\xbf\"", "\"\xf4\x90\x80\x80\"", "\"\xf5\x80\x80\x80\"", "\"\xff\"", "\"\xe2\x82\"", "\"\xf0\x9f\x98\"",
+    "{\"a\"}", "{\"a\" 1}", "{\"a\":}", "{\"a\":1,}", "{\"a\":1 \"b\":2}", "{\"a\":1,\"a\":2}", "{\"a\":1,\"\\u0061\":2}",
+    "{\"a\":{\"a\":1},\"b\":{\"a\":2,\"a\":3}}", "{1:2}", "{,}", "[1,]", "[,1]", "[1 2]", "[1,,2]", "{\"a\":[1,{\"b\":2}],\"c\":3}",
+    "[[[[[[1]]]]]]", "[[[[[[[1]]]]]]]", "[[[[[[]]]]]]", "[[[[[[[]]]]]]]", "{\"a\":{\"b\":{\"c\":{\"d\":{\"e\":{}}}}}}",
+    "{\"a\":{\"b\":{\"c\":{\"d\":{\"e\":{\"f\":1}}}}}}", "1 2", "{} {}", "{}x", "  {}  ", "\t\n\r{}\r\n\t", "{}\x00",
+    "\x00", "\xef\xbb\xbf{}", "{\"a\":\"\\b\\f\\n\\r\\t\\/\\\\\\\"\"}", "{\"a\":1e5}", "{\"a\":-1.5e-3}", "{\"a\":1E+2}",
+    "{\"a\":nul}", "{\"a\":truex}", "{\"a\":\"x\"}", "[\"a\",\"a\"]", "{\"\":1,\"\":2}", "{\"a\":1}", "[1]", "\"x\"", "7",
+    "{\"schema\":1}", "{\"zzz\":1}", "[{}]", "{\"a\":[1,2,3,{\"b\":[4,{\"c\":5}]}]}", "{\"a\":01}", "{\"a\":-}",
+    "{\"a\":.5}", "{\"a\":+1}", "{\"a\":\"\\u00\"}", "{\"a\":\"\\uD83D\\uDE00\"}", "{\"a\":\"\\uDE00\\uD83D\"}",
+    "{\"a\" : 1 , \"b\" : [ ] , \"c\" : { } }", "{\"a\":1,\"b\":2,\"c\":3,\"b\":4}",
+]
+
+
+def fuzz_json(rnd, depth=0):
+    r = rnd.random()
+    if depth > 7 or r < 0.3:
+        return rnd.choice(["1", "-2", "0", "3.5", "1e9", "true", "false", "null", "\"s\"", "\"\\u00e9\"",
+                           "\"\\ud83d\\ude00\"", "\"a\\nb\"", "18446744073709551616", "\"k\""])
+    if r < 0.65:
+        return "[" + ",".join(fuzz_json(rnd, depth + 1) for _ in range(rnd.randint(0, 4))) + "]"
+    keys = ["a", "b", "c", "\\u0061", "id", "\u00e9"]
+    return "{" + ",".join('"%s":%s' % (rnd.choice(keys), fuzz_json(rnd, depth + 1))
+                          for _ in range(rnd.randint(0, 4))) + "}"
+
+
+def s_json():
+    out = [rec("R", c.encode("latin-1")) for c in JSON_CASES]
+    rnd = random.Random(11)
+    for _ in range(1500):
+        d = fuzz_json(rnd).encode()
+        out.append(rec("R", d))
+        if d:
+            b = bytearray(d)
+            p = rnd.randrange(len(b))
+            b[p] = rnd.choice(b' {}[]:,"\\x0\x01\xff-')
+            out.append(rec("R", bytes(b)))
+    for _ in range(300):
+        out.append(rec("R", bytes(rnd.randrange(256) for _ in range(rnd.randint(1, 40)))))
+    big = "{" + ",".join('"k%d":%d' % (i, i) for i in range(3000)) + "}"
+    out.append(rec("R", big))
+    out.append(rec("R", big[:-1] + ',"k2999":1}'))
+    return out
+
+
+def s_mutants():
+    out = []
+    rnd = random.Random(1726)
+    raws = [open(os.path.join(ROOT, "tests", "resolve", "receipts", h + ".json"), "rb").read() for h in RUST]
+    # every position of one Rust receipt with its 0x20 bit flipped (case flips, quote/space swaps)
+    r0 = raws[0]
+    for p in range(len(r0)):
+        b = bytearray(r0)
+        b[p] ^= 0x20
+        out.append(rec("R", bytes(b)))
+    # every truncation of another
+    r1 = raws[1]
+    for n in range(len(r1)):
+        out.append(rec("R", r1[:n]))
+    # random single-byte flips of all three
+    for _ in range(600):
+        r = rnd.choice(raws)
+        b = bytearray(r)
+        p = rnd.randrange(len(b))
+        b[p] ^= rnd.randint(1, 255)
+        out.append(rec("R", bytes(b)))
+    # receipts built here (id computed by the reader under test), then flipped or truncated
+    bases = [emit(f) for f in shape_variants()[:4]] + [emit(full()), emit(rj(lease=True, inputs=[sha("9")]))]
+    for _ in range(1200):
+        d = rnd.choice(bases)
+        if rnd.random() < 0.2:
+            out.append(rec("M", d, rnd.randrange(len(d)), 256))
+        else:
+            out.append(rec("M", d, rnd.randrange(len(d)), rnd.randint(1, 255)))
+    return out
+
+
+def s_big():
+    out = []
+    many = [sha("%x" % (i % 16)) [:7] + "%064x" % (i * 2654435761) for i in range(4096)]
+    out.append(rec("M", emit(setf(rj(), "input_artifacts", "[" + ", ".join(js(x) for x in many) + "]"))))
+    out.append(rec("M", emit(setf(rj(), "input_artifacts", "[" + ", ".join(js(x) for x in many + [sha("f")]) + "]"))))
+    out.append(rec("M", emit(setf(rj(), "external_refs", "[" + ", ".join(js(x) for x in many[::-1] + many[:100]) + "]"))))
+    over = "[" + ", ".join(js(x) for x in many + [sha("f")]) + "]"
+    for k in ["output_artifacts", "dependencies", "required_features"]:
+        out.append(rec("M", emit(setf(rj(), k, over))))
+    asr = ", ".join('{"id": "a%05d", "pass": true}' % ((i * 7919) % 4096) for i in range(4096))
+    out.append(rec("M", emit(setf(rj(), "assertions", "[" + asr + "]"))))
+    out.append(rec("M", emit(setf(rj(), "assertions", "[" + asr + ', {"id": "x", "pass": true}]'))))
+    # canonical bytes over 1 MiB (several harness windows): 4096 long digests
+    longd = ["sha512:" + ("%04x" % i) * 250 for i in range(4096)]
+    out.append(rec("M", emit(setf(rj(), "output_artifacts", "[" + ", ".join(js(x) for x in longd) + "]"))))
+    out.append(rec("M", emit(rj(tier="PRODUCTION", authority="k" * (1 << 20)))))
+    out.append(rec("M", emit(rj(tier="PRODUCTION", authority="k" * (1 << 20) + "test-only"))))
+    out.append(rec("M", emit(setf(rj(), "toolchain", '"' + "\u00e9" * 1500000 + '"'))))
+    out.append(rec("M", emit(setf(rj(), "toolchain", '"' + "\\u4e2d" * 600000 + '"'))))
+    d = emit(rj())
+    out.append(rec("M", d + " " * (MAX - len(d))))
+    out.append(rec("M", d + " " * (MAX - len(d) + 1)))
+    out.append(rec("R", d + " " * (MAX - len(d) + 1)))
+    out.append(rec("R", b""))
+    out.append(rec("M", emit(setf(rj(), "timestamp", "1" + "0" * 2000000))))
+    out.append(rec("M", emit(setf(rj(), "version", "1." + "0" * 1500000))))
+    out.append(rec("R", "[" + "0," * 1500000 + "0]"))
+    out.append(rec("R", " " * (MAX - 2) + "{}"))
+    return out
+
+
+def s_tier():
+    out = [rec("T", t) for t in TIERS]
+    out += [rec("T", t) for t in ["", "host_test", "HOST_TEST ", " HOST_TEST", "PRODUCTIO", "PRODUCTIONX", "QEMU_",
+                                   "TEST_ONLY_TRUST\xe9", "x" * 300]]
+    out.append(rec("S", b""))
+    return out
+
+
+STREAMS = [("rust", s_rust), ("shapes", s_shapes), ("fields", s_fields), ("json", s_json),
+           ("mutants", s_mutants), ("big", s_big), ("tier", s_tier)]
+
+
+def main():
+    if len(sys.argv) != 2:
+        sys.exit(__doc__)
+    os.makedirs(sys.argv[1], exist_ok=True)
+    for name, fn in STREAMS:
+        recs = fn()
+        with open(os.path.join(sys.argv[1], name + ".bin"), "wb") as f:
+            for r in recs:
+                f.write(r)
+        print(name, len(recs))
+
+
+if __name__ == "__main__":
+    main()
diff --git a/om/receipt/parity/expected.txt b/om/receipt/parity/expected.txt
new file mode 100644
index 000000000..a8ee5425e
--- /dev/null
+++ b/om/receipt/parity/expected.txt
@@ -0,0 +1,10 @@
+# stream lines sha256 of the C oracle driver's output (src/omega_receipt.c 88cfe0c5...1651 at omega-mv acb3f15c,
+# gcc 13.3.0 -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2, BLAKE3 from src/omega_blake3.c + src/sha256.c).
+# Recorded once; parity/run.sh compares receipt.om against these hashes and builds no C.
+rust 18 a86b56cb4d8de65b280ab528d233c6bdbeaa8251a2f77250068bdf8051be972c
+shapes 96 7d77d8daa4127f24cca49304bc3cd7981c0e8f2ab363abb7af701843be2f3d0a
+fields 1634 bf2c85950cfc8cc9905495719ac9c2e22dcd80b15eeb65f1d08dcf8e66b54e65
+json 3412 dceb67e08df6d67f7a3ec01e1406dedba160b1dca4ff2896d397fc93010fb293
+mutants 4062 5c8f513c1e4dbb7968f59920fe938cf175102465ef7d0e44a0816e1404e16749
+big 21 5aefacd53d4f5da8cdbfec4b56b0b786594eae5f56b45e94b22d0dbde6d6f678
+tier 18 dd9dff1784451257c48f755c7cf90c50374748065cd1c0a1bb3657475bf1894d
diff --git a/om/receipt/parity/run.sh b/om/receipt/parity/run.sh
new file mode 100755
index 000000000..ab0c574e9
--- /dev/null
+++ b/om/receipt/parity/run.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+# Parity of om/receipt/receipt.om against the C it ports (src/omega_receipt.c + omega_receipt.h), by
+# RECORDED oracle output: this script does not build or run any C. corpus.py regenerates the corpus,
+# the .om harness runs every stream, and each stream's output must have the line count and sha256 in
+# parity/expected.txt, which is the C oracle driver's output recorded when the port was made (the
+# driver is not in the tree; README.md says how to rerun it). Then small mutants of receipt.om must
+# each run to completion and change their stream's hash (the corpus discriminates). With OMEGA_BRIDGE
+# set, the five entry points are also cut into function-mode units (unit.py), bound by the pinned
+# omega-bridge generator and compiled as C (bindability).
+#   OMEGA_OMC     seed-born omc, sha256 pinned below (exit 3 NOT_RUN without it)
+#   OMEGA_BRIDGE  optional: an aien-dev/omega-bridge checkout whose src/native.om matches the pin
+set -eu
+OMC_PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+NATIVE_PIN=2c2c53f61d4ab302f1a2092c3c32189335dd53f6cf2b388f47a475f99f2c3940
+P=$(cd "$(dirname "$0")" && pwd)
+OM=$P/../receipt.om
+[ -n "${OMEGA_OMC:-}" ] || { echo "RECEIPT-PARITY NOT_RUN: set OMEGA_OMC"; exit 3; }
+[ "$(sha256sum < "$OMEGA_OMC" | cut -c1-64)" = "$OMC_PIN" ] || { echo "RECEIPT-PARITY NOT_RUN: omc is not the pinned compiler"; exit 3; }
+command -v python3 > /dev/null || { echo "RECEIPT-PARITY NOT_RUN: python3 missing"; exit 3; }
+T=$(mktemp -d); trap 'rm -rf "$T"' EXIT
+python3 "$P/corpus.py" "$T/corp" > "$T/counts"
+"$OMEGA_OMC" < "$OM" > "$T/rc"; chmod +x "$T/rc"
+grep -v '^#' "$P/expected.txt" | while read -r s n want; do
+  rc=0; "$T/rc" < "$T/corp/$s.bin" > "$T/$s.out" || rc=$?
+  got=$(sha256sum < "$T/$s.out" | cut -c1-64)
+  lines=$(wc -l < "$T/$s.out")
+  if [ "$rc" = 0 ] && [ "$got" = "$want" ] && [ "$lines" = "$n" ]; then
+    echo "PASS $s: $n lines identical to the recorded C oracle output ($(grep "^$s " "$T/counts" | cut -d' ' -f2) records)"
+  else
+    echo "FAIL $s: exit $rc, $lines lines, sha256 $got (want $n, $want)"; echo x >> "$T/failed"
+  fi
+done
+[ ! -e "$T/failed" ] || { echo "RECEIPT-PARITY FAIL"; exit 1; }
+
+# Mutants: name | stream | exact text in receipt.om (\n for a newline) | replacement.
+# Killed = the mutant harness exits 0 with the expected line count and a different sha256.
+cat > "$T/mutants" <<'EOF'
+json_dup_key|json|if dupkey js n f k|if eq k 0
+json_depth|json|if gt d 6|if gt d 7
+json_surrogate_utf8|json|if and ge cp 2048 not and ge cp 55296 le cp 57343|if ge cp 2048
+json_pair_offset|json|ret fail wk 7 add p 4|ret fail wk 7 p
+json_leading_zero|json|if gt sub q d0 1|if gt sub q d0 2
+deny_unknown|shapes|if eq k 999\nret failk wk 22 0|if false\nret failk wk 22 0
+schema|shapes|if not nameq js wk get wk 64 59|if false
+env_class|shapes|if ne dcmp js get wk 77 get wk 68 0|if false
+pass_needs_assertion|shapes|if and eq m 0 eq get wk 103 0|if false
+prod_test_only|shapes|if eq get a 8 1\nret fail wk 60 0|if false\nret fail wk 60 0
+canon_sort|shapes|put wk 7 0\nmsort js wk m|put wk 7 0
+id_compare|shapes|if not same|if false
+escape_f|shapes|if eq e 102\nret 12|if eq e 102\nret 13
+set_dedup|fields|ret ne dcmp js x y 0|ret true
+mutation_order|fields|if gt so sev get wk 105|if false
+u64_overflow|fields|if gt x div sub 18446744073709551615 dg 10|if false
+upper_hex|rust|ret sub c 55|ret 16
+b3_root|rust|put w 74 or get w 74 8|put w 74 or get w 74 0
+canon_window|big|if and ge t lo lt t add lo 1048576|if and ge t lo lt t add lo 1048575
+tier_test_only|tier|if eq need 0\nret 1|if eq need 0\nret 0
+EOF
+while IFS='|' read -r name s old new; do
+  python3 - "$OM" "$T/m.om" "$old" "$new" <<'PY'
+import sys
+src, dst, old, new = sys.argv[1], sys.argv[2], sys.argv[3].replace("\\n", "\n"), sys.argv[4].replace("\\n", "\n")
+s = open(src).read()
+assert s.count(old + "\n") == 1, "mutant text not found exactly once: " + old
+open(dst, "w").write(s.replace(old + "\n", new + "\n"))
+PY
+  "$OMEGA_OMC" < "$T/m.om" > "$T/m"; chmod +x "$T/m"
+  rc=0; "$T/m" < "$T/corp/$s.bin" > "$T/m.out" 2> /dev/null || rc=$?
+  got=$(sha256sum < "$T/m.out" | cut -c1-64)
+  lines=$(wc -l < "$T/m.out")
+  want=$(grep "^$s " "$P/expected.txt" | cut -d' ' -f3)
+  n=$(grep "^$s " "$P/expected.txt" | cut -d' ' -f2)
+  if [ "$rc" != 0 ] || [ "$lines" != "$n" ] || [ "$got" = "$want" ]; then
+    echo "mutant $name NOT killed on $s (exit $rc, $lines lines, sha256 $got)"; echo x >> "$T/failed"; continue
+  fi
+  dl=$(paste -d'\n' "$T/m.out" "$T/$s.out" | awk 'NR % 2 == 1 { a = $0; next } a != $0' | wc -l)
+  echo "mutant $name killed on $s (exit 0, $dl of $n lines differ)"
+done < "$T/mutants"
+[ ! -e "$T/failed" ] || { echo "RECEIPT-PARITY FAIL"; exit 1; }
+
+if [ -z "${OMEGA_BRIDGE:-}" ]; then
+  echo "RECEIPT-PARITY PASS (bindability NOT_RUN: set OMEGA_BRIDGE)"; exit 0
+fi
+[ "$(sha256sum < "$OMEGA_BRIDGE/src/native.om" | cut -c1-64)" = "$NATIVE_PIN" ] || { echo "RECEIPT-PARITY PASS (bindability NOT_RUN: native.om is not the pinned generator)"; exit 0; }
+"$OMEGA_OMC" < "$OMEGA_BRIDGE/src/native.om" > "$T/native"; chmod +x "$T/native"
+: > "$T/units"
+for u in rcparse rccanon rcverify rctier rcsat; do
+  python3 "$P/unit.py" "$OM" "$u" > "$T/u.om"
+  "$OMEGA_OMC" < "$T/u.om" > "$T/u.bin"
+  { cat "$T/u.om"; printf '\0'; printf '%08d' "$(wc -c < "$T/u.bin")"; cat "$T/u.bin"; } >> "$T/units"
+done
+"$T/native" < "$T/units" > "$T/units.c"
+cc -std=gnu11 -O2 -Wall -Wextra -Werror -c "$T/units.c" -o "$T/units.o"
+echo "bindability: 5 function-mode units accepted by native.om and compiled ($(grep -c ') uint32_t omega_[a-z0-9]*(uint64_t \*result' "$T/units.c") exported functions)"
+echo "RECEIPT-PARITY PASS"
diff --git a/om/receipt/parity/unit.py b/om/receipt/parity/unit.py
new file mode 100644
index 000000000..2c6b24eae
--- /dev/null
+++ b/om/receipt/parity/unit.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+"""unit.py RECEIPT.om NAME: print the function-mode unit that exports NAME.
+
+Copied from om/gpumath/parity/unit.py (aien-dev/omega-mv#751); only the file names differ.
+
+The unit is NAME and every library function it reaches through calls (the part of receipt.om
+before the parity-harness marker), in file order, with NAME moved to the end: the seeded compiler
+enters a function-mode unit at its last function and the omega-bridge native call ABI v1 binds that
+one; the others stay private helpers. Note lines before a kept function travel with it.
+"""
+import sys
+
+MARK = "note ==== parity harness"
+
+
+def functions(lib):
+    """[(name, first line incl. leading notes, end line)] of the library."""
+    out = []
+    i = 0
+    while i < len(lib):
+        w = lib[i].split()
+        if w[:1] == ["fn"]:
+            j = i
+            while j > 0 and lib[j - 1].startswith("note") and not lib[j - 1].startswith("note ----"):
+                j -= 1
+            depth = 0
+            for k in range(i, len(lib)):
+                t = lib[k].split()[:1]
+                if t and t[0] in ("fn", "if", "while", "for"):
+                    depth += 1
+                elif t == ["end"]:
+                    depth -= 1
+                    if depth == 0:
+                        break
+            else:
+                sys.exit("unit.py: %s has no closing end" % w[1])
+            out.append((w[1], j, k))
+            i = k + 1
+        else:
+            i += 1
+    return out
+
+
+def main():
+    if len(sys.argv) != 3:
+        sys.exit(__doc__)
+    src, name = sys.argv[1], sys.argv[2]
+    lines = open(src).read().split("\n")
+    lib = lines[:next(i for i, l in enumerate(lines) if l.startswith(MARK))]
+    fns = functions(lib)
+    span = {n: (a, b) for n, a, b in fns}
+    if name not in span:
+        sys.exit("unit.py: no function %s" % name)
+    calls = {}
+    for n, a, b in fns:
+        words = set()
+        for l in lib[a:b + 1]:
+            if not l.startswith("note"):
+                words.update(l.split())
+        calls[n] = {m for m in words if m in span and m != n}
+    keep = {name}
+    todo = [name]
+    while todo:
+        for m in calls[todo.pop()]:
+            if m not in keep:
+                keep.add(m)
+                todo.append(m)
+    order = [n for n, _, _ in fns if n in keep and n != name] + [name]
+    parts = []
+    for n in order:
+        a, b = span[n]
+        parts.append("\n".join(lib[a:b + 1]))
+    sys.stdout.write("note SPDX-License-Identifier: Apache-2.0\nnote generated from om/receipt/receipt.om by parity/unit.py %s\n\n" % name)
+    sys.stdout.write("\n\n".join(parts) + "\n")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/om/receipt/receipt.om b/om/receipt/receipt.om
new file mode 100644
index 000000000..ea5153db9
--- /dev/null
+++ b/om/receipt/receipt.om
@@ -0,0 +1,2698 @@
+note SPDX-License-Identifier: Apache-2.0
+note receipt.om: seeded Omega port of src/omega_receipt.c (+ omega_receipt.h), the reader of the
+note aien-proof EvidenceReceiptV1 wire contract: strict JSON parse (serde shape rules, deny unknown
+note fields), every canonical_bytes validation, the canonical byte encoding and id = BLAKE3(canonical).
+note Part of aien-dev/omega-mv#726, aien-dev/aien-architecture-mv#300 and #316.
+note
+note Library (everything above the parity-harness marker) uses no globals and no text, so each entry
+note point can be cut into a function-mode unit for the omega-bridge native call ABI v1:
+note   rcparse js n wk            0 ok, -1 refused (reason in wk 0..2)
+note   rccanon js n wk out pos    after rcparse returned 0: total canonical length; canonical bytes
+note                              [pos, pos + 1048576) into out 0.., id = BLAKE3(canonical) into out 1049600..
+note   rcverify js n wk out       parse, recompute, require the id field to equal it (any hex case)
+note   rctier s n wk              tier rank of the bytes s[0..n), -1 unknown
+note   rcsat need have            the aien-proof tier_satisfies rule
+note js is the receipt JSON (n bytes, at most 4 MiB, the C OMEGA_RECEIPT_MAX_BYTES).
+note A refusal is a reason code (wk 0), a field-name index (wk 1, for messages that name a field) and a
+note byte offset (wk 2, for JSON syntax messages). The parity harness renders the exact C message text.
+note There is no DOM: pass 1 checks the JSON syntax exactly as the C reader does (same errors, same
+note byte offsets); pass 2 reads fields by walking the validated text; strings are decoded on the fly.
+note
+note wk layout (ulong 65536): 0 code, 1 field, 2 byte offset, 3 n, 4 root offset, 5..7 sort scratch,
+note 8..10 canonical emitter (bytes emitted, window start, chunk fill), 16+k value offset of top-level
+note key k (0 absent), 64+k string content offset of top-level key k (0 = absent, reads as ""),
+note 100 version, 101 timestamp, 102 dirty, 103 result, 104 tier rank, 105 declared mutation,
+note 106 observed mutation, 107 has ledger, 108 ledger index, 109 ledger hash, 110 has lease,
+note 111 lease hold_id, 112 lease resource, 113 assertion count, 114+j count of list j
+note (0 input_artifacts, 1 output_artifacts, 2 dependencies, 3 external_refs, 4 required_features),
+note 128.. name table (65 entries of 5 words: length, then up to 32 bytes packed little endian),
+note 512..959 BLAKE3 chaining-value stack (952 depth, 953 chunks absorbed),
+note 1024 + 4096 j list j string offsets, 21504 + 6 i assertion i (id expected observed pass source note),
+note 46080 sort area, 50176 merge scratch.
+note out layout (uchar 1049632): 0..1048575 canonical window, 1048576..1049599 BLAKE3 chunk,
+note 1049600..1049631 computed id.
+
+note Array lengths are literal numbers: function-mode units refuse `const` (error 9).
+
+note ---- BLAKE3: copied from om/blake3/b3unit.om (no import in Omegese). Changes: the chaining-value
+note ---- stack lives in wk at 512 (depth 952, count 953), the chunk is read from out at 1048576, and
+note ---- the root bytes go to out at 1049600. The compression code is unchanged.
+fn initw w edit ulong 128 to void
+put w 83 1779033703
+put w 84 3144134277
+put w 85 1013904242
+put w 86 2773480762
+put w 87 1359893119
+put w 88 2600822924
+put w 89 528734635
+put w 90 1541459225
+put w 91 2
+put w 92 6
+put w 93 3
+put w 94 10
+put w 95 7
+put w 96 0
+put w 97 4
+put w 98 13
+put w 99 1
+put w 100 11
+put w 101 12
+put w 102 5
+put w 103 9
+put w 104 14
+put w 105 15
+put w 106 8
+end
+
+note the G mixing function on state words a b c d with message words 2j and 2j+1
+fn g w edit ulong 128 a ulong b ulong c ulong d ulong j ulong to void
+x = get w add 16 mul j 2
+t = add get w a get w b
+put w a and add t x 4294967295
+t = xor get w d get w a
+put w d and or shr t 16 shl t 16 4294967295
+put w c and add get w c get w d 4294967295
+t = xor get w b get w c
+put w b and or shr t 12 shl t 20 4294967295
+x = get w add 17 mul j 2
+t = add get w a get w b
+put w a and add t x 4294967295
+t = xor get w d get w a
+put w d and or shr t 8 shl t 24 4294967295
+put w c and add get w c get w d 4294967295
+t = xor get w b get w c
+put w b and or shr t 7 shl t 25 4294967295
+end
+
+fn round w edit ulong 128 to void
+g w 0 4 8 12 0
+g w 1 5 9 13 1
+g w 2 6 10 14 2
+g w 3 7 11 15 3
+g w 0 5 10 15 4
+g w 1 6 11 12 5
+g w 2 7 8 13 6
+g w 3 4 9 14 7
+end
+
+fn permute w edit ulong 128 to void
+for i ulong 16
+put w add 32 i get w add 16 get w add 91 i
+end
+for i ulong 16
+put w add 16 i get w add 32 i
+end
+end
+
+note the 16 little-endian words of blk into m
+fn loadm w edit ulong 128 blk edit uchar 64 to void
+for i ulong 16
+o = mul i 4
+v = ulong get blk add o 3
+v = or shl v 8 ulong get blk add o 2
+v = or shl v 8 ulong get blk add o 1
+v = or shl v 8 ulong get blk o
+put w add 16 i v
+end
+end
+
+note compress (input chaining value, blk, block length, counter, flags) into the output words
+fn compress w edit ulong 128 blk edit uchar 64 to void
+loadm w blk
+for i ulong 8
+put w i get w add 48 i
+put w add i 8 get w add 83 i
+end
+put w 12 and get w 73 4294967295
+put w 13 and shr get w 73 32 4294967295
+put w 14 get w 72
+put w 15 get w 74
+for r ulong 7
+round w
+permute w
+end
+for i ulong 8
+put w add 56 i xor get w i get w add i 8
+put w add 64 i xor get w add i 8 get w add 48 i
+end
+end
+
+note compress, then the node chaining value is the first 8 output words
+fn nodecv w edit ulong 128 blk edit uchar 64 to void
+compress w blk
+for i ulong 8
+put w add 75 i get w add 56 i
+end
+end
+
+note copy cnt bytes of b from offset o into blk, zero the rest
+fn loadblk blk edit uchar 64 b edit uchar 1049632 o ulong cnt ulong to void
+for i ulong 64
+if lt i cnt
+put blk i get b add 1048576 add o i
+else
+put blk i 0
+end
+end
+end
+
+fn setnb w edit ulong 128 bl ulong ctr ulong fl ulong to void
+put w 72 bl
+put w 73 ctr
+put w 74 fl
+end
+
+note chunk ctr holding b[0..cnt): every block but the last compressed, the last left set up
+fn chunk w edit ulong 128 blk edit uchar 64 b edit uchar 1049632 cnt ulong ctr ulong to void
+for i ulong 8
+put w add 48 i get w add 83 i
+end
+nblk = ulong 1
+if gt cnt 0
+nblk = div add cnt 63 64
+end
+k = ulong 0
+while lt add k 1 nblk bound 16
+loadblk blk b mul k 64 64
+fl = ulong 0
+if eq k 0
+fl = 1
+end
+setnb w 64 ctr fl
+compress w blk
+for i ulong 8
+put w add 48 i get w add 56 i
+end
+k = add k 1
+end
+bo = mul sub nblk 1 64
+loadblk blk b bo sub cnt bo
+fl = ulong 2
+if eq nblk 1
+fl = 3
+end
+setnb w sub cnt bo ctr fl
+end
+
+note parent node of stack row r (left) and the node chaining value (right), set up to compress
+fn parentn w edit ulong 128 blk edit uchar 64 st edit ulong 65536 r ulong to void
+for i ulong 8
+put w add 48 i get w add 83 i
+end
+for i ulong 8
+l = get st add 512 add mul r 8 i
+v = get w add 75 i
+for k ulong 4
+sh = mul k 8
+q = add mul i 4 k
+put blk q uchar and shr l sh 255
+put blk add 32 q uchar and shr v sh 255
+end
+end
+setnb w 64 0 4
+end
+
+fn push w edit ulong 128 st edit ulong 65536 to void
+p = get st 952
+for i ulong 8
+put st add 512 add mul p 8 i get w add 75 i
+end
+put st 952 add p 1
+end
+
+note a whole chunk that is not the last: merge completed subtrees, then push its chaining value
+fn midchk w edit ulong 128 blk edit uchar 64 st edit ulong 65536 b edit uchar 1049632 to void
+ctr = get st 953
+chunk w blk b 1024 ctr
+nodecv w blk
+tot = add ctr 1
+while eq and tot 1 0 bound 64
+d = sub get st 952 1
+put st 952 d
+parentn w blk st d
+nodecv w blk
+tot = shr tot 1
+end
+push w st
+put st 953 add ctr 1
+end
+
+note the last chunk: fold the stack into the root and write its 32 little-endian bytes into b at 1049600
+fn lastchk w edit ulong 128 blk edit uchar 64 st edit ulong 65536 b edit uchar 1049632 n ulong to void
+chunk w blk b n get st 953
+while gt get st 952 0 bound 64
+nodecv w blk
+d = sub get st 952 1
+put st 952 d
+parentn w blk st d
+end
+put w 74 or get w 74 8
+compress w blk
+outle w b
+end
+
+note the first 8 output words, little endian, into o at 1049600 (the id slot)
+fn outle w edit ulong 128 o edit uchar 1049632 to void
+for i ulong 8
+v = get w add 56 i
+for k ulong 4
+q = add mul i 4 k
+put o add 1049600 q uchar and shr v mul k 8 255
+end
+end
+end
+
+note ---- name table: the strings the C compares against, packed 8 bytes per word
+fn nminit wk edit ulong 65536 to void
+note 0 schema
+put wk 128 6
+put wk 129 107122480669555
+note 1 version
+put wk 133 7
+put wk 134 31084746137298294
+note 2 id
+put wk 138 2
+put wk 139 25705
+note 3 kind
+put wk 143 4
+put wk 144 1684957547
+note 4 tier
+put wk 148 4
+put wk 149 1919248756
+note 5 result
+put wk 153 6
+put wk 154 128009175786866
+note 6 timestamp
+put wk 158 9
+put wk 159 7881708861846808948
+put wk 160 112
+note 7 repo
+put wk 163 4
+put wk 164 1869636978
+note 8 commit
+put wk 168 6
+put wk 169 127996156276579
+note 9 dirty
+put wk 173 5
+put wk 174 521644697956
+note 10 toolchain
+put wk 178 9
+put wk 179 7593465222953660276
+put wk 180 110
+note 11 procedure
+put wk 183 9
+put wk 184 8247608679221654128
+put wk 185 101
+note 12 machine
+put wk 188 7
+put wk 189 28550371649741165
+note 13 env_class
+put wk 193 9
+put wk 194 8314045561161805413
+put wk 195 115
+note 14 input_artifacts
+put wk 198 15
+put wk 199 8241973746855865961
+put wk 200 32497592506411380
+note 15 output_artifacts
+put wk 203 16
+put wk 204 7016454792213198191
+put wk 205 8319383681641313394
+note 16 assertions
+put wk 208 10
+put wk 209 8028075845441778529
+put wk 210 29550
+note 17 dependencies
+put wk 213 12
+put wk 214 7954874742130894180
+put wk 215 1936025955
+note 18 declared_mutation
+put wk 218 17
+put wk 219 7234314139196417380
+put wk 220 8028075772679122271
+put wk 221 110
+note 19 observed_mutation
+put wk 223 17
+put wk 224 7234318610140979823
+put wk 225 8028075772679122271
+put wk 226 110
+note 20 authority
+put wk 228 9
+put wk 229 8388361603773658465
+put wk 230 121
+note 21 output_digest
+put wk 233 13
+put wk 234 7232627574326981999
+put wk 235 500152231785
+note 22 external_refs
+put wk 238 13
+put wk 239 7809644666444609637
+put wk 240 495639163487
+note 23 ledger
+put wk 243 6
+put wk 244 125779851896172
+note 24 lease
+put wk 248 5
+put wk 249 435727459692
+note 25 required_features
+put wk 253 17
+put wk 254 7234314173708068210
+put wk 255 7310034287886427743
+put wk 256 115
+note 26 reserved
+put wk 258 8
+put wk 259 7234318610140980594
+note 27 id
+put wk 263 2
+put wk 264 25705
+note 28 expected
+put wk 268 8
+put wk 269 7234316346693023845
+note 29 observed
+put wk 273 8
+put wk 274 7234318610140979823
+note 30 pass
+put wk 278 4
+put wk 279 1936941424
+note 31 source
+put wk 283 6
+put wk 284 111477796466547
+note 32 note
+put wk 288 4
+put wk 289 1702129518
+note 33 index
+put wk 293 5
+put wk 294 517097156201
+note 34 hash
+put wk 298 4
+put wk 299 1752392040
+note 35 hold_id
+put wk 303 7
+put wk 304 28263356098703208
+note 36 resource
+put wk 308 8
+put wk 309 7305808869231650162
+note 37 TEST_ONLY_TRUST
+put wk 313 15
+put wk 314 5498419465921185108
+put wk 315 23735523962281817
+note 38 HOST_TEST
+put wk 318 9
+put wk 319 6000294846954426184
+put wk 320 84
+note 39 QEMU
+put wk 323 4
+put wk 324 1431127377
+note 40 QEMU_SECURITY
+put wk 328 13
+put wk 329 4847372242852332881
+put wk 330 383666180693
+note 41 MACHINE1_READ_ONLY
+put wk 333 18
+put wk 334 3550329957903450445
+put wk 335 5642833604875997791
+put wk 336 22860
+note 42 MACHINE1_ATTENDED
+put wk 338 17
+put wk 339 3550329957903450445
+put wk 340 4991200346707870047
+put wk 341 68
+note 43 MACHINE1_MUTATING
+put wk 343 17
+put wk 344 3550329957903450445
+put wk 345 5641132647822740831
+put wk 346 71
+note 44 PRODUCTION
+put wk 348 10
+put wk 349 5283922296309764688
+put wk 350 20047
+note 45 PASS
+put wk 353 4
+put wk 354 1397965136
+note 46 FAIL
+put wk 358 4
+put wk 359 1279869254
+note 47 BLOCKED
+put wk 363 7
+put wk 364 19216487970458690
+note 48 INCOMPLETE
+put wk 368 10
+put wk 369 4993454379819552329
+put wk 370 17748
+note 49 SKIPPED
+put wk 373 7
+put wk 374 19216509663005523
+note 50 NONE
+put wk 378 4
+put wk 379 1162760014
+note 51 VOLATILE_ONLY
+put wk 383 13
+put wk 384 4993446713068638038
+put wk 385 383532289887
+note 52 REMOVABLE_MEDIA_ONLY
+put wk 388 20
+put wk 389 5495026334298883410
+put wk 390 6863847864658648901
+put wk 391 1498173007
+note 53 ONE_TIME_BOOT_SELECTION
+put wk 393 23
+put wk 394 4993728188548206159
+put wk 395 4995441227396498015
+put wk 396 22042224548332876
+note 54 BOUNDED_TEST_REGION_WRITE
+put wk 398 25
+put wk 399 6864687891693784898
+put wk 400 5135601519476032852
+put wk 401 6073476107700424521
+put wk 402 69
+note 55 BOOT_CONFIGURATION_CHANGE
+put wk 403 25
+put wk 404 5642802934833958722
+put wk 405 5283920084686293318
+put wk 406 5138116003500084815
+put wk 407 69
+note 56 TRUST_ROOT_CHANGE
+put wk 408 17
+put wk 409 5715735692866572884
+put wk 410 5138116003500086351
+put wk 411 69
+note 57 TPM_POLICY_CHANGE
+put wk 413 17
+put wk 414 5281683669613629524
+put wk 415 5138116003500087619
+put wk 416 69
+note 58 DESTRUCTIVE_STORAGE
+put wk 418 19
+put wk 419 6071790534715983172
+put wk 420 5931051951327630921
+put wk 421 4540225
+note 59 EvidenceReceiptV1
+put wk 423 17
+put wk 424 7305804402280461893
+put wk 425 6229727782535128402
+put wk 426 49
+note 60 v1-base
+put wk 428 7
+put wk 429 28555834743927158
+note 61 AIEN_EVIDENCE_RECEIPT_V1
+put wk 433 24
+put wk 434 5284487488403228993
+put wk 435 4995159687793886532
+put wk 436 3555133771584456003
+note 62 blake3
+put wk 438 6
+put wk 439 56510686260322
+note 63 sha256
+put wk 443 6
+put wk 444 59602106411123
+note 64 sha512
+put wk 448 6
+put wk 449 55186930362483
+end
+
+fn fail wk edit ulong 65536 code ulong pos ulong to long
+put wk 0 code
+put wk 2 pos
+ret -1
+end
+
+fn failk wk edit ulong 65536 code ulong key ulong to long
+put wk 0 code
+put wk 1 key
+ret -1
+end
+
+fn hexv c ulong to ulong
+if and ge c 48 le c 57
+ret sub c 48
+end
+if and ge c 97 le c 102
+ret sub c 87
+end
+if and ge c 65 le c 70
+ret sub c 55
+end
+ret 16
+end
+
+fn isws b uchar to bool
+ret or or eq b 32 eq b 9 or eq b 10 eq b 13
+end
+
+fn isdig b uchar to bool
+ret and ge b 48 le b 57
+end
+
+fn umin a ulong b ulong to ulong
+if lt a b
+ret a
+end
+ret b
+end
+
+note ---- string decoder (input already validated by pass 1); cursor c: 0 next byte, 1 pending count,
+note ---- 2..4 pending UTF-8 bytes, 5 done. dnext gives a byte, or 256 at the closing quote.
+fn dinit c edit ulong 8 so ulong to void
+put c 0 so
+put c 1 0
+put c 5 0
+if eq so 0
+put c 5 1
+end
+end
+
+fn hex4v js view uchar 4194304 p ulong to ulong
+v = hexv ulong get js p
+v = or shl v 4 hexv ulong get js add p 1
+v = or shl v 4 hexv ulong get js add p 2
+v = or shl v 4 hexv ulong get js add p 3
+ret v
+end
+
+fn descv e uchar to ulong
+if eq e 98
+ret 8
+end
+if eq e 102
+ret 12
+end
+if eq e 110
+ret 10
+end
+if eq e 114
+ret 13
+end
+if eq e 116
+ret 9
+end
+ret ulong e
+end
+
+fn dutf c edit ulong 8 cp ulong to ulong
+if lt cp 128
+ret cp
+end
+if lt cp 2048
+put c 2 or 128 and cp 63
+put c 1 1
+ret or 192 shr cp 6
+end
+if lt cp 65536
+put c 2 or 128 and shr cp 6 63
+put c 3 or 128 and cp 63
+put c 1 2
+ret or 224 shr cp 12
+end
+put c 2 or 128 and shr cp 12 63
+put c 3 or 128 and shr cp 6 63
+put c 4 or 128 and cp 63
+put c 1 3
+ret or 240 shr cp 18
+end
+
+fn dunic js view uchar 4194304 c edit ulong 8 to ulong
+p = get c 0
+cp = hex4v js p
+put c 0 add p 4
+if and ge cp 55296 le cp 56319
+lo = hex4v js add p 6
+put c 0 add p 10
+cp = add 65536 add shl sub cp 55296 10 sub lo 56320
+end
+ret dutf c cp
+end
+
+fn dnext js view uchar 4194304 c edit ulong 8 to ulong
+k = get c 1
+if gt k 0
+v = get c 2
+put c 2 get c 3
+put c 3 get c 4
+put c 1 sub k 1
+ret v
+end
+if eq get c 5 1
+ret 256
+end
+p = get c 0
+b = get js p
+if eq b 34
+put c 5 1
+ret 256
+end
+if ne b 92
+put c 0 add p 1
+ret ulong b
+end
+e = get js add p 1
+put c 0 add p 2
+if eq e 117
+ret dunic js c
+end
+ret descv e
+end
+
+note strcmp order: the end of a string sorts before every byte
+fn dkey v ulong to ulong
+if eq v 256
+ret 0
+end
+ret add v 1
+end
+
+note strcmp of the decoded strings at content offsets x and y: -1, 0, 1
+fn dcmp js view uchar 4194304 x ulong y ulong to long
+ca = new ulong 8 0
+cb = new ulong 8 0
+dinit ca x
+dinit cb y
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+u = dkey dnext js ca
+v = dkey dnext js cb
+if ne u v
+if lt u v
+ret -1
+end
+ret 1
+end
+if eq u 0
+ret 0
+end
+k = add k 1
+end
+end
+trap 4
+end
+
+note byte i of name-table entry whose length word is at wk b
+fn nmbyte wk edit ulong 65536 b ulong i ulong to ulong
+w = get wk add add b 1 shr i 3
+sh = shl and i 7 3
+ret and shr w sh 255
+end
+
+note decoded string at so equals name-table entry k
+fn nameq js view uchar 4194304 wk edit ulong 65536 so ulong k ulong to bool
+c = new ulong 8 0
+dinit c so
+b = add 128 mul k 5
+nl = get wk b
+i = ulong 0
+while true bound 64
+v = dnext js c
+if eq v 256
+ret eq i nl
+end
+if ge i nl
+ret false
+end
+if ne v nmbyte wk b i
+ret false
+end
+i = add i 1
+end
+ret false
+end
+
+note the raw bytes s[0..n) equal name-table entry k (tier lookup by C string)
+fn rawname s view uchar 4194304 n ulong wk edit ulong 65536 k ulong to bool
+b = add 128 mul k 5
+if ne n get wk b
+ret false
+end
+for i ulong n
+if ne ulong get s i nmbyte wk b i
+ret false
+end
+end
+ret true
+end
+
+note statistics of one decoded string: 0 length, 1 index of the first ':', 2 non-hex bytes,
+note 3 non-hex bytes after the first ':', 4 bytes outside [0-9a-f], 5 bytes that are not JSON
+note whitespace, 6 first 8 bytes packed, 7 last 8 bytes lowercased, 8 holds test-only/test_only/testonly,
+note 10 a ':' was seen
+fn sstep a edit ulong 16 v ulong to void
+i = get a 0
+if eq hexv v 16
+put a 2 add get a 2 1
+if eq get a 10 1
+put a 3 add get a 3 1
+end
+end
+if not or and ge v 48 le v 57 and ge v 97 le v 102
+put a 4 add get a 4 1
+end
+if not or or eq v 32 eq v 9 or eq v 10 eq v 13
+put a 5 add get a 5 1
+end
+if lt i 8
+put a 6 or get a 6 shl v shl i 3
+end
+if and eq v 58 eq get a 10 0
+put a 10 1
+put a 1 i
+end
+lc = v
+if and ge v 65 le v 90
+lc = add v 32
+end
+top = shr get a 7 56
+w = or shl get a 7 8 lc
+put a 7 w
+if eq w 8387236824970325113
+put a 8 1
+end
+if and eq top 116 or eq w 7310314358644305017 eq w 7310314573392669817
+put a 8 1
+end
+put a 0 add i 1
+end
+
+fn sstat js view uchar 4194304 so ulong a edit ulong 16 to void
+for i ulong 16
+put a i 0
+end
+c = new ulong 8 0
+dinit c so
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+v = dnext js c
+if eq v 256
+ret
+end
+sstep a v
+k = add k 1
+end
+end
+trap 4
+end
+
+note raw "" is the only JSON string that decodes empty (\u0000 is refused)
+fn isempty js view uchar 4194304 so ulong to bool
+if eq so 0
+ret true
+end
+ret eq get js so 34
+end
+
+fn hex32ok js view uchar 4194304 so ulong to bool
+a = new ulong 16 0
+sstat js so a
+ret and eq get a 0 64 eq get a 2 0
+end
+
+note ---- pass 1: the JSON syntax of the C reader (jvalue/jcontainer/jstring), iterative, same errors
+note ---- and byte offsets. Codes 2..19 are its messages; nesting deeper than 6 is refused.
+fn skipws js view uchar 4194304 n ulong p ulong to ulong
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge p n
+ret p
+end
+if not isws get js p
+ret p
+end
+p = add p 1
+k = add k 1
+end
+end
+ret p
+end
+
+fn iscont js view uchar 4194304 p ulong to bool
+ret eq and get js p 192 128
+end
+
+fn u3cp js view uchar 4194304 p ulong to ulong
+a = shl and ulong get js p 15 12
+b = shl and ulong get js add p 1 63 6
+ret or or a b and ulong get js add p 2 63
+end
+
+fn u4cp js view uchar 4194304 p ulong to ulong
+a = shl and ulong get js p 7 18
+b = shl and ulong get js add p 1 63 12
+c = shl and ulong get js add p 2 63 6
+ret or or a b or c and ulong get js add p 3 63
+end
+
+note utf8_len: bytes of one valid UTF-8 sequence at p, 0 when invalid
+fn utf8l js view uchar 4194304 n ulong p ulong to ulong
+s = ulong get js p
+if lt s 128
+ret 1
+end
+av = sub n p
+if and and ge s 194 le s 223 ge av 2
+if iscont js add p 1
+ret 2
+end
+end
+if and and ge s 224 le s 239 ge av 3
+if and iscont js add p 1 iscont js add p 2
+cp = u3cp js p
+if and ge cp 2048 not and ge cp 55296 le cp 57343
+ret 3
+end
+end
+end
+if and and ge s 240 le s 244 ge av 4
+if and and iscont js add p 1 iscont js add p 2 iscont js add p 3
+cp = u4cp js p
+if and ge cp 65536 le cp 1114111
+ret 4
+end
+end
+end
+ret 0
+end
+
+note hex4 with its bounds check: the value, or 65536 when bad
+fn hex4c js view uchar 4194304 n ulong p ulong to ulong
+if gt add p 4 n
+ret 65536
+end
+v = ulong 0
+for k ulong 4
+h = hexv ulong get js add p k
+if eq h 16
+ret 65536
+end
+v = or shl v 4 h
+end
+ret v
+end
+
+note \u escape, p just past the u: new offset or -1
+fn junic js view uchar 4194304 n ulong wk edit ulong 65536 p ulong to long
+cp = hex4c js n p
+if eq cp 65536
+ret fail wk 5 p
+end
+p = add p 4
+if and ge cp 55296 le cp 56319
+if gt add p 2 n
+ret fail wk 6 p
+end
+if or ne get js p 92 ne get js add p 1 117
+ret fail wk 6 p
+end
+p = add p 2
+lo = hex4c js n p
+if eq lo 65536
+ret fail wk 7 p
+end
+if or lt lo 56320 gt lo 57343
+ret fail wk 7 add p 4
+end
+ret long add p 4
+end
+if and ge cp 56320 le cp 57343
+ret fail wk 6 p
+end
+if eq cp 0
+ret fail wk 8 p
+end
+ret long p
+end
+
+fn simpesc e uchar to bool
+x = or or eq e 34 eq e 92 or eq e 47 eq e 98
+y = or or eq e 102 eq e 110 or eq e 114 eq e 116
+ret or x y
+end
+
+note escape, p just past the backslash: new offset or -1
+fn jesc js view uchar 4194304 n ulong wk edit ulong 65536 p ulong to long
+if ge p n
+ret fail wk 4 p
+end
+e = get js p
+p = add p 1
+if simpesc e
+ret long p
+end
+if ne e 117
+ret fail wk 4 p
+end
+ret junic js n wk p
+end
+
+note jstring, p just past the opening quote: offset after the closing quote, or -1
+fn jstr js view uchar 4194304 n ulong wk edit ulong 65536 p ulong to long
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge p n
+ret fail wk 2 p
+end
+c = get js p
+if eq c 34
+ret long add p 1
+end
+if lt c 32
+ret fail wk 3 p
+end
+if eq c 92
+r = jesc js n wk add p 1
+if lt r 0
+ret r
+end
+p = ulong r
+else
+l = utf8l js n p
+if eq l 0
+ret fail wk 9 p
+end
+p = add p l
+end
+k = add k 1
+end
+end
+trap 4
+end
+
+fn skipdig js view uchar 4194304 n ulong p ulong to ulong
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge p n
+ret p
+end
+if not isdig get js p
+ret p
+end
+p = add p 1
+k = add k 1
+end
+end
+ret p
+end
+
+fn isnx c uchar to bool
+x = or isdig c or eq c 43 eq c 45
+y = or or eq c 101 eq c 69 eq c 46
+ret or x y
+end
+
+note the C number tail after '.', 'e' or 'E': digits + - e E .
+fn skipnx js view uchar 4194304 n ulong p ulong to ulong
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge p n
+ret p
+end
+c = get js p
+if not isnx c
+ret p
+end
+p = add p 1
+k = add k 1
+end
+end
+ret p
+end
+
+fn lit4 js view uchar 4194304 p ulong a uchar b uchar c uchar d uchar to bool
+x = and eq get js p a eq get js add p 1 b
+y = and eq get js add p 2 c eq get js add p 3 d
+ret and x y
+end
+
+note null / true / false at p: the offset after it, 0 when none
+fn jlit js view uchar 4194304 n ulong p ulong to ulong
+r = sub n p
+if ge r 4
+if lit4 js p 110 117 108 108
+ret add p 4
+end
+if lit4 js p 116 114 117 101
+ret add p 4
+end
+end
+if ge r 5
+if lit4 js p 102 97 108 115
+if eq get js add p 4 101
+ret add p 5
+end
+end
+end
+ret 0
+end
+
+note parser state st: 0 offset, 1 depth, 2 next step (0 value, 1 member, 2 after a value),
+note 8+d container kind at depth d (1 object), 16+d content offset of that object's first key
+fn jnum js view uchar 4194304 n ulong wk edit ulong 65536 st edit ulong 32 p ulong to long
+q = p
+if eq get js q 45
+q = add q 1
+end
+d0 = q
+q = skipdig js n q
+if eq q d0
+ret fail wk 16 q
+end
+if eq get js d0 48
+if gt sub q d0 1
+ret fail wk 17 q
+end
+end
+if lt q n
+c = get js q
+if or eq c 46 or eq c 101 eq c 69
+q = skipnx js n add q 1
+end
+end
+put st 0 q
+ret 0
+end
+
+fn jopen js view uchar 4194304 n ulong wk edit ulong 65536 st edit ulong 32 p ulong to long
+d = add get st 1 1
+put st 1 d
+q = add p 1
+if gt d 6
+ret fail wk 10 q
+end
+cl = uchar 93
+put st add 8 d 0
+if eq get js p 123
+cl = 125
+put st add 8 d 1
+end
+put st add 16 d 0
+q = skipws js n q
+if lt q n
+if eq get js q cl
+put st 0 add q 1
+put st 1 sub d 1
+put st 2 2
+ret 0
+end
+end
+put st 0 q
+put st 2 1
+ret 0
+end
+
+fn jval js view uchar 4194304 n ulong wk edit ulong 65536 st edit ulong 32 to long
+p = skipws js n get st 0
+if ge p n
+ret fail wk 15 p
+end
+c = get js p
+if or eq c 123 eq c 91
+ret jopen js n wk st p
+end
+put st 2 2
+if eq c 34
+r = jstr js n wk add p 1
+if lt r 0
+ret r
+end
+put st 0 ulong r
+ret 0
+end
+q = jlit js n p
+if gt q 0
+put st 0 q
+ret 0
+end
+if or eq c 45 isdig c
+ret jnum js n wk st p
+end
+ret fail wk 18 p
+end
+
+note ---- skipping over text pass 1 has already accepted
+fn skipstr js view uchar 4194304 q ulong to ulong
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+b = get js q
+if eq b 34
+ret add q 1
+end
+if eq b 92
+q = add q 2
+else
+q = add q 1
+end
+k = add k 1
+end
+end
+trap 4
+end
+
+fn skipbox js view uchar 4194304 q ulong to ulong
+d = ulong 0
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+b = get js q
+if eq b 34
+q = skipstr js add q 1
+else
+if or eq b 123 eq b 91
+d = add d 1
+end
+if or eq b 125 eq b 93
+d = sub d 1
+if eq d 0
+ret add q 1
+end
+end
+q = add q 1
+end
+k = add k 1
+end
+end
+trap 4
+end
+
+fn skipval js view uchar 4194304 n ulong v ulong to ulong
+c = get js v
+if eq c 34
+ret skipstr js add v 1
+end
+if or eq c 123 eq c 91
+ret skipbox js v
+end
+ret skipsc js n v
+end
+
+note a number or literal: up to the next whitespace, ',', ']' or '}'
+fn skipsc js view uchar 4194304 n ulong v ulong to ulong
+q = v
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge q n
+ret q
+end
+c = get js q
+if or or isws c eq c 44 or eq c 93 eq c 125
+ret q
+end
+q = add q 1
+k = add k 1
+end
+end
+ret q
+end
+
+note content offset of the key after the key at content offset q (both in one object)
+fn nextkey js view uchar 4194304 n ulong q ulong to ulong
+e = skipstr js q
+e = skipws js n e
+e = skipws js n add e 1
+e = skipval js n e
+e = skipws js n e
+e = skipws js n add e 1
+ret add e 1
+end
+
+note an earlier key of the object (first key at content offset f) equals the key at k
+fn dupkey js view uchar 4194304 n ulong f ulong k ulong to bool
+q = f
+for o ulong 16
+i = ulong 0
+while lt i 500000 bound 999999
+if eq q k
+ret false
+end
+if eq dcmp js q k 0
+ret true
+end
+q = nextkey js n q
+i = add i 1
+end
+end
+trap 4
+end
+
+fn jmem js view uchar 4194304 n ulong wk edit ulong 65536 st edit ulong 32 to long
+p = skipws js n get st 0
+d = get st 1
+if eq get st add 8 d 0
+put st 0 p
+put st 2 0
+ret 0
+end
+if ge p n
+ret fail wk 11 p
+end
+if ne get js p 34
+ret fail wk 11 p
+end
+k = add p 1
+r = jstr js n wk k
+if lt r 0
+ret r
+end
+e = ulong r
+f = get st add 16 d
+if eq f 0
+put st add 16 d k
+else
+if dupkey js n f k
+ret fail wk 12 e
+end
+end
+q = skipws js n e
+if ge q n
+ret fail wk 13 q
+end
+if ne get js q 58
+ret fail wk 13 q
+end
+put st 0 add q 1
+put st 2 0
+ret 0
+end
+
+fn jaft js view uchar 4194304 n ulong wk edit ulong 65536 st edit ulong 32 to long
+d = get st 1
+if eq d 0
+ret 1
+end
+p = skipws js n get st 0
+if lt p n
+c = get js p
+if eq c 44
+put st 0 add p 1
+put st 2 1
+ret 0
+end
+cl = uchar 93
+if eq get st add 8 d 1
+cl = 125
+end
+if eq c cl
+put st 0 add p 1
+put st 1 sub d 1
+put st 2 2
+ret 0
+end
+end
+ret fail wk 14 p
+end
+
+fn jcheck js view uchar 4194304 n ulong wk edit ulong 65536 to long
+st = new ulong 32 0
+for o ulong 32
+k = ulong 0
+while lt k 500000 bound 999999
+s = get st 2
+r = long 0
+if eq s 0
+r = jval js n wk st
+else
+if eq s 1
+r = jmem js n wk st
+else
+r = jaft js n wk st
+end
+end
+if lt r 0
+ret r
+end
+if eq r 1
+p = skipws js n get st 0
+if ne p n
+ret fail wk 19 p
+end
+ret 0
+end
+k = add k 1
+end
+end
+trap 4
+end
+
+note ---- pass 2: walking validated containers
+fn objfirst js view uchar 4194304 n ulong o ulong to ulong
+q = skipws js n add o 1
+if eq get js q 125
+ret 0
+end
+ret q
+end
+
+note value offset of the member whose key quote is at q
+fn keyvalp js view uchar 4194304 n ulong q ulong to ulong
+e = skipstr js add q 1
+e = skipws js n e
+ret skipws js n add e 1
+end
+
+fn objnext js view uchar 4194304 n ulong q ulong to ulong
+e = skipval js n keyvalp js n q
+e = skipws js n e
+if eq get js e 44
+ret skipws js n add e 1
+end
+ret 0
+end
+
+fn arrfirst js view uchar 4194304 n ulong o ulong to ulong
+q = skipws js n add o 1
+if eq get js q 93
+ret 0
+end
+ret q
+end
+
+fn arrnext js view uchar 4194304 n ulong v ulong to ulong
+e = skipws js n skipval js n v
+if eq get js e 44
+ret skipws js n add e 1
+end
+ret 0
+end
+
+note index of the name in [lo, hi) equal to the key whose quote is at q, 999 when none
+fn keyidx js view uchar 4194304 wk edit ulong 65536 q ulong lo ulong hi ulong to ulong
+k = lo
+while lt k hi bound 64
+if nameq js wk add q 1 k
+ret k
+end
+k = add k 1
+end
+ret 999
+end
+
+note number of array elements at v, stopping once past 4096
+fn arrcnt js view uchar 4194304 n ulong v ulong to ulong
+m = ulong 0
+e = arrfirst js n v
+while gt e 0 bound 4098
+m = add m 1
+if gt m 4096
+ret m
+end
+e = arrnext js n e
+end
+ret m
+end
+
+fn topscan js view uchar 4194304 n ulong wk edit ulong 65536 to long
+r = get wk 4
+if ne get js r 123
+ret failk wk 21 0
+end
+for k ulong 27
+put wk add 16 k 0
+end
+q = objfirst js n r
+while gt q 0 bound 64
+k = keyidx js wk q 0 27
+if eq k 999
+ret failk wk 22 0
+end
+put wk add 16 k keyvalp js n q
+q = objnext js n q
+end
+ret 0
+end
+
+note ---- the C want_* readers
+fn wstr js view uchar 4194304 wk edit ulong 65536 v ulong key ulong req bool slot ulong to long
+if eq v 0
+if req
+ret failk wk 23 key
+end
+put wk slot 0
+ret 0
+end
+if ne get js v 34
+ret failk wk 24 key
+end
+put wk slot add v 1
+ret 0
+end
+
+fn wbool js view uchar 4194304 wk edit ulong 65536 v ulong key ulong slot ulong to long
+if eq v 0
+ret failk wk 23 key
+end
+c = get js v
+if and ne c 116 ne c 102
+ret failk wk 28 key
+end
+put wk slot 0
+if eq c 116
+put wk slot 1
+end
+ret 0
+end
+
+fn vnum c uchar to bool
+ret not or or or eq c 34 eq c 123 or eq c 91 eq c 110 or eq c 116 eq c 102
+end
+
+note want_u64: a plain number (no sign, fraction or exponent) of at most 20 digits below 2^64
+fn wu64 js view uchar 4194304 n ulong wk edit ulong 65536 v ulong key ulong slot ulong to long
+if eq v 0
+ret failk wk 23 key
+end
+c = get js v
+if or not vnum c eq c 45
+ret failk wk 29 key
+end
+q = v
+while lt q n bound 64
+if or not isdig get js q gt sub q v 21
+break
+end
+q = add q 1
+end
+if lt q n
+c = get js q
+if or eq c 46 or eq c 101 eq c 69
+ret failk wk 29 key
+end
+end
+if gt sub q v 20
+ret failk wk 29 key
+end
+x = ulong 0
+i = v
+while lt i q bound 64
+dg = ulong sub get js i 48
+if gt x div sub 18446744073709551615 dg 10
+ret failk wk 29 key
+end
+x = add mul x 10 dg
+i = add i 1
+end
+put wk slot x
+ret 0
+end
+
+note want_strlist into list j (key names it); external_refs and required_features may be absent
+fn wlist js view uchar 4194304 n ulong wk edit ulong 65536 v ulong key ulong j ulong to long
+put wk add 114 j 0
+if eq v 0
+if or eq key 22 eq key 25
+ret 0
+end
+ret failk wk 23 key
+end
+if ne get js v 91
+ret failk wk 25 key
+end
+m = arrcnt js n v
+if gt m 4096
+ret failk wk 26 key
+end
+b = add 1024 mul j 4096
+i = ulong 0
+e = arrfirst js n v
+while gt e 0 bound 4097
+if ne get js e 34
+ret failk wk 27 key
+end
+put wk add b i add e 1
+i = add i 1
+e = arrnext js n e
+end
+put wk add 114 j m
+ret 0
+end
+
+note want_mut: the mutation's table index into slot
+fn wmut js view uchar 4194304 wk edit ulong 65536 v ulong key ulong slot ulong to long
+r = wstr js wk v key true slot
+if lt r 0
+ret r
+end
+so = get wk slot
+k = ulong 50
+while lt k 59 bound 16
+if nameq js wk so k
+put wk slot sub k 50
+ret 0
+end
+k = add k 1
+end
+ret failk wk 30 key
+end
+
+note the C want chain, in its order
+fn fields1 js view uchar 4194304 n ulong wk edit ulong 65536 to long
+r = wstr js wk get wk 16 0 true 64
+if lt r 0
+ret r
+end
+r = wu64 js n wk get wk 17 1 100
+if lt r 0
+ret r
+end
+for k ulong 4
+r = wstr js wk get wk add 18 k add 2 k true add 66 k
+if lt r 0
+ret r
+end
+end
+r = wu64 js n wk get wk 22 6 101
+if lt r 0
+ret r
+end
+r = wstr js wk get wk 23 7 true 71
+if lt r 0
+ret r
+end
+r = wstr js wk get wk 24 8 true 72
+if lt r 0
+ret r
+end
+r = wbool js wk get wk 25 9 102
+if lt r 0
+ret r
+end
+for k ulong 4
+r = wstr js wk get wk add 26 k add 10 k true add 74 k
+if lt r 0
+ret r
+end
+end
+r = wlist js n wk get wk 30 14 0
+if lt r 0
+ret r
+end
+r = wlist js n wk get wk 31 15 1
+if lt r 0
+ret r
+end
+r = wlist js n wk get wk 33 17 2
+if lt r 0
+ret r
+end
+ret 0
+end
+
+fn fields2 js view uchar 4194304 n ulong wk edit ulong 65536 to long
+r = wmut js wk get wk 34 18 105
+if lt r 0
+ret r
+end
+r = wmut js wk get wk 35 19 106
+if lt r 0
+ret r
+end
+r = wstr js wk get wk 36 20 false 84
+if lt r 0
+ret r
+end
+r = wstr js wk get wk 37 21 true 85
+if lt r 0
+ret r
+end
+r = wlist js n wk get wk 38 22 3
+if lt r 0
+ret r
+end
+r = wlist js n wk get wk 41 25 4
+if lt r 0
+ret r
+end
+ret wstr js wk get wk 42 26 false 90
+end
+
+note name-table index in [lo, hi) equal to the decoded string at so, 999 when none
+fn nameidx js view uchar 4194304 wk edit ulong 65536 so ulong lo ulong hi ulong to ulong
+k = lo
+while lt k hi bound 64
+if nameq js wk so k
+ret k
+end
+k = add k 1
+end
+ret 999
+end
+
+note check_digest_list, the : form (a: sstat of the item)
+fn dgcolon wk edit ulong 65536 a edit ulong 16 key ulong to long
+p6 = and get a 6 281474976710655
+ok = eq p6 get wk 439
+ok = or ok eq p6 get wk 444
+ok = or ok eq p6 get wk 449
+if not and eq get a 1 6 ok
+ret failk wk 44 key
+end
+hl = sub sub get a 0 get a 1 1
+bad = or lt hl 32 ne and hl 1 0
+if or bad ne get a 3 0
+ret failk wk 45 key
+end
+ret 0
+end
+
+note check_digest_list for one item
+fn dgchk js view uchar 4194304 wk edit ulong 65536 so ulong key ulong to long
+a = new ulong 16 0
+sstat js so a
+if eq get a 10 1
+ret dgcolon wk a key
+end
+if and eq get a 0 64 eq get a 2 0
+ret 0
+end
+ret failk wk 46 key
+end
+
+fn dglist js view uchar 4194304 wk edit ulong 65536 j ulong key ulong to long
+b = add 1024 mul j 4096
+for i ulong get wk add 114 j
+r = dgchk js wk get wk add b i key
+if lt r 0
+ret r
+end
+end
+ret 0
+end
+
+note the canonical_bytes validations up to the id, in the C order
+fn checks1 js view uchar 4194304 wk edit ulong 65536 to long
+if gt get wk 100 4294967295
+ret fail wk 31 0
+end
+if not nameq js wk get wk 64 59
+ret fail wk 32 0
+end
+if ne get wk 100 1
+ret fail wk 33 0
+end
+for i ulong get wk 118
+if not nameq js wk get wk add 17408 i 60
+ret fail wk 34 0
+end
+end
+if not isempty js get wk 90
+ret fail wk 35 0
+end
+if isempty js get wk 67
+ret fail wk 36 0
+end
+if isempty js get wk 71
+ret fail wk 37 0
+end
+a = new ulong 16 0
+sstat js get wk 72 a
+if not and or eq get a 0 40 eq get a 0 64 eq get a 4 0
+ret fail wk 38 0
+end
+if isempty js get wk 75
+ret fail wk 39 0
+end
+if isempty js get wk 76
+ret fail wk 40 0
+end
+ret 0
+end
+
+fn checks2 js view uchar 4194304 wk edit ulong 65536 to long
+t = nameidx js wk get wk 68 37 45
+if eq t 999
+ret fail wk 41 0
+end
+put wk 104 sub t 37
+t = nameidx js wk get wk 69 45 50
+if eq t 999
+ret fail wk 42 0
+end
+put wk 103 sub t 45
+if ne dcmp js get wk 77 get wk 68 0
+ret fail wk 43 0
+end
+r = dglist js wk 0 14
+if lt r 0
+ret r
+end
+r = dglist js wk 1 15
+if lt r 0
+ret r
+end
+if not hex32ok js get wk 85
+ret fail wk 47 0
+end
+if not hex32ok js get wk 66
+ret fail wk 48 0
+end
+ret 0
+end
+
+note one assertion object at e, index i
+fn asone js view uchar 4194304 n ulong wk edit ulong 65536 e ulong i ulong to long
+if ne get js e 123
+ret fail wk 50 0
+end
+t = new ulong 8 0
+q = objfirst js n e
+while gt q 0 bound 16
+k = keyidx js wk q 27 33
+if eq k 999
+ret fail wk 51 0
+end
+put t sub k 27 keyvalp js n q
+q = objnext js n q
+end
+b = add 21504 mul i 6
+r = wstr js wk get t 0 27 true b
+if lt r 0
+ret r
+end
+r = wstr js wk get t 1 28 false add b 1
+if lt r 0
+ret r
+end
+r = wstr js wk get t 2 29 false add b 2
+if lt r 0
+ret r
+end
+r = wbool js wk get t 3 30 add b 3
+if lt r 0
+ret r
+end
+r = wstr js wk get t 4 31 false add b 4
+if lt r 0
+ret r
+end
+ret wstr js wk get t 5 32 false add b 5
+end
+
+fn asall js view uchar 4194304 n ulong wk edit ulong 65536 to long
+put wk 113 0
+v = get wk 32
+if eq v 0
+ret failk wk 23 16
+end
+if ne get js v 91
+ret fail wk 49 0
+end
+m = arrcnt js n v
+if gt m 4096
+ret fail wk 49 0
+end
+i = ulong 0
+e = arrfirst js n v
+while gt e 0 bound 4097
+r = asone js n wk e i
+if lt r 0
+ret r
+end
+i = add i 1
+e = arrnext js n e
+end
+put wk 113 m
+if and eq m 0 eq get wk 103 0
+ret fail wk 52 0
+end
+ret asids js wk m
+end
+
+note assertion ids: not empty, no duplicates (each against the earlier ones, as the C)
+fn asids js view uchar 4194304 wk edit ulong 65536 m ulong to long
+for i ulong m
+x = get wk add 21504 mul i 6
+if isempty js x
+ret fail wk 53 0
+end
+for k ulong i
+y = get wk add 21504 mul k 6
+if eq dcmp js y x 0
+ret fail wk 54 0
+end
+end
+end
+ret 0
+end
+
+fn sev k ulong to ulong
+if le k 6
+ret k
+end
+ret sub k 1
+end
+
+fn checks3 js view uchar 4194304 wk edit ulong 65536 to long
+a = new ulong 16 0
+for i ulong get wk 116
+if not hex32ok js get wk add 9216 i
+ret fail wk 55 0
+end
+end
+so = sev get wk 106
+if gt so sev get wk 105
+ret fail wk 56 0
+end
+rk = get wk 104
+mx = ulong 4
+if eq rk 4
+mx = 2
+end
+if eq rk 5
+mx = 5
+end
+if ge rk 6
+mx = 255
+end
+if gt so mx
+ret fail wk 57 0
+end
+if and eq rk 4 ge get wk 106 4
+ret fail wk 58 0
+end
+if eq rk 7
+sstat js get wk 84 a
+if eq get a 5 0
+ret fail wk 59 0
+end
+if eq get a 8 1
+ret fail wk 60 0
+end
+end
+ret 0
+end
+
+fn ledger js view uchar 4194304 n ulong wk edit ulong 65536 to long
+put wk 107 0
+v = get wk 39
+if eq v 0
+ret 0
+end
+if eq get js v 110
+ret 0
+end
+if ne get js v 123
+ret fail wk 61 0
+end
+t = new ulong 4 0
+q = objfirst js n v
+while gt q 0 bound 8
+k = keyidx js wk q 33 35
+if eq k 999
+ret fail wk 62 0
+end
+put t sub k 33 keyvalp js n q
+q = objnext js n q
+end
+r = wu64 js n wk get t 0 33 108
+if lt r 0
+ret r
+end
+r = wstr js wk get t 1 34 true 109
+if lt r 0
+ret r
+end
+if not hex32ok js get wk 109
+ret fail wk 63 0
+end
+put wk 107 1
+ret 0
+end
+
+fn lease js view uchar 4194304 n ulong wk edit ulong 65536 to long
+put wk 110 0
+v = get wk 40
+if eq v 0
+ret 0
+end
+if eq get js v 110
+ret 0
+end
+if ne get js v 123
+ret fail wk 64 0
+end
+t = new ulong 4 0
+q = objfirst js n v
+while gt q 0 bound 8
+k = keyidx js wk q 35 37
+if eq k 999
+ret fail wk 65 0
+end
+put t sub k 35 keyvalp js n q
+q = objnext js n q
+end
+r = wstr js wk get t 0 35 true 111
+if lt r 0
+ret r
+end
+r = wstr js wk get t 1 36 true 112
+if lt r 0
+ret r
+end
+if not hex32ok js get wk 111
+ret fail wk 66 0
+end
+a = new ulong 16 0
+sstat js get wk 112 a
+if eq get a 5 0
+ret fail wk 67 0
+end
+put wk 110 1
+ret 0
+end
+
+note omega_receipt_parse: 0 ok, -1 with the reason in wk 0..2
+fn rcparse js view uchar 4194304 n ulong wk edit ulong 65536 to long
+put wk 0 0
+put wk 1 0
+put wk 2 0
+put wk 107 0
+put wk 110 0
+put wk 113 0
+nminit wk
+if or eq n 0 gt n 4194304
+ret fail wk 20 0
+end
+put wk 3 n
+r = jcheck js n wk
+if lt r 0
+ret r
+end
+put wk 4 skipws js n 0
+r = topscan js n wk
+if lt r 0
+ret r
+end
+r = fields1 js n wk
+if lt r 0
+ret r
+end
+r = fields2 js n wk
+if lt r 0
+ret r
+end
+r = checks1 js wk
+if lt r 0
+ret r
+end
+r = checks2 js wk
+if lt r 0
+ret r
+end
+r = asall js n wk
+if lt r 0
+ret r
+end
+r = checks3 js wk
+if lt r 0
+ret r
+end
+r = ledger js n wk
+if lt r 0
+ret r
+end
+ret lease js n wk
+end
+
+note ---- canonical bytes, streamed: each byte goes to the window (when inside it) and to BLAKE3
+fn b3mid wk edit ulong 65536 out edit uchar 1049632 to void
+w = new ulong 128 0
+blk = new uchar 64 0
+initw w
+midchk w blk wk out
+end
+
+fn b3fin wk edit ulong 65536 out edit uchar 1049632 to void
+w = new ulong 128 0
+blk = new uchar 64 0
+initw w
+lastchk w blk wk out get wk 10
+end
+
+fn eb wk edit ulong 65536 out edit uchar 1049632 v uchar to void
+t = get wk 8
+lo = get wk 9
+if and ge t lo lt t add lo 1048576
+put out sub t lo v
+end
+f = get wk 10
+if eq f 1024
+b3mid wk out
+f = 0
+end
+put out add 1048576 f v
+put wk 10 add f 1
+put wk 8 add t 1
+end
+
+fn eu32 wk edit ulong 65536 out edit uchar 1049632 v ulong to void
+eb wk out uchar and shr v 24 255
+eb wk out uchar and shr v 16 255
+eb wk out uchar and shr v 8 255
+eb wk out uchar and v 255
+end
+
+fn eu64 wk edit ulong 65536 out edit uchar 1049632 v ulong to void
+eu32 wk out shr v 32
+eu32 wk out and v 4294967295
+end
+
+fn dlen js view uchar 4194304 so ulong to ulong
+a = new ulong 16 0
+sstat js so a
+ret get a 0
+end
+
+note u64 length, then the decoded bytes
+fn estr js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 so ulong to void
+eu64 wk out dlen js so
+c = new ulong 8 0
+dinit c so
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+v = dnext js c
+if eq v 256
+ret
+end
+eb wk out uchar v
+k = add k 1
+end
+end
+trap 4
+end
+
+note 64 hex digits (any case) as 32 raw bytes
+fn ehex js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 so ulong to void
+c = new ulong 8 0
+dinit c so
+for i ulong 32
+h = hexv dnext js c
+l = hexv dnext js c
+eb wk out uchar or shl h 4 l
+end
+end
+
+note sort key of item it: mode wk 7 = 0 the item is a string offset, 1 an assertion index (its id)
+fn skey wk edit ulong 65536 it ulong to ulong
+if eq get wk 7 0
+ret it
+end
+ret get wk add 21504 mul it 6
+end
+
+note take the left run's head next: i in the left run and (j past the right run or key i <= key j)
+fn mleft js view uchar 4194304 wk edit ulong 65536 i ulong j ulong mid ulong hi ulong to bool
+if ge i mid
+ret false
+end
+if ge j hi
+ret true
+end
+s = get wk 5
+x = skey wk get wk add s i
+y = skey wk get wk add s j
+ret le dcmp js x y 0
+end
+
+fn mput wk edit ulong 65536 k ulong from ulong to void
+put wk add get wk 6 k get wk add get wk 5 from
+end
+
+note merge wk[src+lo, src+mid) and wk[src+mid, src+hi) into dst (src wk 5, dst wk 6)
+fn mrg js view uchar 4194304 wk edit ulong 65536 lo ulong mid ulong hi ulong to void
+i = lo
+j = mid
+k = lo
+while lt k hi bound 4097
+if mleft js wk i j mid hi
+mput wk k i
+i = add i 1
+else
+mput wk k j
+j = add j 1
+end
+k = add k 1
+end
+end
+
+note bottom-up merge sort of wk[46080, 46080 + m) by skey, strcmp order
+fn msort js view uchar 4194304 wk edit ulong 65536 m ulong to void
+put wk 5 46080
+put wk 6 50176
+w = ulong 1
+while lt w m bound 16
+i = ulong 0
+while lt i m bound 4097
+mid = umin add i w m
+hi = umin add i mul 2 w m
+mrg js wk i mid hi
+i = add i mul 2 w
+end
+s = get wk 5
+put wk 5 get wk 6
+put wk 6 s
+w = mul w 2
+end
+if ne get wk 5 46080
+for i ulong m
+put wk add 46080 i get wk add 50176 i
+end
+end
+end
+
+note sorted item i differs from item i - 1 (BTreeSet: equal strings kept once)
+fn isnew js view uchar 4194304 wk edit ulong 65536 i ulong to bool
+if eq i 0
+ret true
+end
+x = get wk add 46079 i
+y = get wk add 46080 i
+ret ne dcmp js x y 0
+end
+
+note sort list j into the sort area; the number of distinct strings
+fn lsort js view uchar 4194304 wk edit ulong 65536 j ulong to ulong
+m = get wk add 114 j
+b = add 1024 mul j 4096
+for i ulong m
+put wk add 46080 i get wk add b i
+end
+put wk 7 0
+msort js wk m
+u = ulong 0
+for i ulong m
+if isnew js wk i
+u = add u 1
+end
+end
+ret u
+end
+
+note a sorted string set: u32 count, then each distinct string (hx 1: as 32 raw bytes)
+fn eset js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 j ulong hx bool to void
+u = lsort js wk j
+eu32 wk out u
+for i ulong get wk add 114 j
+if isnew js wk i
+if hx
+ehex js wk out get wk add 46080 i
+else
+estr js wk out get wk add 46080 i
+end
+end
+end
+end
+
+fn eassert js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 to void
+m = get wk 113
+for i ulong m
+put wk add 46080 i i
+end
+put wk 7 1
+msort js wk m
+eu32 wk out m
+for i ulong m
+b = add 21504 mul get wk add 46080 i 6
+estr js wk out get wk b
+estr js wk out get wk add b 1
+estr js wk out get wk add b 2
+eb wk out uchar get wk add b 3
+estr js wk out get wk add b 4
+estr js wk out get wk add b 5
+end
+end
+
+fn edomain wk edit ulong 65536 out edit uchar 1049632 to void
+for i ulong 24
+eb wk out uchar nmbyte wk 433 i
+end
+end
+
+fn ehead js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 to void
+edomain wk out
+eu32 wk out 1
+estr js wk out get wk 67
+estr js wk out get wk 68
+eb wk out uchar get wk 103
+estr js wk out get wk 71
+estr js wk out get wk 72
+eb wk out uchar get wk 102
+estr js wk out get wk 74
+estr js wk out get wk 75
+estr js wk out get wk 76
+estr js wk out get wk 77
+end
+
+fn etail js view uchar 4194304 wk edit ulong 65536 out edit uchar 1049632 to void
+if eq get wk 107 1
+eb wk out 1
+eu64 wk out get wk 108
+ehex js wk out get wk 109
+else
+eb wk out 0
+end
+if eq get wk 110 1
+eb wk out 1
+ehex js wk out get wk 111
+estr js wk out get wk 112
+else
+eb wk out 0
+end
+eu64 wk out get wk 101
+eset js wk out 4 false
+eu32 wk out 0
+end
+
+note omega_receipt_canonical + compute_id, after rcparse returned 0 on the same js and wk
+fn rccanon js view uchar 4194304 n ulong wk edit ulong 65536 out edit uchar 1049632 pos ulong to ulong
+put wk 8 0
+put wk 9 pos
+put wk 10 0
+for i ulong 448
+put wk add 512 i 0
+end
+ehead js wk out
+eset js wk out 0 false
+eset js wk out 1 false
+eassert js wk out
+eset js wk out 2 true
+eb wk out uchar get wk 105
+eb wk out uchar get wk 106
+estr js wk out get wk 84
+ehex js wk out get wk 85
+eset js wk out 3 false
+etail js wk out
+b3fin wk out
+ret get wk 8
+end
+
+note omega_receipt_verify_bytes: parse, recompute, the id field must equal the result (any case)
+fn rcverify js view uchar 4194304 n ulong wk edit ulong 65536 out edit uchar 1049632 to long
+r = rcparse js n wk
+if lt r 0
+ret r
+end
+t = rccanon js n wk out 0
+c = new ulong 8 0
+dinit c get wk 66
+same = true
+for i ulong 32
+h = hexv dnext js c
+h = or shl h 4 hexv dnext js c
+if ne h ulong get out add 1049600 i
+same = false
+end
+end
+if not same
+ret fail wk 69 0
+end
+ret 0
+end
+
+note omega_tier_rank of the C string s[0..n)
+fn rctier s view uchar 4194304 n ulong wk edit ulong 65536 to long
+nminit wk
+for k ulong 8
+if rawname s n wk add 37 k
+ret long k
+end
+end
+ret -1
+end
+
+note omega_tier_satisfies (aien-proof chain.rs tier_satisfies)
+fn rcsat need long have long to long
+if or lt need 0 lt have 0
+ret 0
+end
+if eq have 0
+if eq need 0
+ret 1
+end
+ret 0
+end
+if and ge need 4 lt have 4
+ret 0
+end
+if ge have need
+ret 1
+end
+ret 0
+end
+
+note ==== parity harness (program mode; not part of any unit: unit cutting stops at this line)
+note stdin: records of a 25-byte header (op byte, then length, a, b as 8 decimal digits each) and
+note length payload bytes. One output line per record, the same format as the C oracle driver:
+note   R     
+note   op R: the payload as is. op M: the payload holds the placeholder id (64 '0'): parse it, compute
+note   the id, write it over the placeholder (b 257: upper case), then apply the mutation (b 1..255:
+note   xor byte a with b; b 256: truncate to a bytes) and print the R line of the result; when the
+note   placeholder is absent or the payload does not parse, the R line of the payload.
+note   op T: T . op S: S then omega_tier_satisfies over -3 -1 0..8.
+note Exit 65 on a short record.
+
+text tmsgs "out of memory\nunterminated string\ncontrol character in string\nbad escape\nbad \\u escape\nlone surrogate\nbad surrogate pair\nNUL in string\ninvalid UTF-8\nnesting too deep\nexpected object key\nduplicate key\nexpected ':'\nexpected ',' or closing bracket\nunexpected end\nbad number\nleading zero\nunexpected character\ntrailing bytes after the receipt\nreceipt: empty or oversize input\nreceipt: top level must be an object\nreceipt: unknown field\nreceipt: missing field %\nreceipt: field % must be a string\nreceipt: field % must be a list\nreceipt: field % is too long\nreceipt: list % must hold strings\nreceipt: field % must be true or false\nreceipt: field % must be an unsigned integer\nreceipt: unknown mutation in %\nreceipt: version out of range\nreceipt: unknown receipt schema\nreceipt: unsupported receipt version\nreceipt: unknown required receipt feature\nreceipt: reserved field must be empty\nreceipt: kind must not be empty\nreceipt: repo must not be empty\nreceipt: commit must be 40 or 64 lowercase hex digits\nreceipt: procedure identity must not be empty\nreceipt: machine identity must not be empty\nreceipt: unknown tier\nreceipt: unknown result\nreceipt: env_class contradicts tier\nreceipt: unknown digest algorithm in %\nreceipt: bad digest hex in %\nreceipt: digest must be : or 64 hex digits in %\nreceipt: output_digest must be 64 hex digits\nreceipt: id must be 64 hex digits\nreceipt: assertions must be a list\nreceipt: an assertion must be an object\nreceipt: unknown assertion field\nreceipt: PASS receipts must carry at least one assertion\nreceipt: assertion id must not be empty\nreceipt: duplicate assertion id\nreceipt: dependency is not a 64 digit receipt hash\nreceipt: observed mutation exceeds declared mutation\nreceipt: tier cannot claim that observed mutation\nreceipt: a read-only run cannot claim that mutation\nreceipt: PRODUCTION receipts require an authority reference\nreceipt: a TEST_ONLY signer cannot produce a PRODUCTION receipt\nreceipt: ledger must be null or an object\nreceipt: unknown ledger field\nreceipt: ledger hash must be 64 hex digits\nreceipt: lease must be null or an object\nreceipt: unknown lease field\nreceipt: lease hold_id must be 64 hex digits\nreceipt: lease resource must not be empty\nreceipt: cannot compute canonical identity\nreceipt id mismatch: the file claims one id, its canonical bytes hash to another\n"
+text tkeys "schema\nversion\nid\nkind\ntier\nresult\ntimestamp\nrepo\ncommit\ndirty\ntoolchain\nprocedure\nmachine\nenv_class\ninput_artifacts\noutput_artifacts\nassertions\ndependencies\ndeclared_mutation\nobserved_mutation\nauthority\noutput_digest\nexternal_refs\nledger\nlease\nrequired_features\nreserved\nid\nexpected\nobserved\npass\nsource\nnote\nindex\nhash\nhold_id\nresource\n"
+text tjs "receipt JSON: "
+text tat " at byte "
+text ttab "\t"
+text tnl "\n"
+text tdash "-"
+text tr "R"
+text tt "T"
+text ts "S"
+
+fn wkey k ulong to void
+s = ulong 0
+ln = ulong 0
+while lt ln k bound 64
+while ne get tkeys s 10 bound 64
+s = add s 1
+end
+s = add s 1
+ln = add ln 1
+end
+e = s
+while ne get tkeys e 10 bound 64
+e = add e 1
+end
+r = write 1 tkeys s sub e s
+end
+
+note line k of tmsgs, '%' replaced by key name f
+fn wmline k ulong f ulong to void
+s = ulong 0
+ln = ulong 0
+while lt ln k bound 128
+while ne get tmsgs s 10 bound 128
+s = add s 1
+end
+s = add s 1
+ln = add ln 1
+end
+b = s
+while ne get tmsgs s 10 bound 128
+if eq get tmsgs s 37
+r = write 1 tmsgs b sub s b
+wkey f
+b = add s 1
+end
+s = add s 1
+end
+r = write 1 tmsgs b sub s b
+end
+
+fn wdec v ulong to void
+d = new uchar 24 0
+i = ulong 24
+while true bound 24
+i = sub i 1
+put d i uchar add rem v 10 48
+v = div v 10
+if eq v 0
+break
+end
+end
+r = write 1 d i sub 24 i
+end
+
+fn wsdec v long to void
+if lt v 0
+r = write 1 tdash 0 1
+wdec ulong neg v
+ret
+end
+wdec ulong v
+end
+
+fn wtab to void
+r = write 1 ttab 0 1
+end
+
+fn wmsg wk edit ulong 65536 to void
+c = get wk 0
+if le c 19
+r = write 1 tjs 0 len tjs
+wmline sub c 1 0
+r = write 1 tat 0 len tat
+wdec get wk 2
+ret
+end
+wmline sub c 1 get wk 1
+end
+
+fn hexc v ulong up bool to uchar
+if lt v 10
+ret uchar add v 48
+end
+if up
+ret uchar add v 55
+end
+ret uchar add v 87
+end
+
+note out[off, off + cnt) as lower-case hex on stdout
+fn ohex out edit uchar 1049632 off ulong cnt ulong hb edit uchar 65536 to void
+p = off
+e = add off cnt
+while lt p e bound 64
+m = umin sub e p 32768
+for i ulong m
+b = ulong get out add p i
+put hb mul i 2 hexc shr b 4 false
+put hb add mul i 2 1 hexc and b 15 false
+end
+r = write 1 hb 0 mul m 2
+p = add p m
+end
+end
+
+fn rline js view uchar 4194304 n ulong wk edit ulong 65536 out edit uchar 1049632 hb edit uchar 65536 to void
+r = write 1 tr 0 1
+wtab
+pr = rcparse js n wk
+wsdec pr
+wtab
+if lt pr 0
+wmsg wk
+wtab
+r = write 1 tdash 0 1
+else
+t = rccanon js n wk out 0
+ohex out 0 umin t 1048576 hb
+pos = ulong 1048576
+while lt pos t bound 16
+t2 = rccanon js n wk out pos
+ohex out 0 umin sub t pos 1048576 hb
+pos = add pos 1048576
+end
+wtab
+ohex out 1049600 32 hb
+end
+wtab
+vr = rcverify js n wk out
+wsdec vr
+wtab
+if lt vr 0
+wmsg wk
+else
+ohex out 1049600 32 hb
+end
+r = write 1 tnl 0 1
+end
+
+note offset of the first run of 64 '0' bytes, n when none
+fn findz js view uchar 4194304 n ulong to ulong
+if gt n 4194304
+ret n
+end
+run = ulong 0
+i = ulong 0
+for o ulong 16
+k = ulong 0
+while lt k 500000 bound 999999
+if ge i n
+ret n
+end
+if eq get js i 48
+run = add run 1
+if eq run 64
+ret sub i 63
+end
+else
+run = 0
+end
+i = add i 1
+k = add k 1
+end
+end
+ret n
+end
+
+note write the computed id (out 1049600) as hex over the placeholder at z
+fn patchid js edit uchar 4194304 out edit uchar 1049632 z ulong up bool to void
+for i ulong 32
+v = ulong get out add 1049600 i
+q = add z mul i 2
+put js q hexc shr v 4 up
+put js add q 1 hexc and v 15 up
+end
+end
+
+note the mutation of record header (a, b); the new length
+fn mutate js edit uchar 4194304 n ulong a ulong b ulong to ulong
+if ge a n
+ret n
+end
+if and ge b 1 le b 255
+put js a xor get js a uchar b
+end
+if eq b 256
+ret a
+end
+ret n
+end
+
+fn mline js edit uchar 4194304 n ulong wk edit ulong 65536 out edit uchar 1049632 hb edit uchar 65536 to void
+z = findz js n
+pr = long -1
+if lt z n
+pr = rcparse js n wk
+end
+if lt pr 0
+rline js n wk out hb
+ret
+end
+t = rccanon js n wk out 0
+patchid js out z eq get wk 61 257
+m = mutate js n get wk 60 get wk 61
+rline js m wk out hb
+end
+
+fn tval i ulong to long
+if eq i 0
+ret -3
+end
+ret sub long i 2
+end
+
+fn sline to void
+r = write 1 ts 0 1
+for i ulong 11
+for j ulong 11
+wtab
+wsdec rcsat tval i tval j
+end
+end
+r = write 1 tnl 0 1
+end
+
+fn dorec js edit uchar 4194304 n ulong op uchar a ulong b ulong to void
+wk = new ulong 65536 0
+out = new uchar 1049632 0
+hb = new uchar 65536 0
+if eq op 84
+r = write 1 tt 0 1
+wtab
+wsdec rctier js n wk
+r = write 1 tnl 0 1
+ret
+end
+if eq op 83
+sline
+ret
+end
+if eq op 77
+put wk 60 a
+put wk 61 b
+mline js n wk out hb
+ret
+end
+rline js n wk out hb
+end
+
+fn dec8 hd edit uchar 32 o ulong to ulong
+v = ulong 0
+for i ulong 8
+v = add mul v 10 ulong sub get hd add o i 48
+end
+ret v
+end
+
+note read exactly n bytes into js; the count read
+fn rdjs js edit uchar 4194304 n ulong to ulong
+t = ulong 0
+while lt t n bound 999999
+r = read 0 js t sub n t
+if le r 0
+ret t
+end
+t = add t ulong r
+end
+ret t
+end
+
+fn rdhd hd edit uchar 32 to ulong
+t = ulong 0
+while lt t 25 bound 64
+r = read 0 hd t sub 25 t
+if le r 0
+ret t
+end
+t = add t ulong r
+end
+ret t
+end
+
+fn drain n ulong to ulong
+bf = new uchar 65536 0
+t = ulong 0
+while lt t n bound 999999
+r = read 0 bf 0 umin sub n t 65536
+if le r 0
+ret t
+end
+t = add t ulong r
+end
+ret t
+end
+
+note one record: 0 done, 1 end of input, 2 short record
+fn onerec js edit uchar 4194304 to ulong
+hd = new uchar 32 0
+h = rdhd hd
+if eq h 0
+ret 1
+end
+if ne h 25
+ret 2
+end
+n = dec8 hd 1
+if le n 4194304
+if ne rdjs js n n
+ret 2
+end
+else
+if ne drain n n
+ret 2
+end
+end
+dorec js n get hd 0 dec8 hd 9 dec8 hd 17
+ret 0
+end
+
+fn main to int
+js = new uchar 4194304 0
+while true bound 999999
+s = onerec js
+if eq s 1
+ret 0
+end
+if eq s 2
+ret 65
+end
+end
+ret 0
+end
diff --git a/seed/agent/.crumb b/seed/agent/.crumb
new file mode 100644
index 000000000..67a6e99bd
--- /dev/null
+++ b/seed/agent/.crumb
@@ -0,0 +1,58 @@
+{
+  "below": [
+    {
+      "name": "bench",
+      "role": ""
+    },
+    {
+      "name": "tests",
+      "role": ""
+    }
+  ],
+  "extensions": {
+    "generated": {
+      "children": [
+        {
+          "digest": "7438334c8bac2ff0a0f5e4ac0db8d33fc1bb02ebd56cdef6dfd294fb2ed55ae2",
+          "last_commit": "5b39ef42",
+          "name": "bench",
+          "purpose": "Test-only equal-work benchmark of omagent against nanobot reduced to the same four tools: script"
+        },
+        {
+          "digest": "d83674abfa647020999dde6f2a4fded1d42576c32fa06a398621d62f72e46f8a",
+          "last_commit": "116c3237",
+          "name": "tests",
+          "purpose": "Directory tests. Purpose not yet described by a human."
+        }
+      ],
+      "children_root": "sha256:3056fbde3eb131e54f3a67106a1ed8e53d889920e987ad0117289615257d9081",
+      "compiled_at": "2026-10-26T21:07:01Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:ceefb1df61f0ff171468dcc0359e11d8d856e64960ab55eba03bcd61d0088daa",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 6,
+      "generated_at_commit": "ef7d78bdd0c5738c7dc9c5e9123f985d6e643950",
+      "source_tree": "sha256:c845b86d94d764c3c6df90c8cab98fcb5188abacb0c49d3c55f78b0683c29b68"
+    },
+    "owner_lane": "",
+    "seed": {
+      "files": [
+        "README.md",
+        "agent.om"
+      ],
+      "purpose_auto": "Repository root agent. Purpose not yet described by a human."
+    }
+  },
+  "invariants": [
+    "Every implementation byte is seeded .om compiled by seed/out/omc; Python under tests/ and bench/ is a test-only referee or mock",
+    "The model is untrusted: its output is parsed by json.om/http.om under fixed caps and a malformed reply runs nothing",
+    "Tool permissions come only from the operator's command line; the default is read_file inside the workspace",
+    "The API key appears only in the Authorization header, never in stdout, stderr, the session file or a child environment",
+    "Tests and benchmarks bind 127.0.0.1 with kernel-chosen ports only and never contact port 18091"
+  ],
+  "layer": "seed",
+  "name": "agent",
+  "purpose": "Seeded Omega coding agent omagent (nanobot-style): agent loop, permissioned tools, JSONL session memory, SSE model streaming, CLI; scripted-mock test referee and nanobot benchmark",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/agent/README.md b/seed/agent/README.md
new file mode 100644
index 000000000..163aca560
--- /dev/null
+++ b/seed/agent/README.md
@@ -0,0 +1,298 @@
+# seed/agent: omagent, a small coding agent in seeded Omega
+
+omagent is an agent harness in the style of HKUDS/nanobot (MIT), written in seeded Omega.
+Only nanobot's architecture was reused. None of its code was copied. The program is one
+static ARM64 Linux executable (188,268 bytes with omc 2c824805) built from four sources:
+
+```sh
+{ printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om seed/net/http.om seed/agent/agent.om; } \
+  | seed/out/omc > omagent && chmod +x omagent
+```
+
+The only compiler needed is the pinned `seed/out/omc`. Every implementation byte is compiled
+from `.om`. Python appears only in the test referee `tests/check.py`, which also plays the mock
+model server.
+
+Status: IMPLEMENTED and EXERCISED on the host (Linux ARM64, DGX Spark) against a scripted mock
+server. No real model server was used, and no hardware qualification applies.
+
+## Architecture
+
+```
+operator CLI / stdin line  ->  agent loop  ->  model backend (HTTP POST, SSE or JSON)
+                                   |                 |
+                                   v                 v
+                           tool dispatcher    stream parser (http.om SSE + json.om)
+                     (read_file, write_file,         |
+                      run_command, http_fetch)       v
+                                   |          stdout (content deltas as they arrive)
+                                   v
+                     session file (append-only JSONL), memory file (read-only)
+```
+
+### Agent loop
+
+One user turn runs at most `--max-rounds` model rounds (default 8, at most 64):
+
+1. Append the user message to the history.
+2. Send the system prompt, the memory file and the whole history to the model with the
+   four tool schemas.
+3. Stream the reply. Content deltas go to stdout as they arrive. Tool call deltas are
+   collected by `index`, at most 8 calls per reply.
+4. With no tool calls, the turn ends. Otherwise, run every call in order, append one `tool`
+   message per call (matched by `tool_call_id`), then go to step 2.
+5. Hitting the round limit stops with exit 7. Interrupted turns are trimmed from the
+   in-memory history, so a later turn never sends a dangling `tool_calls` message.
+
+With `-p PROMPT`, omagent runs one turn and exits. Without it, it reads prompts from stdin,
+one per line, until end of file (the stdin channel).
+
+### Model backend
+
+Any OpenAI-compatible chat completions endpoint reached over plain HTTP at an IPv4 literal
+or `localhost`. The request is `{"model":..,"stream":true,"tools":[..],"messages":[..]}`
+with `Content-Length`, `Accept: text/event-stream` and, when a key is present,
+`Authorization: Bearer KEY`. A `text/event-stream` reply is parsed as SSE until `[DONE]`.
+Any other content type is read as one JSON document (`choices[0].message`), which covers
+servers that ignore `stream`.
+
+`https://` is refused with exit 2: this build carries no TLS client. Wiring `om/tls` in is
+proposed and NOT_RUN. Point omagent only at a model server you run. The resident server on
+127.0.0.1:18091 must not be used for tests.
+
+### Tool protocol
+
+The tools are OpenAI function tools whose `arguments` is a JSON object (a JSON string holding
+an object, or a raw object, both accepted):
+
+| tool | arguments | permission | result |
+|---|---|---|---|
+| `read_file` | `path` | always | file bytes, at most 64 KiB plus a truncation marker |
+| `write_file` | `path`, `content` | `--allow-write` | `ok: wrote N bytes to PATH` |
+| `run_command` | `argv` (1..63 strings) | `argv[0]` exactly equal to an `--allow-cmd` entry | output, then `[exit status N]`, `[killed by signal N]` or `[killed: timeout after S s]` |
+| `http_fetch` | `url` (`http://` only) | canonical `HOST:PORT` on an `--allow-fetch` entry | `status=N` then the body, at most 64 KiB |
+
+A refused call is answered with a tool message that starts with `refused:` and names the
+permission, and the loop continues. The model sees the refusal; nothing runs. Result text is
+repaired to valid UTF-8 before it enters the history.
+
+### Memory
+
+- Session memory: `--session FILE` is an append-only JSONL file (opened `O_APPEND|O_CREAT`,
+  mode 0600). Each line is one message object. At start-up, the last 768 KiB is loaded. Any
+  line that is not a valid message object stops omagent with exit 8 before contacting the
+  model. This includes a final line cut short by a crash; the operator then deletes that line.
+- History limits: each message is at most 256 KiB. Older messages are dropped from the request,
+  at a user-message boundary, when the history passes 512 KiB or 4096 messages. The session file
+  keeps everything.
+- Long-term memory: `--memory FILE` (at most 64 KiB, read once) is appended to the system prompt.
+  omagent never writes it. Keep it outside the workspace if the model must not edit it
+  through `write_file`.
+
+Relative `--session` and `--memory` paths resolve against the directory omagent started in,
+before it enters `--workdir`. Keep the session file outside the workspace too.
+
+### Channels
+
+Two channels exist now: the CLI one-shot (`-p`) and stdin lines. Both are first-party. These are
+PROPOSED and not built: an HTTP channel (an OpenAI-compatible `/v1/chat/completions` server using
+the `seed/net` server half, like `nanobot serve`) and chat adapters (Matrix, IRC, Telegram).
+Adapters need TLS and are the natural home for omega-bridge or other universal adapters.
+
+## Safety model
+
+1. **The model is untrusted.** Every byte it sends passes `http.om` (status line, headers,
+   chunked or close-delimited body, SSE framing) and `json.om` under fixed caps: 256 KiB per
+   JSON reply or SSE event, 128 KiB reply text, 8 tool calls, and per call 255 bytes of id,
+   127 bytes of name and 64 KiB of arguments. A reply that breaks a cap, is not JSON, carries
+   an `error` object, or ends before `[DONE]` or a `finish_reason` stops omagent with exit 6.
+   Nothing from that reply runs.
+2. **Tool permissions are explicit.** By default, only `read_file` inside the workspace is
+   allowed. Writing, programs and fetches each need their own flag. Programs are named by
+   absolute path, and there is no shell and no PATH search.
+3. **The workspace is a jail by path rules.**
+   - Paths must be relative.
+   - No part may be empty, `.` or `..`. No control byte is allowed.
+   - Every prefix is checked with `lstat` and must not be a symbolic link.
+   - The final open uses `O_NOFOLLOW`.
+   - Limit: the checks and the open are separate system calls, so a concurrent local process
+     that swaps a directory for a link between them could escape (TOCTOU). Proposed fix:
+     `openat2` with `RESOLVE_BENEATH` as a host word. The effect-manifest work in `seed/effects`
+     is the proposed outer sandbox layer.
+4. **Commands are bounded.**
+   - Children run with an empty environment and stdin on `/dev/null`.
+   - stdout and stderr go to one close-on-exec pipe, and at most 64 KiB is kept.
+   - At the `--cmd-timeout` deadline (default 10 s), the child gets SIGKILL and is reaped.
+   - Grandchildren are not killed: there are no process groups yet. One that keeps the pipe
+     open only delays omagent until the deadline.
+5. **No secrets in logs.**
+   - The API key is read from `OMAGENT_API_KEY` (or `--key-env NAME`), never from argv. It must
+     be bytes 0x21..0x7e.
+   - The key appears only in the Authorization header. The header buffer is zeroed after the
+     write.
+   - stderr carries only fixed messages and `omagent: tool NAME: ok|refused|error`.
+   - Tool arguments and results are never echoed to stderr.
+   - The session file stores messages, not headers.
+   - The tests assert that the key never appears in stdout, stderr or the session file, and
+     that the mock server did receive it.
+6. **Timeouts.** `--timeout` (default 120 s) bounds each model request, both idle time and the
+   whole body. Connecting has a 5 s limit.
+
+## CLI
+
+```
+omagent --url http://IP:PORT/PATH --model NAME [-p PROMPT] [--workdir DIR]
+  [--session FILE] [--memory FILE] [--allow-cmd /ABS/PATH]... [--allow-write]
+  [--allow-fetch HOST:PORT]... [--timeout S] [--cmd-timeout S] [--max-rounds N]
+  [--key-env NAME] | --version | --help
+```
+
+Exit codes:
+
+| code | meaning |
+|---|---|
+| 0 | ok |
+| 2 | usage, configuration, `--workdir` or a bad key |
+| 3 | connect or send failed |
+| 4 | HTTP status other than 200 (stderr shows the status and the first 512 sanitized body bytes) |
+| 5 | model timeout or read failure |
+| 6 | malformed model output |
+| 7 | `--max-rounds` reached |
+| 8 | session or memory file |
+| 9 | a message could not be encoded, or the history is full |
+
+## Tests
+
+```sh
+nice -n 19 ionice -c3 python3 seed/agent/tests/check.py
+```
+
+The test builds omagent with `seed/out/omc` and starts a scripted mock model server on a
+kernel-chosen 127.0.0.1 port. It then runs 32 conversations:
+
+- plain SSE and JSON replies
+- every tool, plus two calls in one reply
+- refusals: a program not on the allowlist, programs disabled, `..`, an absolute path, a
+  symbolic link, writing disabled, an unknown tool, a fetch host not on the allowlist, https
+- malformed output: a bad event, a truncated stream, an error object, a bad call index,
+  HTTP 500
+- a model timeout, a command timeout and the round limit
+- session reload, a corrupt session line, no key, two stdin lines, connection refused
+
+Negative controls follow. Two wrong expectations must fail. Six source mutants must each be
+caught: allowlist bypass, `..` allowed, symlink followed, fetch allowlist bypass, write flag
+ignored, end of stream without `[DONE]` accepted. Output: `AGENT-CHECK PASS cases=32 mutants=6`.
+Exit 0 means PASS, 1 FAIL, and 3 NOT_RUN (no compiler).
+
+## Host dependencies
+
+| dependency | version | purpose | Omega replacement |
+|---|---|---|---|
+| `seed/out/omc` | pin sha256 2c824805... (omega-mv main) | compiler | itself (seeded) |
+| Linux ARM64 kernel | host | system calls through compiled host words | none (platform) |
+| Python 3 | 3.12 on the Spark | test referee and mock server only, not on the product path | a `.om` mock server on `seed/net` (proposed) |
+| nanobot-ai | 0.3.5 on Python 3.12.3, in a separate venv | comparison arm of `bench/` only | none needed (not a dependency of omagent) |
+
+## Compared with nanobot
+
+### Feature matrix
+
+nanobot-ai 0.3.5 (paths relative to its installed `nanobot/` package) against omagent (`agent.om`
+lines at this commit). Status: HAS (equivalent), PARTIAL (narrower), MISSING (absent).
+
+| feature | nanobot evidence | omagent | omagent evidence |
+|---|---|---|---|
+| model/tool loop with an iteration cap | `agent/runner.py`, `maxToolIterations` `config/schema.py:129` | HAS | `agturn` :2237, `--max-rounds` :82, :161 |
+| streamed replies (SSE) | `providers/openai_compat_provider.py:2124` | HAS | `agsse` :1498; non-stream JSON too, `agjsonbody` :1527 |
+| read and write a file | `read_file`/`write_file` `agent/tools/filesystem.py:281,546` | HAS (no offset/limit/pages on read) | `agtread` :1762, `agtwrite` :1804 |
+| edit_file, list_dir, find_files, grep, apply_patch | `filesystem.py:869,1111`, `search.py:215,514`, `apply_patch.py:84` | MISSING | |
+| shell command | `exec` `agent/tools/shell.py:248` (through a shell) | PARTIAL: argv exec of allowlisted programs, no shell | `agtrun` :1965, `agallowed` :1849 |
+| persistent exec sessions | `exec_session`, `list_exec_sessions` `exec_session.py:565,722` | MISSING | |
+| web fetch | `web_fetch` `agent/tools/web.py:1114` (https, redirects, extraction) | PARTIAL: plain `http://` to allowlisted HOST:PORT, raw body | `agtfetch` :2039 |
+| web search | `web_search` `web.py:367` | MISSING | |
+| workspace confinement | `restrictToWorkspace` `schema.py:401` (default off) | HAS (always on: no `..`, absolute paths or symlinks) | `agpathok` :1735 |
+| command deny-list / timeouts | built-in deny-list `shell.py` ~213-232, timeout `:97` | PARTIAL: allowlist instead of deny-list; timeout kills the child only | `agexec` :1926, `--cmd-timeout` :81 |
+| MCP client (stdio, SSE, streamable HTTP) | `agent/tools/mcp.py:1365,1412`, `schema.py:362` | MISSING | |
+| session history | `session/manager.py`, sessions dir | HAS (one JSONL file per `--session`) | `agsload` :1032, `agappend` :917 |
+| history compaction / consolidation | Consolidator and AutoCompact `agent/loop.py:433,443`, summaries `agent/memory.py:803-824` | PARTIAL: drops the oldest whole turns, no summaries | `agcompact` :896 |
+| long-term memory and Dream | `memory/MEMORY.md`, `DreamConfig` `schema.py:53` (gateway only) | PARTIAL: read-only `--memory` file, nothing written back | `agmemload` :755 |
+| system prompt from workspace templates and skills | `cli/agent.py:154`, `skills/` (11 built-in) | MISSING (fixed system prompt plus memory file) | `agsysmsg` :1093 |
+| skills | `skills/`, `disabledSkills` `schema.py:146` | MISSING | |
+| providers, presets, fallback models | about 46 providers `schema.py:240`, `fallbackModels` `:128` | PARTIAL: one OpenAI-compatible endpoint, plain HTTP only, Bearer key | `agurl` :420, `agkeyload` :720 |
+| subagents | `spawn` `agent/tools/spawn.py:63`, `agent/subagent.py:100` | MISSING | |
+| messages and session tools, goals | `message.py:117`, `session_messages.py:81,153`, `sessions.py:88,165`, `long_task.py:159,290` | MISSING | |
+| chat channels | 17 channels in `channels/` (Telegram, Slack, Discord, ...) | MISSING (CLI only: `-p` or stdin lines) | `agline` :2289 |
+| WebUI, gateway, OpenAI-compatible API server | `webui/`, `GatewayConfig` `schema.py:353`, `ApiConfig` `:333` | MISSING | |
+| cron and heartbeat | `cron` tool `agent/tools/cron.py:118`, heartbeat `schema.py:326` | MISSING | |
+| image generation, CLI apps, `my` | `image_generation.py:121`, `cli_apps.py:99`, `self.py:149` | MISSING | |
+| transcription | `TranscriptionConfig` `schema.py:42` | MISSING | |
+| API key kept out of logs and child environments | | HAS (checked by every test case) | `tests/check.py` |
+
+omagent lacks MCP, subagents, skills, web search, the editing and search tools, exec sessions,
+summarizing memory, multiple providers, TLS, chat channels, the WebUI and API server, cron and
+heartbeat, image generation and transcription. What it has is the four-tool coding loop above.
+
+### Equal-work benchmark
+
+`bench/equal_bench.py` runs both programs through the same session:
+- the same prompt and the same scripted mock, `bench/equal_mock.py`;
+- streamed replies, four model requests per session: `read_file`, then `write_file`, then one
+  echo through the shell tool, then the final answer;
+- the same advertised tools: nanobot is reduced to `read_file`, `write_file`, `exec` and
+  `web_fetch` by `bench/nb_minimal.py`, because its config cannot drop the rest. It also has no
+  MCP, no channels, every built-in skill disabled, `restrictToWorkspace`, and a fresh session each
+  run;
+- the mock checks every tool result, and the driver checks the written file and the final answer.
+
+Remaining differences:
+- nanobot's system prompt is larger: 43,230 request bytes per session against 7,480 (5.78x).
+- nanobot's command runs as `env echo gamma-789` through `sh`, because its workspace guard
+  refuses `/bin/echo`. omagent runs `/bin/echo` directly.
+
+A negative control (omagent without `--allow-write`) is graded BAD.
+
+MEASURED on 2026-10-26 with omc 2c824805 (binary sha256 3eb8e93e..., 188,268 bytes):
+- N=30 paired runs per core class and model delay, arm order alternating;
+- client pinned with `taskset` to X925 cpu 5 or A725 cpu 1;
+- all 240 runs graded ok;
+- warm page cache; the Spark was heavily loaded by other work (load average 28 to 45 during the
+  runs, recorded per group), so absolute times are noisy, while the paired order keeps the
+  comparison fair.
+
+A first run misnamed one skill, so nanobot's `update-setup` skill stayed enabled. That skill
+added 1,468 request bytes per session (3.3% of nanobot's 44,698). The numbers below are from the
+rerun with every built-in skill disabled. They are a little different from the first run, partly
+because the machine was busier.
+
+Wall times include the same Python launcher and `/usr/bin/time` for both arms. Medians, with ratios
+from Wolfram:
+
+| measure | omagent | nanobot | nanobot/omagent |
+|---|---|---|---|
+| launch to first model request, X925 / A725 | 5.5 / 9.0 ms | 831 / 2228 ms | 167x / 255x |
+| full session, instant mock, X925 / A725 | 14.2 / 23.1 ms | 1206 / 2917 ms | 92x / 126x |
+| full session, mock at 50 ms per chunk, X925 / A725 | 1838 / 1850 ms | 3758 / 5020 ms | 2.02x / 2.73x |
+| peak RSS | 2,584 KiB | 142,838 to 143,046 KiB | 55.3x |
+
+On-disk footprint:
+- omagent is the 188,268-byte static binary and nothing else.
+- During the session, nanobot loaded 1,894 module files totaling 51,602,687 bytes: 3.06 MB of its
+  own package, 41.65 MB of third-party packages and 6.90 MB of the standard library. On top of that
+  comes the 7,845,048-byte interpreter, which makes 316x.
+- nanobot's full installation is 336,116,353 bytes of site-packages, plus the standard library and
+  the interpreter.
+
+Once the model is slow, the harness matters much less. With the mock spending about 1.8 s per
+session, omagent's advantage falls from 92x to 2.02x (X925) and from 126x to 2.73x (A725). The
+absolute gap stays at 1.2 to 3.2 s per session, mostly nanobot's 0.8 to 2.4 s startup, and
+amounts to 50% (X925) and 63% (A725) of nanobot's session time. Against a real model that takes
+seconds per reply, the share is smaller again. NOT_RUN: a real model server.
+
+Raw rows, machine state, the Wolfram input and output, and the footprint lists are filed in the
+operator handoff `OmegaBot/eqbench2/` (the first, flawed run is in `OmegaBot/eqbench/`).
+
+## Limits and NOT_RUN
+
+- TLS model endpoints and fetches: NOT_RUN (refused by design in this build).
+- Real model servers (vLLM, llama.cpp, MAX): NOT_RUN. Only the scripted mock was used.
+- One request at a time; no parallel tool calls; no process-group kill; the TOCTOU limit above.
diff --git a/seed/agent/agent.om b/seed/agent/agent.om
new file mode 100644
index 000000000..e6c2b0684
--- /dev/null
+++ b/seed/agent/agent.om
@@ -0,0 +1,2402 @@
+note seed/agent/agent.om -- omagent: a small coding agent in seeded Omega (program mode).
+note Compose: { printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om seed/net/http.om seed/agent/agent.om; } | seed/out/omc > omagent
+note Design, safety model, CLI and exit codes: seed/agent/README.md. Tests: seed/agent/tests/check.py.
+note The model is untrusted: every byte it sends is parsed by json.om/http.om under fixed caps, every
+note tool call is checked against permissions the operator gave on the command line, and the API key
+note never reaches stdout, stderr, the session file or a child process (execprog passes no environment).
+
+const QUSED ulong 0
+const QIP ulong 1
+const QPORT ulong 2
+const QTMO ulong 3
+const QCTMO ulong 4
+const QROUND ulong 5
+const QWRITE ulong 6
+const QNCMD ulong 7
+const QNFET ulong 8
+const QSFD ulong 9
+const QHBL ulong 10
+const QNREC ulong 11
+const QRES ulong 12
+const QINL ulong 13
+const QINP ulong 14
+const QINEOF ulong 15
+const QMEML ulong 16
+const QHAVEK ulong 17
+const QSESS ulong 18
+const QTST ulong 19
+const QURL ulong 20
+const QMODEL ulong 21
+const SCLEN ulong 0
+const SNC ulong 1
+const SFIN ulong 3
+const SID ulong 8
+const SNM ulong 16
+const SARG ulong 24
+const IPATH ulong 0
+const IMODEL ulong 1
+const IKEY ulong 2
+const IWORK ulong 3
+const ISESS ulong 4
+const IMEM ulong 5
+const IPROMPT ulong 6
+const IKEYENV ulong 7
+const IHOST ulong 8
+const ICMD ulong 16
+const IFET ulong 32
+const QMAXC ulong 8
+const QRESC ulong 65536
+const QCONC ulong 131072
+const QMSG ulong 262144
+
+global gpool uchar 65536
+global gsof ulong 64
+global gsln ulong 64
+global gnum ulong 32
+global gst ulong 64
+global gcont uchar 131072
+global gtid uchar 2048
+global gtnm uchar 1024
+global gtarg uchar 524288
+global gres uchar 70000
+global gmem uchar 65536
+global gmb ulong 8192
+global gmr uchar 8192
+global gin uchar 65536
+
+text cpre "omagent: "
+text cnl "\n"
+text cver "omagent 0.1.0 (seeded Omega, omega-mv seed/agent)\n"
+text cusage "usage: omagent --url http://IP:PORT/PATH --model NAME [-p PROMPT] [--workdir DIR]\n  [--session FILE] [--memory FILE] [--allow-cmd /ABS/PATH]... [--allow-write]\n  [--allow-fetch HOST:PORT]... [--timeout S] [--cmd-timeout S] [--max-rounds N]\n  [--key-env NAME] | --version | --help\nWithout -p, prompts are read from stdin, one per line. The API key is read from the\nenvironment variable OMAGENT_API_KEY (or --key-env NAME) and sent as a Bearer token.\n"
+text odurl "--url"
+text odmodel "--model"
+text odp "-p"
+text odwork "--workdir"
+text odsess "--session"
+text odmem "--memory"
+text odcmd "--allow-cmd"
+text odwrite "--allow-write"
+text odfetch "--allow-fetch"
+text odtmo "--timeout"
+text odctmo "--cmd-timeout"
+text odround "--max-rounds"
+text odkeyenv "--key-env"
+text odver "--version"
+text odhelp "--help"
+text cdefkey "OMAGENT_API_KEY"
+text chttp "http://"
+text chttps "https://"
+text clocal "localhost"
+text cpost "POST"
+text cget "GET"
+text chost "Host"
+text cctype "Content-Type"
+text cjson "application/json"
+text caccept "Accept"
+text cevst "text/event-stream"
+text cauth "Authorization"
+text cbearer "Bearer "
+text cnctype "content-type"
+text cevs "event-stream"
+text cslash "/"
+text cbody1 "{\"model\":\""
+text cbody2 "\",\"stream\":true,\"tools\":"
+text cbody3 ",\"messages\":["
+text ccomma ","
+text cbody4 "]}"
+text ctools "[{\"type\":\"function\",\"function\":{\"name\":\"read_file\",\"description\":\"Read a text file inside the workspace (at most 64 KiB).\",\"parameters\":{\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"path relative to the workspace\"}},\"required\":[\"path\"]}}},{\"type\":\"function\",\"function\":{\"name\":\"write_file\",\"description\":\"Create or replace a file inside the workspace.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"path relative to the workspace\"},\"content\":{\"type\":\"string\"}},\"required\":[\"path\",\"content\"]}}},{\"type\":\"function\",\"function\":{\"name\":\"run_command\",\"description\":\"Run an allowlisted program in the workspace. argv[0] is its absolute path; no shell, no environment.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"argv\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"argv\"]}}},{\"type\":\"function\",\"function\":{\"name\":\"http_fetch\",\"description\":\"GET an http:// URL on an allowlisted host:port (at most 64 KiB of body).\",\"parameters\":{\"type\":\"object\",\"properties\":{\"url\":{\"type\":\"string\"}},\"required\":[\"url\"]}}}]"
+text csys "You are omagent, a small coding agent. Answer briefly. Use the tools only when they are needed; file paths are relative to the workspace. A tool result that starts with refused: was blocked by the operator's permissions; do not retry it."
+text cmemh "\n\nMemory file:\n"
+text crole "role"
+text cuser "user"
+text cassist "assistant"
+text ctool "tool"
+text csystem "system"
+text ccontent "content"
+text ctoolc "tool_calls"
+text ctcid "tool_call_id"
+text cid "id"
+text ctype "type"
+text cfunc "function"
+text cname "name"
+text cargs "arguments"
+text cindex "index"
+text cdelta "delta"
+text cmessage "message"
+text cchoices "choices"
+text cfinish "finish_reason"
+text cerror "error"
+text cpath "path"
+text cargv "argv"
+text curl "url"
+text cdone "[DONE]"
+text ccall "call_"
+text tnread "read_file"
+text tnwrite "write_file"
+text tnrun "run_command"
+text tnfetch "http_fetch"
+text cdevnull "/dev/null"
+text ecfg "missing or bad option; see --help"
+text ekeybad "the API key holds bytes outside 0x21..0x7e; refusing it"
+text ework "cannot enter --workdir"
+text esess "cannot open or read --session file"
+text esline "session file line is not a valid message object; refusing to continue"
+text emem "cannot read --memory file"
+text econn "cannot connect to the model server"
+text ewrite "sending the request failed"
+text etmo "the model server timed out"
+text eread "reading the model response failed"
+text estat "the model server answered with status"
+text ebad "malformed model output"
+text ebig "malformed model output: a JSON reply or one SSE event is over 256 KiB"
+text eevj "malformed model output: an event is not a JSON object"
+text eserr "the model server sent an error object"
+text enodone "malformed model output: the stream ended before [DONE] or a finish_reason"
+text emany "malformed model output: more than 8 tool calls, or a bad index"
+text elong "malformed model output: a tool call field is too long"
+text econt "malformed model output: the reply is over 128 KiB"
+text emsg "a message could not be encoded (invalid UTF-8 or over 256 KiB)"
+text efull "the conversation history is full"
+text esave "cannot append to the session file"
+text eround "stopped: tool round limit reached (--max-rounds)"
+text ltool "tool "
+text lok ": ok"
+text lref ": refused"
+text lerr ": error"
+text rnoargs "error: tool arguments are not a JSON object"
+text runknown "refused: unknown tool "
+text rpatharg "error: the path argument must be a string"
+text rpath "refused: the path must be relative to the workspace, without empty, . or .. parts and without symbolic links"
+text ropen "error: cannot open the file, errno "
+text rreadf "error: reading the file failed, errno "
+text rtrunc "\n[truncated at 65536 bytes]"
+text rnowrite "refused: write_file is disabled (the operator did not pass --allow-write)"
+text rcontarg "error: the content argument must be a string under 256 KiB"
+text rwrote "ok: wrote "
+text rbytes " bytes to "
+text rwfail "error: writing the file failed, errno "
+text rnocmd "refused: run_command is disabled (the operator gave no --allow-cmd)"
+text rargv "error: argv must be an array of 1..63 strings"
+text rnotal "refused: the program is not on the --allow-cmd list: "
+text rnul "refused: an argument holds a zero byte"
+text rpack "refused: argv is over 4 KiB"
+text rpipe "error: cannot create a pipe or fork"
+text rexit "\n[exit status "
+text rsig "\n[killed by signal "
+text rtmo "\n[killed: timeout after "
+text rsec " s]"
+text rclose "]"
+text rnofet "refused: http_fetch is disabled (the operator gave no --allow-fetch)"
+text rurlarg "error: the url argument must be a string"
+text rnohttp "refused: only http:// URLs are supported by this build"
+text rurlbad "error: malformed url"
+text rnotfa "refused: the host:port is not on the --allow-fetch list: "
+text rconn "error: cannot connect"
+text rfreq "error: request failed"
+text rftmo "error: timed out"
+text rstatus "status="
+
+note ======== output and small helpers
+
+fn agwr fd int b view uchar * o ulong n ulong to bool
+p = ulong 0
+while lt p n bound 999999
+w = write fd b add o p sub n p
+if le w 0
+ret false
+end
+p = add p ulong w
+end
+ret true
+end
+
+fn agdec v ulong d edit uchar 24 to ulong
+t = new uchar 24 0
+k = ulong 0
+x = v
+for i ulong 21
+put t k uchar add 48 rem x 10
+k = add k 1
+x = div x 10
+if eq x 0
+break
+end
+end
+for j ulong k
+put d j get t sub sub k 1 j
+end
+ret k
+end
+
+fn agerr t view uchar * to void
+r = agwr 2 cpre 0 len cpre
+r = agwr 2 t 0 len t
+r = agwr 2 cnl 0 1
+end
+
+fn agerrn t view uchar * v ulong to void
+d = new uchar 24 0
+r = agwr 2 cpre 0 len cpre
+r = agwr 2 t 0 len t
+d2 = new uchar 1 32
+r = agwr 2 d2 0 1
+n = agdec v d
+r = agwr 2 d 0 n
+r = agwr 2 cnl 0 1
+end
+
+note ======== string pool for configuration (ids I*), filled once from argv and the environment
+
+fn agstash id ulong a view uchar * to bool
+u = get gnum QUSED
+n = len a
+if gt n sub 65536 u
+ret false
+end
+for i ulong n
+put gpool add u i get a i
+end
+put gsof id u
+put gsln id n
+put gnum QUSED add u n
+ret true
+end
+
+fn agsget id ulong d edit uchar * to ulong
+n = get gsln id
+if gt n len d
+ret 0
+end
+o = get gsof id
+for i ulong n
+put d i get gpool add o i
+end
+ret n
+end
+
+fn agseq id ulong a view uchar * to bool
+n = get gsln id
+if ne n len a
+ret false
+end
+o = get gsof id
+for i ulong n
+if ne get gpool add o i get a i
+ret false
+end
+end
+ret true
+end
+
+note ======== tool result buffer gres[0, QRES), status QTST 0 ok, 1 refused, 2 error
+
+fn agradd t view uchar * to void
+r = get gnum QRES
+for i ulong len t
+if ge r 69000
+break
+end
+put gres r get t i
+r = add r 1
+end
+put gnum QRES r
+end
+
+fn agrset st ulong t view uchar * to void
+put gnum QRES 0
+put gnum QTST st
+agradd t
+end
+
+fn agrnum v ulong to void
+d = new uchar 24 0
+n = agdec v d
+agradd view part d 0 n
+end
+
+fn agrerr t view uchar * e long to void
+agrset 2 t
+x = ulong 0
+if lt e 0
+x = ulong neg e
+end
+agrnum x
+end
+
+note agu8fix: replace every byte of gres that is not part of well-formed UTF-8 by '?', so the
+note JSON writer (which validates UTF-8) always accepts a tool result
+fn agu8fix to void
+n = get gnum QRES
+i = ulong 0
+while lt i n bound 999999
+c = get gres i
+if lt c 128
+i = add i 1
+continue
+end
+k = ulong 0
+lo = uchar 128
+hi = uchar 191
+if and ge c 194 le c 223
+k = 1
+end
+if and ge c 224 le c 239
+k = 2
+end
+if and ge c 240 le c 244
+k = 3
+end
+if eq c 224
+lo = 160
+end
+if eq c 237
+hi = 159
+end
+if eq c 240
+lo = 144
+end
+if eq c 244
+hi = 143
+end
+ok = and gt k 0 lt add i k n
+if ok
+b = get gres add i 1
+if or lt b lo gt b hi
+ok = false
+end
+end
+if ok
+for j ulong sub k 1
+b2 = get gres add add i 2 j
+if or lt b2 128 gt b2 191
+ok = false
+end
+end
+end
+if ok
+i = add add i k 1
+else
+put gres i 63
+i = add i 1
+end
+end
+end
+
+note ======== URLs: http://HOST[:PORT][/PATH]; HOST is a dotted IPv4 address or localhost
+note r: 0 ip, 1 port, 2 authority offset, 3 authority length, 4 path offset, 5 path length, 6 host length
+
+fn agip4 u view uchar * o ulong n ulong to long
+v = ulong 0
+part4 = ulong 0
+dig = ulong 0
+cnt = ulong 0
+for i ulong n
+c = get u add o i
+if eq c 46
+if or eq dig 0 gt part4 255
+ret -1
+end
+v = or shl v 8 part4
+cnt = add cnt 1
+part4 = 0
+dig = 0
+continue
+end
+if or lt c 48 gt c 57
+ret -1
+end
+part4 = add mul part4 10 ulong sub c 48
+dig = add dig 1
+if gt dig 3
+ret -1
+end
+end
+if or or eq dig 0 gt part4 255 ne cnt 3
+ret -1
+end
+ret long or shl v 8 part4
+end
+
+fn agurl u view uchar * r edit ulong 8 to long
+n = len u
+if and ge n 8 heq view part u 0 8 chttps
+ret -1
+end
+if or lt n 8 not heq view part u 0 7 chttp
+ret -1
+end
+a = ulong 7
+e = a
+while lt e n bound 999999
+if eq get u e 47
+break
+end
+e = add e 1
+end
+if eq e a
+ret -2
+end
+hl = sub e a
+port = ulong 80
+for i ulong sub e a
+if eq get u add a i 58
+hl = i
+pd = add add a i 1
+if or eq pd e gt sub e pd 5
+ret -2
+end
+if not hdigits view part u pd sub e pd
+ret -2
+end
+port = hdecv view part u pd sub e pd
+break
+end
+end
+if or eq port 0 gt port 65535
+ret -2
+end
+ip = long 0
+if heq view part u a hl clocal
+ip = 2130706433
+else
+ip = agip4 u a hl
+end
+if lt ip 0
+ret -2
+end
+for j ulong sub n e
+c = get u add e j
+if or le c 32 ge c 127
+ret -2
+end
+end
+put r 0 ulong ip
+put r 1 port
+put r 2 a
+put r 3 sub e a
+put r 4 e
+put r 5 sub n e
+put r 6 hl
+ret 0
+end
+
+note ======== command line
+
+fn agnamech c uchar to bool
+if and ge c 97 le c 122
+ret true
+end
+if and ge c 65 le c 90
+ret true
+end
+if and ge c 48 le c 57
+ret true
+end
+ret or or or eq c 46 eq c 95 or eq c 58 eq c 47 or or eq c 45 eq c 64 eq c 43
+end
+
+fn agsetnum ab view uchar 65536 n ulong slot ulong mul1 ulong to bool
+if not hdigits view part ab 0 n
+ret false
+end
+v = hdecv view part ab 0 n
+if or eq v 0 gt v 86400
+ret false
+end
+put gnum slot mul v mul1
+ret true
+end
+
+fn agseturl ab view uchar 65536 n ulong to bool
+r = new ulong 8 0
+rc = agurl view part ab 0 n r
+if lt rc 0
+ret false
+end
+put gnum QIP get r 0
+put gnum QPORT get r 1
+put gnum QURL 1
+if eq get r 5 0
+if not agstash IPATH cslash
+ret false
+end
+else
+if not agstash IPATH view part ab get r 4 get r 5
+ret false
+end
+end
+ret agstash IHOST view part ab get r 2 get r 3
+end
+
+fn agsetmodel ab view uchar 65536 n ulong to bool
+if or eq n 0 gt n 200
+ret false
+end
+for i ulong n
+if not agnamech get ab i
+ret false
+end
+end
+put gnum QMODEL 1
+ret agstash IMODEL view part ab 0 n
+end
+
+note agopt1: one option that takes a value; ab holds the value, n its length
+fn agopt1 op ulong ab view uchar 65536 n ulong to bool
+if eq op 1
+ret agseturl ab n
+end
+if eq op 2
+ret agsetmodel ab n
+end
+if eq op 3
+if eq n 0
+ret false
+end
+ret agstash IPROMPT view part ab 0 n
+end
+if eq op 4
+ret and gt n 0 agstash IWORK view part ab 0 n
+end
+if eq op 5
+ret and gt n 0 agstash ISESS view part ab 0 n
+end
+if eq op 6
+ret and gt n 0 agstash IMEM view part ab 0 n
+end
+if eq op 7
+k = get gnum QNCMD
+if or or ge k 16 lt n 2 ne get ab 0 47
+ret false
+end
+put gnum QNCMD add k 1
+ret agstash add ICMD k view part ab 0 n
+end
+if eq op 8
+k2 = get gnum QNFET
+if or ge k2 16 eq n 0
+ret false
+end
+put gnum QNFET add k2 1
+ret agstash add IFET k2 view part ab 0 n
+end
+if eq op 9
+ret agsetnum ab n QTMO 1000000000
+end
+if eq op 10
+ret agsetnum ab n QCTMO 1000000000
+end
+if eq op 11
+if not agsetnum ab n QROUND 1
+ret false
+end
+ret le get gnum QROUND 64
+end
+if eq op 12
+ret and gt n 0 agstash IKEYENV view part ab 0 n
+end
+ret false
+end
+
+fn agoptid ab view uchar 65536 n ulong to ulong
+if heq view part ab 0 n odurl
+ret 1
+end
+if heq view part ab 0 n odmodel
+ret 2
+end
+if heq view part ab 0 n odp
+ret 3
+end
+if heq view part ab 0 n odwork
+ret 4
+end
+if heq view part ab 0 n odsess
+ret 5
+end
+if heq view part ab 0 n odmem
+ret 6
+end
+if heq view part ab 0 n odcmd
+ret 7
+end
+if heq view part ab 0 n odfetch
+ret 8
+end
+if heq view part ab 0 n odtmo
+ret 9
+end
+if heq view part ab 0 n odctmo
+ret 10
+end
+if heq view part ab 0 n odround
+ret 11
+end
+if heq view part ab 0 n odkeyenv
+ret 12
+end
+if heq view part ab 0 n odwrite
+ret 20
+end
+if heq view part ab 0 n odver
+ret 21
+end
+if heq view part ab 0 n odhelp
+ret 22
+end
+ret 0
+end
+
+note agargs: 0 ready, 1 printed --version/--help (exit 0), 2 usage error
+fn agargs to int
+ab = new uchar 65536 0
+c = ulong argcnt
+put gnum QTMO 120000000000
+put gnum QCTMO 10000000000
+put gnum QROUND 8
+ok = agstash IKEYENV cdefkey
+i = ulong 1
+while lt i c bound 9999
+n = argread i ab 0 65536
+if lt n 0
+agerr ecfg
+ret 2
+end
+op = agoptid ab ulong n
+if eq op 0
+agerr ecfg
+ret 2
+end
+if eq op 20
+put gnum QWRITE 1
+i = add i 1
+continue
+end
+if eq op 21
+ok = agwr 1 cver 0 len cver
+ret 1
+end
+if eq op 22
+ok = agwr 1 cusage 0 len cusage
+ret 1
+end
+if ge add i 1 c
+agerr ecfg
+ret 2
+end
+n2 = argread add i 1 ab 0 65536
+if lt n2 0
+agerr ecfg
+ret 2
+end
+if not agopt1 op ab ulong n2
+agerr ecfg
+ret 2
+end
+i = add i 2
+end
+if or eq get gnum QURL 0 eq get gnum QMODEL 0
+agerr ecfg
+ok = agwr 2 cusage 0 len cusage
+ret 2
+end
+ret 0
+end
+
+fn agkeyok eb view uchar 8192 o ulong n ulong to bool
+if or eq n 0 gt n 4000
+ret false
+end
+for j ulong n
+c = get eb add o j
+if or lt c 33 gt c 126
+ret false
+end
+end
+ret true
+end
+
+note agkeyload: find KEYENV=VALUE in the environment; the value goes to the pool only
+fn agkeyload to int
+eb = new uchar 8192 0
+kn = new uchar 256 0
+k = agsget IKEYENV kn
+if eq k 0
+ret 0
+end
+rc = int 0
+for i ulong ulong envcnt
+n = envread i eb 0 8192
+if le n long k
+continue
+end
+if ne get eb k 61
+continue
+end
+if not heq view part eb 0 k view part kn 0 k
+continue
+end
+vl = sub ulong n add k 1
+if agkeyok eb add k 1 vl
+ok = agstash IKEY view part eb add k 1 vl
+put gnum QHAVEK 1
+else
+agerr ekeybad
+rc = 2
+end
+break
+end
+for z ulong 8192
+put eb z 0
+end
+ret rc
+end
+
+note agmemload: --memory FILE (read before chdir) into gmem, at most 65535 bytes, UTF-8 repaired
+fn agmemload to int
+if eq get gsln IMEM 0
+ret 0
+end
+pb = new uchar 4096 0
+pn = agsget IMEM pb
+if eq pn 0
+agerr emem
+ret 8
+end
+fd = fopen pb 0 pn 524288 0
+if lt fd 0
+agerr emem
+ret 8
+end
+got = ulong 0
+while lt got 65535 bound 999999
+r = read int fd gres got sub 65535 got
+if lt r 0
+agerr emem
+ret 8
+end
+if eq r 0
+break
+end
+got = add got ulong r
+end
+r2 = fclose int fd
+put gnum QRES got
+agu8fix
+for i ulong got
+put gmem i get gres i
+end
+put gnum QMEML got
+put gnum QRES 0
+ret 0
+end
+
+note ======== conversation history: hb holds the message objects joined by commas; gmb/gmr
+note record each object's offset and role (1 user, 2 assistant, 3 tool, 4 system, 5 assistant
+note with tool_calls). The session file holds the same objects, one per line.
+
+fn agkey src view uchar 262144 tp view uint 65536 obj ulong key view uchar * to ulong
+if ne js_type tp obj jsobj
+ret jsnone
+end
+k = js_first tp obj
+while ne k jsnone bound 999999
+if js_streq src js_off tp k key
+ret add k 1
+end
+k = js_mnext tp k
+end
+ret jsnone
+end
+
+fn agrole src view uchar 262144 tp view uint 65536 to ulong
+if ne js_type tp 0 jsobj
+ret 0
+end
+r = agkey src tp 0 crole
+if eq r jsnone
+ret 0
+end
+if ne js_type tp r jsstr
+ret 0
+end
+o = js_off tp r
+if js_streq src o cuser
+ret 1
+end
+if js_streq src o cassist
+if ne agkey src tp 0 ctoolc jsnone
+ret 5
+end
+ret 2
+end
+if js_streq src o ctool
+ret 3
+end
+if js_streq src o csystem
+ret 4
+end
+ret 0
+end
+
+note agfront: drop the records before index k (k may equal the count: drop all)
+fn agfront hb edit uchar 1048576 k ulong to void
+n = get gnum QNREC
+h = get gnum QHBL
+if eq k 0
+ret
+end
+if ge k n
+put gnum QNREC 0
+put gnum QHBL 0
+ret
+end
+off = get gmb k
+hmove hb 0 off sub h off
+for j ulong sub n k
+put gmb j sub get gmb add j k off
+put gmr j get gmr add j k
+end
+put gnum QNREC sub n k
+put gnum QHBL sub h off
+end
+
+note agtrim: an interrupted turn (history ending in user, tool, or assistant with tool_calls)
+note is dropped back to before its user message
+fn agtrim to void
+n = get gnum QNREC
+if eq n 0
+ret
+end
+last = get gmr sub n 1
+if eq last 2
+ret
+end
+u = n
+for i ulong n
+j = sub sub n 1 i
+if eq get gmr j 1
+u = j
+break
+end
+end
+if eq u n
+put gnum QNREC 0
+put gnum QHBL 0
+ret
+end
+put gnum QNREC u
+if eq u 0
+put gnum QHBL 0
+else
+put gnum QHBL sub get gmb u 1
+end
+end
+
+note agcompact: before a turn, keep the newest whole turns within 512 KiB and 4096 records
+fn agcompact hb edit uchar 1048576 to void
+n = get gnum QNREC
+h = get gnum QHBL
+if and le h 524288 le n 4096
+ret
+end
+k = n
+for i ulong n
+if eq get gmr i 1
+if le sub h get gmb i 524288
+if le sub n i 4096
+k = i
+break
+end
+end
+end
+end
+agfront hb k
+end
+
+fn agappend wb edit uchar 263184 hb edit uchar 1048576 role ulong to int
+r = js_wdone wb
+if lt r 0
+agerr emsg
+ret 9
+end
+m = ulong r
+if gt m QMSG
+agerr emsg
+ret 9
+end
+h = get gnum QHBL
+k = get gnum QNREC
+if or gt add add h m 1 1048576 ge k 8192
+agerr efull
+ret 9
+end
+if gt h 0
+put hb h 44
+h = add h 1
+end
+for i ulong m
+put hb add h i get wb add 1040 i
+end
+put gmb k h
+put gmr k uchar role
+put gnum QNREC add k 1
+put gnum QHBL add h m
+if eq get gnum QSESS 1
+fd = int get gnum QSFD
+ok = agwr fd wb 1040 m
+ok2 = agwr fd cnl 0 1
+if not and ok ok2
+agerr esave
+ret 8
+end
+end
+ret 0
+end
+
+note agsread: open --session FILE (O_RDWR|O_CREAT|O_APPEND|O_CLOEXEC, mode 0600) and read its
+note last 768 KiB into hb, starting at a line boundary; returns the byte count or -1
+fn agsread hb edit uchar 1048576 to long
+pb = new uchar 4096 0
+st = new uchar 128 0
+pn = agsget ISESS pb
+fd = fopen pb 0 pn 525378 384
+if lt fd 0
+ret -1
+end
+put gnum QSFD ulong fd
+put gnum QSESS 1
+r = fstat int fd st 0 128
+if lt r 0
+ret -1
+end
+sz = ulong 0
+for b ulong 8
+sz = or shl sz 8 ulong get st sub 55 b
+end
+start = ulong 0
+if gt sz 786432
+start = sub sz 786432
+end
+got = ulong 0
+while lt got sub sz start bound 999999
+r = pread int fd hb got sub sub sz start got long add start got
+if lt r 0
+ret -1
+end
+if eq r 0
+break
+end
+got = add got ulong r
+end
+if eq start 0
+ret long got
+end
+p = ulong 0
+while lt p got bound 999999
+if eq get hb p 10
+break
+end
+p = add p 1
+end
+if ge p got
+ret 0
+end
+hmove hb 0 add p 1 sub got add p 1
+ret long sub got add p 1
+end
+
+note agsrec: check one session line hb[p, p+ln) and append it at w; returns the role or 0
+fn agsrec hb edit uchar 1048576 p ulong ln ulong w ulong to ulong
+lb = new uchar 262144 0
+tp = new uint 65536 0
+if gt ln 262144
+ret 0
+end
+ri = js_init tp 262144 64
+for i ulong ln
+put lb i get hb add p i
+end
+pr = js_parse lb tp ln
+if lt pr 0
+ret 0
+end
+ro = agrole lb tp
+if ne ro 0
+hmove hb w p ln
+end
+ret ro
+end
+
+note agsload: rebuild hb, gmb and gmr from the session file; every line must be a message object
+fn agsload hb edit uchar 1048576 to int
+if eq get gsln ISESS 0
+ret 0
+end
+got = agsread hb
+if lt got 0
+agerr esess
+ret 8
+end
+n = ulong got
+p = ulong 0
+w = ulong 0
+k = ulong 0
+while lt p n bound 999999
+e = p
+while lt e n bound 999999
+if eq get hb e 10
+break
+end
+e = add e 1
+end
+if gt e p
+if gt w 0
+put hb w 44
+w = add w 1
+end
+ro = ulong 0
+if lt k 8192
+ro = agsrec hb p sub e p w
+end
+if eq ro 0
+agerr esline
+ret 8
+end
+put gmb k w
+put gmr k uchar ro
+k = add k 1
+w = add w sub e p
+end
+p = add e 1
+end
+put gnum QNREC k
+put gnum QHBL w
+agtrim
+u = get gnum QNREC
+for i ulong u
+if eq get gmr i 1
+u = i
+break
+end
+end
+agfront hb u
+ret 0
+end
+
+note ======== messages written with the JSON writer (wb: 1040 state bytes + 262144 text bytes)
+
+fn agwstr wb edit uchar 263184 t view uchar * to void
+js_wsbuf wb t 0 len t
+end
+
+fn agsysmsg wb edit uchar 263184 to long
+r = js_winit wb
+js_wobj wb
+agwstr wb crole
+agwstr wb csystem
+agwstr wb ccontent
+js_wsbeg wb
+for i ulong len csys
+js_wsb wb get csys i
+end
+ml = get gnum QMEML
+if gt ml 0
+for j ulong len cmemh
+js_wsb wb get cmemh j
+end
+for k ulong ml
+js_wsb wb get gmem k
+end
+end
+js_wsend wb
+js_wobje wb
+ret js_wdone wb
+end
+
+fn agwuser wb edit uchar 263184 ub view uchar 65536 un ulong to void
+r = js_winit wb
+js_wobj wb
+agwstr wb crole
+agwstr wb cuser
+agwstr wb ccontent
+js_wsbuf wb ub 0 un
+js_wobje wb
+end
+
+note agwg: write one JSON string from a global: 0 gtid, 1 gtnm, 2 gtarg, 3 gcont, 4 gres
+fn agwg wb edit uchar 263184 sel ulong off ulong n ulong to void
+js_wsbeg wb
+for i ulong n
+c = uchar 0
+if eq sel 0
+c = get gtid add off i
+end
+if eq sel 1
+c = get gtnm add off i
+end
+if eq sel 2
+c = get gtarg add off i
+end
+if eq sel 3
+c = get gcont add off i
+end
+if eq sel 4
+c = get gres add off i
+end
+js_wsb wb c
+end
+js_wsend wb
+end
+
+fn agwcall wb edit uchar 263184 c ulong to void
+js_wobj wb
+agwstr wb cid
+agwg wb 0 mul c 256 get gst add SID c
+agwstr wb ctype
+agwstr wb cfunc
+agwstr wb cfunc
+js_wobj wb
+agwstr wb cname
+agwg wb 1 mul c 128 get gst add SNM c
+agwstr wb cargs
+agwg wb 2 mul c 65536 get gst add SARG c
+js_wobje wb
+js_wobje wb
+end
+
+fn agwasst wb edit uchar 263184 to void
+r = js_winit wb
+js_wobj wb
+agwstr wb crole
+agwstr wb cassist
+agwstr wb ccontent
+nc = get gst SNC
+if and eq get gst SCLEN 0 gt nc 0
+js_wnull wb
+else
+agwg wb 3 0 get gst SCLEN
+end
+if gt nc 0
+agwstr wb ctoolc
+js_warr wb
+for c ulong nc
+agwcall wb c
+end
+js_warre wb
+end
+js_wobje wb
+end
+
+fn agwtool wb edit uchar 263184 c ulong to void
+r = js_winit wb
+js_wobj wb
+agwstr wb crole
+agwstr wb ctool
+agwstr wb ctcid
+agwg wb 0 mul c 256 get gst add SID c
+agwstr wb ccontent
+agwg wb 4 0 get gnum QRES
+js_wobje wb
+end
+
+note agfixids: a call without an id gets call_N, so its tool message can name it
+fn agfixids to void
+for c ulong get gst SNC
+if eq get gst add SID c 0
+for i ulong len ccall
+put gtid add mul c 256 i get ccall i
+end
+put gtid add mul c 256 len ccall uchar add 48 c
+put gst add SID c add len ccall 1
+end
+end
+end
+
+note ======== model response: SSE events or one JSON body; both carry choices[0].delta|message
+
+note agapp: append dc[0, n) to field sel (0 id, 1 name, 2 arguments) of tool call ix
+fn agapp sel ulong ix ulong dc view uchar 262144 n ulong to bool
+slot = add SID ix
+cap = ulong 255
+if eq sel 1
+slot = add SNM ix
+cap = 127
+end
+if eq sel 2
+slot = add SARG ix
+cap = 65535
+end
+l = get gst slot
+if gt n sub cap l
+ret false
+end
+b = add mul ix add cap 1 l
+if eq sel 0
+for i ulong n
+put gtid add b i get dc i
+end
+end
+if eq sel 1
+for j ulong n
+put gtnm add b j get dc j
+end
+end
+if eq sel 2
+for k ulong n
+put gtarg add b k get dc k
+end
+end
+put gst slot add l n
+ret true
+end
+
+note agtcstr: field sel of call ix from value v (absent: nothing; a string: decoded and appended;
+note an object as arguments: its raw JSON text appended)
+fn agtcstr src view uchar 262144 tp view uint 65536 v ulong sel ulong ix ulong dc edit uchar 262144 to int
+if eq v jsnone
+ret 0
+end
+t = js_type tp v
+if eq t jsnull
+ret 0
+end
+if eq t jsstr
+n = js_sget src js_off tp v dc
+if lt n 0
+agerr ebad
+ret 6
+end
+if not agapp sel ix dc ulong n
+agerr elong
+ret 6
+end
+ret 0
+end
+if and eq sel 2 eq t jsobj
+o = js_off tp v
+sp = js_span tp v
+for i ulong sp
+put dc i get src add o i
+end
+if not agapp sel ix dc sp
+agerr elong
+ret 6
+end
+ret 0
+end
+agerr ebad
+ret 6
+end
+
+fn agtcix src view uchar 262144 tp view uint 65536 e ulong pos ulong to ulong
+xi = agkey src tp e cindex
+if eq xi jsnone
+ret pos
+end
+if ne js_type tp xi jsnum
+ret QMAXC
+end
+if not js_isu src js_off tp xi
+ret QMAXC
+end
+ret js_tou src js_off tp xi
+end
+
+fn agtcdelta src view uchar 262144 tp view uint 65536 e ulong pos ulong dc edit uchar 262144 to int
+if ne js_type tp e jsobj
+agerr ebad
+ret 6
+end
+ix = agtcix src tp e pos
+if ge ix QMAXC
+agerr emany
+ret 6
+end
+if ge ix get gst SNC
+put gst SNC add ix 1
+end
+id = agkey src tp e cid
+if ne id jsnone
+put gst add SID ix 0
+end
+rc = agtcstr src tp id 0 ix dc
+if ne rc 0
+ret rc
+end
+fu = agkey src tp e cfunc
+if eq fu jsnone
+ret 0
+end
+if ne js_type tp fu jsobj
+agerr ebad
+ret 6
+end
+rc = agtcstr src tp agkey src tp fu cname 1 ix dc
+if ne rc 0
+ret rc
+end
+ret agtcstr src tp agkey src tp fu cargs 2 ix dc
+end
+
+fn agdelta src view uchar 262144 tp view uint 65536 d ulong dc edit uchar 262144 to int
+if ne js_type tp d jsobj
+agerr ebad
+ret 6
+end
+c = agkey src tp d ccontent
+if and ne c jsnone eq js_type tp c jsstr
+n = js_sget src js_off tp c dc
+if lt n 0
+agerr ebad
+ret 6
+end
+l = get gst SCLEN
+nn = ulong n
+if gt nn sub QCONC l
+agerr econt
+ret 6
+end
+for i ulong nn
+put gcont add l i get dc i
+end
+put gst SCLEN add l nn
+ok = agwr 1 dc 0 nn
+end
+tc = agkey src tp d ctoolc
+if eq tc jsnone
+ret 0
+end
+if eq js_type tp tc jsnull
+ret 0
+end
+if ne js_type tp tc jsarr
+agerr ebad
+ret 6
+end
+e = js_first tp tc
+pos = ulong 0
+while ne e jsnone bound 999999
+rc = agtcdelta src tp e pos dc
+if ne rc 0
+ret rc
+end
+e = js_enext tp e
+pos = add pos 1
+end
+ret 0
+end
+
+note agchunk: one parsed JSON object (an SSE event or a whole body) of n bytes in src
+fn agchunk src view uchar 262144 tp edit uint 65536 n ulong dc edit uchar 262144 to int
+pr = js_parse src tp n
+if lt pr 0
+agerr eevj
+ret 6
+end
+if ne js_type tp 0 jsobj
+agerr eevj
+ret 6
+end
+if ne agkey src tp 0 cerror jsnone
+agerr eserr
+ret 6
+end
+ch = agkey src tp 0 cchoices
+if eq ch jsnone
+ret 0
+end
+if ne js_type tp ch jsarr
+agerr ebad
+ret 6
+end
+c0 = js_first tp ch
+if eq c0 jsnone
+ret 0
+end
+if ne js_type tp c0 jsobj
+agerr ebad
+ret 6
+end
+fr = agkey src tp c0 cfinish
+if ne fr jsnone
+if eq js_type tp fr jsstr
+put gst SFIN 1
+end
+end
+d = agkey src tp c0 cdelta
+if eq d jsnone
+d = agkey src tp c0 cmessage
+end
+if eq d jsnone
+ret 0
+end
+ret agdelta src tp d dc
+end
+
+fn agrderr n long to int
+if eq n HETIME
+agerr etmo
+ret 5
+end
+if eq n HEBIG
+agerr ebig
+ret 6
+end
+agerr eread
+ret 5
+end
+
+note agevent: one ready SSE event in lb; 1 at [DONE], 0 to go on, else an exit code
+fn agevent ss edit ulong 16 lb view uchar 262400 eb edit uchar 262144 tp edit uint 65536 dc edit uchar 262144 to int
+dl = get ss HSDLEN
+hssenext ss
+if eq dl 6
+if heq view part lb 128 6 cdone
+ret 1
+end
+end
+if gt dl 262144
+agerr ebig
+ret 6
+end
+if eq dl 0
+ret 0
+end
+for i ulong dl
+put eb i get lb add 128 i
+end
+ret agchunk eb tp dl dc
+end
+
+note agfeed: feed src[0, gst 40) to the SSE parser; 1 at [DONE], 0 to read on, else an exit code
+fn agfeed ss edit ulong 16 lb edit uchar 262400 src view uchar 4096 eb edit uchar 262144 tp edit uint 65536 dc edit uchar 262144 to int
+off = ulong 0
+while lt off get gst 40 bound 999999
+c = hssefeed ss lb view part src off sub get gst 40 off
+if lt c 0
+agerr ebad
+ret 6
+end
+off = add off ulong c
+if eq get ss HSRDY 0
+if eq c 0
+agerr ebad
+ret 6
+end
+continue
+end
+rc = agevent ss lb eb tp dc
+if ne rc 0
+ret rc
+end
+end
+ret 0
+end
+
+note agsse: read the SSE body until [DONE] (or the end of the body after a finish_reason)
+fn agsse cs edit ulong 320 io edit uchar 131072 eb edit uchar 262144 tp edit uint 65536 dc edit uchar 262144 to int
+ss = new ulong 16 0
+lb = new uchar 262400 0
+src = new uchar 4096 0
+r = hsseinit ss
+for it ulong 16777216
+n = hbodyrd cs io src
+if lt n 0
+ret agrderr n
+end
+if eq n 0
+break
+end
+put gst 40 ulong n
+rc = agfeed ss lb src eb tp dc
+if eq rc 1
+ret 0
+end
+if ne rc 0
+ret rc
+end
+end
+if eq get gst SFIN 0
+agerr enodone
+ret 6
+end
+ret 0
+end
+
+fn agjsonbody cs edit ulong 320 io edit uchar 131072 eb edit uchar 262144 tp edit uint 65536 dc edit uchar 262144 to int
+n = hbodyall cs io eb
+if lt n 0
+ret agrderr n
+end
+ret agchunk eb tp ulong n dc
+end
+
+fn agresp cs edit ulong 320 io edit uchar 131072 sse bool to int
+eb = new uchar 262144 0
+tp = new uint 65536 0
+dc = new uchar 262144 0
+ri = js_init tp 262144 64
+if sse
+ret agsse cs io eb tp dc
+end
+ret agjsonbody cs io eb tp dc
+end
+
+fn agissse cs edit ulong 320 io edit uchar 131072 to bool
+i = hhfind cs io cnctype
+if lt i 0
+ret false
+end
+vo = hhvoff cs ulong i
+vl = hhvlen cs ulong i
+m = len cevs
+if lt vl m
+ret false
+end
+for s ulong add sub vl m 1
+if heq view part io add vo s m cevs
+ret true
+end
+end
+ret false
+end
+
+fn agstatus cs edit ulong 320 io edit uchar 131072 st long to int
+agerrn estat ulong st
+b = new uchar 512 0
+n = hbodyrd cs io b
+if gt n 0
+for i ulong ulong n
+c = get b i
+if or lt c 32 gt c 126
+put b i 32
+end
+end
+ok = agwr 2 cpre 0 len cpre
+ok = agwr 2 b 0 ulong n
+ok = agwr 2 cnl 0 1
+end
+r = hclose cs
+ret 4
+end
+
+note agconn: connect to ip:port (5 s connect limit) and set idle and body deadlines t (ns)
+fn agconn cs edit ulong 320 io edit uchar 131072 ip ulong port ulong t long to long
+a = new uchar 16 0
+r = haddr4 a uint ip port
+fd = hdial a 5000000000
+if lt fd 0
+ret fd
+end
+r = hinit cs io int fd 0
+hsettmo cs t t
+hsetbdl cs t
+ret 0
+end
+
+note agauth: the Authorization header, built in a local that is zeroed before return
+fn agauth cs edit ulong 320 io edit uchar 131072 r long to long
+if eq get gnum QHAVEK 0
+ret r
+end
+kb = new uchar 4200 0
+for i ulong len cbearer
+put kb i get cbearer i
+end
+ko = get gsof IKEY
+kl = get gsln IKEY
+for j ulong kl
+put kb add len cbearer j get gpool add ko j
+end
+x = hfe r hhname cs io cauth
+x = hfe x hhval cs io view part kb 0 add len cbearer kl
+for z ulong 4200
+put kb z 0
+end
+ret x
+end
+
+fn aghead cs edit ulong 320 io edit uchar 131072 sn ulong to long
+pb = new uchar 8192 0
+hh = new uchar 256 0
+pn = agsget IPATH pb
+hl = agsget IHOST hh
+r = hreqst cs io cpost
+r = hfe r hreqtg cs io view part pb 0 pn
+r = hfe r hhname cs io chost
+r = hfe r hhval cs io view part hh 0 hl
+r = hfe r hhname cs io cctype
+r = hfe r hhval cs io cjson
+r = hfe r hhname cs io caccept
+r = hfe r hhval cs io cevst
+r = agauth cs io r
+c = add add len cbody1 get gsln IMODEL add len cbody2 len ctools
+c = add c add add len cbody3 sn add 1 len cbody4
+c = add c get gnum QHBL
+ret hfe r hhend cs io 0 c
+end
+
+fn agbody cs edit ulong 320 io edit uchar 131072 hb view uchar 1048576 wb view uchar 263184 sn ulong r long to long
+mb = new uchar 256 0
+mn = agsget IMODEL mb
+r = hfe r hput cs io cbody1
+r = hfe r hput cs io view part mb 0 mn
+r = hfe r hput cs io cbody2
+r = hfe r hput cs io ctools
+r = hfe r hput cs io cbody3
+r = hfe r hput cs io view part wb 1040 sn
+r = hfe r hput cs io ccomma
+r = hfe r hput cs io view part hb 0 get gnum QHBL
+r = hfe r hput cs io cbody4
+ret hfe r hwfin cs io
+end
+
+note agreq: one chat-completions request (stream: true) over a fresh connection
+fn agreq cs edit ulong 320 io edit uchar 131072 hb edit uchar 1048576 wb edit uchar 263184 to int
+sr = agsysmsg wb
+if lt sr 0
+agerr emsg
+ret 9
+end
+r = agconn cs io get gnum QIP get gnum QPORT long get gnum QTMO
+if lt r 0
+agerr econn
+ret 3
+end
+r = aghead cs io ulong sr
+r = agbody cs io hb wb ulong sr r
+if lt r 0
+x = hclose cs
+if eq r HETIME
+agerr etmo
+ret 5
+end
+agerr ewrite
+ret 3
+end
+st = hrsprd cs io
+if lt st 0
+x = hclose cs
+ret agrderr st
+end
+if ne st 200
+ret agstatus cs io st
+end
+rc = agresp cs io agissse cs io
+x = hclose cs
+ret rc
+end
+
+note ======== tools
+
+fn agargstr src view uchar 262144 tp view uint 65536 key view uchar * d edit uchar * to long
+v = agkey src tp 0 key
+if eq v jsnone
+ret -1
+end
+if ne js_type tp v jsstr
+ret -1
+end
+n = js_sget src js_off tp v d
+if lt n 0
+ret -2
+end
+ret n
+end
+
+note agpathok: relative, every part nonempty and not . or .., no control bytes, and no part
+note (checked with lstat, prefix by prefix) is a symbolic link
+note agcomp: the part p[s, i) is not empty, . or .., and the prefix p[0, i) is not a symbolic link
+fn agcomp p view uchar * s ulong i ulong to bool
+cl = sub i s
+if eq cl 0
+ret false
+end
+if eq get p s 46
+if eq cl 1
+ret false
+end
+if eq cl 2
+if eq get p add s 1 46
+ret false
+end
+end
+end
+st = new uchar 128 0
+r = lstat p 0 i st 0 128
+if lt r 0
+ret true
+end
+md = or ulong get st 16 shl ulong get st 17 8
+ret ne and md 61440 40960
+end
+
+fn agpathok p view uchar * to bool
+n = len p
+if or eq n 0 gt n 4095
+ret false
+end
+if eq get p 0 47
+ret false
+end
+s = ulong 0
+for i ulong add n 1
+c = uchar 47
+if lt i n
+c = get p i
+if or lt c 32 eq c 127
+ret false
+end
+end
+if eq c 47
+if not agcomp p s i
+ret false
+end
+s = add i 1
+end
+end
+ret true
+end
+
+fn agtread ab view uchar 262144 tp view uint 65536 to void
+pb = new uchar 4096 0
+one = new uchar 1 0
+n = agargstr ab tp cpath pb
+if lt n 0
+agrset 2 rpatharg
+ret
+end
+pn = ulong n
+if not agpathok view part pb 0 pn
+agrset 1 rpath
+ret
+end
+fd = fopen pb 0 pn 557056 0
+if lt fd 0
+agrerr ropen fd
+ret
+end
+put gnum QTST 0
+got = ulong 0
+while lt got QRESC bound 999999
+r = read int fd gres got sub QRESC got
+if lt r 0
+r2 = fclose int fd
+agrerr rreadf r
+ret
+end
+if eq r 0
+break
+end
+got = add got ulong r
+end
+put gnum QRES got
+if eq got QRESC
+r3 = read int fd one 0 1
+if gt r3 0
+agradd rtrunc
+end
+end
+r4 = fclose int fd
+end
+
+fn agtwrite ab view uchar 262144 tp view uint 65536 to void
+if eq get gnum QWRITE 0
+agrset 1 rnowrite
+ret
+end
+pb = new uchar 4096 0
+cb = new uchar 262144 0
+n = agargstr ab tp cpath pb
+if lt n 0
+agrset 2 rpatharg
+ret
+end
+pn = ulong n
+if not agpathok view part pb 0 pn
+agrset 1 rpath
+ret
+end
+cn = agargstr ab tp ccontent cb
+if lt cn 0
+agrset 2 rcontarg
+ret
+end
+fd = fopen pb 0 pn 557633 420
+if lt fd 0
+agrerr ropen fd
+ret
+end
+p = ulong 0
+m = ulong cn
+while lt p m bound 999999
+w = write int fd cb p sub m p
+if le w 0
+r = fclose int fd
+agrerr rwfail w
+ret
+end
+p = add p ulong w
+end
+r2 = fclose int fd
+agrset 0 rwrote
+agrnum m
+agradd rbytes
+agradd view part pb 0 pn
+end
+
+fn agallowed base ulong cnt ulong a view uchar * to bool
+for k ulong cnt
+if agseq add base k a
+ret true
+end
+end
+ret false
+end
+
+note agspawn: fork and run the packed argv with stdout and stderr on a close-on-exec pipe and stdin
+note on /dev/null; returns the child pid (the pipe's read end in gnum 22) or a negative errno
+fn agspawn pk view uchar 4096 pn ulong to long
+pf = new uchar 8 0
+r = pipefds pf 0 8 524288
+if lt r 0
+ret r
+end
+rfd = int or ulong get pf 0 shl ulong get pf 1 8
+wfd = int or ulong get pf 4 shl ulong get pf 5 8
+dn = fopen cdevnull 0 len cdevnull 524288 0
+pid = fork
+if eq pid 0
+r = dupfd wfd 1 0
+r = dupfd wfd 2 0
+if ge dn 0
+r = dupfd int dn 0 0
+end
+r = execprog pk 0 pn
+exit 127
+end
+r = fclose wfd
+if ge dn 0
+r = fclose int dn
+end
+if lt pid 0
+r = fclose rfd
+ret pid
+end
+put gnum 22 ulong rfd
+ret pid
+end
+
+note agdrain: read the child's output into gres (at most 64 KiB kept) until end of file or the
+note --cmd-timeout deadline; true on timeout
+fn agdrain rfd int to bool
+buf = new uchar 4096 0
+put gnum QRES 0
+dl = add ulong monons get gnum QCTMO
+for it ulong 999999
+now = ulong monons
+if ge now dl
+ret true
+end
+wv = waitio rfd 1 long sub dl now
+if eq wv 0
+ret true
+end
+n = read rfd buf 0 4096
+if eq n 0
+ret false
+end
+if lt n 0
+if or eq n -4 eq n -11
+continue
+end
+ret false
+end
+for i ulong ulong n
+if lt get gnum QRES QRESC
+put gres get gnum QRES get buf i
+put gnum QRES add get gnum QRES 1
+end
+end
+end
+ret true
+end
+
+note agexec: run the packed argv, collect its output, kill it (SIGKILL) at the deadline, reap it
+fn agexec pk view uchar 4096 pn ulong to void
+ws = new uchar 4 0
+pid = agspawn pk pn
+if lt pid 0
+agrset 2 rpipe
+ret
+end
+rfd = int get gnum 22
+put gnum QTST 0
+tmo = agdrain rfd
+if tmo
+r = killpid int pid 9
+end
+r = waitpid int pid ws 0 4 0
+r = fclose rfd
+if ge get gnum QRES QRESC
+agradd rtrunc
+end
+if tmo
+put gnum QTST 2
+agradd rtmo
+agrnum div get gnum QCTMO 1000000000
+agradd rsec
+ret
+end
+wst = or ulong get ws 0 shl ulong get ws 1 8
+if ne and wst 127 0
+put gnum QTST 2
+agradd rsig
+agrnum and wst 127
+agradd rclose
+ret
+end
+agradd rexit
+agrnum and shr wst 8 255
+agradd rclose
+end
+
+fn agtrun ab view uchar 262144 tp view uint 65536 to void
+nc = get gnum QNCMD
+if eq nc 0
+agrset 1 rnocmd
+ret
+end
+av = agkey ab tp 0 cargv
+if eq av jsnone
+agrset 2 rargv
+ret
+end
+if ne js_type tp av jsarr
+agrset 2 rargv
+ret
+end
+nel = js_nkids tp av
+if or eq nel 0 gt nel 63
+agrset 2 rargv
+ret
+end
+pk = new uchar 4096 0
+e1 = new uchar 4096 0
+w = ulong 2
+e = js_first tp av
+for k ulong nel
+if ne js_type tp e jsstr
+agrset 2 rargv
+ret
+end
+n = js_sget ab js_off tp e e1
+if lt n 0
+agrset 1 rpack
+ret
+end
+w = agpack pk w e1 ulong n k
+if eq w 0
+ret
+end
+e = js_enext tp e
+end
+put pk 0 uchar nel
+put pk 1 0
+agexec pk w
+end
+
+note agpack: append argument k (e1[0, m)) to the packed list at w; the new end, or 0 with the
+note refusal already in gres
+fn agpack pk edit uchar 4096 w ulong e1 view uchar 4096 m ulong k ulong to ulong
+for z ulong m
+if eq get e1 z 0
+agrset 1 rnul
+ret 0
+end
+end
+if eq k 0
+if or eq m 0 not agallowed ICMD get gnum QNCMD view part e1 0 m
+agrset 1 rnotal
+agradd view part e1 0 m
+ret 0
+end
+end
+if gt add add w 2 m 4096
+agrset 1 rpack
+ret 0
+end
+put pk w uchar and m 255
+put pk add w 1 uchar shr m 8
+b = add w 2
+for j ulong m
+put pk add b j get e1 j
+end
+ret add b m
+end
+
+fn agtfetch ab view uchar 262144 tp view uint 65536 to void
+nf = get gnum QNFET
+if eq nf 0
+agrset 1 rnofet
+ret
+end
+ub = new uchar 4096 0
+n = agargstr ab tp curl ub
+if lt n 0
+agrset 2 rurlarg
+ret
+end
+un = ulong n
+r = new ulong 8 0
+rc = agurl view part ub 0 un r
+if eq rc -1
+agrset 1 rnohttp
+ret
+end
+if lt rc 0
+agrset 2 rurlbad
+ret
+end
+cn = new uchar 300 0
+cl = agcanon ub r cn
+if not agallowed IFET nf view part cn 0 cl
+agrset 1 rnotfa
+agradd view part cn 0 cl
+ret
+end
+agfetch1 ub r
+end
+
+note agcanon: HOST:PORT of a parsed url (the port always written), for the --allow-fetch check
+fn agcanon ub view uchar 4096 r view ulong 8 cn edit uchar 300 to ulong
+d = new uchar 24 0
+hl = get r 6
+if gt hl 255
+hl = 255
+end
+b = get r 2
+for i ulong hl
+put cn i get ub add b i
+end
+put cn hl 58
+dn = agdec get r 1 d
+b = add hl 1
+for j ulong dn
+put cn add b j get d j
+end
+ret add b dn
+end
+
+note agfreq: send GET for the parsed url and read the status line and headers
+fn agfreq cs edit ulong 320 io edit uchar 131072 ub view uchar 4096 r view ulong 8 to long
+x = agconn cs io get r 0 get r 1 long get gnum QCTMO
+if lt x 0
+ret -1000
+end
+x = hreqst cs io cget
+if eq get r 5 0
+x = hfe x hreqtg cs io cslash
+else
+x = hfe x hreqtg cs io view part ub get r 4 get r 5
+end
+x = hfe x hhname cs io chost
+x = hfe x hhval cs io view part ub get r 2 get r 3
+x = hfe x hhend cs io 0 0
+x = hfe x hwfin cs io
+if lt x 0
+ret x
+end
+ret hrsprd cs io
+end
+
+note agfbody: append the response body to gres (64 KiB kept)
+fn agfbody cs edit ulong 320 io edit uchar 131072 to void
+b = new uchar 4096 0
+for it ulong 999999
+n = hbodyrd cs io b
+if le n 0
+if eq n HETIME
+put gnum QTST 2
+agradd rftmo
+end
+ret
+end
+for i ulong ulong n
+if lt get gnum QRES QRESC
+put gres get gnum QRES get b i
+put gnum QRES add get gnum QRES 1
+end
+end
+if ge get gnum QRES QRESC
+agradd rtrunc
+ret
+end
+end
+end
+
+fn agfetch1 ub view uchar 4096 r view ulong 8 to void
+cs = new ulong 320 0
+io = new uchar 131072 0
+st = agfreq cs io ub r
+if eq st -1000
+agrset 2 rconn
+ret
+end
+if lt st 0
+y = hclose cs
+if eq st HETIME
+agrset 2 rftmo
+ret
+end
+agrset 2 rfreq
+ret
+end
+agrset 0 rstatus
+agrnum ulong st
+agradd cnl
+agfbody cs io
+y = hclose cs
+end
+
+fn agtoolid nm view uchar * to ulong
+if heq nm tnread
+ret 1
+end
+if heq nm tnwrite
+ret 2
+end
+if heq nm tnrun
+ret 3
+end
+if heq nm tnfetch
+ret 4
+end
+ret 0
+end
+
+note agcall: run tool call c; its result is left in gres/QRES (valid UTF-8), its status in QTST.
+note stderr names the tool and the status only, never arguments or results.
+fn agcall c ulong to void
+ab = new uchar 262144 0
+tp = new uint 65536 0
+nm = new uchar 128 0
+ri = js_init tp 262144 64
+nl = get gst add SNM c
+for j ulong nl
+put nm j get gtnm add mul c 128 j
+end
+an = get gst add SARG c
+for i ulong an
+put ab i get gtarg add mul c 65536 i
+end
+put gnum QRES 0
+which = agtoolid view part nm 0 nl
+if eq which 0
+agrset 1 runknown
+agradd view part nm 0 nl
+else
+pr = js_parse ab tp an
+if or lt pr 0 ne js_type tp 0 jsobj
+agrset 2 rnoargs
+else
+if eq which 1
+agtread ab tp
+end
+if eq which 2
+agtwrite ab tp
+end
+if eq which 3
+agtrun ab tp
+end
+if eq which 4
+agtfetch ab tp
+end
+end
+end
+agu8fix
+ok = agwr 2 cpre 0 len cpre
+ok = agwr 2 ltool 0 len ltool
+ok = agwr 2 nm 0 nl
+s = get gnum QTST
+if eq s 0
+ok = agwr 2 lok 0 len lok
+end
+if eq s 1
+ok = agwr 2 lref 0 len lref
+end
+if eq s 2
+ok = agwr 2 lerr 0 len lerr
+end
+ok = agwr 2 cnl 0 1
+end
+
+note ======== the agent loop
+
+fn agturn ub view uchar 65536 un ulong hb edit uchar 1048576 wb edit uchar 263184 cs edit ulong 320 io edit uchar 131072 to int
+agtrim
+agcompact hb
+agwuser wb ub un
+rc = agappend wb hb 1
+if ne rc 0
+ret rc
+end
+mr = get gnum QROUND
+for k ulong mr
+for i ulong 64
+put gst i 0
+end
+rc = agreq cs io hb wb
+if ne rc 0
+if gt get gst SCLEN 0
+ok = agwr 1 cnl 0 1
+end
+ret rc
+end
+agfixids
+agwasst wb
+nc = get gst SNC
+role = ulong 2
+if gt nc 0
+role = 5
+end
+rc = agappend wb hb role
+if ne rc 0
+ret rc
+end
+if eq nc 0
+ok2 = agwr 1 cnl 0 1
+ret 0
+end
+if gt get gst SCLEN 0
+ok3 = agwr 1 cnl 0 1
+end
+for c ulong nc
+agcall c
+agwtool wb c
+rc = agappend wb hb 3
+if ne rc 0
+ret rc
+end
+end
+end
+agerr eround
+ret 7
+end
+
+note agline: the next stdin line (CR LF or LF) into ub; -1 at the end of input, -2 too long
+fn agline ub edit uchar 65536 to long
+for it ulong 999999
+l = get gnum QINL
+p = get gnum QINP
+for i ulong sub l p
+if eq get gin add p i 10
+n = i
+if and gt n 0 eq get gin add p sub n 1 13
+n = sub n 1
+end
+for j ulong n
+put ub j get gin add p j
+end
+put gnum QINP add add p i 1
+ret long n
+end
+end
+if eq get gnum QINEOF 1
+if eq p l
+ret -1
+end
+n2 = sub l p
+for j2 ulong n2
+put ub j2 get gin add p j2
+end
+put gnum QINP l
+ret long n2
+end
+if gt p 0
+for m ulong sub l p
+put gin m get gin add p m
+end
+put gnum QINL sub l p
+put gnum QINP 0
+end
+l2 = get gnum QINL
+if ge l2 65535
+ret -2
+end
+r = read 0 gin l2 sub 65535 l2
+if le r 0
+put gnum QINEOF 1
+else
+put gnum QINL add l2 ulong r
+end
+end
+ret -1
+end
+
+fn agchdir to int
+if eq get gsln IWORK 0
+ret 0
+end
+pb = new uchar 4096 0
+pn = agsget IWORK pb
+c = chdir pb 0 pn
+if lt c 0
+agerr ework
+ret 2
+end
+ret 0
+end
+
+fn main to int
+cs = new ulong 320 0
+io = new uchar 131072 0
+hb = new uchar 1048576 0
+wb = new uchar 263184 0
+ub = new uchar 65536 0
+r = agargs
+if eq r 1
+ret 0
+end
+if ne r 0
+ret r
+end
+r = agkeyload
+if ne r 0
+ret r
+end
+r = agmemload
+if ne r 0
+ret r
+end
+r = agsload hb
+if ne r 0
+ret r
+end
+r = agchdir
+if ne r 0
+ret r
+end
+if gt get gsln IPROMPT 0
+un = agsget IPROMPT ub
+ret agturn ub un hb wb cs io
+end
+for it ulong 999999
+n = agline ub
+if eq n -1
+ret 0
+end
+if eq n -2
+agerr emsg
+ret 9
+end
+if gt n 0
+rc = agturn ub ulong n hb wb cs io
+if ne rc 0
+ret rc
+end
+end
+end
+ret 0
+end
diff --git a/seed/agent/bench/.crumb b/seed/agent/bench/.crumb
new file mode 100644
index 000000000..1587bf5be
--- /dev/null
+++ b/seed/agent/bench/.crumb
@@ -0,0 +1,33 @@
+{
+  "above": {
+    "name": "agent",
+    "path": ".."
+  },
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-26T20:55:09Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:7438334c8bac2ff0a0f5e4ac0db8d33fc1bb02ebd56cdef6dfd294fb2ed55ae2",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 3,
+      "generated_at_commit": "5b39ef42a84dbd5988c77976a5550f622a129bbc",
+      "source_tree": "sha256:8092b21916db7f55ac076b2a1b55786ed0777f3e0bf8697c3c481c1f9dcf7c75"
+    },
+    "owner_lane": "",
+    "seed": {
+      "files": [
+        "equal_bench.py",
+        "equal_mock.py",
+        "nb_minimal.py"
+      ],
+      "purpose_auto": "Directory bench. Purpose not yet described by a human."
+    }
+  },
+  "layer": "bench",
+  "name": "bench",
+  "purpose": "Test-only equal-work benchmark of omagent against nanobot reduced to the same four tools: scripted streaming mock, paired interleaved driver, nanobot launcher.",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/agent/bench/equal_bench.py b/seed/agent/bench/equal_bench.py
new file mode 100755
index 000000000..577162216
--- /dev/null
+++ b/seed/agent/bench/equal_bench.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python3
+"""TEST-ONLY equal-work benchmark driver: omagent vs nanobot reduced to the same four tools.
+
+Usage: equal_bench.py OMAGENT VENV_PYTHON N CPU DELAY_MS OUT.tsv
+Both arms get the same prompt, endpoint, scripted mock (equal_mock.py), streaming, workspace
+contents and tool script (read_file, write_file, one /bin/echo through each harness's shell tool,
+final answer). Each run is a fresh process with a fresh session: nanobot's session store is
+deleted between runs, omagent runs without --session. Client pinned with taskset to CPU, the
+mock to CPU+1. Arms alternate order every repetition (paired, interleaved).
+Row: arm cpu delay_ms rep wall_ns first_req_ns maxrss_kib rc posts verdict
+first_req_ns = mock arrival of the first POST minus the driver's launch time (CLOCK_MONOTONIC).
+verdict is ok only if the mock saw all four steps with correct tool results, out.txt holds
+beta-456 and stdout holds delta-000."""
+import json, os, shutil, subprocess, sys, time, urllib.request
+
+B, PY, N, CPU, DELAY, OUT = sys.argv[1], sys.argv[2], int(sys.argv[3]), int(sys.argv[4]), sys.argv[5], sys.argv[6]
+D = os.path.dirname(os.path.abspath(__file__))
+H = "/tmp/OmegaBot-eq-%d-%s" % (CPU, DELAY)
+PROMPT = "Read notes.txt, write beta-456 to out.txt, run /bin/echo gamma-789, then reply done."
+shutil.rmtree(H, ignore_errors=True)
+os.makedirs(H + "/nb/workspace")
+os.makedirs(H + "/om")
+pf = H + "/port"
+mock = subprocess.Popen(["taskset", "-c", str(CPU + 1), sys.executable, D + "/equal_mock.py", pf, DELAY])
+for _ in range(100):
+    if os.path.exists(pf) and open(pf).read():
+        break
+    time.sleep(0.05)
+P = int(open(pf).read())
+assert P != 18091
+URL = "http://127.0.0.1:%d/v1" % P
+cfg = H + "/nb/config.json"
+json.dump({
+    "agents": {"defaults": {"workspace": H + "/nb/workspace", "model": "mock-1", "provider": "custom",
+                            "timezone": "UTC", "maxToolIterations": 8,
+                            "disabledSkills": ["clawhub", "cron", "github", "memory", "skill-creator", "summarize",
+                                               "tmux", "weather", "my", "image-generation", "update-setup"]}},
+    "providers": {"custom": {"apiKey": "sk-test", "apiBase": URL}},
+    "tools": {"restrictToWorkspace": True, "mcpServers": {},
+              "exec": {"enable": True, "timeout": 10},
+              "web": {"enable": True, "fetch": {"useJinaReader": False}},
+              "file": {"enable": True},
+              "cliApps": {"enable": False}, "my": {"enable": False}, "imageGeneration": {"enabled": False}},
+}, open(cfg, "w"))
+ENV = dict(os.environ, HOME=H + "/nb", OMAGENT_KEY="sk-test")
+# Peak RSS comes from GNU time, whose child is forked from a small C process; the driver's own
+# rusage would charge the forked Python driver image to the child before exec.
+TIME = ["/usr/bin/time", "-f", "%M", "-o", H + "/rss"]
+CMD = {
+    "omagent": (TIME + ["taskset", "-c", str(CPU), B, "--url", URL + "/chat/completions", "--model", "mock-1",
+                 "--key-env", "OMAGENT_KEY", "-p", PROMPT, "--workdir", H + "/om", "--allow-write",
+                 "--allow-cmd", "/bin/echo", "--cmd-timeout", "10", "--max-rounds", "8"], H + "/om"),
+    "nanobot": (TIME + ["taskset", "-c", str(CPU), PY, D + "/nb_minimal.py", "agent", "-m", PROMPT, "--no-markdown",
+                 "-c", cfg, "-w", H + "/nb/workspace"], H + "/nb/workspace"),
+}
+
+
+def state():
+    return json.load(urllib.request.urlopen("http://127.0.0.1:%d/state" % P))
+
+
+def one(arm):
+    cmd, wd = CMD[arm]
+    for f in ("out.txt",):
+        if os.path.exists(os.path.join(wd, f)):
+            os.unlink(os.path.join(wd, f))
+    open(os.path.join(wd, "notes.txt"), "w").write("alpha-123\n")
+    shutil.rmtree(H + "/nb/sessions", ignore_errors=True)
+    mem = H + "/nb/workspace/memory"
+    if os.path.isdir(H + "/memory.snap"):
+        shutil.rmtree(mem, ignore_errors=True)
+        shutil.copytree(H + "/memory.snap", mem)
+    state()
+    so = open(H + "/stdout", "w")
+    t0 = time.monotonic_ns()
+    p = subprocess.Popen(cmd, cwd=wd, env=ENV, stdout=so, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL)
+    _, status, ru = os.wait4(p.pid, 0)
+    t1 = time.monotonic_ns()
+    p.returncode = os.waitstatus_to_exitcode(status)
+    so.close()
+    st = state()
+    out = open(H + "/stdout").read()
+    okf = os.path.exists(os.path.join(wd, "out.txt")) and open(os.path.join(wd, "out.txt")).read().strip() == "beta-456"
+    ok = p.returncode == 0 and st["posts"] == 4 and not st["bad"] and okf and "delta-000" in out
+    verdict = "ok" if ok else "BAD:" + json.dumps({"posts": st["posts"], "bad": st["bad"], "file": okf, "out": out[-200:]})
+    rss = int(open(H + "/rss").read().split()[-1])
+    return [t1 - t0, (st["first_ns"] - t0) if st["first_ns"] else -1, rss, p.returncode, st["posts"], verdict, st["tools"], st["req_bytes"]]
+
+
+with open(OUT, "w") as fh:
+    for arm in ("omagent", "nanobot"):  # warm-up, not recorded; also records the advertised tools
+        r = one(arm)
+        print("warmup", arm, r[3], r[5], "tools=" + ",".join(r[6]), "req_bytes=%d" % r[7], flush=True)
+        if arm == "nanobot":
+            shutil.copytree(H + "/nb/workspace/memory", H + "/memory.snap")
+    for rep in range(1, N + 1):
+        order = ("omagent", "nanobot") if rep % 2 else ("nanobot", "omagent")
+        for arm in order:
+            r = one(arm)
+            fh.write("\t".join(map(str, [arm, CPU, DELAY, rep] + r[:6] + [r[7]])) + "\n")
+            fh.flush()
+mock.kill()
diff --git a/seed/agent/bench/equal_mock.py b/seed/agent/bench/equal_mock.py
new file mode 100755
index 000000000..711cb595b
--- /dev/null
+++ b/seed/agent/bench/equal_mock.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python3
+"""TEST-ONLY scripted model server for the equal-work benchmark (omagent vs nanobot).
+
+Usage: equal_mock.py PORTFILE DELAY_MS
+Every POST /v1/chat/completions must ask for stream=true. The reply depends on how many tool
+results follow the last user message, so both harnesses walk the same four-step script:
+  0 -> call read_file   {path: notes.txt}                      result must contain alpha-123
+  1 -> call write_file  {path: out.txt, content: beta-456}      result must mention 8
+  2 -> call the shell   /bin/echo gamma-789                     result must contain gamma-789
+  3 -> final answer "done delta-000"
+The shell call uses each harness's own schema: omagent run_command {argv:[...]}, nanobot exec
+{command: "..."}. Each reply is streamed as TOKENS chunks with DELAY_MS before every chunk, so
+DELAY_MS=0 measures the harness and DELAY_MS=50 imitates a 50 ms/token model.
+GET /state returns and resets {first_ns, last_ns, posts, bad, tools, req_bytes}; times are
+CLOCK_MONOTONIC nanoseconds of request arrival, comparable with the driver's monotonic_ns."""
+import http.server, json, socketserver, sys, threading, time
+
+TOKENS = 10
+DELAY = int(sys.argv[2]) / 1000.0
+LOCK = threading.Lock()
+STATE = {}
+
+
+def reset():
+    STATE.clear()
+    STATE.update(first_ns=0, last_ns=0, posts=0, bad=[], tools=[], req_bytes=0)
+
+
+reset()
+EXPECT = {1: "alpha-123", 2: "8", 3: "gamma-789"}
+
+
+def chunk(delta, finish=None):
+    return {"id": "x", "object": "chat.completion.chunk", "created": 0, "model": "mock-1",
+            "choices": [{"index": 0, "delta": delta, "finish_reason": finish}]}
+
+
+def split(s, n):
+    k = max(1, -(-len(s) // n))
+    return [s[i:i + k] for i in range(0, len(s), k)] or [""]
+
+
+class H(http.server.BaseHTTPRequestHandler):
+    protocol_version = "HTTP/1.0"
+
+    def log_message(self, *a):
+        pass
+
+    def do_GET(self):
+        with LOCK:
+            b = json.dumps(STATE).encode()
+            reset()
+        self.send_response(200)
+        self.send_header("Content-Type", "application/json")
+        self.send_header("Content-Length", str(len(b)))
+        self.end_headers()
+        self.wfile.write(b)
+
+    def do_POST(self):
+        now = time.monotonic_ns()
+        raw = self.rfile.read(int(self.headers.get("Content-Length", "0")))
+        body = json.loads(raw or b"{}")
+        msgs = body.get("messages", [])
+        last_user = max([i for i, m in enumerate(msgs) if m.get("role") == "user"] or [0])
+        tool_msgs = [m for m in msgs[last_user:] if m.get("role") == "tool"]
+        step = len(tool_msgs)
+        names = [t.get("function", {}).get("name") for t in body.get("tools", [])]
+        with LOCK:
+            STATE["first_ns"] = STATE["first_ns"] or now
+            STATE["posts"] += 1
+            STATE["req_bytes"] += len(raw)
+            STATE["tools"] = sorted(n for n in names if n)
+            if not body.get("stream"):
+                STATE["bad"].append("step %d: stream not requested" % step)
+            if step in EXPECT:
+                c = tool_msgs[-1].get("content")
+                c = c if isinstance(c, str) else json.dumps(c)
+                if EXPECT[step] not in c:
+                    STATE["bad"].append("step %d: tool result lacks %s: %r" % (step, EXPECT[step], c[:200]))
+        om = "run_command" in names
+        if step == 0:
+            call = ("read_file", {"path": "notes.txt"})
+        elif step == 1:
+            call = ("write_file", {"path": "out.txt", "content": "beta-456"})
+        elif step == 2:
+            # nanobot's restrictToWorkspace guard refuses absolute paths outside the workspace, so
+            # its command reaches the same echo through PATH; env makes it a real exec, not a builtin.
+            call = ("run_command", {"argv": ["/bin/echo", "gamma-789"]}) if om else ("exec", {"command": "env echo gamma-789"})
+        else:
+            call = None
+        self.send_response(200)
+        self.send_header("Content-Type", "text/event-stream")
+        self.end_headers()
+        evs = []
+        if call is None:
+            for i, piece in enumerate(split("done delta-000", TOKENS)):
+                evs.append(chunk({"role": "assistant", "content": piece} if i == 0 else {"content": piece}))
+            evs.append(chunk({}, "stop"))
+        else:
+            args = split(json.dumps(call[1]), TOKENS)
+            for i, piece in enumerate(args):
+                tc = {"index": 0, "function": {"arguments": piece}}
+                if i == 0:
+                    tc.update(id="call_%d" % step, type="function")
+                    tc["function"]["name"] = call[0]
+                evs.append(chunk({"role": "assistant", "tool_calls": [tc]} if i == 0 else {"tool_calls": [tc]}))
+            evs.append(chunk({}, "tool_calls"))
+        for i, ev in enumerate(evs):
+            if DELAY and i < TOKENS:
+                time.sleep(DELAY)
+            self.wfile.write(("data: %s\n\n" % json.dumps(ev)).encode())
+            self.wfile.flush()
+        self.wfile.write(b"data: [DONE]\n\n")
+
+
+class S(socketserver.ThreadingMixIn, http.server.HTTPServer):
+    daemon_threads = True
+
+
+s = S(("127.0.0.1", 0), H)
+assert s.server_address[1] != 18091
+open(sys.argv[1], "w").write(str(s.server_address[1]))
+s.serve_forever()
diff --git a/seed/agent/bench/nb_minimal.py b/seed/agent/bench/nb_minimal.py
new file mode 100644
index 000000000..8b45c7a9d
--- /dev/null
+++ b/seed/agent/bench/nb_minimal.py
@@ -0,0 +1,37 @@
+"""TEST-ONLY launcher: nanobot's own CLI, reduced to omagent's four tools for the equal-work benchmark.
+
+nanobot 0.3.5 has no config switch for every extra tool (message, spawn, cron, session and goal
+tools stay registered; see the feature matrix), so this wrapper drops every tool except
+read_file, write_file, exec and web_fetch at registration. Everything else is unmodified nanobot.
+If NB_MODULES is set, the files of all loaded modules are written there at exit (footprint run only).
+"""
+import atexit, os, sys
+
+from nanobot.agent.tools.registry import ToolRegistry
+
+KEEP = {"read_file", "write_file", "exec", "web_fetch"}
+_register = ToolRegistry.register
+
+
+def register(self, tool):
+    if tool.name in KEEP:
+        _register(self, tool)
+
+
+ToolRegistry.register = register
+
+if os.environ.get("NB_MODULES"):
+    def dump():
+        with open(os.environ["NB_MODULES"], "w") as fh:
+            for m in list(sys.modules.values()):
+                f = getattr(m, "__cached__", None) or getattr(m, "__file__", None)
+                if f and not os.path.exists(f):
+                    f = getattr(m, "__file__", None)
+                if f:
+                    fh.write(f + "\n")
+    atexit.register(dump)
+
+from nanobot.cli.entry import main  # noqa: E402
+
+sys.argv[0] = "nanobot"
+sys.exit(main())
diff --git a/seed/agent/tests/.crumb b/seed/agent/tests/.crumb
new file mode 100644
index 000000000..5d76a32d8
--- /dev/null
+++ b/seed/agent/tests/.crumb
@@ -0,0 +1,31 @@
+{
+  "above": {
+    "name": "agent",
+    "path": ".."
+  },
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-26T20:16:39Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:d83674abfa647020999dde6f2a4fded1d42576c32fa06a398621d62f72e46f8a",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 1,
+      "generated_at_commit": "e07c7afb70dec01e9d8c9600b5ce7284321b8399",
+      "source_tree": "sha256:65110105d62eb3b2d571d43673b38bb1ea6ae5fd94338dbb031de23a03128d5b"
+    },
+    "owner_lane": "",
+    "seed": {
+      "files": [
+        "check.py"
+      ],
+      "purpose_auto": "Directory tests. Purpose not yet described by a human."
+    }
+  },
+  "layer": "tests",
+  "name": "tests",
+  "purpose": "Directory tests. Purpose not yet described by a human.",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/agent/tests/check.py b/seed/agent/tests/check.py
new file mode 100755
index 000000000..793d1112d
--- /dev/null
+++ b/seed/agent/tests/check.py
@@ -0,0 +1,491 @@
+#!/usr/bin/env python3
+"""seed/agent/tests/check.py -- host check of seed/agent/agent.om (omagent).
+
+TEST-ONLY. Python is only the referee: it plays a scripted OpenAI-compatible model server
+(chat completions, SSE and plain JSON) on a kernel-chosen 127.0.0.1 port, runs the compiled
+Omega binary against it, and compares exit codes, stdout, stderr, the requests the server saw,
+the session file and the workspace. Every implementation byte under test is compiled .om.
+
+Usage:  nice -n 19 ionice -c3 python3 seed/agent/tests/check.py [--omc PATH] [--bin PATH] [--keep DIR]
+Stages: build, cases (one scripted conversation each), controls (a wrong expectation must
+fail; source mutants of agent.om must each be caught by the cases).
+Exit 0 = PASS, 1 = FAIL, 3 = NOT_RUN (the compiler is missing).
+Never touches port 18091; never reaches outside 127.0.0.1.
+"""
+import http.server
+import json
+import os
+import shutil
+import socketserver
+import subprocess
+import sys
+import tempfile
+import threading
+import time
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+AGENT = os.path.dirname(HERE)
+ROOT = os.path.dirname(os.path.dirname(AGENT))
+SOURCES = ["seed/json/json.om", "seed/json/jsonw.om", "seed/net/http.om", "seed/agent/agent.om"]
+KEY = "sk-omagent-test-7f3a9c41d2e8b605"
+LOG = []
+
+
+def log(s):
+    print(s, flush=True)
+
+
+# ---------------------------------------------------------------- scripted model server
+
+class Mock:
+    """One response script per request: entries are consumed in order."""
+
+    def __init__(self):
+        self.script = []
+        self.requests = []
+        self.lock = threading.Lock()
+
+
+MOCK = Mock()
+
+
+def sse_event(obj):
+    if isinstance(obj, str):
+        return ("data: %s\n\n" % obj).encode()
+    return ("data: %s\n\n" % json.dumps(obj)).encode()
+
+
+def delta_text(t):
+    return {"choices": [{"index": 0, "delta": {"content": t}}]}
+
+
+def delta_call(i, cid, name, args):
+    fn = {}
+    if name is not None:
+        fn["name"] = name
+    if args is not None:
+        fn["arguments"] = args
+    tc = {"index": i, "function": fn}
+    if cid is not None:
+        tc["id"] = cid
+        tc["type"] = "function"
+    return {"choices": [{"index": 0, "delta": {"tool_calls": [tc]}}]}
+
+
+def finish(reason):
+    return {"choices": [{"index": 0, "delta": {}, "finish_reason": reason}]}
+
+
+def sse_text(*parts):
+    ev = [delta_text(p) for p in parts] + [finish("stop"), "[DONE]"]
+    return ("sse", ev)
+
+
+def sse_calls(calls):
+    """calls: list of (name, arguments-json-string); arguments are split in two deltas."""
+    ev = []
+    for i, (name, args) in enumerate(calls):
+        h = len(args) // 2
+        ev.append(delta_call(i, "c%d" % i, name, args[:h]))
+        ev.append(delta_call(i, None, None, args[h:]))
+    ev += [finish("tool_calls"), "[DONE]"]
+    return ("sse", ev)
+
+
+class Handler(http.server.BaseHTTPRequestHandler):
+    protocol_version = "HTTP/1.0"
+
+    def log_message(self, *a):
+        pass
+
+    def do_GET(self):
+        with MOCK.lock:
+            MOCK.requests.append({"method": "GET", "path": self.path, "headers": dict(self.headers), "body": None})
+        body = b"hello from the fetch page\n"
+        self.send_response(200)
+        self.send_header("Content-Type", "text/plain")
+        self.send_header("Content-Length", str(len(body)))
+        self.end_headers()
+        self.wfile.write(body)
+
+    def do_POST(self):
+        n = int(self.headers.get("Content-Length", "0"))
+        raw = self.rfile.read(n)
+        try:
+            body = json.loads(raw)
+        except Exception:
+            body = {"_unparsed": raw.decode("latin-1")}
+        with MOCK.lock:
+            MOCK.requests.append({"method": "POST", "path": self.path, "headers": dict(self.headers), "body": body})
+            step = MOCK.script.pop(0) if MOCK.script else ("status", 500, "script exhausted")
+        kind = step[0]
+        if kind == "sse":
+            self.send_response(200)
+            self.send_header("Content-Type", "text/event-stream")
+            self.end_headers()
+            for ev in step[1]:
+                self.wfile.write(sse_event(ev))
+                self.wfile.flush()
+        elif kind == "rawsse":
+            self.send_response(200)
+            self.send_header("Content-Type", "text/event-stream")
+            self.end_headers()
+            self.wfile.write(step[1])
+        elif kind == "json":
+            b = json.dumps(step[1]).encode()
+            self.send_response(200)
+            self.send_header("Content-Type", "application/json")
+            self.send_header("Content-Length", str(len(b)))
+            self.end_headers()
+            self.wfile.write(b)
+        elif kind == "status":
+            b = step[2].encode()
+            self.send_response(step[1])
+            self.send_header("Content-Type", "text/plain")
+            self.send_header("Content-Length", str(len(b)))
+            self.end_headers()
+            self.wfile.write(b)
+        elif kind == "stall":
+            self.send_response(200)
+            self.send_header("Content-Type", "text/event-stream")
+            self.end_headers()
+            self.wfile.write(sse_event(delta_text("partial ")))
+            self.wfile.flush()
+            time.sleep(step[1])
+
+
+class Server(socketserver.ThreadingMixIn, http.server.HTTPServer):
+    daemon_threads = True
+    allow_reuse_address = True
+
+
+# ---------------------------------------------------------------- cases
+
+def run(binp, port, work, args, stdin=None, env_key=True, timeout=30):
+    env = {"PATH": "/usr/bin:/bin"}
+    if env_key:
+        env["OMAGENT_API_KEY"] = KEY
+    argv = [binp, "--url", "http://127.0.0.1:%d/v1/chat/completions" % port, "--model", "mock-1",
+            "--workdir", work] + [os.path.join(work, x) if x == "s.jsonl" else x for x in args]
+    t0 = time.monotonic()
+    p = subprocess.run(argv, input=stdin, capture_output=True, env=env, timeout=timeout)
+    return p.returncode, p.stdout.decode("utf-8", "replace"), p.stderr.decode("utf-8", "replace"), time.monotonic() - t0
+
+
+def tool_msgs(req):
+    return [m for m in req["body"].get("messages", []) if m.get("role") == "tool"]
+
+
+def C(name, script, args, expect_rc, checks, stdin=None, prep=None, env_key=True, timeout=30):
+    return {"name": name, "script": script, "args": args, "rc": expect_rc, "checks": checks,
+            "stdin": stdin, "prep": prep, "env_key": env_key, "timeout": timeout}
+
+
+def has(s):
+    return lambda o: s in o["out"]
+
+
+def err_has(s):
+    return lambda o: s in o["err"]
+
+
+def last_tool_has(s):
+    def f(o):
+        posts = [r for r in o["reqs"] if r["method"] == "POST"]
+        t = tool_msgs(posts[-1]) if posts else []
+        return bool(t) and s in t[-1]["content"]
+    return f
+
+
+def nposts(n):
+    return lambda o: len([r for r in o["reqs"] if r["method"] == "POST"]) == n
+
+
+def file_is(rel, content):
+    def f(o):
+        p = os.path.join(o["work"], rel)
+        return os.path.isfile(p) and open(p, "rb").read() == content.encode()
+    return f
+
+
+def no_file(rel):
+    return lambda o: not os.path.exists(os.path.join(o["work"], rel))
+
+
+def no_key_leak(o):
+    blob = o["out"] + o["err"]
+    sess = os.path.join(o["work"], "s.jsonl")
+    if os.path.exists(sess):
+        blob += open(sess, encoding="utf-8", errors="replace").read()
+    return KEY not in blob
+
+
+def bearer_sent(o):
+    posts = [r for r in o["reqs"] if r["method"] == "POST"]
+    return bool(posts) and all(r["headers"].get("Authorization") == "Bearer " + KEY for r in posts)
+
+
+def request_shape(o):
+    r = [r for r in o["reqs"] if r["method"] == "POST"][0]
+    b = r["body"]
+    names = [t["function"]["name"] for t in b.get("tools", [])]
+    return (r["path"] == "/v1/chat/completions" and b.get("model") == "mock-1" and b.get("stream") is True
+            and names == ["read_file", "write_file", "run_command", "http_fetch"]
+            and b["messages"][0]["role"] == "system" and b["messages"][-1] == {"role": "user", "content": "hi"})
+
+
+def session_lines(n):
+    def f(o):
+        p = os.path.join(o["work"], "s.jsonl")
+        if not os.path.exists(p):
+            return False
+        ls = open(p, encoding="utf-8").read().splitlines()
+        return len(ls) == n and all(isinstance(json.loads(x), dict) for x in ls)
+    return f
+
+
+def prep_file(rel, content):
+    def f(work):
+        with open(os.path.join(work, rel), "w") as fh:
+            fh.write(content)
+    return f
+
+
+def prep_symlink(work):
+    os.symlink("/etc", os.path.join(work, "lnk"))
+
+
+def prep_bad_session(work):
+    with open(os.path.join(work, "s.jsonl"), "w") as fh:
+        fh.write('{"role":"user","content":"a"}\nnot json\n')
+
+
+def prep_good_session(work):
+    with open(os.path.join(work, "s.jsonl"), "w") as fh:
+        fh.write('{"role":"user","content":"earlier question"}\n{"role":"assistant","content":"earlier answer"}\n')
+
+
+def resent_history(o):
+    b = [r for r in o["reqs"] if r["method"] == "POST"][0]["body"]
+    ms = b["messages"]
+    return (ms[1] == {"role": "user", "content": "earlier question"}
+            and ms[2] == {"role": "assistant", "content": "earlier answer"}
+            and ms[3] == {"role": "user", "content": "hi"})
+
+
+def cases(port):
+    fetch = "127.0.0.1:%d" % port
+    S = ["-p", "hi", "--session", "s.jsonl"]
+    return [
+        C("plain-sse", [sse_text("Hello", ", world")], S, 0,
+          [has("Hello, world"), nposts(1), request_shape, bearer_sent, no_key_leak, session_lines(2)]),
+        C("plain-json", [("json", {"choices": [{"index": 0, "message": {"role": "assistant", "content": "json reply"},
+                                                 "finish_reason": "stop"}]})], S, 0, [has("json reply"), nposts(1)]),
+        C("read-file", [sse_calls([("read_file", '{"path":"notes.txt"}')]), sse_text("done")], S, 0,
+          [has("done"), nposts(2), last_tool_has("secret plan 42"), err_has("tool read_file: ok"), session_lines(4)],
+          prep=prep_file("notes.txt", "secret plan 42\n")),
+        C("write-file", [sse_calls([("write_file", '{"path":"out/x.txt","content":"written by agent"}')]), sse_text("ok")],
+          S + ["--allow-write"], 0, [file_is("out/x.txt", "written by agent"), last_tool_has("ok: wrote 16 bytes")],
+          prep=lambda w: os.mkdir(os.path.join(w, "out"))),
+        C("run-echo", [sse_calls([("run_command", '{"argv":["/bin/echo","hi","there"]}')]), sse_text("ran")],
+          S + ["--allow-cmd", "/bin/echo"], 0, [last_tool_has("hi there\n"), last_tool_has("[exit status 0]")]),
+        C("run-exit-code", [sse_calls([("run_command", '{"argv":["/bin/false"]}')]), sse_text("ran")],
+          S + ["--allow-cmd", "/bin/false"], 0, [last_tool_has("[exit status 1]")]),
+        C("fetch", [sse_calls([("http_fetch", '{"url":"http://%s/page"}' % fetch)]), sse_text("fetched")],
+          S + ["--allow-fetch", fetch], 0, [last_tool_has("status=200\nhello from the fetch page")]),
+        C("two-calls-one-turn", [sse_calls([("read_file", '{"path":"a"}'), ("read_file", '{"path":"b"}')]), sse_text("both")],
+          S, 0, [lambda o: [m["content"] for m in tool_msgs([r for r in o["reqs"] if r["method"] == "POST"][-1])] == ["A", "B"],
+                 lambda o: [m["tool_call_id"] for m in tool_msgs([r for r in o["reqs"] if r["method"] == "POST"][-1])] == ["c0", "c1"]],
+          prep=lambda w: (prep_file("a", "A")(w), prep_file("b", "B")(w))),
+        # refusals: the tool result says refused, the agent continues, nothing is executed
+        C("refuse-cmd-not-allowed", [sse_calls([("run_command", '{"argv":["/bin/rm","-rf","x"]}')]), sse_text("ok")],
+          S + ["--allow-cmd", "/bin/echo"], 0, [last_tool_has("refused: the program is not on the --allow-cmd list: /bin/rm"),
+                                                err_has("tool run_command: refused")]),
+        C("refuse-cmd-disabled", [sse_calls([("run_command", '{"argv":["/bin/echo","x"]}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: run_command is disabled")]),
+        C("refuse-dotdot", [sse_calls([("read_file", '{"path":"../etc/passwd"}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: the path must be relative")]),
+        C("refuse-absolute", [sse_calls([("read_file", '{"path":"/etc/passwd"}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: the path must be relative")]),
+        C("refuse-symlink", [sse_calls([("read_file", '{"path":"lnk/passwd"}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: the path must be relative")], prep=prep_symlink),
+        C("refuse-write-disabled", [sse_calls([("write_file", '{"path":"y.txt","content":"x"}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: write_file is disabled"), no_file("y.txt")]),
+        C("refuse-unknown-tool", [sse_calls([("format_disk", '{}')]), sse_text("ok")],
+          S, 0, [last_tool_has("refused: unknown tool format_disk")]),
+        C("refuse-fetch-host", [sse_calls([("http_fetch", '{"url":"http://10.1.2.3:80/"}')]), sse_text("ok")],
+          S + ["--allow-fetch", fetch], 0, [last_tool_has("refused: the host:port is not on the --allow-fetch list: 10.1.2.3:80")]),
+        C("refuse-https-fetch", [sse_calls([("http_fetch", '{"url":"https://%s/page"}' % fetch)]), sse_text("ok")],
+          S + ["--allow-fetch", fetch], 0, [last_tool_has("refused: only http:// URLs")]),
+        C("bad-tool-args", [sse_calls([("read_file", '[1,2]')]), sse_text("ok")],
+          S, 0, [last_tool_has("error: tool arguments are not a JSON object")]),
+        # malformed model output
+        C("malformed-event", [("rawsse", b"data: {not json\n\n")], S, 6, [err_has("malformed model output")]),
+        C("truncated-stream", [("rawsse", b'data: {"choices":[{"index":0,"delta":{"content":"cut"}}]}\n\n')], S, 6,
+          [err_has("the stream ended before [DONE]")]),
+        C("server-error-object", [("sse", [{"error": {"message": "boom"}}])], S, 6, [err_has("error object")]),
+        C("too-many-calls", [("sse", [delta_call(9, "c9", "read_file", "{}"), finish("tool_calls"), "[DONE]"])], S, 6,
+          [err_has("more than 8 tool calls")]),
+        C("http-500", [("status", 500, "internal oops")], S, 4, [err_has("status"), err_has("internal oops")]),
+        # timeouts
+        C("model-timeout", [("stall", 6)], S + ["--timeout", "2"], 5, [err_has("timed out"), lambda o: o["dt"] < 5.5]),
+        C("cmd-timeout", [sse_calls([("run_command", '{"argv":["/bin/sleep","30"]}')]), sse_text("ok")],
+          S + ["--allow-cmd", "/bin/sleep", "--cmd-timeout", "1"], 0,
+          [last_tool_has("[killed: timeout after 1 s]"), lambda o: o["dt"] < 10]),
+        C("round-limit", [sse_calls([("read_file", '{"path":"a"}')])] * 3, S + ["--max-rounds", "2"], 7,
+          [err_has("round limit"), nposts(2)], prep=prep_file("a", "A")),
+        # sessions and configuration
+        C("session-reload", [sse_text("again")], S, 0, [resent_history, session_lines(4)], prep=prep_good_session),
+        C("session-bad-line", [sse_text("never")], S, 8, [nposts(0), err_has("session file line")], prep=prep_bad_session),
+        C("https-model-refused", [], ["-p", "hi", "--url", "https://127.0.0.1:1/x"], 2, [nposts(0)]),
+        C("no-key-no-header", [sse_text("anon")], S, 0,
+          [lambda o: "Authorization" not in [r for r in o["reqs"] if r["method"] == "POST"][0]["headers"]], env_key=False),
+        C("repl-two-lines", [sse_text("one"), sse_text("two")], ["--session", "s.jsonl"], 0,
+          [has("one"), has("two"), nposts(2), session_lines(4)], stdin=b"first\nsecond\n"),
+        C("connect-refused", [], ["-p", "hi", "--url", "http://127.0.0.1:1/v1"], 3, [err_has("cannot connect")]),
+    ]
+
+
+def run_case(binp, port, base, c):
+    work = tempfile.mkdtemp(prefix=c["name"] + "-", dir=base)
+    if c["prep"]:
+        c["prep"](work)
+    with MOCK.lock:
+        MOCK.script = list(c["script"])
+        MOCK.requests = []
+    rc, out, err, dt = run(binp, port, work, c["args"], c["stdin"], c["env_key"], c["timeout"])
+    o = {"out": out, "err": err, "work": work, "reqs": list(MOCK.requests), "dt": dt}
+    fails = []
+    if rc != c["rc"]:
+        fails.append("rc=%d want %d" % (rc, c["rc"]))
+    for i, chk in enumerate(c["checks"]):
+        try:
+            ok = chk(o)
+        except Exception as e:
+            ok = False
+        if not ok:
+            fails.append("check %d" % i)
+    if c["name"] != "no-key-no-header" and not no_key_leak(o):
+        fails.append("key leaked")
+    return fails, o, rc, dt
+
+
+def build(omc, out):
+    src = b"om2\n" + b"".join(open(os.path.join(ROOT, s), "rb").read() for s in SOURCES)
+    p = subprocess.run([omc], input=src, capture_output=True)
+    if p.returncode != 0:
+        raise RuntimeError("build failed: " + p.stderr.decode()[:400])
+    with open(out, "wb") as fh:
+        fh.write(p.stdout)
+    os.chmod(out, 0o700)
+
+
+# source mutants: each weakens one safety or protocol rule; the cases must catch every one
+MUTANTS = [
+    ("allowlist-bypass", "if eq k 0\nif or eq m 0 not agallowed ICMD get gnum QNCMD view part e1 0 m", "if eq k 1\nif or eq m 0 not agallowed ICMD get gnum QNCMD view part e1 0 m"),
+    ("dotdot-allowed", "if eq cl 2\nif eq get p add s 1 46\nret false", "if eq cl 2\nif eq get p add s 1 47\nret false"),
+    ("symlink-followed", "ret ne and md 61440 40960", "ret true"),
+    ("fetch-allowlist-bypass", "if not agallowed IFET nf view part cn 0 cl", "if eq nf 999"),
+    ("write-flag-ignored", "if eq get gnum QWRITE 0", "if eq get gnum QWRITE 7"),
+    ("no-done-accepted", "if eq get gst SFIN 0\nagerr enodone\nret 6", "if eq get gst SFIN 7\nagerr enodone\nret 6"),
+]
+
+
+def run_mutants(omc, port, base):
+    src0 = open(os.path.join(AGENT, "agent.om")).read()
+    killed = 0
+    for name, a, b in MUTANTS:
+        if src0.count(a) != 1:
+            raise RuntimeError("mutant %s: anchor found %d times" % (name, src0.count(a)))
+        src = b"om2\n" + b"".join(open(os.path.join(ROOT, s), "rb").read() for s in SOURCES[:3]) + src0.replace(a, b).encode()
+        p = subprocess.run([omc], input=src, capture_output=True)
+        if p.returncode != 0:
+            raise RuntimeError("mutant %s does not compile" % name)
+        mb = os.path.join(base, "mut-" + name)
+        with open(mb, "wb") as fh:
+            fh.write(p.stdout)
+        os.chmod(mb, 0o700)
+        caught = []
+        for c in cases(port):
+            f, _, _, _ = run_case(mb, port, base, c)
+            if f:
+                caught.append(c["name"])
+        if caught:
+            killed += 1
+            log("AGENT-MUTANT %s KILLED by %s" % (name, ",".join(caught[:3])))
+        else:
+            log("AGENT-MUTANT %s SURVIVED" % name)
+    return killed
+
+
+def main():
+    a = sys.argv[1:]
+    omc = os.path.join(ROOT, "seed/out/omc")
+    binp = None
+    keep = None
+    while a:
+        k = a.pop(0)
+        if k == "--omc":
+            omc = a.pop(0)
+        elif k == "--bin":
+            binp = a.pop(0)
+        elif k == "--keep":
+            keep = a.pop(0)
+    if not os.access(omc, os.X_OK):
+        log("AGENT-CHECK NOT_RUN no compiler at %s" % omc)
+        return 3
+    base = keep or tempfile.mkdtemp(prefix="omagent-check-")
+    os.makedirs(base, exist_ok=True)
+    srv = Server(("127.0.0.1", 0), Handler)
+    port = srv.server_address[1]
+    assert port != 18091
+    threading.Thread(target=srv.serve_forever, daemon=True).start()
+    try:
+        if binp is None:
+            binp = os.path.join(base, "omagent")
+            build(omc, binp)
+            log("AGENT-BUILD PASS bytes=%d" % os.path.getsize(binp))
+        bad = 0
+        cs = cases(port)
+        for c in cs:
+            f, o, rc, dt = run_case(binp, port, base, c)
+            if f:
+                bad += 1
+                log("AGENT-CASE %s FAIL %s rc=%d dt=%.2f\n  stdout=%r\n  stderr=%r" % (c["name"], "; ".join(f), rc, dt, o["out"][:300], o["err"][:300]))
+            else:
+                log("AGENT-CASE %s PASS rc=%d dt=%.2f" % (c["name"], rc, dt))
+        if bad:
+            log("AGENT-CHECK FAIL failed=%d/%d" % (bad, len(cs)))
+            return 1
+        # negative control: a deliberately wrong expectation must fail
+        wrong = dict(cs[0])
+        wrong["rc"] = 6
+        f, _, _, _ = run_case(binp, port, base, wrong)
+        if not f:
+            log("AGENT-CONTROL FAIL a wrong expectation passed")
+            return 1
+        wrong = dict(cs[0])
+        wrong["checks"] = [has("text the model never sent")]
+        f, _, _, _ = run_case(binp, port, base, wrong)
+        if not f:
+            log("AGENT-CONTROL FAIL a wrong output expectation passed")
+            return 1
+        log("AGENT-CONTROL PASS wrong expectations fail")
+        k = run_mutants(omc, port, base)
+        if k != len(MUTANTS):
+            log("AGENT-MUTANTS FAIL killed=%d/%d" % (k, len(MUTANTS)))
+            return 1
+        log("AGENT-MUTANTS PASS killed=%d/%d" % (k, len(MUTANTS)))
+        log("AGENT-CHECK PASS cases=%d mutants=%d" % (len(cs), len(MUTANTS)))
+        return 0
+    except Exception as e:
+        log("AGENT-CHECK FAIL %s" % e)
+        return 1
+    finally:
+        srv.shutdown()
+        if keep is None:
+            shutil.rmtree(base, ignore_errors=True)
+
+
+if __name__ == "__main__":
+    sys.exit(main())
diff --git a/seed/effects/.crumb b/seed/effects/.crumb
new file mode 100644
index 000000000..6647165f6
--- /dev/null
+++ b/seed/effects/.crumb
@@ -0,0 +1,20 @@
+{
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-30T02:48:27Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:4467ea7f6119a2c4b304abefe1409486f6fbf2db8abc4bbc7d28b1f868b16935",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 8,
+      "generated_at_commit": "7c820ac33706cd50741c62476a3fc57739e781ce",
+      "source_tree": "sha256:e430ad3ff4994aed63258852b188b8b7de66e195ce03260689d68de4bf0eb3dc"
+    }
+  },
+  "layer": "seed",
+  "name": "effects",
+  "purpose": "Effect-derived capability manifest in seeded Omega: host-word manifest, ELF syscall check, seccomp cBPF, with probe-parity, strace and bwrap oracle gate",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/effects/README.md b/seed/effects/README.md
new file mode 100644
index 000000000..7c7b10ee1
--- /dev/null
+++ b/seed/effects/README.md
@@ -0,0 +1,59 @@
+# effects: capability manifest derived from Omega source
+
+A seeded-Omega program reaches the kernel only through the closed keyword set in
+[OMEGESE section 10](../../docs/one_layer/OMEGESE.md) and
+[MAPPING.md](../host/MAPPING.md): there is no raw syscall and no address-to-pointer
+conversion. The host words that appear in a unit are therefore a complete, finite list
+of the OS effects it can have. This tool turns that list into a manifest, checks it
+against the compiled binary, and emits a seccomp filter that enforces it.
+
+```
+seed/out/omc < seed/effects/effects.om > effects && chmod +x effects
+effects src [allow=C,..] < unit.om      host words, classes, Linux syscalls; policy check
+effects elf < binary                    syscalls the omc ELF can issue (fail closed)
+effects verify SRC BIN [allow=C,..]     ELF syscalls must lie within the source manifest
+effects bpf [launch] < unit.om          seccomp cBPF allow-list for bwrap --seccomp
+effects table                           word, class and syscalls, one per line
+```
+
+Classes: `io` (read, write), `fd`, `path`, `net`, `proc`, `ident`, `time`, `env`,
+`random`, `device`. `exit`/traps (syscall 93) are always allowed.
+
+Exit status: 0 pass, 1 refused or undeclared syscall, 2 usage, 3 invalid or
+unresolvable input, 4 read error.
+
+`elf` treats every SVC in an executable load segment as reachable. Each SVC must be
+immediately preceded by `MOVZ X8,#n`, no direct branch may land on it, and the text
+may contain no `BR`/`BLR`. Anything else is `ELF UNRESOLVED` (exit 3). W+X segments
+are refused. These rules hold for every program the pinned compiler emits today. A
+binary from another producer will usually fail closed.
+
+## Qualification
+
+`sh seed/effects/check.sh` (pinned omc; strace, bwrap, od and dd as oracles):
+
+- closure: every keyword with a host code in `seed/omc/genkw.awk` is in the table;
+  `omc.om` has exactly 5 SVC emit sites (a new site means the table needs review)
+- probe parity: one compiled probe per word; the ELF syscalls equal the table row
+- self manifest, fixtures, policy refusals with word, class and line
+- every program-mode unit in `seed/host/tests` and `seed/rung4/tests`, and omc itself:
+  binary syscalls lie within the source manifest
+- strace: syscalls observed at run time lie within the ELF set
+- seccomp: each fixture runs under its own filter; a binary run under a narrower
+  filter is killed (exit 159, SIGSYS)
+- fail-closed controls: SVC without `MOVZ X8`, `MOVZ X9`, branch into an SVC, `BR`,
+  W+X segment, non-ELF input
+- tool mutants (dropped row, wrong syscall number, weakened MOVZ check) are killed
+
+## Limits
+
+- Classes and the filter work at syscall granularity. `fopen` is `path` whether it
+  reads or writes; argument-level policy (literal open flags, socket families) is
+  future work.
+- `bpf launch` adds `execve` (221) so that bwrap can start the program. The program
+  can therefore call execve itself under that filter. An in-program install would close
+  this gap but needs a `prctl`/`seccomp` host word, which is a compiler change.
+- The filter restricts syscalls only. The check runs bwrap with `--dev-bind / /`, so
+  filesystem and namespace isolation are separate.
+- The table is pinned to the compiler in `om/units.sh`. A compiler that changes how
+  host words lower is caught by closure and probe parity, not silently accepted.
diff --git a/seed/effects/cases/clock.om b/seed/effects/cases/clock.om
new file mode 100644
index 000000000..2edfc1d20
--- /dev/null
+++ b/seed/effects/cases/clock.om
@@ -0,0 +1,13 @@
+note clock: time, identity and randomness; no file, network or process words.
+text ok "clock\n"
+fn main to int
+t = monons
+p = getpid
+b = new uchar 8 0
+r = random b 0 8 0
+if or le t 0 le p 0
+ret 1
+end
+w = write 1 ok 0 len ok
+ret 0
+end
diff --git a/seed/effects/cases/files.om b/seed/effects/cases/files.om
new file mode 100644
index 000000000..fa63d7078
--- /dev/null
+++ b/seed/effects/cases/files.om
@@ -0,0 +1,17 @@
+note files: create, stat and remove one file in the current directory.
+text nm "effects.tmp"
+fn main to int
+fd = int fopen nm 0 len nm 578 384
+if lt fd 0
+ret 1
+end
+w = write fd nm 0 len nm
+st = new uchar 128 0
+r = fstat fd st 0 128
+c = fclose fd
+u = unlink nm 0 len nm
+if or ne r 0 ne u 0
+ret 2
+end
+ret 0
+end
diff --git a/seed/effects/cases/net.om b/seed/effects/cases/net.om
new file mode 100644
index 000000000..a9d97468d
--- /dev/null
+++ b/seed/effects/cases/net.om
@@ -0,0 +1,9 @@
+note net: opens and closes one TCP socket; a policy without net must refuse it.
+fn main to int
+s = socknew 2 1 0
+if lt s 0
+ret 1
+end
+c = fclose int s
+ret 0
+end
diff --git a/seed/effects/cases/plain.om b/seed/effects/cases/plain.om
new file mode 100644
index 000000000..9119b5b30
--- /dev/null
+++ b/seed/effects/cases/plain.om
@@ -0,0 +1,6 @@
+note plain: stdout only; manifest must be class io, syscalls 64 and exit 93.
+text hi "plain\n"
+fn main to int
+r = write 1 hi 0 len hi
+ret 0
+end
diff --git a/seed/effects/cases/probes.txt b/seed/effects/cases/probes.txt
new file mode 100644
index 000000000..c0ea88143
--- /dev/null
+++ b/seed/effects/cases/probes.txt
@@ -0,0 +1,85 @@
+note probes.txt: word|expression. check.sh wraps each expression in a minimal program
+note (arrays a 8, b 64, c 128 bytes) and compares the compiled syscalls with effects table.
+read|read 0 b 0 8
+write|write 1 a 0 1
+fopen|fopen a 0 1 0 0
+fclose|fclose 3
+fsync|fsync 3
+fdsync|fdsync 3
+memfd|memfd a 0 1 0
+fchmod|fchmod 3 0
+chmod|chmod a 0 1 0
+chown|chown a 0 1 0 0
+faccess|faccess a 0 1 0
+getuid|getuid
+geteuid|geteuid
+getgid|getgid
+getegid|getegid
+fchdir|fchdir 3
+getppid|getppid
+setsid|setsid
+getpgid|getpgid 0
+getsid|getsid 0
+syncfs|syncfs 3
+shutdown|shutdown 3 0
+flock|flock 3 1
+setpgid|setpgid 0 0
+umask|umask 0
+fseek|fseek 3 long 0 0
+ftrunc|ftrunc 3 long 0
+truncate|truncate a 0 1 long 0
+unlink|unlink a 0 1
+makedir|makedir a 0 1 0
+rmdir|rmdir a 0 1
+cwd|cwd a 0 64
+chdir|chdir a 0 1
+readlnk|readlnk a 0 1 b 0 64
+getdnts|getdnts 3 b 0 64
+fstat|fstat 3 c 0 128
+stat|stat a 0 1 c 0 128
+lstat|lstat a 0 1 c 0 128
+renames|renames a 0 1 0
+link|link a 0 1
+symlnk|symlnk a 0 1
+monons|monons
+realns|realns
+sleepns|sleepns long 0
+socknew|socknew 1 1 0
+bind|bind 3 a 0 1
+connect|connect 3 a 0 1
+listen|listen 3 1
+accept|accept 3 0
+sockname|sockname 3 b 0 64
+sockopt|sockopt 3 1 2 a 0 4
+recv|recv 3 b 0 64 0
+send|send 3 a 0 1 0
+waitio|waitio 3 1 long 0
+peercred|peercred 3 b 0 64
+pollfds|pollfds b 0 8 long 0
+sendmsg|sendmsg 3 a 0 1 0
+fork|fork
+getpid|getpid
+killpid|killpid 0 0
+waitpid|waitpid 0 b 0 8 0
+pipefds|pipefds b 0 8 0
+dupfd|dupfd 3 4 0
+execprog|execprog a 0 1
+argcnt|argcnt
+argread|argread 0 b 0 64
+envcnt|envcnt
+envread|envread 0 b 0 64
+random|random b 0 8 0
+pread|pread 3 b 0 8 long 0
+pwrite|pwrite 3 a 0 1 long 0
+devctl|devctl 3 21531 b 0 4
+mapnew|mapnew 3 0 4096 1 1
+mapdrop|mapdrop long 1
+mapread|mapread long 1 0 b 0 8
+mapwrite|mapwrite long 1 0 a 0 1
+mapaddr|long mapaddr long 1
+mapget|long mapget long 1 0 8
+mapset|mapset long 1 0 8 0
+maphold|maphold 65536 4096
+mapbind|mapbind long 1 3 0 1
+devcall|devcall neg int 1 uint 3223340587 c 0 32 b 0 0
+uvmctl|uvmctl neg int 1 uint 75 c 0 8
diff --git a/seed/effects/check.sh b/seed/effects/check.sh
new file mode 100755
index 000000000..c4754006e
--- /dev/null
+++ b/seed/effects/check.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+# Qualification for seed/effects (effect-derived capability manifest).
+# The tool is seeded Omega; this coordinator only compiles, runs and compares.
+# strace, bwrap, od and dd are read-only oracles / launchers, not implementation.
+# Exit 0 PASS, 1 FAIL, 3 NOT_RUN (wrong compiler or missing oracle).
+set -u
+cd "$(dirname "$0")/../.."
+ROOT=$(pwd)
+OMC=${OMC:-$ROOT/seed/out/omc}
+PIN=$(sed -n 's/^OMC_PIN=//p' om/units.sh)
+[ -x "$OMC" ] || { echo "NOT_RUN effects: no omc at $OMC"; exit 3; }
+[ "$(sha256sum < "$OMC" | cut -c1-64)" = "$PIN" ] || { echo "NOT_RUN effects: omc is not the pinned compiler $PIN"; exit 3; }
+for t in strace bwrap od dd awk; do
+    command -v $t > /dev/null || { echo "NOT_RUN effects: oracle $t missing"; exit 3; }
+done
+B=$ROOT/build/seed/effects
+rm -rf "$B"; mkdir -p "$B/probe" "$B/corpus" "$B/run"
+C=seed/effects/cases
+E=$B/effects
+fails=0; checks=0
+ok() { checks=$((checks + 1)); printf 'ok   %s\n' "$*"; }
+bad() { checks=$((checks + 1)); fails=$((fails + 1)); printf 'FAIL %s\n' "$*"; }
+want() { # want NAME EXPECTED_EXIT ACTUAL_EXIT
+    if [ "$2" = "$3" ]; then ok "$1 exit=$3"; else bad "$1 exit=$3 expected=$2"; fi
+}
+build() { # build SRC OUT
+    "$OMC" < "$1" > "$2" 2> "$2.err" && chmod +x "$2"
+}
+sys_of() { # syscalls line of an elf report
+    sed -n 's/^ELF 1 .* syscalls=//p'
+}
+
+build seed/effects/effects.om "$E" || { cat "$E.err"; echo "SEMANTIC EFFECTS FAIL build"; exit 1; }
+echo "omc $PIN"
+echo "effects sha256 $(sha256sum < "$E" | cut -c1-64)"
+
+# 1. Closure: every keyword with a host code (>= 100, except the non-host type/declaration
+#    keywords const and qty) is in the table,
+#    and the table holds nothing else besides read/write.
+sed -n 16,18p seed/omc/genkw.awk | grep -oE '[a-z0-9]+:[0-9]+' \
+    | awk -F: '$2 >= 100 && $1 != "const" && $1 != "qty" { print $1 }' | sort > "$B/kw.txt"
+"$E" table | cut -d' ' -f1 | grep -v -x -e read -e write | sort > "$B/tab.txt"
+if cmp -s "$B/kw.txt" "$B/tab.txt"; then ok "closure: $(wc -l < "$B/kw.txt") host keywords == table"
+else bad "closure: host keywords differ from table"; diff "$B/kw.txt" "$B/tab.txt"; fi
+# omc emits SVC at exactly these sites; a new site means the table must be re-reviewed.
+n=$(grep -c '^emit 3556769793$' seed/omc/omc.om)
+if [ "$n" = 5 ]; then ok "omc.om SVC emit sites = 5"; else bad "omc.om SVC emit sites = $n (expected 5): review table"; fi
+
+# 2. Probe parity: compile one program per table word with the pinned omc and read the
+#    syscalls back out of the ELF; they must equal the table row (93 = exit is always present).
+probe() { # probe EXPR OUT
+    printf 'fn main to int\na = new uchar 8 65\nb = new uchar 64 0\nc = new uchar 128 0\nr = long %s\nret 0\nend\n' "$1" > "$2.om"
+    build "$2.om" "$2"
+}
+probe_parity() { # probe_parity TOOL -> prints mismatches, returns count
+    m=0
+    "$1" table > "$B/probe/table.txt"
+    while read -r w cl s1 s2; do
+        expr=$(grep "^$w|" $C/probes.txt | head -1 | cut -d'|' -f2-)
+        [ -n "$expr" ] || { echo "  no probe for $w"; m=$((m + 1)); continue; }
+        probe "$expr" "$B/probe/$w" || { echo "  probe $w does not compile: $(cat "$B/probe/$w.err")"; m=$((m + 1)); continue; }
+        got=$("$E" elf < "$B/probe/$w" | sys_of | tr ',' '\n' | grep -v -x 93 | sort -n | tr '\n' ' ')
+        exp=$(printf '%s\n%s\n' "$s1" "$s2" | grep -v -x -- - | sort -n -u | tr '\n' ' ')
+        [ "$got" = "$exp" ] || { echo "  $w table=[$exp] elf=[$got]"; m=$((m + 1)); }
+    done < "$B/probe/table.txt"
+    return $m
+}
+if probe_parity "$E"; then ok "probe parity: $(wc -l < "$B/probe/table.txt") words, table == pinned omc"
+else bad "probe parity"; fi
+printf 'fn main to int\nret 0\nend\n' > "$B/probe/base.om"; build "$B/probe/base.om" "$B/probe/base"
+b=$("$E" elf < "$B/probe/base" | sys_of)
+[ "$b" = 93 ] && ok "base program syscalls = 93" || bad "base program syscalls = $b"
+
+# 3. Self manifest: the tool reads stdin/files and writes stdout, nothing else.
+"$E" src allow=io,fd,path,env < seed/effects/effects.om > "$B/self.txt"; want "self manifest allow=io,fd,path,env" 0 $?
+grep -qx 'EFFECTS 1 words=6 classes=io,fd,path,env syscalls=56,57,63,64,93' "$B/self.txt" && ok "self manifest exact" || bad "self manifest: $(tail -1 "$B/self.txt")"
+"$E" verify seed/effects/effects.om "$E" > "$B/selfv.txt"; want "self verify source vs binary" 0 $?
+
+# 4. Fixtures: manifest, policy, verify.
+for f in plain clock files net; do build $C/$f.om "$B/$f" || bad "fixture $f does not compile"; done
+"$E" src < $C/plain.om | grep -qx 'EFFECTS 1 words=1 classes=io syscalls=64,93' && ok "plain manifest" || bad "plain manifest"
+"$E" src < $C/clock.om | grep -qx 'EFFECTS 1 words=4 classes=io,ident,time,random syscalls=64,93,113,172,278' && ok "clock manifest" || bad "clock manifest"
+"$E" src allow=io,ident,time,random < $C/clock.om > /dev/null; want "clock allow=io,ident,time,random" 0 $?
+"$E" src allow=io,fd,path < $C/net.om > "$B/net.txt"; want "NEGATIVE net under allow=io,fd,path" 1 $?
+grep -qx 'EFFECTS REFUSED word=socknew class=net line=3' "$B/net.txt" && ok "net refusal names word, class and line" || bad "net refusal text"
+"$E" src allow=io,nosuch < $C/plain.om > /dev/null; want "NEGATIVE unknown class" 2 $?
+for f in plain clock files net; do "$E" verify $C/$f.om "$B/$f" > /dev/null; want "verify $f" 0 $?; done
+"$E" verify $C/plain.om "$B/net" > "$B/undecl.txt"; want "NEGATIVE verify plain source vs net binary" 1 $?
+grep -q '^VERIFY FAIL undeclared=57,198' "$B/undecl.txt" && ok "undeclared syscalls named (57,198)" || bad "undeclared text: $(tail -1 "$B/undecl.txt")"
+
+# 5. Corpus: every program-mode unit in seed/host/tests and the fixtures; binary within source.
+cn=0; cf=0
+for s in seed/host/tests/*.om seed/rung4/tests/*.om; do
+    grep -q '^fn main' "$s" || continue
+    o=$B/corpus/$(echo "$s" | tr '/' '_')
+    build "$s" "$o" || continue
+    cn=$((cn + 1))
+    "$E" verify "$s" "$o" > "$o.v" || { cf=$((cf + 1)); echo "  corpus FAIL $s: $(tail -1 "$o.v")"; }
+done
+[ $cn -gt 0 ] && [ $cf = 0 ] && ok "corpus verify: $cn compiled programs, binary syscalls within source manifest" || bad "corpus verify: $cf of $cn"
+"$E" verify seed/omc/omc.om "$OMC" > "$B/omc.v"; want "verify omc.om vs pinned omc" 0 $?
+
+# 6. Dynamic oracle: syscalls observed by strace (after the initial execve) within the ELF set.
+dyn() { # dyn NAME BINARY [ARGS] < stdin
+    n=$1; shift
+    (cd "$B/run" && strace -f -n -qq -o "$B/run/$n.st" "$@" > /dev/null 2>&1)
+    obs=$(sed 1d "$B/run/$n.st" | sed -n 's/^[0-9]* \[ *\([0-9]*\)\].*/\1/p' | sort -n -u | tr '\n' ' ')
+    allow=$("$E" elf < "$1" | sys_of | tr ',' ' ')
+    extra=""
+    for x in $obs; do case " $allow " in *" $x "*) ;; *) extra="$extra $x";; esac; done
+    [ -z "$extra" ] && ok "strace $n observed [$obs] within ELF" || bad "strace $n undeclared:$extra"
+}
+dyn plain "$B/plain"
+dyn clock "$B/clock"
+dyn files "$B/files"
+dyn net "$B/net"
+dyn self "$E" src < seed/effects/effects.om
+dyn selfv "$E" verify "$ROOT/seed/effects/effects.om" "$E"
+
+# 7. Enforcement: the manifest compiled to seccomp cBPF, loaded by bwrap before execve.
+#    'launch' adds execve (221), which bwrap needs to start the program.
+sec() { # sec NAME FILTER_SOURCE BINARY EXPECTED_EXIT
+    "$E" bpf launch < "$2" > "$B/run/$1.bpf"
+    (cd "$B/run" && bwrap --dev-bind / / --seccomp 9 "$3" > /dev/null 2>&1 9< "$B/run/$1.bpf")
+    want "seccomp $1" "$4" $?
+}
+sec plain $C/plain.om "$B/plain" 0
+sec clock $C/clock.om "$B/clock" 0
+sec files $C/files.om "$B/files" 0
+sec net $C/net.om "$B/net" 0
+sec plain-runs-net $C/plain.om "$B/net" 159
+sec plain-runs-clock $C/plain.om "$B/clock" 159
+sec clock-runs-files $C/clock.om "$B/files" 159
+"$E" bpf launch < seed/effects/effects.om > "$B/run/self.bpf"
+bwrap --dev-bind / / --seccomp 9 "$E" src < seed/effects/effects.om 9< "$B/run/self.bpf" | tail -1 | grep -q '^EFFECTS 1 words=6 ' \
+    && ok "effects runs under its own filter" || bad "effects under its own filter"
+"$E" bpf < $C/plain.om > "$B/run/exact.bpf"
+[ "$(wc -c < "$B/run/exact.bpf")" = 64 ] && ok "exact filter for plain = 8 instructions (64 bytes)" || bad "exact filter size $(wc -c < "$B/run/exact.bpf")"
+
+# 8. Fail-closed ELF controls (patched copies of plain).
+word_at_svc() { # index of the first SVC word in the text segment
+    od -An -v -tx4 -w4 "$1" | awk '$1 == "d4000001" { print NR - 1; exit }'
+}
+patch() { # patch IN OUT WORDINDEX LE_BYTES(octal escapes)
+    cp "$1" "$2"
+    printf "$4" | dd of="$2" bs=1 seek=$(($3 * 4)) conv=notrunc 2> /dev/null
+}
+i=$(word_at_svc "$B/plain")
+patch "$B/plain" "$B/run/nomovz" $((i - 1)) '\037\040\003\325'          # NOP replaces MOVZ X8
+"$E" elf < "$B/run/nomovz" > "$B/run/nomovz.txt"; want "NEGATIVE svc without MOVZ X8" 3 $?
+grep -q 'reason=prev-not-movz-x8' "$B/run/nomovz.txt" && ok "  reason prev-not-movz-x8" || bad "  reason text"
+patch "$B/plain" "$B/run/movzx9" $((i - 1)) '\011\010\200\322'        # MOVZ X9,#64: right number, wrong register
+"$E" elf < "$B/run/movzx9" > "$B/run/movzx9.txt"; want "NEGATIVE svc after MOVZ X9" 3 $?
+grep -q 'reason=prev-not-movz-x8' "$B/run/movzx9.txt" && ok "  reason prev-not-movz-x8" || bad "  reason text"
+patch "$B/plain" "$B/run/btgt" $((i - 2)) '\002\000\000\024'            # B +2 lands on the SVC
+"$E" elf < "$B/run/btgt" > "$B/run/btgt.txt"; want "NEGATIVE branch into SVC" 3 $?
+grep -q 'reason=branch-target' "$B/run/btgt.txt" && ok "  reason branch-target" || bad "  reason text"
+patch "$B/plain" "$B/run/br" $((i - 2)) '\000\000\037\326'              # BR X0
+"$E" elf < "$B/run/br" > "$B/run/br.txt"; want "NEGATIVE indirect branch" 3 $?
+patch "$B/plain" "$B/run/wx" 17 '\007'                                  # p_flags of phdr 0 = RWX
+"$E" elf < "$B/run/wx" > "$B/run/wx.txt"; want "NEGATIVE W+X segment" 3 $?
+grep -qx 'ELF REFUSED wx-segment' "$B/run/wx.txt" && ok "  reason wx-segment" || bad "  reason text"
+printf 'not an elf' > "$B/run/junk"
+"$E" elf < "$B/run/junk" > /dev/null; want "NEGATIVE not an ELF" 3 $?
+
+# 9. Tool mutants must be killed by the checks above.
+mut() { # mut NAME SED_EXPR
+    sed "$2" seed/effects/effects.om > "$B/mut-$1.om"
+    if cmp -s seed/effects/effects.om "$B/mut-$1.om"; then bad "mutant $1 did not apply"; return; fi
+    build "$B/mut-$1.om" "$B/mut-$1" || { bad "mutant $1 does not compile"; return; }
+    k=""
+    probe_parity "$B/mut-$1" > /dev/null || k="$k probe-parity"
+    "$B/mut-$1" table | cut -d' ' -f1 | grep -v -x -e read -e write | sort | cmp -s - "$B/kw.txt" || k="$k closure"
+    "$B/mut-$1" verify $C/clock.om "$B/clock" > /dev/null || k="$k verify"
+    "$B/mut-$1" elf < "$B/run/movzx9" > /dev/null; [ $? = 3 ] || k="$k movzx9"
+    [ -n "$k" ] && ok "mutant $1 killed by:$k" || bad "mutant $1 survived"
+}
+mut drop-getpid 's/getpid ident 172 -\\n//'
+mut wrong-random 's/random random 278 -/random random 277 -/'
+mut svc-any-prev 's/^if ne and p 4292870175 3531603976$/if eq p 1/'
+
+if [ $fails = 0 ]; then echo "SEMANTIC EFFECTS PASS checks=$checks"; exit 0; fi
+echo "SEMANTIC EFFECTS FAIL failed=$fails checks=$checks"; exit 1
diff --git a/seed/effects/effects.om b/seed/effects/effects.om
new file mode 100644
index 000000000..095305feb
--- /dev/null
+++ b/seed/effects/effects.om
@@ -0,0 +1,867 @@
+note effects: effect-derived capability manifest for seeded-Omega programs.
+note A unit can reach the kernel only through the closed set of keyword operations in
+note OMEGESE section 10 (no raw syscall, no address-to-pointer), so the set of host
+note words in its source is a complete, finite statement of its OS effects.
+note Modes:
+note   effects src [allow=C,..] < unit.om      host words, classes, Linux syscalls
+note   effects elf < binary                    syscalls the omc ELF can issue (fail closed)
+note   effects verify SRC BIN [allow=C,..]     ELF syscalls must be within the source set
+note   effects bpf [launch] < unit.om          seccomp cBPF allow-list (bwrap --seccomp)
+note   effects table                           the word table, for the probe parity test
+note Exit: 0 pass, 1 refused/undeclared, 2 usage, 3 invalid or unresolvable input, 4 read.
+
+global inb uchar 8388612
+global mk uchar 2097156
+global ob uchar 1048576
+global obn ulong 1
+global dig uchar 24
+global ab uchar 4096
+global wn ulong 128
+global wc ulong 128
+global ws1 ulong 128
+global ws2 ulong 128
+global wl ulong 128
+global wk ulong 128
+global nw ulong 1
+global cn ulong 16
+global ncl ulong 1
+global sy uchar 512
+global se uchar 512
+global cu uchar 16
+global al uchar 16
+global st ulong 16
+global ef ulong 8
+
+note word class syscall1 syscall2 ('-' none). Kept equal to the pinned omc by check.sh,
+note which compiles one probe per word and reads the syscalls back out of the ELF.
+text tab "read io 63 -\nwrite io 64 -\nfclose fd 57 -\nfsync fd 82 -\nfdsync fd 83 -\nfseek fd 62 -\nftrunc fd 46 -\nfchmod fd 52 -\nfchdir fd 50 -\nsyncfs fd 267 -\nflock fd 32 -\ngetdnts fd 61 -\nfstat fd 80 -\npread fd 67 -\npwrite fd 68 -\ndupfd fd 24 -\npipefds fd 59 -\nwaitio fd 73 -\npollfds fd 73 -\nmemfd fd 279 -\nfopen path 56 -\nchmod path 53 -\nchown path 54 -\nfaccess path 48 -\ntruncate path 45 -\nunlink path 35 -\nmakedir path 34 -\nrmdir path 35 -\ncwd path 17 -\nchdir path 49 -\nreadlnk path 78 -\nstat path 79 -\nlstat path 79 -\nrenames path 276 -\nlink path 37 -\nsymlnk path 36 -\nsocknew net 198 -\nbind net 200 -\nconnect net 203 -\nlisten net 201 -\naccept net 242 -\nsockname net 204 -\nsockopt net 208 -\nrecv net 207 -\nsend net 206 -\npeercred net 209 -\nsendmsg net 211 -\nshutdown net 210 -\nfork proc 220 -\nexecprog proc 221 -\nkillpid proc 129 -\nwaitpid proc 260 -\nsetsid proc 157 -\nsetpgid proc 154 -\numask proc 166 -\ngetpid ident 172 -\ngetppid ident 173 -\ngetuid ident 174 -\ngeteuid ident 175 -\ngetgid ident 176 -\ngetegid ident 177 -\ngetpgid ident 155 -\ngetsid ident 156 -\nmonons time 113 -\nrealns time 113 -\nsleepns time 101 -\nargcnt env - -\nargread env - -\nenvcnt env - -\nenvread env - -\nrandom random 278 -\ndevctl device 29 -\ndevcall device 29 -\nuvmctl device 29 -\nmapnew device 222 -\nmapdrop device 215 -\nmaphold device 215 222\nmapbind device 215 222\nmapread device - -\nmapwrite device - -\nmapaddr device - -\nmapget device - -\nmapset device - -\n"
+text cls "io\nfd\npath\nnet\nproc\nident\ntime\nenv\nrandom\ndevice\n"
+text kwn "note allow= launch src elf verify bpf table "
+text msg "EFFECT \n class=\n syscalls=\n uses=\n line=\nEFFECTS 1 words=\n classes=\nEFFECTS REFUSED word=\nEFFECTS PASS\nEFFECTS REFUSED n=\nELF 1 words=\n svc=\nELF UNRESOLVED at=\n reason=prev-not-movz-x8\n reason=branch-target\n reason=indirect-branch\nELF INVALID\nVERIFY PASS syscalls=\nVERIFY FAIL undeclared=\n unused=\nusage: effects src [allow=C,..] < unit.om | elf < binary | verify SRC BIN [allow=C,..] | bpf [launch] < unit.om | table\neffects: cannot read input\n-\n,\n \nELF REFUSED wx-segment\nEFFECTS REFUSED unknown-class\n reason=nr-range\nELF REFUSED no-exec-segment\n"
+
+note ---- output ----
+fn obf to void
+n = get obn 0
+o = ulong 0
+while lt o n
+r = write 1 ob o sub n o
+if le r 0
+exit 4
+end
+o = add o ulong r
+end
+put obn 0 0
+end
+fn ob1 b uchar to void
+n = get obn 0
+if ge n 1048000
+obf
+n = ulong 0
+end
+put ob n b
+put obn 0 add n 1
+end
+fn onl to void
+ob1 10
+end
+fn say id ulong to void
+k = ulong 0
+s = ulong 0
+for i ulong len msg
+if eq get msg i 10
+if eq k id
+for j ulong sub i s
+ob1 get msg add s j
+end
+ret
+end
+k = add k 1
+s = add i 1
+end
+end
+end
+fn od v ulong to void
+x = v
+n = ulong 0
+while ge x 10
+put dig n uchar add 48 rem x 10
+x = div x 10
+n = add n 1
+end
+put dig n uchar add 48 x
+n = add n 1
+for i ulong n
+ob1 get dig sub sub n i 1
+end
+end
+fn pw w ulong to void
+x = w
+for i ulong 8
+if eq x 0
+ret
+end
+ob1 uchar and x 255
+x = shr x 8
+end
+end
+
+note ---- tables ----
+fn kwp id ulong to ulong
+k = ulong 0
+w = ulong 0
+s = ulong 0
+for i ulong len kwn
+c = get kwn i
+if eq c 32
+if eq k id
+ret w
+end
+k = add k 1
+w = ulong 0
+s = ulong 0
+else
+w = or w shl ulong c s
+s = add s 8
+end
+end
+ret 0
+end
+fn clsid w ulong to ulong
+for i ulong get ncl 0
+if eq get cn i w
+ret i
+end
+end
+ret 99
+end
+fn tinit to void
+w = ulong 0
+s = ulong 0
+r = ulong 0
+for i ulong len cls
+c = get cls i
+if eq c 10
+put cn r w
+r = add r 1
+w = ulong 0
+s = ulong 0
+else
+w = or w shl ulong c s
+s = add s 8
+end
+end
+put ncl 0 r
+dash = ulong 45
+r = ulong 0
+f = ulong 0
+w = ulong 0
+s = ulong 0
+d = ulong 0
+for i ulong len tab
+c = get tab i
+if or eq c 32 eq c 10
+if eq f 0
+put wn r w
+end
+if eq f 1
+put wc r clsid w
+end
+if eq f 2
+if eq w dash
+put ws1 r 65535
+else
+put ws1 r d
+end
+end
+if eq f 3
+if eq w dash
+put ws2 r 65535
+else
+put ws2 r d
+end
+end
+f = add f 1
+if eq c 10
+r = add r 1
+f = ulong 0
+end
+w = ulong 0
+s = ulong 0
+d = ulong 0
+else
+w = or w shl ulong c s
+s = add s 8
+d = add mul d 10 sub ulong c 48
+end
+end
+put nw 0 r
+end
+
+note ---- input ----
+fn rdfd fd int to ulong
+n = ulong 0
+for i ulong 8388608
+r = read fd inb n sub 8388612 n
+if lt r 0
+ret 8388613
+end
+if eq r 0
+ret n
+end
+n = add n ulong r
+if ge n 8388612
+ret 8388613
+end
+end
+ret 8388613
+end
+fn rdarg ix ulong to ulong
+m = argread ix ab 0 4095
+if le m 0
+ret 8388613
+end
+fd = int fopen ab 0 ulong m 0 0
+if lt fd 0
+ret 8388613
+end
+n = rdfd fd
+c = fclose fd
+ret n
+end
+fn argw ix ulong to ulong
+m = argread ix ab 0 4095
+if or le m 0 gt m 8
+ret 0
+end
+w = ulong 0
+for i ulong ulong m
+w = or w shl ulong get ab i mul i 8
+end
+ret w
+end
+note allow=C1,C2 in argument ix; returns false on an unknown class name
+fn parsal ix ulong to bool
+m = argread ix ab 0 4095
+if le m 0
+ret false
+end
+if lt m 6
+ret false
+end
+pfx = ulong 0
+for i ulong 6
+pfx = or pfx shl ulong get ab i mul i 8
+end
+if ne pfx kwp 1
+ret false
+end
+put ef 0 1
+w = ulong 0
+s = ulong 0
+for i ulong sub ulong m 5
+j = add i 6
+c = uchar 44
+if lt j ulong m
+c = get ab j
+end
+if eq c 44
+if gt s 0
+k = clsid w
+if eq k 99
+ret false
+end
+put al k 1
+end
+w = ulong 0
+s = ulong 0
+else
+if ge s 64
+ret false
+end
+w = or w shl ulong c s
+s = add s 8
+end
+end
+ret true
+end
+
+note ---- source scan: every host word occurrence outside notes and text literals ----
+fn hit w ulong ln ulong to void
+for r ulong get nw 0
+if eq get wn r w
+put wk r add get wk r 1
+if eq get wl r 0
+put wl r ln
+end
+put cu get wc r 1
+a = get ws1 r
+if lt a 512
+put sy a 1
+end
+b = get ws2 r
+if lt b 512
+put sy b 1
+end
+ret
+end
+end
+end
+note st: 0 packed word, 1 word length, 2 line, 3 skip-to-eol, 4 in quote, 5 escape, 6 first word on line
+fn fin to void
+l = get st 1
+if eq l 0
+ret
+end
+w = get st 0
+if and eq get st 6 1 and eq l 4 eq w kwp 0
+put st 3 1
+else
+if le l 8
+hit w get st 2
+end
+end
+put st 6 0
+put st 0 0
+put st 1 0
+end
+fn scansrc n ulong to void
+put st 0 0
+put st 1 0
+put st 2 1
+put st 3 0
+put st 4 0
+put st 5 0
+put st 6 1
+put sy 93 1
+for i ulong 8388608
+if ge i n
+break
+end
+c = get inb i
+if eq c 10
+fin
+put st 2 add get st 2 1
+put st 3 0
+put st 4 0
+put st 5 0
+put st 6 1
+continue
+end
+if eq get st 3 1
+continue
+end
+if eq get st 4 1
+if eq get st 5 1
+put st 5 0
+else
+if eq c 92
+put st 5 1
+end
+if eq c 34
+put st 4 0
+end
+end
+continue
+end
+if or or eq c 32 eq c 9 or eq c 13 or eq c 40 eq c 41
+fin
+continue
+end
+if eq c 34
+fin
+put st 4 1
+put st 6 0
+continue
+end
+l = get st 1
+if lt l 8
+put st 0 or get st 0 shl ulong c mul l 8
+end
+put st 1 add l 1
+end
+fin
+end
+fn plist a ulong to void
+note a 0: source set, 1: elf set, 2: elf minus source, 3: source minus elf
+k = ulong 0
+for i ulong 512
+x = get sy i
+y = get se i
+p = false
+if eq a 0
+p = eq x 1
+end
+if eq a 1
+p = eq y 1
+end
+if eq a 2
+p = and eq y 1 eq x 0
+end
+if eq a 3
+p = and eq x 1 eq y 0
+end
+if p
+if gt k 0
+say 23
+end
+od i
+k = add k 1
+end
+end
+if eq k 0
+say 22
+end
+end
+fn psys r ulong to void
+a = get ws1 r
+b = get ws2 r
+if ge a 512
+say 22
+ret
+end
+od a
+if lt b 512
+say 23
+od b
+end
+end
+fn report to int
+u = ulong 0
+for r ulong get nw 0
+if gt get wk r 0
+u = add u 1
+say 0
+pw get wn r
+say 1
+pw get cn get wc r
+say 2
+psys r
+say 3
+od get wk r
+say 4
+od get wl r
+onl
+end
+end
+say 5
+od u
+say 6
+k = ulong 0
+for i ulong get ncl 0
+if eq get cu i 1
+if gt k 0
+say 23
+end
+pw get cn i
+k = add k 1
+end
+end
+if eq k 0
+say 22
+end
+say 2
+plist 0
+onl
+ret refuse
+end
+fn refuse to int
+if eq get ef 0 0
+ret 0
+end
+bad = ulong 0
+for r ulong get nw 0
+if and gt get wk r 0 eq get al get wc r 0
+bad = add bad 1
+say 7
+pw get wn r
+say 1
+pw get cn get wc r
+say 4
+od get wl r
+onl
+end
+end
+if eq bad 0
+say 8
+onl
+ret 0
+end
+say 9
+od bad
+onl
+ret 1
+end
+
+note ---- ELF scan of an omc static AArch64 binary ----
+fn r8 o ulong to ulong
+ret ulong get inb o
+end
+fn r16 o ulong to ulong
+ret or r8 o shl r8 add o 1 8
+end
+fn r32 o ulong to ulong
+ret or r16 o shl r16 add o 2 16
+end
+fn r64 o ulong to ulong
+ret or r32 o shl r32 add o 4 32
+end
+fn bad3 id ulong to int
+say id
+onl
+ret 3
+end
+fn unres at ulong why ulong to int
+say 12
+od at
+say why
+onl
+ret 3
+end
+note branch target of word w at index j, or 4294967295 if w is not a direct branch
+fn btgt w ulong j ulong to ulong
+o = ulong 0
+m = ulong 0
+if eq and w 2080374784 335544320
+o = and w 67108863
+m = 67108864
+end
+if or eq and w 4278190096 1409286144 eq and w 2113929216 872415232
+o = and shr w 5 524287
+m = 524288
+end
+if eq and w 2113929216 905969664
+o = and shr w 5 16383
+m = 16384
+end
+if eq m 0
+ret 4294967295
+end
+if ge o div m 2
+b = sub m o
+if gt b j
+ret 4294967294
+end
+ret sub j b
+end
+ret add j o
+end
+fn scantext off ulong fsz ulong to int
+nwd = div fsz 4
+if gt nwd 2097152
+ret bad3 16
+end
+for j ulong 2097152
+if ge j nwd
+break
+end
+put mk j 0
+end
+for j ulong 2097152
+if ge j nwd
+break
+end
+w = r32 add off mul j 4
+if or eq and w 4294966303 3592355840 eq and w 4294966303 3594452992
+ret unres j 15
+end
+if eq and w 4292870175 3556769793
+put ef 1 add get ef 1 1
+put mk j 1
+if eq j 0
+ret unres j 13
+end
+p = r32 add off mul sub j 1 4
+if ne and p 4292870175 3531603976
+ret unres j 13
+end
+nr = and shr p 5 65535
+if ge nr 512
+ret unres j 29
+end
+put se nr 1
+end
+end
+for j ulong 2097152
+if ge j nwd
+break
+end
+t = btgt r32 add off mul j 4 j
+if lt t nwd
+if eq get mk t 1
+ret unres t 14
+end
+end
+end
+put ef 2 add get ef 2 nwd
+ret 0
+end
+note one program header: -1 not an executable load, 0 scanned, >0 exit code
+fn seg p ulong n ulong to int
+t = r32 p
+f = r32 add p 4
+if ne t 1
+ret -1
+end
+if and ne and f 1 0 ne and f 2 0
+say 25
+onl
+ret 3
+end
+if eq and f 1 0
+ret -1
+end
+off = r64 add p 8
+fsz = r64 add p 32
+if or ne rem off 4 0 gt add off fsz n
+ret bad3 16
+end
+ret scantext off fsz
+end
+fn scanelf n ulong to int
+if lt n 64
+ret bad3 16
+end
+if or ne r32 0 1179403647 ne r16 18 183
+ret bad3 16
+end
+ph = r64 32
+pe = r16 54
+pn = r16 56
+if or ne pe 56 gt add ph mul pn 56 n
+ret bad3 16
+end
+nx = ulong 0
+for i ulong pn
+v = seg add ph mul i 56 n
+if gt v 0
+ret v
+end
+if eq v 0
+nx = add nx 1
+end
+end
+if eq nx 0
+say 30
+onl
+ret 3
+end
+ret 0
+end
+fn elfrep to void
+say 10
+od get ef 2
+say 11
+od get ef 1
+say 2
+plist 1
+onl
+end
+
+note ---- seccomp cBPF: arch check, one JEQ per allowed nr, kill otherwise ----
+fn binst code ulong jt ulong jf ulong k ulong to void
+ob1 uchar and code 255
+ob1 uchar shr code 8
+ob1 uchar jt
+ob1 uchar jf
+ob1 uchar and k 255
+ob1 uchar and shr k 8 255
+ob1 uchar and shr k 16 255
+ob1 uchar shr k 24
+end
+fn bpfout to void
+m = ulong 0
+for i ulong 512
+if eq get sy i 1
+m = add m 1
+end
+end
+binst 32 0 0 4
+binst 21 1 0 3221225655
+binst 6 0 0 2147483648
+binst 32 0 0 0
+t = ulong 0
+for i ulong 512
+if eq get sy i 1
+binst 21 sub m t 0 i
+t = add t 1
+end
+end
+binst 6 0 0 2147483648
+binst 6 0 0 2147418112
+end
+
+fn ptable to void
+for r ulong get nw 0
+pw get wn r
+ob1 32
+pw get cn get wc r
+ob1 32
+a = get ws1 r
+if lt a 512
+od a
+else
+say 22
+end
+ob1 32
+b = get ws2 r
+if lt b 512
+od b
+else
+say 22
+end
+onl
+end
+end
+
+fn main to int
+tinit
+ac = argcnt
+if lt ac 2
+say 20
+onl
+obf
+ret 2
+end
+md = argw 1
+if eq md kwp 7
+ptable
+obf
+ret 0
+end
+if eq md kwp 3
+if gt ac 3
+say 20
+onl
+obf
+ret 2
+end
+if eq ac 3
+if not parsal 2
+say 26
+onl
+obf
+ret 2
+end
+end
+n = rdfd 0
+if gt n 8388612
+say 21
+onl
+obf
+ret 4
+end
+scansrc n
+v = report
+obf
+ret v
+end
+if eq md kwp 4
+if ne ac 2
+say 20
+onl
+obf
+ret 2
+end
+n = rdfd 0
+if gt n 8388612
+say 21
+onl
+obf
+ret 4
+end
+v = scanelf n
+if eq v 0
+elfrep
+end
+obf
+ret v
+end
+if eq md kwp 6
+lw = ulong 0
+if eq ac 3
+lw = argw 2
+end
+if or gt ac 3 and eq ac 3 ne lw kwp 2
+say 20
+onl
+obf
+ret 2
+end
+n = rdfd 0
+if gt n 8388612
+say 21
+onl
+obf
+ret 4
+end
+scansrc n
+if eq ac 3
+put sy 221 1
+end
+bpfout
+obf
+ret 0
+end
+if eq md kwp 5
+if or lt ac 4 gt ac 5
+say 20
+onl
+obf
+ret 2
+end
+if eq ac 5
+if not parsal 4
+say 26
+onl
+obf
+ret 2
+end
+end
+n = rdarg 2
+if gt n 8388612
+say 21
+onl
+obf
+ret 4
+end
+scansrc n
+v = report
+n = rdarg 3
+if gt n 8388612
+say 21
+onl
+obf
+ret 4
+end
+e = scanelf n
+if ne e 0
+obf
+ret e
+end
+elfrep
+k = ulong 0
+for i ulong 512
+if and eq get se i 1 eq get sy i 0
+k = add k 1
+end
+end
+if gt k 0
+say 18
+plist 2
+onl
+obf
+ret 1
+end
+say 17
+plist 1
+say 19
+plist 3
+onl
+obf
+ret v
+end
+say 20
+onl
+obf
+ret 2
+end
diff --git a/seed/nki/.crumb b/seed/nki/.crumb
new file mode 100644
index 000000000..ccd069463
--- /dev/null
+++ b/seed/nki/.crumb
@@ -0,0 +1,20 @@
+{
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-30T02:52:13Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:77abf208f8226ddb9217067f78c12d708ae06cc5b906d5e7e27c78d32d5cbe73",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 7,
+      "generated_at_commit": "6c95edd2da9415f341ed1dc57f417251e8a16053",
+      "source_tree": "sha256:a7a092a9c257dd37b4b579860adacecdda4d8dd0fb05cb7efbc89c1d32622955"
+    }
+  },
+  "layer": "seed",
+  "name": "nki",
+  "purpose": "Seeded Omega OSC IR v1 elementwise scalar to AWS NKI (nki.isa) kernel emitter with NKI CPU simulator interop-oracle verification",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/nki/README.md b/seed/nki/README.md
new file mode 100644
index 000000000..498f98ed8
--- /dev/null
+++ b/seed/nki/README.md
@@ -0,0 +1,162 @@
+# seed/nki: Omega to AWS Trainium / Inferentia (NKI)
+
+`irnki.om` is a handwritten, seeded-Omega emitter. It reads an OSC IR v1 unit
+(`spec/one-layer-format.md`) and writes an NKI kernel module in Python at the `nki.isa`
+(NISA) level. NISA is the lowest level AWS documents publicly. The first kernel is
+vecadd: `out[i] = a[i] + b[i]`.
+
+Status, 2026-10-26:
+
+| Item | Status |
+|---|---|
+| Emitter `irnki.om` | IMPLEMENTED |
+| Kernels on the NKI CPU simulator, targets trn1, trn2, trn3 | EXERCISED-on-oracle (interop oracle, not Omega-native) |
+| Trainium or Inferentia hardware | NOT_RUN |
+
+## What it emits
+
+Each function becomes one `@nki.jit` kernel. The kernel loops over tiles of
+128 partitions x 512 elements (`nl.affine_range`) and keeps three explicit SBUF tiles per
+step, `ta`, `tb` and `tc`. It moves data with `nisa.dma_copy` (HBM to SBUF and back) and
+computes one `nisa.tensor_tensor(dst=tc, data1=, data2=, op=nl.)`. The module ends
+with `KERNELS = {name: (kernel, dtype)}`.
+
+The emitter lifts only this shape:
+
+- two parameters and a result, all u32 (tag 4), and three vregs;
+- one block of two instructions: `BIN sub dst=2 a b` (a and b are params 0 or 1), then `RET 2`.
+
+The supported subcodes are add, sub, mul, and, or and xor, mapped to `nl.add`,
+`subtract`, `multiply`, `bitwise_and`, `bitwise_or` and `bitwise_xor`. These are refused:
+
+| Input | Exit and message |
+|---|---|
+| div, rem, shl, shr | 24 UNSUPPORTED_OP. Omega traps on these and NKI has no trap. |
+| Any tag other than u32 | 25 UNSUPPORTED_TAG |
+| Any other function shape | 29 NOT_ELEMENTWISE |
+| Bad bytes | 20–28, as in irwasm |
+| Bad arguments | 30 USAGE |
+
+Every refusal happens before the first stdout byte.
+
+`irnki f32` retypes the lanes to float32 and then allows only add, sub and mul. This
+retyping is explicit and documented. It exists because IR v1 cannot carry floats: the
+compiler refuses float words in `ir` mode with error 16, and the float tags in spec
+section 10.3 are not produced yet. The f32 vecadd is therefore the u32 unit
+`vecadd.unit.om` with float32 lanes. The gate computes the f32 reference from the same
+unit with `uint` read as `f32`.
+
+Shape limits: the kernels take 2-D arrays whose rows are a multiple of 128 and whose
+columns are a multiple of 512. Any other shape is refused by an assertion, and the gate
+checks that (128, 500) is refused. Three f32 tiles take 6144 bytes per partition, which
+is 1/32 of the 192 KiB trn1 SBUF partition (224 KiB on trn2, 256 KiB on trn3). Computed
+with WolframLanguageEvaluator: `3*512*4 -> 6144`, `3*512*4/(192*1024) -> 0.03125`.
+
+## Run
+
+```sh
+seed/nki/setup-oracle.sh /tmp/nki-oracle          # pinned downloads, user files only
+NKI_ORACLE_DIR=/tmp/nki-oracle nice -n 19 seed/nki/gate-irnki.sh
+```
+
+Exit codes: 0 PASS, 1 FAIL, 3 NOT_RUN (no oracle directory, the oracle does not start,
+the oracle version differs from the pin, or the host is not AArch64). Artifacts go to
+`build/seed/nki/`, and `gate.log` holds SOURCE, COMPILER, ORACLE and PLATFORM.
+
+The gate does the following:
+
+1. Builds `irnki` with the pinned `seed/out/omc` (sha256 `2c824805…029f`).
+2. Lifts `vecadd.unit.om` (f32 and u32) and `ops.unit.om` (8 functions: every op,
+   swapped operands `sub b a`, and repeated operands `add a a`). Each module is emitted
+   twice and compared with `cmp`.
+3. Computes the expected lanes with a native AArch64 Omega program for each function,
+   built from the same unit source plus a driver. No foreign code computes expected
+   values.
+4. Runs every kernel in `nki.simulate` for trn1, trn2 and trn3 on 262144 lanes, shaped
+   (256, 1024), which is 4 tiles. The input set includes all pairs of edge values: 100
+   for u32, and 196 for f32, covering ±0, ±inf, NaN, ±max, min-normal, subnormals and
+   1+ulp. Results are compared bit for bit, except that two NaNs count as equal, because
+   NaN sign and payload are not part of the IEEE result.
+5. Negative controls, each of which must FAIL:
+   - an emitted `nl.add` edited to `nl.subtract`;
+   - the IR BIN subcode byte changed from add to sub before lifting;
+   - one expected bit flipped;
+   - a kernel dropped from `KERNELS`.
+6. Checks 14 refusals: exact exit code, the message on stderr and empty stdout.
+
+Measured 2026-10-26 on the DGX Spark: PASS, with 30 of 30 kernel/target runs equal and
+every control rejected. The same result came from a directory freshly prepared by
+`setup-oracle.sh`.
+
+## Oracle stack (interop oracle, not Omega-native; never generates kernels)
+
+The nki wheel is published for x86_64 only, so on AArch64 it runs as x86_64 CPython
+under qemu-user. Every item is a host dependency of the oracle only.
+
+| Item | Version | Licence | sha256 |
+|---|---|---|---|
+| nki (from `pip.repos.neuron.amazonaws.com`) | 0.7.0+37713544100.gfede04bb, cp312 linux_x86_64 | Apache-2.0 | `03543bed…0c4e` |
+| numpy | 2.2.6 | BSD-3-Clause | `fd83c012…6249` |
+| ml_dtypes | 0.5.3 | Apache-2.0 | `1b255aca…9e55` |
+| typing_extensions | 4.15.0 | PSF-2.0 | `f0fa19c6…e548` |
+| CPython (python-build-standalone 20261026) | 3.12.16 x86_64 | PSF-2.0 | `6a79e922…9de` |
+| qemu-user (Debian trixie) | 10.0.13+ds-0+deb13u1 arm64 | GPL-2.0 | `c73711af…158d` |
+| libc6, libgcc-s1, libstdc++6, zlib1g (Ubuntu noble amd64) | see `setup-oracle.sh` | LGPL-2.1 / GPL-3 with runtime exception / zlib | see `setup-oracle.sh` |
+
+`setup-oracle.sh` holds the full pins. The host qemu 8.2.2 crashes (internal SIGSEGV)
+when Python reads `/proc/self/maps`, which is why the Debian 10.0.13 static build is used.
+
+`oracle.py` is the only foreign code. It writes the deterministic inputs, runs the
+emitted kernels and compares bits. It never writes a kernel or an expected value.
+There is no Omega replacement yet: it needs an Omega reader for the NKI simulator, or
+an Omega NISA interpreter.
+
+## How open the stack is (primary sources, read 2026-10-26)
+
+- The NKI programming interface (`nki.language`, `nki.isa`) and the CPU simulator ship in
+  the `nki` wheel under Apache-2.0. Wheels exist for x86_64 only.
+  https://awsdocs-neuron.readthedocs-hosted.com/en/latest/nki/get-started/about/index.html,
+  https://awsdocs-neuron.readthedocs-hosted.com/en/latest/nki/guides/nki_simulator.html
+- The NKI compiler (MLIR based) is announced as open source but is a private beta. The
+  wheel's project URL `github.com/aws-neuron/private-nki-staging` is not public, and
+  `github.com/aws-neuron/nki` returns 404. The NKI IR and its MLIR dialect ship only as
+  compiled binaries and are not documented.
+  https://aws.amazon.com/about-aws/whats-new/2025/12/announcement-aws-neuron-2-27/,
+  https://awsdocs-neuron.readthedocs-hosted.com/en/latest/nki/deep-dives/nki-compiler.html
+- The lowest documented level is therefore `nki.isa`, one call per engine instruction.
+  Below it, NEFF and the engine binary encodings are not public.
+- `neuronx-cc` 2.28.7631.0 (wheel METADATA and LICENSE.txt, read without installing) is
+  under the "AWS Neuron Software License Agreement". That agreement grants use only "in
+  connection with AWS Services" and requires an AWS account in good standing. The gate
+  does not use it.
+- nki-samples is MIT-0; nki-library and nkipy are Apache-2.0; aws-neuron-driver is
+  GPL-2.0. https://awsdocs-neuron.readthedocs-hosted.com/en/latest/about-neuron/oss/index.html
+- Architecture figures (SBUF 24/28/32 MiB = 128 partitions of 192/224/256 KiB; PSUM
+  2 MiB) come from
+  https://awsdocs-neuron.readthedocs-hosted.com/en/latest/nki/guides/architecture/trainium_inferentia2_arch.html,
+  `trainium2_arch.html` and `trainium3_arch.html`.
+
+## What is NOT established
+
+- No hardware run. The simulator is AWS's functional model; it is not the chip. Engine
+  choice, timing, subnormal flushing and NaN payloads on Trainium/Inferentia are not
+  measured. The simulator runs with its default `NKI_PRECISE_FP=1`.
+- Kernels are not compiled by `neuronx-cc`, and no NEFF exists.
+- Only single-op elementwise u32 units are covered, plus the f32 retyping. There are no
+  reductions, no matmul (TensorE/PSUM), no broadcasting and no ragged shapes.
+
+## Path to hardware (NOT_RUN)
+
+1. An AWS account and a Neuron instance: inf2.xlarge or trn1.2xlarge (NeuronCore-v2),
+   trn2 (v3) or trn3 (v4), with the Neuron DLAMI or the driver, runtime and `neuronx-cc`
+   from the Neuron setup guide.
+   https://awsdocs-neuron.readthedocs-hosted.com/en/latest/setup/index.html
+2. Run the same emitted module with `@nki.jit` on NumPy arrays (it compiles through
+   `neuronx-cc` and runs on the NeuronDevice), and compare the lanes with the same
+   native Omega references used here.
+3. Record the instance type, Neuron SDK versions and the NEFF sha256 in a receipt. Only
+   that receipt can move the status past EXERCISED-on-oracle.
+
+The next kernel is matmul: `nisa.nc_matmul` with a 128x128 stationary tile and a 128x512
+moving tile accumulating in PSUM, then `nisa.tensor_copy` PSUM to SBUF and `dma_copy` out,
+checked on the same simulator against a native Omega reference.
diff --git a/seed/nki/gate-irnki.sh b/seed/nki/gate-irnki.sh
new file mode 100755
index 000000000..e9181b37b
--- /dev/null
+++ b/seed/nki/gate-irnki.sh
@@ -0,0 +1,229 @@
+#!/bin/sh
+# Host-only verification of seed/nki/irnki.om, the OSC IR v1 -> AWS NKI (nki.isa) emitter.
+# The NKI CPU simulator (nki.simulate, nki 0.7.0, Apache-2.0) is an interop oracle, not
+# Omega-native, and never generates kernels: irnki.om writes every kernel and a native
+# Omega program computes every expected lane. Simulator results are not hardware
+# qualification; the Trainium/Inferentia hardware receipt stays NOT_RUN.
+# NKI_ORACLE_DIR names a directory prepared by seed/nki/setup-oracle.sh (x86_64 CPython +
+# nki wheel run under qemu-user, because the nki wheel is published for x86_64 only).
+# Optional: OMC, NKI_TARGETS (default "trn1 trn2 trn3").
+# Exit 0 PASS, 1 FAIL, 3 NOT_RUN. Every artifact stays under build/seed/nki.
+set -eu
+cd "$(dirname "$0")/../.."
+B=build/seed/nki
+mkdir -p "$B"
+find "$B" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
+: > "$B/gate.log"
+say() { printf '%s\n' "$*" | tee -a "$B/gate.log"; }
+fail() { say "FAIL $*"; exit 1; }
+notrun() { say "NOT_RUN $*"; exit 3; }
+[ "$(uname -m)" = aarch64 ] || notrun 'requires AArch64 Linux (seed/out/omc emits AArch64)'
+OMC=${OMC:-seed/out/omc}
+pin=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+[ -f "$OMC" ] || fail "compiler $OMC missing"
+[ "$(sha256sum "$OMC" | cut -d ' ' -f 1)" = "$pin" ] || fail 'compiler pin differs'
+D=${NKI_ORACLE_DIR:-}
+[ -n "$D" ] || notrun 'NKI_ORACLE_DIR unset; prepare it with seed/nki/setup-oracle.sh DIR'
+for f in qemu/usr/bin/qemu-x86_64 python/bin/python3.12 sysroot/usr/lib/x86_64-linux-gnu/libc.so.6 site/nki/__init__.py; do
+    [ -e "$D/$f" ] || notrun "oracle file $D/$f missing; rerun seed/nki/setup-oracle.sh"
+done
+D=$(cd "$D" && pwd)
+TARGETS=${NKI_TARGETS:-trn1 trn2 trn3}
+oracle() {
+    target=$1
+    shift
+    env -i PATH=/usr/bin:/bin PYTHONPATH="$D/site" NEURON_LOGICAL_NC_CONFIG=1 \
+        NEURON_PLATFORM_TARGET_OVERRIDE="$target" \
+        nice -n 19 "$D/qemu/usr/bin/qemu-x86_64" -L "$D/sysroot" \
+        "$D/python/bin/python3.12" -s -S seed/nki/oracle.py "$@"
+}
+version=$(oracle trn3 version 2> "$B/oracle-version.err") ||
+    { cat "$B/oracle-version.err"; notrun 'NKI simulator does not start'; }
+want='nki 0.7.0+37713544100.gfede04bb numpy 2.2.6 python 3.12.16'
+[ "$version" = "$want" ] || notrun "oracle is '$version', pinned '$want'"
+say "SOURCE $(git rev-parse HEAD)"
+say "COMPILER $OMC sha256=$pin"
+say "ORACLE interop oracle, not Omega-native: nki.simulate ($version) targets=$TARGETS"
+say "ORACLE_HOST qemu-x86_64 $("$D/qemu/usr/bin/qemu-x86_64" --version | sed -n 1p) sha256=$(sha256sum "$D/qemu/usr/bin/qemu-x86_64" | cut -d ' ' -f 1)"
+say "ORACLE_DRIVER oracle.py sha256=$(sha256sum seed/nki/oracle.py | cut -d ' ' -f 1)"
+say "PLATFORM $(uname -srm)"
+nice -n 19 "$OMC" < seed/nki/irnki.om > "$B/irnki" 2> "$B/compile.err"
+[ ! -s "$B/compile.err" ] || fail 'emitter compile stderr'
+chmod +x "$B/irnki"
+# lift UNIT LANE OUT: IR v1 bytes of a unit, then the NKI module, emitted twice.
+lift() {
+    { printf 'ir\n'; cat "seed/nki/$1.unit.om"; } | nice -n 19 "$OMC" > "$B/$1.ir" 2> "$B/$1.ir.err"
+    [ ! -s "$B/$1.ir.err" ] || fail "$1 IR stderr"
+    if [ "$2" = float32 ]; then mode=f32; else mode=; fi
+    # shellcheck disable=SC2086 # empty mode means no argument
+    "$B/irnki" $mode < "$B/$1.ir" > "$B/$3.py" 2> "$B/$3.err" || fail "irnki $1 $2 exit $?"
+    # shellcheck disable=SC2086
+    "$B/irnki" $mode < "$B/$1.ir" > "$B/$3.again.py"
+    cmp -s "$B/$3.py" "$B/$3.again.py" || fail "$3 emission is not deterministic"
+    [ ! -s "$B/$3.err" ] || fail "$3 emitter stderr"
+    say "EMIT $3 from $1.unit.om lane=$2 deterministic sha256=$(sha256sum "$B/$3.py" | cut -d ' ' -f 1)"
+}
+# ref UNIT LANE OUT: one native AArch64 Omega program per function computes the expected
+# lanes from the same unit source. float32 rereads the unit with uint as f32, the same
+# retyping irnki applies to the lanes.
+ref() {
+    mkdir -p "$B/$3.ref"
+    for name in $(sed -n 's/^fn \([A-Za-z0-9_]*\) .*/\1/p' "seed/nki/$1.unit.om"); do
+        p=$B/$3.ref/$name
+        if [ "$2" = float32 ]; then
+            sed '/^fn /s/ uint/ f32/g' "seed/nki/$1.unit.om" > "$p.om"
+            call="r = ulong bitcast uint $name bitcast f32 a bitcast f32 b"
+        else
+            cat "seed/nki/$1.unit.om" > "$p.om"
+            call="r = ulong $name a b"
+        fi
+        cat >> "$p.om" < "$p.bin.exe" 2> "$p.err" || { cat "$p.err"; fail "native reference $name compile"; }
+        [ ! -s "$p.err" ] || { cat "$p.err"; fail "native reference $name compile stderr"; }
+        chmod +x "$p.bin.exe"
+        nice -n 19 "$p.bin.exe" < "$B/$2.in" > "$B/$3.ref/$name.bin" || fail "native reference $name exit $?"
+    done
+    names=$(sed -n 's/^fn \([A-Za-z0-9_]*\) .*/\1/p' "seed/nki/$1.unit.om" | tr '\n' ' ')
+    say "REFERENCE $3 native Omega lanes for: $names"
+}
+# check ID LANE EXPECTREF: run every kernel of ID.py on every target.
+check() {
+    for t in $TARGETS; do
+        # shellcheck disable=SC2086 # names are [A-Za-z0-9_] words
+        oracle "$t" check "$B/$1.py" "$B/$2.in" "$B/$3" $names > "$B/$1.$t.log" 2>&1 || return 1
+        tee -a "$B/gate.log" < "$B/$1.$t.log"
+    done
+}
+for lane in uint32 float32; do
+    oracle trn3 inputs "$lane" > "$B/$lane.in" 2> "$B/$lane.in.err" || { cat "$B/$lane.in.err"; fail "inputs $lane"; }
+    say "INPUT $lane 2x262144 lanes sha256=$(sha256sum "$B/$lane.in" | cut -d ' ' -f 1)"
+done
+lift vecadd float32 vecadd-f32
+lift vecadd uint32 vecadd-u32
+lift ops uint32 ops-u32
+grep -q '^            nisa.tensor_tensor(dst=tc, data1=ta, data2=tb, op=nl.add)$' "$B/vecadd-f32.py" ||
+    fail 'vecadd kernel does not use nisa.tensor_tensor add'
+ref vecadd float32 vecadd-f32
+ref vecadd uint32 vecadd-u32
+ref ops uint32 ops-u32
+names=vecadd
+check vecadd-f32 float32 vecadd-f32.ref || { cat "$B"/vecadd-f32.*.log; fail 'vecadd float32 differs from native Omega'; }
+check vecadd-u32 uint32 vecadd-u32.ref || { cat "$B"/vecadd-u32.*.log; fail 'vecadd uint32 differs from native Omega'; }
+names=$(sed -n 's/^fn \([A-Za-z0-9_]*\) .*/\1/p' seed/nki/ops.unit.om | tr '\n' ' ')
+check ops-u32 uint32 ops-u32.ref || { cat "$B"/ops-u32.*.log; fail 'ops uint32 differ from native Omega'; }
+oracle trn3 limit "$B/vecadd-f32.py" vecadd > "$B/limit.log" 2>&1 || { cat "$B/limit.log"; fail 'kernel accepted a shape outside 128x512 tiles'; }
+say "CONTROL limit $(sed -n 1p "$B/limit.log")"
+
+# Negative controls: each must make the oracle comparison FAIL.
+names=vecadd
+ALL=$TARGETS
+TARGETS=trn3
+neg() {
+    if check "$1" "$2" "$3"; then fail "negative control $1 passed"; fi
+    say "CONTROL $1 rejected: $(grep -m 1 '^FAIL\|oracle:' "$B/$1.trn3.log")"
+}
+# (a) the emitted kernel text changed from add to subtract
+sed 's/op=nl.add)/op=nl.subtract)/' "$B/vecadd-f32.py" > "$B/mut-text.py"
+cmp -s "$B/vecadd-f32.py" "$B/mut-text.py" && fail 'text mutant unchanged'
+neg mut-text float32 vecadd-f32.ref
+# (b) the IR BIN subcode changed from add (1) to sub (2) before lifting
+[ "$(od -An -j 38 -N 2 -t u1 "$B/vecadd.ir" | tr -s ' ')" = ' 3 1' ] || fail 'vecadd IR BIN is not at offset 38'
+cp "$B/vecadd.ir" "$B/mut-ir.ir"
+printf '\002' | dd of="$B/mut-ir.ir" bs=1 seek=39 conv=notrunc 2> /dev/null
+"$B/irnki" f32 < "$B/mut-ir.ir" > "$B/mut-ir.py"
+neg mut-ir float32 vecadd-f32.ref
+# (c) one expected lane flipped by one bit
+mkdir -p "$B/mut-ref"
+cp "$B/vecadd-f32.ref/vecadd.bin" "$B/mut-ref/vecadd.bin"
+b0=$(od -An -j 4000 -N 1 -t u1 "$B/mut-ref/vecadd.bin" | tr -d ' ')
+printf "\\$(printf '%03o' $((b0 ^ 1)))" | dd of="$B/mut-ref/vecadd.bin" bs=1 seek=4000 conv=notrunc 2> /dev/null
+cp "$B/vecadd-f32.py" "$B/mut-ref.py"
+neg mut-ref float32 mut-ref
+# (d) a kernel set that drops a function
+sed '/^    "vecadd": /d' "$B/vecadd-f32.py" > "$B/mut-set.py"
+neg mut-set float32 vecadd-f32.ref
+# Refusals: exact exit code, the error text on stderr and nothing on stdout.
+refuse() {
+    want=$1; label=$2; shift 2
+    set +e
+    "$B/irnki" "$@" < "$B/r.ir" > "$B/r.out" 2> "$B/r.err"
+    got=$?
+    set -e
+    [ "$got" = "$want" ] || fail "refusal $label exit $got, expected $want"
+    [ ! -s "$B/r.out" ] || fail "refusal $label wrote stdout"
+    grep -q '^irnki: ' "$B/r.err" || fail "refusal $label without message"
+    say "REFUSE $label exit $got $(cat "$B/r.err")"
+}
+unit() { { printf 'ir\n'; printf '%s\n' "$@"; } | nice -n 19 "$OMC" > "$B/r.ir" || fail "unit $1 IR"; }
+cp "$B/vecadd.ir" "$B/r.ir"; refuse 30 usage-extra-arg f32 x
+cp "$B/ops.ir" "$B/r.ir"; refuse 24 f32-xor f32
+cp "$B/vecadd.ir" "$B/r.ir"; refuse 30 usage-bad-lane f64
+unit 'fn q a uint b uint to uint' 'ret div a b' 'end'; refuse 24 div
+unit 'fn q a uint b uint to uint' 'ret shl a b' 'end'; refuse 24 shl
+unit 'fn q a int b int to int' 'ret add a b' 'end'; refuse 25 int-tag
+unit 'fn q a ulong b ulong to ulong' 'ret add a b' 'end'; refuse 25 ulong-tag
+unit 'fn q a uint b uint to uint' 'ret add mul a b a' 'end'; refuse 29 two-ops
+unit 'fn q a uint to uint' 'ret add a a' 'end'; refuse 29 one-param
+printf 'OSC1IR\000\002\001\000' > "$B/r.ir"; refuse 21 version
+printf 'OSC2IR\000\001\001\000' > "$B/r.ir"; refuse 20 magic
+head -c 30 "$B/vecadd.ir" > "$B/r.ir"; refuse 22 truncated
+{ cat "$B/vecadd.ir"; printf '\000'; } > "$B/r.ir"; refuse 27 trailing
+printf 'OSC1IR\000\001\000\000' > "$B/r.ir"; refuse 26 no-functions
+say "HARDWARE NOT_RUN: no Trainium/Inferentia instance; simulator results are not hardware qualification"
+say "PASS irnki: kernels from Omega equal native Omega lanes on nki.simulate targets=$ALL; controls on trn3"
+sha256sum seed/nki/irnki.om seed/nki/oracle.py seed/nki/*.unit.om "$B/irnki" "$B"/*.py "$B"/*.ir | tee -a "$B/gate.log"
diff --git a/seed/nki/irnki.om b/seed/nki/irnki.om
new file mode 100644
index 000000000..29ce70766
--- /dev/null
+++ b/seed/nki/irnki.om
@@ -0,0 +1,528 @@
+note SPDX-License-Identifier: Apache-2.0
+note irnki: OSC IR v1 elementwise scalar functions to AWS NKI kernels at the nki.isa level.
+note Wire authority spec/one-layer-format.md. NKI ISA reference (read 2026-10-26):
+note https://awsdocs-neuron.readthedocs-hosted.com/en/latest/nki/api/nki.isa.html
+note A liftable function is exactly: two parameters and a result of tag 4 (u32), three vregs,
+note one block of two instructions, BIN sub dst=2 a,b in {0,1}, then RET 2.
+note Lane dtype: uint32 (default, same meaning as the IR) or float32 with argument f32,
+note an explicit retyping because IR v1 has no float tag (spec section 10.3 is not produced yet).
+note Output is buffered: every refusal happens before the first stdout byte.
+global input uchar 2620252
+global output uchar 1048576
+note state slots: 0 input cursor, 1 input size, 2 output size, 3 lane (0 uint32, 1 float32), 4 nfuncs
+global state ulong 8
+global names ulong 32
+global namelen ulong 32
+global subs ulong 32
+global lhs ulong 32
+global rhs ulong 32
+text emagic "irnki: MAGIC\n"
+text ever "irnki: VERSION\n"
+text etrunc "irnki: TRUNCATED\n"
+text ecap "irnki: CAPACITY\n"
+text eop "irnki: UNSUPPORTED_OP\n"
+text etype "irnki: UNSUPPORTED_TAG\n"
+text einval "irnki: INVALID\n"
+text etrail "irnki: TRAILING\n"
+text eio "irnki: IO\n"
+text eshape "irnki: NOT_ELEMENTWISE\n"
+text eusage "irnki: USAGE irnki [f32] < unit.ir > kernels.py\n"
+text th0 "# Generated by seed/nki/irnki.om (seeded Omega) from an OSC IR v1 unit. Do not edit.\n# Level: nki.isa (NISA) instructions on explicit SBUF tiles of 128 partitions x 512.\n# Lane dtype: "
+text th1 "\nimport nki\nimport nki.isa as nisa\nimport nki.language as nl\n\nTILE_P = 128\nTILE_F = 512\n"
+text tf0 "\n\n@nki.jit\ndef om_"
+text tf1 "(a, b):\n    assert a.shape == b.shape\n    rows, cols = a.shape\n    assert rows % TILE_P == 0\n    assert cols % TILE_F == 0\n    out = nl.ndarray(a.shape, dtype=nl."
+text tf2 ", buffer=nl.shared_hbm)\n    for m in nl.affine_range(rows // TILE_P):\n        for n in nl.affine_range(cols // TILE_F):\n"
+text tal0 "            t"
+text tal1 " = nl.ndarray((TILE_P, TILE_F), dtype=nl."
+text tal2 ", buffer=nl.sbuf)\n"
+text td0 "            nisa.dma_copy(dst=t"
+text td1 ", src="
+text tslc "[m * TILE_P:(m + 1) * TILE_P, n * TILE_F:(n + 1) * TILE_F]"
+text td2 ")\n"
+text tt0 "            nisa.tensor_tensor(dst=tc, data1=t"
+text tt1 ", data2=t"
+text tt2 ", op=nl."
+text ts0 "            nisa.dma_copy(dst=out"
+text ts1 ", src=tc)\n    return out\n"
+text tk0 "\n\nKERNELS = {\n"
+text tk1 "    \""
+text tk2 "\": (om_"
+text tk3 ", \""
+text tk4 "\"),\n"
+text tk5 "}\n"
+text tdf "float32"
+text tdu "uint32"
+text tadd "add"
+text tsub "subtract"
+text tmul "multiply"
+text tand "bitwise_and"
+text tor "bitwise_or"
+text txor "bitwise_xor"
+fn refuse code int to void
+k = long 0
+if eq code 20
+k = write 2 emagic 0 len emagic
+end
+if eq code 21
+k = write 2 ever 0 len ever
+end
+if eq code 22
+k = write 2 etrunc 0 len etrunc
+end
+if eq code 23
+k = write 2 ecap 0 len ecap
+end
+if eq code 24
+k = write 2 eop 0 len eop
+end
+if eq code 25
+k = write 2 etype 0 len etype
+end
+if eq code 26
+k = write 2 einval 0 len einval
+end
+if eq code 27
+k = write 2 etrail 0 len etrail
+end
+if eq code 28
+k = write 2 eio 0 len eio
+end
+if eq code 29
+k = write 2 eshape 0 len eshape
+end
+if eq code 30
+k = write 2 eusage 0 len eusage
+end
+exit code
+end
+fn need ok bool to void
+if not ok
+refuse 26
+end
+end
+fn rd n ulong to ulong
+p = get state 0
+if gt n sub get state 1 p
+refuse 22
+end
+v = ulong 0
+for j ulong n
+v = or v shl ulong get input add p j mul j 8
+end
+put state 0 add p n
+ret v
+end
+fn shape ok bool to void
+if not ok
+refuse 29
+end
+end
+note Every register and the result must be u32 (tag 4). Tags 0..12 other than 4 are
+note unsupported; tags above 12 do not exist in any OSC version.
+fn lane t ulong to void
+if ne t 4
+refuse 25
+end
+end
+fn namech c ulong to bool
+if and ge c 48 le c 57
+ret true
+end
+if and ge c 65 le c 90
+ret true
+end
+if and ge c 97 le c 122
+ret true
+end
+ret eq c 95
+end
+fn same a ulong b ulong to bool
+if ne get namelen a get namelen b
+ret false
+end
+for j ulong get namelen a
+x = get input add get names a j
+y = get input add get names b j
+if ne x y
+ret false
+end
+end
+ret true
+end
+note BIN subcodes 1 add, 2 sub, 3 mul, 6 and, 7 or, 8 xor are liftable for uint32 lanes;
+note float32 lanes take only add, sub, mul (float bitwise BIN is invalid, spec 10.3).
+note div/rem trap on zero and shl/shr trap on wide counts in Omega; NKI has no trap,
+note so 4, 5, 9 and 10 are refused rather than silently changed.
+fn binsub s ulong to void
+need and ge s 1 le s 10
+if or eq s 4 eq s 5
+refuse 24
+end
+if or eq s 9 eq s 10
+refuse 24
+end
+if and eq get state 3 1 gt s 3
+refuse 24
+end
+end
+fn loadfn f ulong to void
+n = rd 1
+need and ne n 0 le n 63
+put namelen f n
+put names f get state 0
+for j ulong n
+need namech rd 1
+end
+for j ulong f
+need not same f j
+end
+shape eq rd 1 2
+lane rd 1
+shape eq rd 2 3
+for j ulong 3
+lane rd 1
+end
+shape eq rd 2 1
+need eq rd 4 0
+shape eq rd 4 2
+shape eq rd 4 2
+if ne rd 1 3
+refuse 24
+end
+s = rd 1
+binsub s
+put subs f s
+need eq rd 2 2
+x = rd 2
+need lt x 2
+put lhs f x
+x = rd 2
+need lt x 2
+put rhs f x
+if ne rd 1 15
+refuse 24
+end
+need eq rd 2 2
+for c ulong 2
+n = rd 2
+need le n 255
+for j ulong n
+need ne rd 1 0
+end
+end
+end
+fn emit v ulong to void
+p = get state 2
+if ge p len output
+refuse 23
+end
+put output p uchar v
+put state 2 add p 1
+end
+note Fragment table: one id per text above, emitted byte for byte.
+fn frag k ulong to void
+if eq k 0
+for j ulong len th0
+emit ulong get th0 j
+end
+end
+if eq k 1
+for j ulong len th1
+emit ulong get th1 j
+end
+end
+if eq k 2
+for j ulong len tf0
+emit ulong get tf0 j
+end
+end
+if eq k 3
+for j ulong len tf1
+emit ulong get tf1 j
+end
+end
+if eq k 4
+for j ulong len tf2
+emit ulong get tf2 j
+end
+end
+if eq k 5
+for j ulong len tal0
+emit ulong get tal0 j
+end
+end
+if eq k 6
+for j ulong len tal1
+emit ulong get tal1 j
+end
+end
+if eq k 7
+for j ulong len tal2
+emit ulong get tal2 j
+end
+end
+if eq k 8
+for j ulong len td0
+emit ulong get td0 j
+end
+end
+if eq k 9
+for j ulong len td1
+emit ulong get td1 j
+end
+end
+if eq k 10
+for j ulong len tslc
+emit ulong get tslc j
+end
+end
+if eq k 11
+for j ulong len td2
+emit ulong get td2 j
+end
+end
+if eq k 12
+for j ulong len tt0
+emit ulong get tt0 j
+end
+end
+if eq k 13
+for j ulong len tt1
+emit ulong get tt1 j
+end
+end
+if eq k 14
+for j ulong len tt2
+emit ulong get tt2 j
+end
+end
+if eq k 15
+for j ulong len ts0
+emit ulong get ts0 j
+end
+end
+if eq k 16
+for j ulong len ts1
+emit ulong get ts1 j
+end
+end
+if eq k 17
+for j ulong len tk0
+emit ulong get tk0 j
+end
+end
+if eq k 18
+for j ulong len tk1
+emit ulong get tk1 j
+end
+end
+if eq k 19
+for j ulong len tk2
+emit ulong get tk2 j
+end
+end
+if eq k 20
+for j ulong len tk3
+emit ulong get tk3 j
+end
+end
+if eq k 21
+for j ulong len tk4
+emit ulong get tk4 j
+end
+end
+if eq k 22
+for j ulong len tk5
+emit ulong get tk5 j
+end
+end
+end
+fn dtype to void
+if eq get state 3 1
+for j ulong len tdf
+emit ulong get tdf j
+end
+else
+for j ulong len tdu
+emit ulong get tdu j
+end
+end
+end
+fn opname s ulong to void
+if eq s 1
+for j ulong len tadd
+emit ulong get tadd j
+end
+end
+if eq s 2
+for j ulong len tsub
+emit ulong get tsub j
+end
+end
+if eq s 3
+for j ulong len tmul
+emit ulong get tmul j
+end
+end
+if eq s 6
+for j ulong len tand
+emit ulong get tand j
+end
+end
+if eq s 7
+for j ulong len tor
+emit ulong get tor j
+end
+end
+if eq s 8
+for j ulong len txor
+emit ulong get txor j
+end
+end
+end
+fn fname f ulong to void
+for j ulong get namelen f
+emit ulong get input add get names f j
+end
+end
+note Parameter register 0 is a, 1 is b; their SBUF tiles are ta and tb.
+fn param r ulong to void
+emit add 97 r
+end
+fn tile c ulong to void
+frag 5
+emit c
+frag 6
+dtype
+frag 7
+end
+fn load r ulong to void
+frag 8
+param r
+frag 9
+param r
+frag 10
+frag 11
+end
+fn kernel f ulong to void
+frag 2
+fname f
+frag 3
+dtype
+frag 4
+tile 97
+tile 98
+tile 99
+load 0
+load 1
+frag 12
+param get lhs f
+frag 13
+param get rhs f
+frag 14
+opname get subs f
+frag 11
+frag 15
+frag 10
+frag 16
+end
+fn module to void
+frag 0
+dtype
+frag 1
+for f ulong get state 4
+kernel f
+end
+frag 17
+for f ulong get state 4
+frag 18
+fname f
+frag 19
+fname f
+frag 20
+dtype
+frag 21
+end
+frag 22
+end
+fn args to void
+c = argcnt
+if eq c 1
+put state 3 0
+ret
+end
+if ne c 2
+refuse 30
+end
+b = new uchar 4 0
+k = argread 1 b 0 4
+if ne k 3
+refuse 30
+end
+if or ne get b 0 102 or ne get b 1 51 ne get b 2 50
+refuse 30
+end
+put state 3 1
+end
+fn main to int
+args
+n = ulong 0
+for attempt ulong 2620252
+if eq n len input
+refuse 23
+end
+k = read 0 input n sub len input n
+if lt k 0
+refuse 28
+end
+if eq k 0
+break
+end
+n = add n ulong k
+end
+if eq n len input
+refuse 23
+end
+put state 1 n
+magic = new uchar 7 0
+put magic 0 79
+put magic 1 83
+put magic 2 67
+put magic 3 49
+put magic 4 73
+put magic 5 82
+for j ulong 7
+v = rd 1
+if ne v ulong get magic j
+refuse 20
+end
+end
+if ne rd 1 1
+refuse 21
+end
+nf = rd 2
+if gt nf 32
+refuse 23
+end
+need ne nf 0
+put state 4 nf
+for f ulong nf
+loadfn f
+end
+if ne get state 0 n
+refuse 27
+end
+module
+p = ulong 0
+for attempt ulong 1048576
+if eq p get state 2
+break
+end
+k = write 1 output p sub get state 2 p
+if le k 0
+refuse 28
+end
+p = add p ulong k
+end
+ret 0
+end
diff --git a/seed/nki/ops.unit.om b/seed/nki/ops.unit.om
new file mode 100644
index 000000000..bfae5008e
--- /dev/null
+++ b/seed/nki/ops.unit.om
@@ -0,0 +1,25 @@
+note Every BIN subcode irnki lifts for uint32 lanes, plus swapped and repeated operands.
+fn vaddu a uint b uint to uint
+ret add a b
+end
+fn vsubu a uint b uint to uint
+ret sub a b
+end
+fn vsubr a uint b uint to uint
+ret sub b a
+end
+fn vmulu a uint b uint to uint
+ret mul a b
+end
+fn vandu a uint b uint to uint
+ret and a b
+end
+fn voru a uint b uint to uint
+ret or a b
+end
+fn vxoru a uint b uint to uint
+ret xor a b
+end
+fn vdbl a uint b uint to uint
+ret add a a
+end
diff --git a/seed/nki/oracle.py b/seed/nki/oracle.py
new file mode 100644
index 000000000..11b98f191
--- /dev/null
+++ b/seed/nki/oracle.py
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: Apache-2.0
+# interop oracle, not Omega-native; never generates kernels.
+#
+# Host dependency (oracle only): CPython 3.12 + nki 0.7.0 (Apache-2.0, AWS) + numpy 2.2.6.
+# Omega replacement: none yet. The kernels come from seed/nki/irnki.om; the expected
+# values come from a native Omega program built by gate-irnki.sh. This script only
+# (1) writes deterministic input lanes and (2) runs the emitted kernels on the public
+# NKI CPU simulator (nki.simulate) and compares the result bits with the Omega values.
+#
+#   oracle.py version
+#   oracle.py inputs uint32|float32 > in.bin          a lanes then b lanes, little-endian
+#   oracle.py check kernels.py in.bin refdir name...  exit 0 all equal, 1 any differ
+#   oracle.py limit kernels.py name                   exit 0 if a (128, 500) call is refused
+import importlib.util
+import os
+import sys
+
+ROWS, COLS = 256, 1024
+N = ROWS * COLS
+
+
+def die(msg, code):
+    sys.stderr.write("oracle: " + msg + "\n")
+    sys.exit(code)
+
+
+try:
+    import numpy as np
+    import nki
+except Exception as ex:  # the gate maps exit 3 to NOT_RUN
+    die("cannot import the simulator: %s: %s" % (type(ex).__name__, ex), 3)
+
+
+def load(path):
+    spec = importlib.util.spec_from_file_location("omnki", path)
+    mod = importlib.util.module_from_spec(spec)
+    spec.loader.exec_module(mod)
+    return mod.KERNELS
+
+
+def inputs(dtype):
+    rng = np.random.default_rng(20261026)
+    a = rng.integers(0, 2 ** 32, N, dtype=np.uint64).astype(np.uint32)
+    b = rng.integers(0, 2 ** 32, N, dtype=np.uint64).astype(np.uint32)
+    if dtype == "uint32":
+        edge = [0, 1, 2, 0x7FFFFFFF, 0x80000000, 0x80000001, 0xFFFF, 0x10000, 0xFFFFFFFE, 0xFFFFFFFF]
+    elif dtype == "float32":
+        # +0 -0 +inf -inf qNaN max -max min-normal smallest/largest subnormal 1 -1 1+ulp 2^24
+        edge = [0x00000000, 0x80000000, 0x7F800000, 0xFF800000, 0x7FC00000, 0x7F7FFFFF,
+                0xFF7FFFFF, 0x00800000, 0x00000001, 0x007FFFFF, 0x3F800000, 0xBF800000,
+                0x3F800001, 0x4B800000]
+        # the rest: half raw bit patterns (all exponents), half normal values near 1
+        k = N // 2
+        a[k:] = rng.standard_normal(N - k).astype(np.float32).view(np.uint32)
+        b[k:] = rng.standard_normal(N - k).astype(np.float32).view(np.uint32)
+    else:
+        die("inputs: dtype must be uint32 or float32", 2)
+    e = np.array(edge, dtype=np.uint32)
+    m = len(edge)
+    a[: m * m] = np.repeat(e, m)
+    b[: m * m] = np.tile(e, m)
+    sys.stdout.buffer.write(a.astype("= 6 and argv[1] == "check":
+        check(argv[2], argv[3], argv[4], argv[5:])
+    elif len(argv) == 4 and argv[1] == "limit":
+        limit(argv[2], argv[3])
+    else:
+        die("usage: see header", 2)
+
+
+if __name__ == "__main__":
+    main(sys.argv)
diff --git a/seed/nki/setup-oracle.sh b/seed/nki/setup-oracle.sh
new file mode 100755
index 000000000..9abe2b2c8
--- /dev/null
+++ b/seed/nki/setup-oracle.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Prepare the NKI simulator oracle for seed/nki/gate-irnki.sh in DIR (user files only, no
+# root, no account). Interop oracle, not Omega-native; nothing here generates kernels.
+# The nki wheel is published for x86_64 only, so on AArch64 it runs as an x86_64 CPython
+# under qemu-user with an x86_64 glibc sysroot. Every download is pinned by sha256.
+# Host tools used: curl, sha256sum, tar, dpkg-deb, unzip.
+#   seed/nki/setup-oracle.sh DIR      then: NKI_ORACLE_DIR=DIR seed/nki/gate-irnki.sh
+set -eu
+[ $# -eq 1 ] || { echo 'usage: setup-oracle.sh DIR' >&2; exit 2; }
+D=$1
+mkdir -p "$D/dl"
+D=$(cd "$D" && pwd)
+U=http://archive.ubuntu.com/ubuntu/pool/main
+PY=https://files.pythonhosted.org/packages
+# sha256  file  url   (licences: README.md, "Oracle stack")
+cat > "$D/dl/pins" <&2; exit 1; }
+    mv "$f.part" "$f"
+done < "$D/dl/pins"
+rm -rf "$D/python" "$D/qemu" "$D/sysroot" "$D/site"
+tar -xzf "$D/dl/cpython.tar.gz" -C "$D"
+dpkg-deb -x "$D/dl/qemu-user.deb" "$D/qemu"
+mkdir -p "$D/sysroot" "$D/site"
+for p in libc6 libgcc-s1 libstdcxx6 zlib1g; do dpkg-deb -x "$D/dl/$p.deb" "$D/sysroot"; done
+[ -e "$D/sysroot/lib64" ] || ln -s usr/lib64 "$D/sysroot/lib64"
+[ -e "$D/sysroot/lib" ] || ln -s usr/lib "$D/sysroot/lib"
+for w in numpy ml_dtypes typing_extensions nki; do unzip -q -o "$D/dl/$w.whl" -d "$D/site"; done
+echo "setup-oracle: ready; run NKI_ORACLE_DIR=$D seed/nki/gate-irnki.sh"
diff --git a/seed/nki/vecadd.unit.om b/seed/nki/vecadd.unit.om
new file mode 100644
index 000000000..e839d6327
--- /dev/null
+++ b/seed/nki/vecadd.unit.om
@@ -0,0 +1,5 @@
+note vecadd: out[i] = a[i] + b[i]. irnki lifts this scalar function to an NKI tile kernel.
+note IR v1 carries uint lanes; `irnki f32` retypes the lanes to float32 (see README.md).
+fn vecadd a uint b uint to uint
+ret add a b
+end
diff --git a/seed/qualification/om2/baseline/adequacy.cases b/seed/qualification/om2/baseline/adequacy.cases
index fdb61f02a..3b730da2a 100644
--- a/seed/qualification/om2/baseline/adequacy.cases
+++ b/seed/qualification/om2/baseline/adequacy.cases
@@ -2,6 +2,6 @@
 # cannot kill it: the length is not padded into the block (empty message, bit length 0), or
 # every piece is a whole number of blocks.
 subst seed/qualification/om2/baseline/mutants/nowrite.from seed/qualification/om2/baseline/mutants/nowrite.to
-mut-nowrite-fips-empty kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
+mut-nowrite-fips-empty kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
 subst seed/qualification/om2/baseline/mutants/split.from seed/qualification/om2/baseline/mutants/split.to
-mut-split-seq-1000-p4096 kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 4096
+mut-split-seq-1000-p4096 kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 4096
diff --git a/seed/qualification/om2/baseline/guard.cases b/seed/qualification/om2/baseline/guard.cases
index 406e032b8..df01f6c49 100644
--- a/seed/qualification/om2/baseline/guard.cases
+++ b/seed/qualification/om2/baseline/guard.cases
@@ -6,6 +6,6 @@ subst seed/qualification/om2/compiler-mutants/guard-wrapped.from seed/qualificat
 cc seed/omc/omc.om
 witness-guard-mutant kill seed/qualification/om2/baseline/slice-witness.om - - - 0
 witness-guard-mutant-exact run seed/qualification/om2/baseline/slice-witness.om - line:WRAPPED_SLICE_ACCEPTED_4 - 0
-sha-abc-guard-mutant run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+sha-abc-guard-mutant run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 cc pinned
 witness-pinned-again run seed/qualification/om2/baseline/slice-witness.om - - - 103
diff --git a/seed/qualification/om2/baseline/sha256-om1.om b/seed/qualification/om2/baseline/sha256-om1.om
new file mode 100644
index 000000000..88e6b0b0b
--- /dev/null
+++ b/seed/qualification/om2/baseline/sha256-om1.om
@@ -0,0 +1,1527 @@
+note SPDX-License-Identifier: Apache-2.0
+note sha256.om: FIPS 180-4 SHA-256 as one function-mode unit, bound through the omega-bridge native
+note call ABI (docs/NATIVE-ABI.md) and exported as omega_omsha. It replaces the algorithm of
+note src/sha256.c: the C file keeps only the sha256_* entry points that cut caller data into
+note pieces of at most 4096 bytes.
+note
+note The whole hash state lives in the caller's sha256_ctx (104 bytes, src/sha256.h):
+note   bytes 0..31   state[8], uint32 little endian
+note   bytes 32..39  count, uint64 little endian (bytes absorbed so far)
+note   bytes 40..103 buffer, the pending partial block
+note omsha c b n op w b8:
+note   op 0  init: count 0, FIPS initial hash value
+note   op 1  absorb b[0..n), n <= 4096, with src/sha256.c's buffering rules
+note   op 2  final: pad, absorb the bit length, the 32-byte digest packed into w[0..4)
+note   op 3  one shot: the digest of the n < 4096 bytes of b8 packed into w[0..4); c is not used
+note w is the caller's scratch for the message schedule (64 words, contents ignored and overwritten):
+note Omega writes every word before reading it, so the caller need not clear it.
+note n > 4096 traps 3; any other op traps 9.
+
+note little-endian word of nb bytes at byte offset p of the context
+fn getle c edit uchar 104 p ulong nb ulong to ulong
+v = ulong 0
+i = nb
+while gt i 0 bound 8
+i = sub i 1
+v = or shl v 8 ulong get c add p i
+end
+ret v
+end
+
+fn putle c edit uchar 104 p ulong nb ulong v ulong to void
+x = v
+for i ulong nb
+put c add p i uchar and x 255
+x = shr x 8
+end
+end
+
+note the hash words of the context into h, and back
+fn loadh c edit uchar 104 h edit uint 8 to void
+for i ulong 8
+put h i uint getle c mul i 4 4
+end
+end
+
+fn storeh c edit uchar 104 h edit uint 8 to void
+for i ulong 8
+putle c mul i 4 4 ulong get h i
+end
+end
+
+note big-endian words of the block at byte o of b into w[0..16), then the schedule
+fn schedb b view uchar 4096 o ulong w edit ulong 64 to void
+for i ulong 16
+q = add o mul i 4
+v = ulong get b q
+v = or shl v 8 ulong get b add q 1
+v = or shl v 8 ulong get b add q 2
+v = or shl v 8 ulong get b add q 3
+put w i or v shl v 32
+end
+expand w
+end
+
+note big-endian words of the block at byte 40 of b into w[0..16), then the schedule
+fn schedc b edit uchar 104 w edit ulong 64 to void
+for i ulong 16
+q = add 40 mul i 4
+v = ulong get b q
+v = or shl v 8 ulong get b add q 1
+v = or shl v 8 ulong get b add q 2
+v = or shl v 8 ulong get b add q 3
+put w i or v shl v 32
+end
+expand w
+end
+
+note the 64 rounds, unrolled with the working words in locals (names rotate instead of moving).
+note Same lazy low-32-bit cells and rotate trick as expand; K is an immediate; the eight words are
+note reduced to 32 bits only when they are added back into h.
+fn rounds h edit uint 8 w view ulong 64 to void
+a = ulong get h 0
+b = ulong get h 1
+c = ulong get h 2
+d = ulong get h 3
+e = ulong get h 4
+f = ulong get h 5
+g = ulong get h 6
+x = ulong get h 7
+t = ulong 0
+u = ulong 0
+t = add x add get w 0 1116352408
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 1 1899447441
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 2 3049323471
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 3 3921009573
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 4 961987163
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 5 1508970993
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 6 2453635748
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 7 2870763221
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 8 3624381080
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 9 310598401
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 10 607225278
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 11 1426881987
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 12 1925078388
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 13 2162078206
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 14 2614888103
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 15 3248222580
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 16 3835390401
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 17 4022224774
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 18 264347078
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 19 604807628
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 20 770255983
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 21 1249150122
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 22 1555081692
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 23 1996064986
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 24 2554220882
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 25 2821834349
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 26 2952996808
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 27 3210313671
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 28 3336571891
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 29 3584528711
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 30 113926993
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 31 338241895
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 32 666307205
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 33 773529912
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 34 1294757372
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 35 1396182291
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 36 1695183700
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 37 1986661051
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 38 2177026350
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 39 2456956037
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 40 2730485921
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 41 2820302411
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 42 3259730800
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 43 3345764771
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 44 3516065817
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 45 3600352804
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 46 4094571909
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 47 275423344
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 48 430227734
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 49 506948616
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 50 659060556
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 51 883997877
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 52 958139571
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 53 1322822218
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 54 1537002063
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 55 1747873779
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add x add get w 56 1955562222
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor g and e xor f g
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor b and xor a b xor b c
+d = add d t
+x = add t u
+t = add g add get w 57 2024104815
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor f and d xor e f
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor a and xor x a xor a b
+c = add c t
+g = add t u
+t = add f add get w 58 2227730452
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor e and c xor d e
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor x and xor g x xor x a
+b = add b t
+f = add t u
+t = add e add get w 59 2361852424
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor d and b xor c d
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor g and xor f g xor g x
+a = add a t
+e = add t u
+t = add d add get w 60 2428436474
+u = shl a 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor c and a xor b c
+u = shl e 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor f and xor e f xor f g
+x = add x t
+d = add t u
+t = add c add get w 61 2756734187
+u = shl x 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor b and x xor a b
+u = shl d 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor e and xor d e xor e f
+g = add g t
+c = add t u
+t = add b add get w 62 3204031479
+u = shl g 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor a and g xor x a
+u = shl c 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor d and xor c d xor d e
+f = add f t
+b = add t u
+t = add a add get w 63 3329325298
+u = shl f 32
+u = or u shr u 32
+u = xor xor shr u 6 shr u 11 shr u 25
+t = add t u
+t = add t xor x and f xor g x
+u = shl b 32
+u = or u shr u 32
+u = xor xor shr u 2 shr u 13 shr u 22
+u = add u xor c and xor b c xor c d
+e = add e t
+a = add t u
+t = add ulong get h 0 a
+put h 0 uint and t 4294967295
+t = add ulong get h 1 b
+put h 1 uint and t 4294967295
+t = add ulong get h 2 c
+put h 2 uint and t 4294967295
+t = add ulong get h 3 d
+put h 3 uint and t 4294967295
+t = add ulong get h 4 e
+put h 4 uint and t 4294967295
+t = add ulong get h 5 f
+put h 5 uint and t 4294967295
+t = add ulong get h 6 g
+put h 6 uint and t 4294967295
+t = add ulong get h 7 x
+put h 7 uint and t 4294967295
+end
+
+fn tobuf c edit uchar 104 bi ulong b view uchar 4096 bo ulong n ulong to void
+for i ulong n
+put c add 40 add bi i get b add bo i
+end
+end
+
+note absorb b[0..n), n <= 4096, exactly as src/sha256.c sha256_update does for that piece
+fn absorb c edit uchar 104 b view uchar 4096 n ulong w edit ulong 64 to void
+if gt n 4096
+trap 3
+end
+h = new uint 8 0
+cnt = getle c 32 8
+bi = and cnt 63
+putle c 32 8 add cnt n
+off = ulong 0
+if gt bi 0
+lf = sub 64 bi
+if lt n lf
+tobuf c bi b 0 n
+ret
+end
+tobuf c bi b 0 lf
+loadh c h
+schedc c w
+rounds h w
+storeh c h
+off = lf
+end
+if le add off 64 n
+loadh c h
+while le add off 64 n bound 65
+schedb b off w
+rounds h w
+off = add off 64
+end
+storeh c h
+end
+tobuf c 0 b off sub n off
+end
+
+fn init c edit uchar 104 to void
+putle c 32 8 0
+putle c 0 4 1779033703
+putle c 4 4 3144134277
+putle c 8 4 1013904242
+putle c 12 4 2773480762
+putle c 16 4 1359893119
+putle c 20 4 2600822924
+putle c 24 4 528734635
+putle c 28 4 1541459225
+end
+
+note compress the context's own block buffer (bytes 40..103) into its hash words
+fn compbuf c edit uchar 104 w edit ulong 64 to void
+h = new uint 8 0
+loadh c h
+schedc c w
+rounds h w
+storeh c h
+end
+
+note zero buffer bytes s..e-1 (indices into the 64-byte block)
+fn zbuf c edit uchar 104 s ulong e ulong to void
+i = s
+while lt i e bound 64
+put c add 40 i 0
+i = add i 1
+end
+end
+
+note sha256_final of src/sha256.c, padding in place: 0x80, zeros to 56 mod 64 (one more block
+note when the pending part is 56 bytes or more), the 64-bit big-endian bit count, then the digest.
+note The count field is left as it was (src/sha256.c adds the padding to it; nothing reads it after).
+fn final c edit uchar 104 w edit ulong 64 to void
+cnt = getle c 32 8
+bi = and cnt 63
+put c add 40 bi 128
+zbuf c add bi 1 64
+if ge bi 56
+compbuf c w
+zbuf c 0 56
+end
+bits = mul cnt 8
+for i ulong 8
+sh = mul sub 7 i 8
+put c add 96 i uchar and shr bits sh 255
+end
+compbuf c w
+h = new uint 8 0
+loadh c h
+digest8 h w
+end
+
+note IV into h
+fn initiv h edit uint 8 to void
+put h 0 uint 1779033703
+put h 1 uint 3144134277
+put h 2 uint 1013904242
+put h 3 uint 2773480762
+put h 4 uint 1359893119
+put h 5 uint 2600822924
+put h 6 uint 528734635
+put h 7 uint 1541459225
+end
+
+note expand w[0..16) into the full 64-word schedule, unrolled (constant indices need no bounds checks).
+note Every schedule word is stored duplicated, the 32-bit value in both halves (d = (x << 32) | x), so
+note a rotate right by r is the low half of d >> r and a plain shift right by n is d >> (32 + n); sums
+note are formed in the low 32 bits (add, and, xor, or need no masks) and duplicated once on store.
+fn expand w edit ulong 64 to void
+u = ulong 0
+v = ulong 0
+x = ulong 0
+x = get w 14
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 1
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 9
+u = add u get w 0
+u = shl u 32
+put w 16 or u shr u 32
+x = get w 15
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 2
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 10
+u = add u get w 1
+u = shl u 32
+put w 17 or u shr u 32
+x = get w 16
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 3
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 11
+u = add u get w 2
+u = shl u 32
+put w 18 or u shr u 32
+x = get w 17
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 4
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 12
+u = add u get w 3
+u = shl u 32
+put w 19 or u shr u 32
+x = get w 18
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 5
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 13
+u = add u get w 4
+u = shl u 32
+put w 20 or u shr u 32
+x = get w 19
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 6
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 14
+u = add u get w 5
+u = shl u 32
+put w 21 or u shr u 32
+x = get w 20
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 7
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 15
+u = add u get w 6
+u = shl u 32
+put w 22 or u shr u 32
+x = get w 21
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 8
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 16
+u = add u get w 7
+u = shl u 32
+put w 23 or u shr u 32
+x = get w 22
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 9
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 17
+u = add u get w 8
+u = shl u 32
+put w 24 or u shr u 32
+x = get w 23
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 10
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 18
+u = add u get w 9
+u = shl u 32
+put w 25 or u shr u 32
+x = get w 24
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 11
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 19
+u = add u get w 10
+u = shl u 32
+put w 26 or u shr u 32
+x = get w 25
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 12
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 20
+u = add u get w 11
+u = shl u 32
+put w 27 or u shr u 32
+x = get w 26
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 13
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 21
+u = add u get w 12
+u = shl u 32
+put w 28 or u shr u 32
+x = get w 27
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 14
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 22
+u = add u get w 13
+u = shl u 32
+put w 29 or u shr u 32
+x = get w 28
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 15
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 23
+u = add u get w 14
+u = shl u 32
+put w 30 or u shr u 32
+x = get w 29
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 16
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 24
+u = add u get w 15
+u = shl u 32
+put w 31 or u shr u 32
+x = get w 30
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 17
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 25
+u = add u get w 16
+u = shl u 32
+put w 32 or u shr u 32
+x = get w 31
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 18
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 26
+u = add u get w 17
+u = shl u 32
+put w 33 or u shr u 32
+x = get w 32
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 19
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 27
+u = add u get w 18
+u = shl u 32
+put w 34 or u shr u 32
+x = get w 33
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 20
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 28
+u = add u get w 19
+u = shl u 32
+put w 35 or u shr u 32
+x = get w 34
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 21
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 29
+u = add u get w 20
+u = shl u 32
+put w 36 or u shr u 32
+x = get w 35
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 22
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 30
+u = add u get w 21
+u = shl u 32
+put w 37 or u shr u 32
+x = get w 36
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 23
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 31
+u = add u get w 22
+u = shl u 32
+put w 38 or u shr u 32
+x = get w 37
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 24
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 32
+u = add u get w 23
+u = shl u 32
+put w 39 or u shr u 32
+x = get w 38
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 25
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 33
+u = add u get w 24
+u = shl u 32
+put w 40 or u shr u 32
+x = get w 39
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 26
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 34
+u = add u get w 25
+u = shl u 32
+put w 41 or u shr u 32
+x = get w 40
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 27
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 35
+u = add u get w 26
+u = shl u 32
+put w 42 or u shr u 32
+x = get w 41
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 28
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 36
+u = add u get w 27
+u = shl u 32
+put w 43 or u shr u 32
+x = get w 42
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 29
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 37
+u = add u get w 28
+u = shl u 32
+put w 44 or u shr u 32
+x = get w 43
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 30
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 38
+u = add u get w 29
+u = shl u 32
+put w 45 or u shr u 32
+x = get w 44
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 31
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 39
+u = add u get w 30
+u = shl u 32
+put w 46 or u shr u 32
+x = get w 45
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 32
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 40
+u = add u get w 31
+u = shl u 32
+put w 47 or u shr u 32
+x = get w 46
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 33
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 41
+u = add u get w 32
+u = shl u 32
+put w 48 or u shr u 32
+x = get w 47
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 34
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 42
+u = add u get w 33
+u = shl u 32
+put w 49 or u shr u 32
+x = get w 48
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 35
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 43
+u = add u get w 34
+u = shl u 32
+put w 50 or u shr u 32
+x = get w 49
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 36
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 44
+u = add u get w 35
+u = shl u 32
+put w 51 or u shr u 32
+x = get w 50
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 37
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 45
+u = add u get w 36
+u = shl u 32
+put w 52 or u shr u 32
+x = get w 51
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 38
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 46
+u = add u get w 37
+u = shl u 32
+put w 53 or u shr u 32
+x = get w 52
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 39
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 47
+u = add u get w 38
+u = shl u 32
+put w 54 or u shr u 32
+x = get w 53
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 40
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 48
+u = add u get w 39
+u = shl u 32
+put w 55 or u shr u 32
+x = get w 54
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 41
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 49
+u = add u get w 40
+u = shl u 32
+put w 56 or u shr u 32
+x = get w 55
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 42
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 50
+u = add u get w 41
+u = shl u 32
+put w 57 or u shr u 32
+x = get w 56
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 43
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 51
+u = add u get w 42
+u = shl u 32
+put w 58 or u shr u 32
+x = get w 57
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 44
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 52
+u = add u get w 43
+u = shl u 32
+put w 59 or u shr u 32
+x = get w 58
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 45
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 53
+u = add u get w 44
+u = shl u 32
+put w 60 or u shr u 32
+x = get w 59
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 46
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 54
+u = add u get w 45
+u = shl u 32
+put w 61 or u shr u 32
+x = get w 60
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 47
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 55
+u = add u get w 46
+u = shl u 32
+put w 62 or u shr u 32
+x = get w 61
+u = xor xor shr x 17 shr x 19 shr x 42
+x = get w 48
+v = xor xor shr x 7 shr x 18 shr x 35
+u = add u v
+u = add u get w 56
+u = add u get w 47
+u = shl u 32
+put w 63 or u shr u 32
+end
+
+note Word access for the aligned paths. b8 is the caller's 8-byte-aligned copy of the input lent a
+note second time as ulong cells (b views the same bytes), so one load brings 8 bytes. Swapping the
+note bytes inside each 32-bit half (two mask-and-shift steps; the constants stay in registers) turns
+note little-endian bytes b0..b7 into the big-endian words b0..b3 (low half) and b4..b7 (high half).
+note Each word is stored duplicated, as expand requires.
+fn blk8 b8 view ulong 512 q ulong w edit ulong 64 to void
+for i ulong 8
+x = get b8 add q i
+y = or shl and x 71777214294589695 8 and shr x 8 71777214294589695
+y = or shl and y 281470681808895 16 and shr y 16 281470681808895
+j = mul i 2
+t = shl y 32
+put w j or t shr t 32
+put w add j 1 or and y 18446744069414584320 shr y 32
+end
+end
+
+note the padded tail b[off..n) (less than 64 bytes), read as words through b8 (the bytes past n
+note are inside the caller's 4096-byte copy and are masked off here): the word holding byte n keeps
+note its k valid bytes and gets 0x80 after them, later words are zero, the 64-bit bit count goes in
+note words 14 and 15; a second block when the tail is 56 bytes or more
+fn tail8 h edit uint 8 b8 view ulong 512 off ulong n ulong w edit ulong 64 to void
+blk8 b8 shr off 3 w
+r = sub n off
+fw = shr r 2
+k = and r 3
+sh = mul k 8
+v = get w fw
+v = and v shl 4294967295 sub 32 sh
+v = and v 4294967295
+v = or v shl 128 sub 24 sh
+put w fw or v shl v 32
+i = add fw 1
+while lt i 16 bound 16
+put w i 0
+i = add i 1
+end
+if ge r 56
+expand w
+rounds h w
+for j ulong 14
+put w j 0
+end
+end
+bits = mul n 8
+v = shr bits 32
+put w 14 or v shl v 32
+v = and bits 4294967295
+put w 15 or v shl v 32
+expand w
+rounds h w
+end
+
+note the digest of h as 32 bytes packed little endian into w[0..4): word i holds the big-endian
+note bytes of h[2i] then h[2i+1], so the caller copies the digest out of w with memcpy
+fn digest8 h edit uint 8 w edit ulong 64 to void
+for i ulong 4
+j = mul i 2
+x = or ulong get h j shl ulong get h add j 1 32
+y = or shl and x 71777214294589695 8 and shr x 8 71777214294589695
+y = or shl and y 281470681808895 16 and shr y 16 281470681808895
+put w i y
+end
+end
+
+note SHA-256 of the n < 4096 bytes in b8, state in locals only (sha256_hash's short path)
+fn oneshot b8 view ulong 512 n ulong w edit ulong 64 to void
+if ge n 4096
+trap 3
+end
+h = new uint 8 0
+initiv h
+off = ulong 0
+while le add off 64 n bound 64
+blk8 b8 shr off 3 w
+expand w
+rounds h w
+off = add off 64
+end
+tail8 h b8 off n w
+digest8 h w
+end
+
+fn omsha c edit uchar 104 b view uchar 4096 n ulong op ulong w edit ulong 64 b8 view ulong 512 to void
+if eq op 0
+init c
+ret
+end
+if eq op 1
+absorb c b n w
+ret
+end
+if eq op 2
+final c w
+ret
+end
+if eq op 3
+oneshot b8 n w
+ret
+end
+trap 9
+end
diff --git a/seed/qualification/om2/baseline/sha256.cases b/seed/qualification/om2/baseline/sha256.cases
index f5d2de222..20c56af75 100644
--- a/seed/qualification/om2/baseline/sha256.cases
+++ b/seed/qualification/om2/baseline/sha256.cases
@@ -1,272 +1,273 @@
-# Baseline: the CURRENT consumer om/sha256/sha256.om (acb3f15) through baseline/sha256-main.om.
+# Baseline: the OM-1 consumer om/sha256/sha256.om as of acb3f15 (deleted from the tree by 450bbefd, #747),
+# frozen byte-identical as baseline/sha256-om1.om (sha256 7f034814...4e21), through baseline/sha256-main.om.
 # Generated from fixtures/sha256-vectors.txt by the awk commands in fixtures/PROVENANCE.txt.
 # --- vectors, default piece size 4096
-fips-empty run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
-fips-abc run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
-fips-448 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m448.bin line:248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 - 0
-fips-896 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0
-fips-million-a run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:1000000 line:cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 - 0
-seq-0 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:0 line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
-seq-1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1 line:6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d - 0
-seq-2 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:2 line:b413f47d13ee2fe6c845b2ee141af81de858df4ec549a58b7970bb96645bc8d2 - 0
-seq-3 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:3 line:ae4b3280e56e2faf83f414a6e3dabe9d5fbe18976544c05fed121accb85b53fc - 0
-seq-4 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4 line:054edec1d0211f624fed0cbca9d4f9400b0e491c43742af2c5b0abebf0c990d8 - 0
-seq-5 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:5 line:08bb5e5d6eaac1049ede0893d30ed022b1a4d9b5b48db414871f51c9cb35283d - 0
-seq-6 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:6 line:17e88db187afd62c16e5debf3e6527cd006bc012bc90b51a810cd80c2d511f43 - 0
-seq-7 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:7 line:57355ac3303c148f11aef7cb179456b9232cde33a818dfda2c2fcb9325749a6b - 0
-seq-8 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8 line:8a851ff82ee7048ad09ec3847f1ddf44944104d2cbd17ef4e3db22c6785a0d45 - 0
-seq-9 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:9 line:f8348e0b1df00833cbbbd08f07abdecc10c0efb78829d7828c62a7f36d0cc549 - 0
-seq-10 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:10 line:1f825aa2f0020ef7cf91dfa30da4668d791c5d4824fc8e41354b89ec05795ab3 - 0
-seq-11 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:11 line:78a6273103d17c39a0b6126e226cec70e33337f4bc6a38067401b54a33e78ead - 0
-seq-12 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:12 line:fff3a9bcdd37363d703c1c4f9512533686157868f0d4f16a0f02d0f1da24f9a2 - 0
-seq-13 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:13 line:86eba947d50c2c01570fe1bb5ca552958dabbdbb59b0657f0f26e21ff011e5c7 - 0
-seq-14 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:14 line:ab107f1bd632d3c3f5c724a99d024f7faa033f33c07696384b604bfe78ac352d - 0
-seq-15 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:15 line:7071fc3188fde7e7e500d4768f1784bede1a22e991648dcab9dc3219acff1d4c - 0
-seq-16 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:16 line:be45cb2605bf36bebde684841a28f0fd43c69850a3dce5fedba69928ee3a8991 - 0
-seq-17 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:17 line:3e5718fea51a8f3f5baca61c77afab473c1810f8b9db330273b4011ce92c787e - 0
-seq-18 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:18 line:7a096cc12702bcfa647ee070d4f3ba4c2d1d715b484b55b825d0edba6545803b - 0
-seq-19 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:19 line:5f9a753613d87b8a17302373c4aee56faa310d3b24b6ae1862d673aa22e1790f - 0
-seq-20 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:20 line:e7aebf577f60412f0312d442c70a1fa6148c090bf5bab404caec29482ae779e8 - 0
-seq-21 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:21 line:75aee9dcc9fbe7ddc9394f5bc5d38d9f5ad361f0520f7ceab59616e38f5950b5 - 0
-seq-22 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:22 line:22cb4df00cddd6067ad5cfa2bba9857f21a06843e1a6e39ad1a68cb9a45ab8b7 - 0
-seq-23 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:23 line:f6a954a68555187d88cd9a026940d15ab2a7e24c7517d21ceeb028e93c96f318 - 0
-seq-24 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:24 line:1d64add2a6388367c9bc2d1f1b384b069a6ef382cdaaa89771dd103e28613a25 - 0
-seq-25 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:25 line:b729ce724d9a48d3884dbfcbee1d3793d922b29fa9d639e7290af4978263772b - 0
-seq-26 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:26 line:b858da80d8a57dc546905fd147612ebddd3c9188620405d058f9ee5ab1e6bc52 - 0
-seq-27 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:27 line:d78750726155a89c9131d0ecf2704b973b8710865bf9e831845de4f2dcbc19da - 0
-seq-28 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:28 line:dc27f8e8ee2d08a2bccbb2dbd6c8e07ffba194101fc3458c34ded55f72c0971a - 0
-seq-29 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:29 line:d09bea65dff48928a14b79741de3274b646f55ac898b71a66fa3eae2d9facd77 - 0
-seq-30 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:30 line:f2192584b67da35dfc26f743e5f53bb0376046f899dc6dabd5e7b541ae86c32f - 0
-seq-31 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:31 line:4f23c2ca8c5c962e50cd31e221bfb6d0adca19111dca8e0c62598ff146dd19c4 - 0
-seq-32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:32 line:630dcd2966c4336691125448bbb25b4ff412a49c732db2c8abc1b8581bd710dd - 0
-seq-33 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:33 line:5d8fcfefa9aeeb711fb8ed1e4b7d5c8a9bafa46e8e76e68aa18adce5a10df6ab - 0
-seq-34 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:34 line:14cdbf171499f86bd18b262243d669067efbdbb5431a48289cf02f2b5448b3d4 - 0
-seq-35 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:35 line:f12dd12340cb84e4d0d9958d62be7c59bb8f7243a7420fd043177ac542a26aaa - 0
-seq-36 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:36 line:5d7e2d9b1dcbc85e7c890036a2cf2f9fe7b66554f2df08cec6aa9c0a25c99c21 - 0
-seq-37 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:37 line:f4d285f47a1e4959a445ea6528e5df3efab041fa15aad94db1e2600b3f395518 - 0
-seq-38 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:38 line:a2fd0e15d72c9d18f383e40016f9ddc706673c54252084285aaa47a812552577 - 0
-seq-39 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:39 line:4aba23aea5e2a91b7807cf3026cdd10a1c38533ce55332683d4ccb88456e0703 - 0
-seq-40 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:40 line:5faa4eec3611556812c2d74b437c8c49add3f910f10063d801441f7d75cd5e3b - 0
-seq-41 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:41 line:753629a6117f5a25d338dff10f4dd3d07e63eecc2eaf8eabe773f6399706fe67 - 0
-seq-42 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:42 line:40a1ed73b46030c8d7e88682078c5ab1ae5a2e524e066e8c8743c484de0e21e5 - 0
-seq-43 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:43 line:c033843682818c475e187d260d5e2edf0469862dfa3bb0c116f6816a29edbf60 - 0
-seq-44 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:44 line:17619ec4250ef65f083e2314ef30af796b6f1198d0fddfbb0f272930bf9bb991 - 0
-seq-45 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:45 line:a8e960c769a9508d098451e3d74dd5a2ac6c861eb0341ae94e9fc273597278c9 - 0
-seq-46 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:46 line:8ebfeb2e3a159e9f39ad7cc040e6678dade70d4f59a67d529fa76af301ab2946 - 0
-seq-47 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:47 line:ef8a7781a95c32fa02ebf511eda3dc6e273be59cb0f9e20a4f84d54f41427791 - 0
-seq-48 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:48 line:4dbdc2b2b62cb00749785bc84202236dbc3777d74660611b8e58812f0cfde6c3 - 0
-seq-49 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:49 line:7509fe148e2c426ed16c990f22fe8116905c82c561756e723f63223ace0e147e - 0
-seq-50 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:50 line:a622e13829e488422ee72a5fc92cb11d25c3d0f185a1384b8138df5074c983bf - 0
-seq-51 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:51 line:3309847cee454b4f99dcfe8fdc5511a7ba168ce0b6e5684ef73f9030d009b8b5 - 0
-seq-52 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:52 line:c4c6540a15fc140a784056fe6d9e13566fb614ecb2d9ac0331e264c386442acd - 0
-seq-53 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:53 line:90962cc12ae9cdae32d7c33c4b93194b11fac835942ee41b98770c6141c66795 - 0
-seq-54 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:54 line:675f28acc0b90a72d1c3a570fe83ac565555db358cf01826dc8eefb2bf7ca0f3 - 0
-seq-55 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0
-seq-56 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0
-seq-57 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:57 line:2fe741af801cc238602ac0ec6a7b0c3a8a87c7fc7d7f02a3fe03d1c12eac4d8f - 0
-seq-58 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:58 line:e03b18640c635b338a92b82cce4ff072f9f1aba9ac5261ee1340f592f35c0499 - 0
-seq-59 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:59 line:bd2de8f5dd15c73f68dfd26a614080c2e323b2b51b1b5ed9d7933e535d223bda - 0
-seq-60 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:60 line:0ddde28e40838ef6f9853e887f597d6adb5f40eb35d5763c52e1e64d8ba3bfff - 0
-seq-61 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:61 line:4b5c2783c91ceccb7c839213bcbb6a902d7fe8c2ec866877a51f433ea17f3e85 - 0
-seq-62 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:62 line:c89da82cbcd76ddf220e4e9091019b9866ffda72bee30de1effe6c99701a2221 - 0
-seq-63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0
-seq-64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0
-seq-65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0
-seq-66 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:66 line:b6dfd259f6e0d07deb658a88148f8253f9bbbb74ddd6db3edbe159a56bc35073 - 0
-seq-67 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:67 line:8fa5913b62847d42bb4b464e00a72c612d2ab0df2af0b9a96af8d323fa509077 - 0
-seq-68 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:68 line:7ded979c0153ebb9ef28a15a314d0b27b41c4f8eed700b54974b48eb3ecaf91c - 0
-seq-69 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:69 line:1cf3aa651dcf35dbfe296e770ad7ebc4e00bcccd0224db296183dc952d0008c9 - 0
-seq-70 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:70 line:5767d69a906d4860db9079eb7e90ab4a543e5cb032fce846554aef6ceb600e1d - 0
-seq-71 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:71 line:8189e3d54767d51e8d1942659a9e2905f9ec3ae72860c16a66e75b8cc9bd2087 - 0
-seq-72 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:72 line:107de2bc788e11029f7851f8e1b0b5afb4e34379c709fc840689ebd3d1f51b5b - 0
-seq-73 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:73 line:169f6f093a9be82febe1a6a4471425697ec25d5040b472c5b1822aeea2625988 - 0
-seq-74 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:74 line:2087ebd358ae3ea2a092fc19c2dfee57c5f0860296bc7b057c14e1227c5cb9d1 - 0
-seq-75 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:75 line:182ab56f7739e43cee0b9ba1e92c4b2a81b088705516a5243910159744f21be9 - 0
-seq-76 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:76 line:081f6c68899a48a1be455a55416104921d2fe4bdae696f4b72f9d9626a47915e - 0
-seq-77 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:77 line:5ce02376cc256861b78f87e34783814ba1aec6d09ab500d579ed8ee95c8afcc8 - 0
-seq-78 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:78 line:b93e407404e3e95f20fd647365e0e7f46afabe9af1ff083af996135e00d54009 - 0
-seq-79 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:79 line:e81fa832b37be8ed8f79da29987aa4d61310dcb14b2859dedf8fb1daa2541fd3 - 0
-seq-80 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:80 line:c56705fea5b110b8dc63688533ced21167e628017387c885423b835a55edd5ef - 0
-seq-81 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:81 line:c2226285d08a245a17058ed2d24ad095b714f608ae364fddf119e0a7df890540 - 0
-seq-82 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:82 line:f9c270da8793221a6809ac685fdd4f5387e0fe1ee6aaf01c74f1e0a719621614 - 0
-seq-83 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:83 line:e69befd6ef7f685c36e343ac1702d87ad6a0e4ac8c0d5c521d04aad4ef0b7458 - 0
-seq-84 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:84 line:4e3033562ad74a7d43eb5ff5fc2382622c6307cb10e245ad62da77c4c63cb178 - 0
-seq-85 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:85 line:2ea17629472564a59e5eb845a2cdd04f442df2ff26bcc866e400f77158d612a1 - 0
-seq-86 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:86 line:b90223df74dd49a8a1461f340f2d7a90f96903ccbb5bc3c74ea3658fc8948b20 - 0
-seq-87 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:87 line:e0209f42b927ec9c0f6d6a76007ed540e9bdd6e427b3368a1ea6c5e7565972dd - 0
-seq-88 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:88 line:10d9bd424114319c0999adf6288f74060cd8918ef1228827a6269b2bf0f0880c - 0
-seq-89 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:89 line:7d1978a65ac94dbbcdc62e3d81850299fe157dd9b7bd9e01b170156210d2815a - 0
-seq-90 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:90 line:e052dff9e1c94aaa49556f86fad55029a4875839fda57f5005f4c4403876b256 - 0
-seq-91 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:91 line:58d29459b2130a2e151252d408b95e6dac424c564062eb911cc76440cb926ca0 - 0
-seq-92 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:92 line:4e4530c392316f598e1bd07f32166380a8f712a33a48e9eb4247131ec5dc05d3 - 0
-seq-93 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:93 line:a09c9d3e42342c7dea44edb4aeb48cf6727cacd8032a12cf77a25829fc249d32 - 0
-seq-94 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:94 line:eb978d0f1ac03ce5c3510b5f4a16073a7a2bdc15c4ab7777dcf01030cc316667 - 0
-seq-95 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:95 line:7d1905a3ace827ea1ac51c4fa08c281ed3be87e7f4e928d696bfde35c8f2dc0f - 0
-seq-96 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:96 line:08359b108fa567f5dcf319fa3434da6abbc1d595f426372666447f09cc5a87dc - 0
-seq-97 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:97 line:a7b3830ffab0f2bbabbef6df0b169a7917008bf238880bbf8c20b8e000077312 - 0
-seq-98 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:98 line:b4f5d9b1555994c5ebaebd82918d560a3bf82962a171a1614e7551939e943366 - 0
-seq-99 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:99 line:014ecaea1b378900f1212898c6ddb01565d81af1d0ef78df5e28d46e9caf7cfc - 0
-seq-100 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:100 line:bce0aff19cf5aa6a7469a30d61d04e4376e4bbf6381052ee9e7f33925c954d52 - 0
-seq-101 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:101 line:4565d7b898ccea3139ad260f9273115f806b30079d7683218c4e3ecd43af3b33 - 0
-seq-102 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:102 line:ddadeb660fe8902c9fb2db9b6cf237c9ce5b31753398085c4367eb5910b9cc13 - 0
-seq-103 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:103 line:c15a8928131f6687dd10f3c115ddf8d7c8f2df7e18d12c08c4fd16f666ce60ba - 0
-seq-104 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:104 line:ae8e3d799b1353a39815f90eceebefa265cc448fe39faf2008cb20784cb2df9f - 0
-seq-105 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:105 line:98545371a3d9981abe5ab4a32a1d7b2fadd9801d89da52a94a4f78a42740d21c - 0
-seq-106 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:106 line:6323dce2f8b3a04dcea8d205602348c40403cb200c677eb1a1c0fe37edb6eb2f - 0
-seq-107 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:107 line:8150f7c5da910d709ff02ddf85dd293c6a2672633de8cda30f2e0aa58b14b0c4 - 0
-seq-108 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:108 line:44d21db70716bd7644cb0d819fa6791805ebc526ea32996a60e41dc753fcfafc - 0
-seq-109 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:109 line:b9b7c375cca45db19466ebd0fe7c9e147948cc42c1c90f0579728cfb2651956d - 0
-seq-110 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:110 line:a47a551b01e55aaaa015531a4fa26a666f1ebd4ba4573898de712b8b5e0ca7e9 - 0
-seq-111 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:111 line:60780e9451bdc43cf4530ffc95cbb0c4eb24dae2c39f55f334d679e076c08065 - 0
-seq-112 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:112 line:09373f127d34e61dbbaa8bc4499c87074f2ddb10e1b465f506d7d70a15011979 - 0
-seq-113 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:113 line:13aaa9b5fb739cdb0e2af99d9ac0a409390adc4d1cb9b41f1ef94f8552060e92 - 0
-seq-114 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:114 line:5b0a32f1219524f5d72b00ba1a1b1c09a05ff10c83bb7a86042e42988f2afc06 - 0
-seq-115 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:115 line:32796a0a246ea67eb785eda2e045192b9d6e40b9fe2047b21ef0cee929039651 - 0
-seq-116 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:116 line:da9ab8930992a9f65eccec4c310882cab428a708e6c899181046a8c73af00855 - 0
-seq-117 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:117 line:9c94557382c966753c8cab0957eaedbe1d737b5fcb35c56c220ddd36f8a2d351 - 0
-seq-118 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:118 line:d32ab00929cb935b79d44e74c5a745db460ff794dea3b79be40c1cc5cf5388ef - 0
-seq-119 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0
-seq-120 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0
-seq-121 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:121 line:335a461692b30bba1d647cc71604e88e676c90e4c22455d0b8c83f4bd7c8ac9b - 0
-seq-122 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:122 line:3d08c4d7bdda7ec922b0741df357de46e7bd102f9ab7a5c67624ab58da6d9d75 - 0
-seq-123 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:123 line:cc63be92e3a900cd067da89473b61b40579b54ef54f8305c2ffcc893743792e9 - 0
-seq-124 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:124 line:865447fc4fae01471f2fc973bfb448de00217521ef02e3214d5177ea89c3ef31 - 0
-seq-125 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:125 line:3daa582f9563601e290f3cd6d304bff7e25a9ee42a34ffbac5cf2bf40134e0d4 - 0
-seq-126 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:126 line:5dda7cb7c2282a55676f8ad5c448092f4a9ebd65338b07ed224fcd7b6c73f5ef - 0
-seq-127 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:127 line:92ca0fa6651ee2f97b884b7246a562fa71250fedefe5ebf270d31c546bfea976 - 0
-seq-128 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0
-seq-129 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0
-seq-130 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0
-seq-1000 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0
-seq-4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4095 line:45de2924756389e3ccab98bdaacbef8a81cdeb651b59f916a6d6385b4f7b999d - 0
-seq-4096 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4096 line:d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca - 0
-seq-4097 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0
-seq-8191 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8191 line:a7ff4cc384f150c0763c051418a0084ded32bfa5863717ab5f35d3f43a5ffe1c - 0
-seq-8192 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8192 line:25df2449b2e5a35fea14e02a7158e283801a1069c9f84631b9a9dacb2f809a7f - 0
-seq-8193 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0
-seq-65536 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0
-rep-a-55 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:55 line:9f4390f8d30c2dd92ec9f095b65e2b9ae9b0a925a5258e241c9f1e910f734318 - 0
-rep-a-56 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:56 line:b35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a - 0
-rep-a-63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:63 line:7d3e74a05d7db15bce4ad9ec0658ea98e3f06eeecf16b4c6fff2da457ddc2f34 - 0
-rep-a-64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:64 line:ffe054fe7ae0cb6dc65c3af9b61d5209f439851db43d0ba5997337df154668eb - 0
-rep-a-65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:65 line:635361c48bb9eab14198e76ea8ab7f1a41685d6ad62aa9146d301d4f17eb0ae0 - 0
-rep-a-4096 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:4096 line:c93eee2d0db02f10acc7460d9576e122dcf8cd53c4bf8dfcae1b3e74ebcfff5a - 0
-rnd-1-3 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:1:3 line:d46b892acb38e6d9d2f93fab2621df39929be969e7a6245e8f8828e1e224b122 - 0
-rnd-2-55 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:2:55 line:489354d7744738edcbc1228ca418ff7c0494df8e741686cf9092d364104bbe44 - 0
-rnd-3-56 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:3:56 line:a8126f4824235667aeede184b7dac301b41a5713caca7f972851f449a09d1520 - 0
-rnd-4-64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:4:64 line:df69de71c5b8b96befa275d42efa6feb59ffddf56501ae24db33ca419fa3afee - 0
-rnd-5-111 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:5:111 line:5fb527f8bc6556636300f5c4650021bd7c4f76b207b31ec13a9b64b9aeda2ad3 - 0
-rnd-6-4097 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:6:4097 line:4663feee0adebd8f54ad99f0a0e462d4f496613157a8a22d1ed0778a6b59cb4e - 0
-rnd-7-12345 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:7:12345 line:58257600665dc6151a6c00999f9a7a6474c66dd1910ddc4ce7660793504dd1f0 - 0
-rnd-8-100003 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0
+fips-empty run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
+fips-abc run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+fips-448 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m448.bin line:248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 - 0
+fips-896 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0
+fips-million-a run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:1000000 line:cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 - 0
+seq-0 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:0 line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
+seq-1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1 line:6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d - 0
+seq-2 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:2 line:b413f47d13ee2fe6c845b2ee141af81de858df4ec549a58b7970bb96645bc8d2 - 0
+seq-3 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:3 line:ae4b3280e56e2faf83f414a6e3dabe9d5fbe18976544c05fed121accb85b53fc - 0
+seq-4 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4 line:054edec1d0211f624fed0cbca9d4f9400b0e491c43742af2c5b0abebf0c990d8 - 0
+seq-5 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:5 line:08bb5e5d6eaac1049ede0893d30ed022b1a4d9b5b48db414871f51c9cb35283d - 0
+seq-6 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:6 line:17e88db187afd62c16e5debf3e6527cd006bc012bc90b51a810cd80c2d511f43 - 0
+seq-7 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:7 line:57355ac3303c148f11aef7cb179456b9232cde33a818dfda2c2fcb9325749a6b - 0
+seq-8 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8 line:8a851ff82ee7048ad09ec3847f1ddf44944104d2cbd17ef4e3db22c6785a0d45 - 0
+seq-9 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:9 line:f8348e0b1df00833cbbbd08f07abdecc10c0efb78829d7828c62a7f36d0cc549 - 0
+seq-10 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:10 line:1f825aa2f0020ef7cf91dfa30da4668d791c5d4824fc8e41354b89ec05795ab3 - 0
+seq-11 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:11 line:78a6273103d17c39a0b6126e226cec70e33337f4bc6a38067401b54a33e78ead - 0
+seq-12 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:12 line:fff3a9bcdd37363d703c1c4f9512533686157868f0d4f16a0f02d0f1da24f9a2 - 0
+seq-13 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:13 line:86eba947d50c2c01570fe1bb5ca552958dabbdbb59b0657f0f26e21ff011e5c7 - 0
+seq-14 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:14 line:ab107f1bd632d3c3f5c724a99d024f7faa033f33c07696384b604bfe78ac352d - 0
+seq-15 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:15 line:7071fc3188fde7e7e500d4768f1784bede1a22e991648dcab9dc3219acff1d4c - 0
+seq-16 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:16 line:be45cb2605bf36bebde684841a28f0fd43c69850a3dce5fedba69928ee3a8991 - 0
+seq-17 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:17 line:3e5718fea51a8f3f5baca61c77afab473c1810f8b9db330273b4011ce92c787e - 0
+seq-18 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:18 line:7a096cc12702bcfa647ee070d4f3ba4c2d1d715b484b55b825d0edba6545803b - 0
+seq-19 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:19 line:5f9a753613d87b8a17302373c4aee56faa310d3b24b6ae1862d673aa22e1790f - 0
+seq-20 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:20 line:e7aebf577f60412f0312d442c70a1fa6148c090bf5bab404caec29482ae779e8 - 0
+seq-21 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:21 line:75aee9dcc9fbe7ddc9394f5bc5d38d9f5ad361f0520f7ceab59616e38f5950b5 - 0
+seq-22 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:22 line:22cb4df00cddd6067ad5cfa2bba9857f21a06843e1a6e39ad1a68cb9a45ab8b7 - 0
+seq-23 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:23 line:f6a954a68555187d88cd9a026940d15ab2a7e24c7517d21ceeb028e93c96f318 - 0
+seq-24 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:24 line:1d64add2a6388367c9bc2d1f1b384b069a6ef382cdaaa89771dd103e28613a25 - 0
+seq-25 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:25 line:b729ce724d9a48d3884dbfcbee1d3793d922b29fa9d639e7290af4978263772b - 0
+seq-26 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:26 line:b858da80d8a57dc546905fd147612ebddd3c9188620405d058f9ee5ab1e6bc52 - 0
+seq-27 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:27 line:d78750726155a89c9131d0ecf2704b973b8710865bf9e831845de4f2dcbc19da - 0
+seq-28 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:28 line:dc27f8e8ee2d08a2bccbb2dbd6c8e07ffba194101fc3458c34ded55f72c0971a - 0
+seq-29 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:29 line:d09bea65dff48928a14b79741de3274b646f55ac898b71a66fa3eae2d9facd77 - 0
+seq-30 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:30 line:f2192584b67da35dfc26f743e5f53bb0376046f899dc6dabd5e7b541ae86c32f - 0
+seq-31 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:31 line:4f23c2ca8c5c962e50cd31e221bfb6d0adca19111dca8e0c62598ff146dd19c4 - 0
+seq-32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:32 line:630dcd2966c4336691125448bbb25b4ff412a49c732db2c8abc1b8581bd710dd - 0
+seq-33 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:33 line:5d8fcfefa9aeeb711fb8ed1e4b7d5c8a9bafa46e8e76e68aa18adce5a10df6ab - 0
+seq-34 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:34 line:14cdbf171499f86bd18b262243d669067efbdbb5431a48289cf02f2b5448b3d4 - 0
+seq-35 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:35 line:f12dd12340cb84e4d0d9958d62be7c59bb8f7243a7420fd043177ac542a26aaa - 0
+seq-36 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:36 line:5d7e2d9b1dcbc85e7c890036a2cf2f9fe7b66554f2df08cec6aa9c0a25c99c21 - 0
+seq-37 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:37 line:f4d285f47a1e4959a445ea6528e5df3efab041fa15aad94db1e2600b3f395518 - 0
+seq-38 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:38 line:a2fd0e15d72c9d18f383e40016f9ddc706673c54252084285aaa47a812552577 - 0
+seq-39 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:39 line:4aba23aea5e2a91b7807cf3026cdd10a1c38533ce55332683d4ccb88456e0703 - 0
+seq-40 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:40 line:5faa4eec3611556812c2d74b437c8c49add3f910f10063d801441f7d75cd5e3b - 0
+seq-41 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:41 line:753629a6117f5a25d338dff10f4dd3d07e63eecc2eaf8eabe773f6399706fe67 - 0
+seq-42 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:42 line:40a1ed73b46030c8d7e88682078c5ab1ae5a2e524e066e8c8743c484de0e21e5 - 0
+seq-43 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:43 line:c033843682818c475e187d260d5e2edf0469862dfa3bb0c116f6816a29edbf60 - 0
+seq-44 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:44 line:17619ec4250ef65f083e2314ef30af796b6f1198d0fddfbb0f272930bf9bb991 - 0
+seq-45 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:45 line:a8e960c769a9508d098451e3d74dd5a2ac6c861eb0341ae94e9fc273597278c9 - 0
+seq-46 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:46 line:8ebfeb2e3a159e9f39ad7cc040e6678dade70d4f59a67d529fa76af301ab2946 - 0
+seq-47 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:47 line:ef8a7781a95c32fa02ebf511eda3dc6e273be59cb0f9e20a4f84d54f41427791 - 0
+seq-48 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:48 line:4dbdc2b2b62cb00749785bc84202236dbc3777d74660611b8e58812f0cfde6c3 - 0
+seq-49 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:49 line:7509fe148e2c426ed16c990f22fe8116905c82c561756e723f63223ace0e147e - 0
+seq-50 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:50 line:a622e13829e488422ee72a5fc92cb11d25c3d0f185a1384b8138df5074c983bf - 0
+seq-51 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:51 line:3309847cee454b4f99dcfe8fdc5511a7ba168ce0b6e5684ef73f9030d009b8b5 - 0
+seq-52 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:52 line:c4c6540a15fc140a784056fe6d9e13566fb614ecb2d9ac0331e264c386442acd - 0
+seq-53 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:53 line:90962cc12ae9cdae32d7c33c4b93194b11fac835942ee41b98770c6141c66795 - 0
+seq-54 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:54 line:675f28acc0b90a72d1c3a570fe83ac565555db358cf01826dc8eefb2bf7ca0f3 - 0
+seq-55 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0
+seq-56 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0
+seq-57 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:57 line:2fe741af801cc238602ac0ec6a7b0c3a8a87c7fc7d7f02a3fe03d1c12eac4d8f - 0
+seq-58 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:58 line:e03b18640c635b338a92b82cce4ff072f9f1aba9ac5261ee1340f592f35c0499 - 0
+seq-59 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:59 line:bd2de8f5dd15c73f68dfd26a614080c2e323b2b51b1b5ed9d7933e535d223bda - 0
+seq-60 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:60 line:0ddde28e40838ef6f9853e887f597d6adb5f40eb35d5763c52e1e64d8ba3bfff - 0
+seq-61 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:61 line:4b5c2783c91ceccb7c839213bcbb6a902d7fe8c2ec866877a51f433ea17f3e85 - 0
+seq-62 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:62 line:c89da82cbcd76ddf220e4e9091019b9866ffda72bee30de1effe6c99701a2221 - 0
+seq-63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0
+seq-64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0
+seq-65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0
+seq-66 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:66 line:b6dfd259f6e0d07deb658a88148f8253f9bbbb74ddd6db3edbe159a56bc35073 - 0
+seq-67 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:67 line:8fa5913b62847d42bb4b464e00a72c612d2ab0df2af0b9a96af8d323fa509077 - 0
+seq-68 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:68 line:7ded979c0153ebb9ef28a15a314d0b27b41c4f8eed700b54974b48eb3ecaf91c - 0
+seq-69 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:69 line:1cf3aa651dcf35dbfe296e770ad7ebc4e00bcccd0224db296183dc952d0008c9 - 0
+seq-70 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:70 line:5767d69a906d4860db9079eb7e90ab4a543e5cb032fce846554aef6ceb600e1d - 0
+seq-71 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:71 line:8189e3d54767d51e8d1942659a9e2905f9ec3ae72860c16a66e75b8cc9bd2087 - 0
+seq-72 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:72 line:107de2bc788e11029f7851f8e1b0b5afb4e34379c709fc840689ebd3d1f51b5b - 0
+seq-73 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:73 line:169f6f093a9be82febe1a6a4471425697ec25d5040b472c5b1822aeea2625988 - 0
+seq-74 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:74 line:2087ebd358ae3ea2a092fc19c2dfee57c5f0860296bc7b057c14e1227c5cb9d1 - 0
+seq-75 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:75 line:182ab56f7739e43cee0b9ba1e92c4b2a81b088705516a5243910159744f21be9 - 0
+seq-76 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:76 line:081f6c68899a48a1be455a55416104921d2fe4bdae696f4b72f9d9626a47915e - 0
+seq-77 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:77 line:5ce02376cc256861b78f87e34783814ba1aec6d09ab500d579ed8ee95c8afcc8 - 0
+seq-78 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:78 line:b93e407404e3e95f20fd647365e0e7f46afabe9af1ff083af996135e00d54009 - 0
+seq-79 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:79 line:e81fa832b37be8ed8f79da29987aa4d61310dcb14b2859dedf8fb1daa2541fd3 - 0
+seq-80 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:80 line:c56705fea5b110b8dc63688533ced21167e628017387c885423b835a55edd5ef - 0
+seq-81 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:81 line:c2226285d08a245a17058ed2d24ad095b714f608ae364fddf119e0a7df890540 - 0
+seq-82 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:82 line:f9c270da8793221a6809ac685fdd4f5387e0fe1ee6aaf01c74f1e0a719621614 - 0
+seq-83 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:83 line:e69befd6ef7f685c36e343ac1702d87ad6a0e4ac8c0d5c521d04aad4ef0b7458 - 0
+seq-84 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:84 line:4e3033562ad74a7d43eb5ff5fc2382622c6307cb10e245ad62da77c4c63cb178 - 0
+seq-85 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:85 line:2ea17629472564a59e5eb845a2cdd04f442df2ff26bcc866e400f77158d612a1 - 0
+seq-86 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:86 line:b90223df74dd49a8a1461f340f2d7a90f96903ccbb5bc3c74ea3658fc8948b20 - 0
+seq-87 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:87 line:e0209f42b927ec9c0f6d6a76007ed540e9bdd6e427b3368a1ea6c5e7565972dd - 0
+seq-88 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:88 line:10d9bd424114319c0999adf6288f74060cd8918ef1228827a6269b2bf0f0880c - 0
+seq-89 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:89 line:7d1978a65ac94dbbcdc62e3d81850299fe157dd9b7bd9e01b170156210d2815a - 0
+seq-90 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:90 line:e052dff9e1c94aaa49556f86fad55029a4875839fda57f5005f4c4403876b256 - 0
+seq-91 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:91 line:58d29459b2130a2e151252d408b95e6dac424c564062eb911cc76440cb926ca0 - 0
+seq-92 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:92 line:4e4530c392316f598e1bd07f32166380a8f712a33a48e9eb4247131ec5dc05d3 - 0
+seq-93 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:93 line:a09c9d3e42342c7dea44edb4aeb48cf6727cacd8032a12cf77a25829fc249d32 - 0
+seq-94 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:94 line:eb978d0f1ac03ce5c3510b5f4a16073a7a2bdc15c4ab7777dcf01030cc316667 - 0
+seq-95 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:95 line:7d1905a3ace827ea1ac51c4fa08c281ed3be87e7f4e928d696bfde35c8f2dc0f - 0
+seq-96 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:96 line:08359b108fa567f5dcf319fa3434da6abbc1d595f426372666447f09cc5a87dc - 0
+seq-97 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:97 line:a7b3830ffab0f2bbabbef6df0b169a7917008bf238880bbf8c20b8e000077312 - 0
+seq-98 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:98 line:b4f5d9b1555994c5ebaebd82918d560a3bf82962a171a1614e7551939e943366 - 0
+seq-99 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:99 line:014ecaea1b378900f1212898c6ddb01565d81af1d0ef78df5e28d46e9caf7cfc - 0
+seq-100 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:100 line:bce0aff19cf5aa6a7469a30d61d04e4376e4bbf6381052ee9e7f33925c954d52 - 0
+seq-101 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:101 line:4565d7b898ccea3139ad260f9273115f806b30079d7683218c4e3ecd43af3b33 - 0
+seq-102 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:102 line:ddadeb660fe8902c9fb2db9b6cf237c9ce5b31753398085c4367eb5910b9cc13 - 0
+seq-103 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:103 line:c15a8928131f6687dd10f3c115ddf8d7c8f2df7e18d12c08c4fd16f666ce60ba - 0
+seq-104 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:104 line:ae8e3d799b1353a39815f90eceebefa265cc448fe39faf2008cb20784cb2df9f - 0
+seq-105 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:105 line:98545371a3d9981abe5ab4a32a1d7b2fadd9801d89da52a94a4f78a42740d21c - 0
+seq-106 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:106 line:6323dce2f8b3a04dcea8d205602348c40403cb200c677eb1a1c0fe37edb6eb2f - 0
+seq-107 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:107 line:8150f7c5da910d709ff02ddf85dd293c6a2672633de8cda30f2e0aa58b14b0c4 - 0
+seq-108 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:108 line:44d21db70716bd7644cb0d819fa6791805ebc526ea32996a60e41dc753fcfafc - 0
+seq-109 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:109 line:b9b7c375cca45db19466ebd0fe7c9e147948cc42c1c90f0579728cfb2651956d - 0
+seq-110 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:110 line:a47a551b01e55aaaa015531a4fa26a666f1ebd4ba4573898de712b8b5e0ca7e9 - 0
+seq-111 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:111 line:60780e9451bdc43cf4530ffc95cbb0c4eb24dae2c39f55f334d679e076c08065 - 0
+seq-112 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:112 line:09373f127d34e61dbbaa8bc4499c87074f2ddb10e1b465f506d7d70a15011979 - 0
+seq-113 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:113 line:13aaa9b5fb739cdb0e2af99d9ac0a409390adc4d1cb9b41f1ef94f8552060e92 - 0
+seq-114 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:114 line:5b0a32f1219524f5d72b00ba1a1b1c09a05ff10c83bb7a86042e42988f2afc06 - 0
+seq-115 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:115 line:32796a0a246ea67eb785eda2e045192b9d6e40b9fe2047b21ef0cee929039651 - 0
+seq-116 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:116 line:da9ab8930992a9f65eccec4c310882cab428a708e6c899181046a8c73af00855 - 0
+seq-117 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:117 line:9c94557382c966753c8cab0957eaedbe1d737b5fcb35c56c220ddd36f8a2d351 - 0
+seq-118 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:118 line:d32ab00929cb935b79d44e74c5a745db460ff794dea3b79be40c1cc5cf5388ef - 0
+seq-119 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0
+seq-120 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0
+seq-121 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:121 line:335a461692b30bba1d647cc71604e88e676c90e4c22455d0b8c83f4bd7c8ac9b - 0
+seq-122 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:122 line:3d08c4d7bdda7ec922b0741df357de46e7bd102f9ab7a5c67624ab58da6d9d75 - 0
+seq-123 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:123 line:cc63be92e3a900cd067da89473b61b40579b54ef54f8305c2ffcc893743792e9 - 0
+seq-124 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:124 line:865447fc4fae01471f2fc973bfb448de00217521ef02e3214d5177ea89c3ef31 - 0
+seq-125 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:125 line:3daa582f9563601e290f3cd6d304bff7e25a9ee42a34ffbac5cf2bf40134e0d4 - 0
+seq-126 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:126 line:5dda7cb7c2282a55676f8ad5c448092f4a9ebd65338b07ed224fcd7b6c73f5ef - 0
+seq-127 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:127 line:92ca0fa6651ee2f97b884b7246a562fa71250fedefe5ebf270d31c546bfea976 - 0
+seq-128 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0
+seq-129 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0
+seq-130 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0
+seq-1000 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0
+seq-4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4095 line:45de2924756389e3ccab98bdaacbef8a81cdeb651b59f916a6d6385b4f7b999d - 0
+seq-4096 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4096 line:d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca - 0
+seq-4097 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0
+seq-8191 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8191 line:a7ff4cc384f150c0763c051418a0084ded32bfa5863717ab5f35d3f43a5ffe1c - 0
+seq-8192 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8192 line:25df2449b2e5a35fea14e02a7158e283801a1069c9f84631b9a9dacb2f809a7f - 0
+seq-8193 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0
+seq-65536 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0
+rep-a-55 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:55 line:9f4390f8d30c2dd92ec9f095b65e2b9ae9b0a925a5258e241c9f1e910f734318 - 0
+rep-a-56 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:56 line:b35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a - 0
+rep-a-63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:63 line:7d3e74a05d7db15bce4ad9ec0658ea98e3f06eeecf16b4c6fff2da457ddc2f34 - 0
+rep-a-64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:64 line:ffe054fe7ae0cb6dc65c3af9b61d5209f439851db43d0ba5997337df154668eb - 0
+rep-a-65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:65 line:635361c48bb9eab14198e76ea8ab7f1a41685d6ad62aa9146d301d4f17eb0ae0 - 0
+rep-a-4096 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:4096 line:c93eee2d0db02f10acc7460d9576e122dcf8cd53c4bf8dfcae1b3e74ebcfff5a - 0
+rnd-1-3 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:1:3 line:d46b892acb38e6d9d2f93fab2621df39929be969e7a6245e8f8828e1e224b122 - 0
+rnd-2-55 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:2:55 line:489354d7744738edcbc1228ca418ff7c0494df8e741686cf9092d364104bbe44 - 0
+rnd-3-56 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:3:56 line:a8126f4824235667aeede184b7dac301b41a5713caca7f972851f449a09d1520 - 0
+rnd-4-64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:4:64 line:df69de71c5b8b96befa275d42efa6feb59ffddf56501ae24db33ca419fa3afee - 0
+rnd-5-111 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:5:111 line:5fb527f8bc6556636300f5c4650021bd7c4f76b207b31ec13a9b64b9aeda2ad3 - 0
+rnd-6-4097 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:6:4097 line:4663feee0adebd8f54ad99f0a0e462d4f496613157a8a22d1ed0778a6b59cb4e - 0
+rnd-7-12345 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:7:12345 line:58257600665dc6151a6c00999f9a7a6474c66dd1910ddc4ce7660793504dd1f0 - 0
+rnd-8-100003 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0
 # --- split points: piece sizes 1, 32, 63, 64, 65, 4095
-fips-896-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 1
-seq-55-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 1
-seq-56-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 1
-seq-63-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 1
-seq-64-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 1
-seq-65-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 1
-seq-119-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 1
-seq-120-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 1
-seq-128-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 1
-seq-129-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 1
-seq-130-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 1
-seq-1000-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 1
-seq-4097-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 1
-seq-8193-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 1
-seq-65536-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 1
-rnd-8-100003-p1 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 1
-fips-896-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 32
-seq-55-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 32
-seq-56-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 32
-seq-63-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 32
-seq-64-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 32
-seq-65-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 32
-seq-119-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 32
-seq-120-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 32
-seq-128-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 32
-seq-129-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 32
-seq-130-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 32
-seq-1000-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 32
-seq-4097-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 32
-seq-8193-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 32
-seq-65536-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 32
-rnd-8-100003-p32 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 32
-fips-896-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 63
-seq-55-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 63
-seq-56-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 63
-seq-63-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 63
-seq-64-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 63
-seq-65-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 63
-seq-119-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 63
-seq-120-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 63
-seq-128-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 63
-seq-129-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 63
-seq-130-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 63
-seq-1000-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 63
-seq-4097-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 63
-seq-8193-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 63
-seq-65536-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 63
-rnd-8-100003-p63 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 63
-fips-896-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 64
-seq-55-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 64
-seq-56-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 64
-seq-63-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 64
-seq-64-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 64
-seq-65-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 64
-seq-119-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 64
-seq-120-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 64
-seq-128-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 64
-seq-129-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 64
-seq-130-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 64
-seq-1000-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 64
-seq-4097-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 64
-seq-8193-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 64
-seq-65536-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 64
-rnd-8-100003-p64 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 64
-fips-896-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 65
-seq-55-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 65
-seq-56-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 65
-seq-63-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 65
-seq-64-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 65
-seq-65-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 65
-seq-119-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 65
-seq-120-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 65
-seq-128-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 65
-seq-129-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 65
-seq-130-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 65
-seq-1000-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 65
-seq-4097-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 65
-seq-8193-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 65
-seq-65536-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 65
-rnd-8-100003-p65 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 65
-fips-896-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 4095
-seq-55-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 4095
-seq-56-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 4095
-seq-63-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 4095
-seq-64-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 4095
-seq-65-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 4095
-seq-119-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 4095
-seq-120-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 4095
-seq-128-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 4095
-seq-129-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 4095
-seq-130-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 4095
-seq-1000-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 4095
-seq-4097-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 4095
-seq-8193-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 4095
-seq-65536-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 4095
-rnd-8-100003-p4095 run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 4095
+fips-896-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 1
+seq-55-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 1
+seq-56-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 1
+seq-63-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 1
+seq-64-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 1
+seq-65-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 1
+seq-119-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 1
+seq-120-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 1
+seq-128-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 1
+seq-129-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 1
+seq-130-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 1
+seq-1000-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 1
+seq-4097-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 1
+seq-8193-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 1
+seq-65536-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 1
+rnd-8-100003-p1 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 1
+fips-896-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 32
+seq-55-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 32
+seq-56-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 32
+seq-63-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 32
+seq-64-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 32
+seq-65-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 32
+seq-119-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 32
+seq-120-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 32
+seq-128-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 32
+seq-129-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 32
+seq-130-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 32
+seq-1000-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 32
+seq-4097-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 32
+seq-8193-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 32
+seq-65536-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 32
+rnd-8-100003-p32 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 32
+fips-896-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 63
+seq-55-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 63
+seq-56-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 63
+seq-63-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 63
+seq-64-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 63
+seq-65-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 63
+seq-119-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 63
+seq-120-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 63
+seq-128-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 63
+seq-129-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 63
+seq-130-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 63
+seq-1000-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 63
+seq-4097-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 63
+seq-8193-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 63
+seq-65536-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 63
+rnd-8-100003-p63 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 63
+fips-896-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 64
+seq-55-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 64
+seq-56-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 64
+seq-63-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 64
+seq-64-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 64
+seq-65-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 64
+seq-119-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 64
+seq-120-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 64
+seq-128-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 64
+seq-129-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 64
+seq-130-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 64
+seq-1000-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 64
+seq-4097-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 64
+seq-8193-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 64
+seq-65536-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 64
+rnd-8-100003-p64 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 64
+fips-896-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 65
+seq-55-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 65
+seq-56-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 65
+seq-63-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 65
+seq-64-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 65
+seq-65-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 65
+seq-119-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 65
+seq-120-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 65
+seq-128-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 65
+seq-129-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 65
+seq-130-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 65
+seq-1000-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 65
+seq-4097-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 65
+seq-8193-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 65
+seq-65536-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 65
+rnd-8-100003-p65 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 65
+fips-896-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m896.bin line:cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 - 0 4095
+seq-55-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:55 line:463eb28e72f82e0a96c0a4cc53690c571281131f672aa229e0d45ae59b598b59 - 0 4095
+seq-56-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:56 line:da2ae4d6b36748f2a318f23e7ab1dfdf45acdc9d049bd80e59de82a60895f562 - 0 4095
+seq-63-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:63 line:29af2686fd53374a36b0846694cc342177e428d1647515f078784d69cdb9e488 - 0 4095
+seq-64-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:64 line:fdeab9acf3710362bd2658cdc9a29e8f9c757fcf9811603a8c447cd1d9151108 - 0 4095
+seq-65-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65 line:4bfd2c8b6f1eec7a2afeb48b934ee4b2694182027e6d0fc075074f2fabb31781 - 0 4095
+seq-119-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:119 line:da18797ed7c3a777f0847f429724a2d8cd5138e6ed2895c3fa1a6d39d18f7ec6 - 0 4095
+seq-120-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:120 line:f52b23db1fbb6ded89ef42a23ce0c8922c45f25c50b568a93bf1c075420bbb7c - 0 4095
+seq-128-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:128 line:471fb943aa23c511f6f72f8d1652d9c880cfa392ad80503120547703e56a2be5 - 0 4095
+seq-129-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:129 line:5099c6a56203f9687f7d33f4bfdf576d31dc91f6b695ecea38b2770c87631135 - 0 4095
+seq-130-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:130 line:8d39b60b9c767c58975b270c1d6b13c9b4507e5aee7ad496a3528e4c7f880721 - 0 4095
+seq-1000-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 4095
+seq-4097-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:4097 line:a16560d668b843fb3be99ace41dbd18471f342bd3255a1d21204b35e43f74436 - 0 4095
+seq-8193-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:8193 line:7e3691790cd64b19d4edb1a80e988214515abeb53aa0f34ffbfe4b4bf405d120 - 0 4095
+seq-65536-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:65536 line:4b640d85ab3ba30fd02c9fc9db4a8928f416322ad27022ea58a65aaee68a4df2 - 0 4095
+rnd-8-100003-p4095 run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rnd:8:100003 line:990929ebc8acf2ae2d7aa35428c6954f0320f5b48b969dec576f2070bb7afc31 - 0 4095
 # --- mutants of the consumer source (exact-once substitution); each must be killed by a
 # digest mismatch on the named vector, with a clean exit 0
 subst seed/qualification/om2/baseline/mutants/k0.from seed/qualification/om2/baseline/mutants/k0.to
-mut-k0-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+mut-k0-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 subst seed/qualification/om2/baseline/mutants/rot.from seed/qualification/om2/baseline/mutants/rot.to
-mut-rot-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+mut-rot-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 subst seed/qualification/om2/baseline/mutants/order.from seed/qualification/om2/baseline/mutants/order.to
-mut-order-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+mut-order-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 subst seed/qualification/om2/baseline/mutants/iv.from seed/qualification/om2/baseline/mutants/iv.to
-mut-iv-fips-empty kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
+mut-iv-fips-empty kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
 subst seed/qualification/om2/baseline/mutants/nowrite.from seed/qualification/om2/baseline/mutants/nowrite.to
-mut-nowrite-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+mut-nowrite-fips-abc kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 subst seed/qualification/om2/baseline/mutants/split.from seed/qualification/om2/baseline/mutants/split.to
-mut-split-seq-1000-p32 kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 32
+mut-split-seq-1000-p32 kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om seq:1000 line:4e4c294b331f7a2099a379bec34b9f9fc03dc46ab465d998f4d683da53487e6d - 0 32
diff --git a/seed/qualification/om2/baseline/transform.cases b/seed/qualification/om2/baseline/transform.cases
index c33b923be..20881ffda 100644
--- a/seed/qualification/om2/baseline/transform.cases
+++ b/seed/qualification/om2/baseline/transform.cases
@@ -2,12 +2,12 @@
 # number is lowered with immr = s+1 instead of s (UBFM/SBFM, omc.om bo_shr). The pinned compiler's
 # SHA must pass; the mutant compiler's build of the same consumer source must exit 0 and print a
 # wrong digest for each FIPS vector (a clean, specific mismatch, never a crash or a refusal).
-sha-abc-pinned run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+sha-abc-pinned run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 subst seed/qualification/om2/compiler-mutants/shr-imm-plus1.from seed/qualification/om2/compiler-mutants/shr-imm-plus1.to
 cc seed/omc/omc.om
-sha-abc-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
-sha-empty-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
-sha-448-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/m448.bin line:248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 - 0
-sha-million-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om rep:97:1000000 line:cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 - 0
+sha-abc-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+sha-empty-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om - line:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 0
+sha-448-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/m448.bin line:248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 - 0
+sha-million-shr-mutant kill seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om rep:97:1000000 line:cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 - 0
 cc pinned
-sha-abc-pinned-again run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+sha-abc-pinned-again run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
diff --git a/seed/qualification/om2/candidates/s1/s1-lexmutants.cases b/seed/qualification/om2/candidates/s1/s1-lexmutants.cases
index daa245575..ff429dab8 100644
--- a/seed/qualification/om2/candidates/s1/s1-lexmutants.cases
+++ b/seed/qualification/om2/candidates/s1/s1-lexmutants.cases
@@ -5,7 +5,7 @@
 # --- mutant hex-upper
 subst seed/qualification/om2/candidates/s1/mutants/hex-upper.from seed/qualification/om2/candidates/s1/mutants/hex-upper.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-hex-upper-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-hex-upper-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 hex-upper-s1-d-hexupper emit seed/qualification/om2/sec/s0s2/s1/d-hexupper.om - file:seed/qualification/om2/sec/s0s2/exp/d-hexupper.err 6
 hex-upper-s1-d-hexupper-plain emit seed/qualification/om2/sec/s0s2/s1/d-hexupper-plain.om - file:seed/qualification/om2/sec/s0s2/exp/d-hexupper-plain.err 6
 hex-upper-s2-r6-upper emit seed/qualification/om2/sec/s0s2/s2hex/r6-upper.om - err:5:6 6
@@ -15,7 +15,7 @@ cc pinned
 # --- mutant hex-17
 subst seed/qualification/om2/candidates/s1/mutants/hex-17.from seed/qualification/om2/candidates/s1/mutants/hex-17.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-hex-17-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-hex-17-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 hex-17-s1-d-longtok emit seed/qualification/om2/sec/s0s2/s1/d-longtok.om - file:seed/qualification/om2/sec/s0s2/exp/d-longtok.err 6
 hex-17-s2-r6-17small emit seed/qualification/om2/sec/s0s2/s2hex/r6-17small.om - err:5:6 6
 hex-17-s2-r6-17big emit seed/qualification/om2/sec/s0s2/s2hex/r6-17big.om - err:5:6 6
@@ -23,7 +23,7 @@ cc pinned
 # --- mutant diag-col0
 subst seed/qualification/om2/candidates/s1/mutants/diag-col0.from seed/qualification/om2/candidates/s1/mutants/diag-col0.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-diag-col0-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-diag-col0-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 diag-col0-s1-d-left emit seed/qualification/om2/sec/s0s2/s1/d-left.om - file:seed/qualification/om2/sec/s0s2/exp/d-left.err 5
 diag-col0-s1-d-eof-left emit seed/qualification/om2/sec/s0s2/s1/d-eof-left.om - file:seed/qualification/om2/sec/s0s2/exp/d-eof-left.err 5
 diag-col0-s1-d-hexrange emit seed/qualification/om2/sec/s0s2/s1/d-hexrange.om - file:seed/qualification/om2/sec/s0s2/exp/d-hexrange.err 8
@@ -32,14 +32,14 @@ cc pinned
 # --- mutant fmt-note
 subst seed/qualification/om2/candidates/s1/mutants/fmt-note.from seed/qualification/om2/candidates/s1/mutants/fmt-note.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-fmt-note-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-fmt-note-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 fmt-note-s2-fmt-x1 emit seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt+seed/qualification/om2/sec/s0s2/s2fmt/x1.om file:seed/qualification/om2/sec/s0s2/exp/x1.fmt - 0
 fmt-note-s2-fmt-x3 emit seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt+seed/qualification/om2/sec/s0s2/s2fmt/x3.om file:seed/qualification/om2/sec/s0s2/exp/x3.fmt - 0
 cc pinned
 # --- mutant fmt-text
 subst seed/qualification/om2/candidates/s1/mutants/fmt-text.from seed/qualification/om2/candidates/s1/mutants/fmt-text.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-fmt-text-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-fmt-text-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 fmt-text-s2-fmt-x1 emit seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt+seed/qualification/om2/sec/s0s2/s2fmt/x1.om file:seed/qualification/om2/sec/s0s2/exp/x1.fmt - 0
 fmt-text-s2-fmt-x5 emit seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt+seed/qualification/om2/sec/s0s2/s2fmt/x5.om file:seed/qualification/om2/sec/s0s2/exp/x5.fmt - 0
 cc pinned
diff --git a/seed/qualification/om2/candidates/s1/s1-mutants.cases b/seed/qualification/om2/candidates/s1/s1-mutants.cases
index 2030d9e9a..25e0bc6e9 100644
--- a/seed/qualification/om2/candidates/s1/s1-mutants.cases
+++ b/seed/qualification/om2/candidates/s1/s1-mutants.cases
@@ -6,38 +6,38 @@
 # pass), the kill rows of sec/s3s4/mutant-kills.cases, cc pinned. The first block rebuilds the
 # unmutated source: its printed sha256 must equal 3134244727189883d317e6813b93d2f55b24f2ca5e236daf6d39ef48412f049f.
 cc build/om2-qual/cand-s1/omc.om
-ctl-s1-rebuilt-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-s1-rebuilt-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 correct-rot-values run seed/qualification/om2/sec/s3s4/rot-values.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/rot-values.out - 0
 cc pinned
 # --- mutant rot-imm-plus1
 # --- mutant rot-imm-plus1
 subst seed/qualification/om2/candidates/s1/mutants/rot-imm-plus1.from seed/qualification/om2/candidates/s1/mutants/rot-imm-plus1.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-rot-imm-plus1-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-rot-imm-plus1-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 rot-imm-plus1-kill-rot-values kill seed/qualification/om2/sec/s3s4/rot-values.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/rot-values.out - 0
 cc pinned
 # --- mutant rot-imm-wminusn
 subst seed/qualification/om2/candidates/s1/mutants/rot-imm-wminusn.from seed/qualification/om2/candidates/s1/mutants/rot-imm-wminusn.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-rot-imm-wminusn-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-rot-imm-wminusn-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 rot-imm-wminusn-kill-rot-values kill seed/qualification/om2/sec/s3s4/rot-values.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/rot-values.out - 0
 cc pinned
 # --- mutant rol-imm-as-ror
 subst seed/qualification/om2/candidates/s1/mutants/rol-imm-as-ror.from seed/qualification/om2/candidates/s1/mutants/rol-imm-as-ror.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-rol-imm-as-ror-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-rol-imm-as-ror-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 rol-imm-as-ror-kill-rot-values kill seed/qualification/om2/sec/s3s4/rot-values.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/rot-values.out - 0
 cc pinned
 # --- mutant rol-reg-as-ror
 subst seed/qualification/om2/candidates/s1/mutants/rol-reg-as-ror.from seed/qualification/om2/candidates/s1/mutants/rol-reg-as-ror.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-rol-reg-as-ror-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-rol-reg-as-ror-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 rol-reg-as-ror-kill-rot-values kill seed/qualification/om2/sec/s3s4/rot-values.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/rot-values.out - 0
 cc pinned
 # --- mutant rot-nocheck
 subst seed/qualification/om2/candidates/s1/mutants/rot-nocheck.from seed/qualification/om2/candidates/s1/mutants/rot-nocheck.to
 cc build/om2-qual/cand-s1/omc.om
-ctl-rot-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-rot-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 rot-nocheck-kill-rot-trap-A kill seed/qualification/om2/sec/s3s4/rot-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:65:1 file:seed/qualification/om2/oracle/s3s4/exp/rot-trap-A.out - 0
 rot-nocheck-kill-rot-trap-B kill seed/qualification/om2/sec/s3s4/rot-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:66:1 file:seed/qualification/om2/oracle/s3s4/exp/rot-trap-B.out - 0
 rot-nocheck-kill-rot-trap-C kill seed/qualification/om2/sec/s3s4/rot-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:67:1 file:seed/qualification/om2/oracle/s3s4/exp/rot-trap-C.out - 0
diff --git a/seed/qualification/om2/candidates/s2/s2-mutants.cases b/seed/qualification/om2/candidates/s2/s2-mutants.cases
index 76a2633ff..3d4d12710 100644
--- a/seed/qualification/om2/candidates/s2/s2-mutants.cases
+++ b/seed/qualification/om2/candidates/s2/s2-mutants.cases
@@ -3,26 +3,26 @@
 # from that commit; copy its seed/omc/omc.om to build/om2-qual/cand-s2/omc.om first. Kill rows are the
 # predictions of sec/s3s4/mutant-kills.cases (written before S2 was read).
 cc build/om2-qual/cand-s2/omc.om
-ctl-s2-rebuilt run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-s2-rebuilt run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 cc pinned
 # --- mutant unroll-kminus1
 subst seed/qualification/om2/candidates/s2/mutants/unroll-kminus1.from seed/qualification/om2/candidates/s2/mutants/unroll-kminus1.to
 cc build/om2-qual/cand-s2/omc.om
-ctl-unroll-kminus1-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-unroll-kminus1-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 unroll-kminus1-kill-unroll-sum kill seed/qualification/om2/sec/s3s4/unroll-sum.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/unroll-sum.out - 0
 unroll-kminus1-kill-unroll-nest kill seed/qualification/om2/sec/s3s4/unroll-nest.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/unroll-nest.out - 0
 cc pinned
 # --- mutant unroll-kplus1
 subst seed/qualification/om2/candidates/s2/mutants/unroll-kplus1.from seed/qualification/om2/candidates/s2/mutants/unroll-kplus1.to
 cc build/om2-qual/cand-s2/omc.om
-ctl-unroll-kplus1-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-unroll-kplus1-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 unroll-kplus1-kill-unroll-sum kill seed/qualification/om2/sec/s3s4/unroll-sum.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/unroll-sum.out - 0
 unroll-kplus1-kill-unroll-nest kill seed/qualification/om2/sec/s3s4/unroll-nest.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/unroll-nest.out - 0
 cc pinned
 # --- mutant fold-div0
 subst seed/qualification/om2/candidates/s2/mutants/fold-div0.from seed/qualification/om2/candidates/s2/mutants/fold-div0.to
 cc build/om2-qual/cand-s2/omc.om
-ctl-fold-div0-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-fold-div0-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 fold-div0-kill-fold-trap-A kill seed/qualification/om2/sec/s3s4/fold-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:65:1 file:seed/qualification/om2/oracle/s3s4/exp/fold-trap-A.out - 0
 fold-div0-kill-fold-trap-B kill seed/qualification/om2/sec/s3s4/fold-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:66:1 file:seed/qualification/om2/oracle/s3s4/exp/fold-trap-B.out - 0
 fold-div0-kill-fold-trap-C kill seed/qualification/om2/sec/s3s4/fold-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:67:1 file:seed/qualification/om2/oracle/s3s4/exp/fold-trap-C.out - 0
diff --git a/seed/qualification/om2/candidates/s3/s3-mutants.cases b/seed/qualification/om2/candidates/s3/s3-mutants.cases
index a0e8983a0..8c8b72dcf 100644
--- a/seed/qualification/om2/candidates/s3/s3-mutants.cases
+++ b/seed/qualification/om2/candidates/s3/s3-mutants.cases
@@ -2,12 +2,12 @@
 # §5 mutants of om2/compiler-s3 @ ad220c05 (omc 98cd1621...). Kill rows: sec/s5s7/mutant-side.cases (b-d),
 # written before S3 was read. Copy the head's seed/omc/omc.om to build/om2-qual/cand-s3/omc.om first.
 cc build/om2-qual/cand-s3/omc.om
-ctl-s3-rebuilt run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-s3-rebuilt run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 cc pinned
 # --- mutant fresh-union
 subst seed/qualification/om2/candidates/s3/mutants/fresh-union.from seed/qualification/om2/candidates/s3/mutants/fresh-union.to
 cc build/om2-qual/cand-s3/omc.om
-ctl-fresh-union-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-fresh-union-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 fresh-union-ctl-a5-exact run seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/a5-exact.out - 0
 fresh-union-ctl-f5-ifelse run seed/qualification/om2/sec/s5s7/f5-ifelse.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/f5-ifelse.out - 0
 fresh-union-mut-b-join-diff run seed/qualification/om2/sec/s5s7/f5-join-diff.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/f5-join-diff.mutant - 0
@@ -18,7 +18,7 @@ cc pinned
 # --- mutant ctor-bypass
 subst seed/qualification/om2/candidates/s3/mutants/ctor-bypass.from seed/qualification/om2/candidates/s3/mutants/ctor-bypass.to
 cc build/om2-qual/cand-s3/omc.om
-ctl-ctor-bypass-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-ctor-bypass-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 ctor-bypass-ctl-a5-exact run seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/a5-exact.out - 0
 ctor-bypass-ctl-f5-ifelse run seed/qualification/om2/sec/s5s7/f5-ifelse.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/f5-ifelse.out - 0
 ctor-bypass-mut-c-seal-main emit seed/qualification/om2/sec/s5s7/a5-seal-main.om+seed/qualification/om2/sec/s5s7/pr.om any any 0
@@ -27,7 +27,7 @@ cc pinned
 # --- mutant check-erased
 subst seed/qualification/om2/candidates/s3/mutants/check-erased.from seed/qualification/om2/candidates/s3/mutants/check-erased.to
 cc build/om2-qual/cand-s3/omc.om
-ctl-check-erased-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-check-erased-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 check-erased-ctl-a5-exact run seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/a5-exact.out - 0
 check-erased-ctl-f5-ifelse run seed/qualification/om2/sec/s5s7/f5-ifelse.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/f5-ifelse.out - 0
 check-erased-mut-d-kept run seed/qualification/om2/sec/s5s7/a5-kept.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/a5-kept.mutant - 0
@@ -36,6 +36,6 @@ cc pinned
 # --- mutant fresh-noreset: an if without else (and a rolled loop) keeps the arm's writes at the join
 subst seed/qualification/om2/candidates/s3/mutants/fresh-noreset.from seed/qualification/om2/candidates/s3/mutants/fresh-noreset.to
 cc build/om2-qual/cand-s3/omc.om
-ctl-fresh-noreset-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-fresh-noreset-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 fresh-noreset-mut-b-branch run seed/qualification/om2/sec/s5s7/f5-branch.om+seed/qualification/om2/sec/s5s7/pr.om - line:7 - 0
 cc pinned
diff --git a/seed/qualification/om2/candidates/s4/s4-mutants.cases b/seed/qualification/om2/candidates/s4/s4-mutants.cases
index a2f7a971d..d7d6bdff2 100644
--- a/seed/qualification/om2/candidates/s4/s4-mutants.cases
+++ b/seed/qualification/om2/candidates/s4/s4-mutants.cases
@@ -4,11 +4,11 @@
 # stdout). Mutant: the out-of-range read/write proceeds, the program prints and exits 0 (stdout differs from empty).
 # The part-based witnesses kill-ce-view-* stay NOT_RUN until part lands.
 cc build/om2-qual/cand-s4/omc.om
-ctl-s4-rebuilt run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-s4-rebuilt run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 cc pinned
 subst seed/qualification/om2/candidates/s4/mutants/view-nocheck.from seed/qualification/om2/candidates/s4/mutants/view-nocheck.to
 cc build/om2-qual/cand-s4/omc.om
-ctl-view-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-view-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 ctl-view-nocheck-v6-sum run seed/qualification/om2/sec/s5s7/v6-sum.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-sum.out - 0
 view-nocheck-kill-v6-idx kill seed/qualification/om2/sec/s5s7/v6-idx.om+seed/qualification/om2/sec/s5s7/pr.om - - - 0
 cc pinned
diff --git a/seed/qualification/om2/candidates/s4/s4-part-mutants.cases b/seed/qualification/om2/candidates/s4/s4-part-mutants.cases
index f635ed13b..baa65fd4a 100644
--- a/seed/qualification/om2/candidates/s4/s4-part-mutants.cases
+++ b/seed/qualification/om2/candidates/s4/s4-part-mutants.cases
@@ -3,33 +3,33 @@
 # (mut-a*) and sec/s3s4/mutant-kills.cases (kill-ce-view-*), written before S4 was read. Each mutant must
 # also pass v6-part-empty (o = len, k = 0) and hash abc.
 cc build/om2-qual/cand-s4/omc.om
-ctl-head-rebuilt run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-head-rebuilt run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 cc pinned
 # --- mutant part-wrapped
 subst seed/qualification/om2/candidates/s4/mutants/part-wrapped.from seed/qualification/om2/candidates/s4/mutants/part-wrapped.to
 cc build/om2-qual/cand-s4/omc.om
-ctl-part-wrapped-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-part-wrapped-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 part-wrapped-ctl-v6-part-empty run seed/qualification/om2/sec/s5s7/v6-part-empty.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-empty.out - 0
 part-wrapped-mut-a-part-wrap run seed/qualification/om2/sec/s5s7/v6-part-wrap.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-wrap.mutant - 0
 cc pinned
 # --- mutant part-nosecond
 subst seed/qualification/om2/candidates/s4/mutants/part-nosecond.from seed/qualification/om2/candidates/s4/mutants/part-nosecond.to
 cc build/om2-qual/cand-s4/omc.om
-ctl-part-nosecond-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-part-nosecond-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 part-nosecond-ctl-v6-part-empty run seed/qualification/om2/sec/s5s7/v6-part-empty.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-empty.out - 0
 part-nosecond-mut-a2-part-tail run seed/qualification/om2/sec/s5s7/v6-part-tail.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-tail.mutant - 0
 cc pinned
 # --- mutant part-nofirst
 subst seed/qualification/om2/candidates/s4/mutants/part-nofirst.from seed/qualification/om2/candidates/s4/mutants/part-nofirst.to
 cc build/om2-qual/cand-s4/omc.om
-ctl-part-nofirst-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-part-nofirst-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 part-nofirst-ctl-v6-part-empty run seed/qualification/om2/sec/s5s7/v6-part-empty.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-empty.out - 0
 part-nofirst-mut-a3-part-o run seed/qualification/om2/sec/s5s7/v6-part-o.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-o.mutant - 0
 cc pinned
 # --- mutant view-nocheck
 subst seed/qualification/om2/candidates/s4/mutants/view-nocheck.from seed/qualification/om2/candidates/s4/mutants/view-nocheck.to
 cc build/om2-qual/cand-s4/omc.om
-ctl-view-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
+ctl-view-nocheck-sha run seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om file:seed/qualification/om2/fixtures/msg/abc.bin line:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - 0
 view-nocheck-ctl-v6-part-empty run seed/qualification/om2/sec/s5s7/v6-part-empty.om+seed/qualification/om2/sec/s5s7/pr.om - file:seed/qualification/om2/oracle/s5s7/exp/v6-part-empty.out - 0
 view-nocheck-kill-ce-view-A kill seed/qualification/om2/sec/s3s4/ce-view.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:65:1 file:seed/qualification/om2/oracle/s3s4/exp/ce-view-A.out - 0
 view-nocheck-kill-ce-view-C kill seed/qualification/om2/sec/s3s4/ce-view.om+seed/qualification/om2/sec/s3s4/lib-pu.om rep:67:1 file:seed/qualification/om2/oracle/s3s4/exp/ce-view-C.out - 0
diff --git a/seed/qualification/om2/compiler-mutants/guard-wrapped.from b/seed/qualification/om2/compiler-mutants/guard-wrapped.from
index 905be94a0..b8900c515 100644
--- a/seed/qualification/om2/compiler-mutants/guard-wrapped.from
+++ b/seed/qualification/om2/compiler-mutants/guard-wrapped.from
@@ -1,7 +1,5 @@
-t = alloc
-matconst t get nm_len sub e 1
-emit or or 3942645791 shl rn 5 shl t 16
+emit or or 3942645791 shl rn 5 shl l 16
 trapc 8 3
-e3 3405774848 t t rn
+e3 3405774848 t l rn
 emit or or 3942645791 shl ro 5 shl t 16
 trapc 8 3
diff --git a/seed/qualification/om2/compiler-mutants/guard-wrapped.to b/seed/qualification/om2/compiler-mutants/guard-wrapped.to
index 6e97cc681..8470134e9 100644
--- a/seed/qualification/om2/compiler-mutants/guard-wrapped.to
+++ b/seed/qualification/om2/compiler-mutants/guard-wrapped.to
@@ -1,6 +1,4 @@
-t = alloc
-matconst t get nm_len sub e 1
 wsum = alloc
 e3 2332033024 wsum ro rn
-emit or or 3942645791 shl wsum 5 shl t 16
+emit or or 3942645791 shl wsum 5 shl l 16
 trapc 8 3
diff --git a/seed/qualification/om2/fixtures/PROVENANCE.txt b/seed/qualification/om2/fixtures/PROVENANCE.txt
index 56374b98e..40791a189 100644
--- a/seed/qualification/om2/fixtures/PROVENANCE.txt
+++ b/seed/qualification/om2/fixtures/PROVENANCE.txt
@@ -93,7 +93,7 @@ NIST documents (downloaded 2026-10-25, not committed; sha256 by /usr/bin/sha256s
 
 4. Case lists derived from sha256-vectors.txt (mechanical transforms, run in seed/qualification/om2):
    baseline/sha256.cases (comment lines omitted here; they are in the file):
-     D=seed/qualification/om2/baseline/sha256-main.om+om/sha256/sha256.om
+     D=seed/qualification/om2/baseline/sha256-main.om+seed/qualification/om2/baseline/sha256-om1.om
      M=seed/qualification/om2/baseline/mutants
      awk -v D="$D" '{print $1, "run", D, $2, "line:" $4, "-", 0}' fixtures/sha256-vectors.txt
      for c in 1 32 63 64 65 4095; do awk -v D="$D" -v c=$c '$1 ~ /^(seq-(55|56|63|64|65|119|120|128|129|130|1000|4097|8193|65536)|fips-896|rnd-8-100003)$/ {print $1 "-p" c, "run", D, $2, "line:" $4, "-", 0, c}' fixtures/sha256-vectors.txt; done
@@ -108,6 +108,13 @@ NIST documents (downloaded 2026-10-25, not committed; sha256 by /usr/bin/sha256s
    sed -n 2807,2813p and 2058p of seed/omc/omc.om). Each .to file is its .from with one edit:
    a one-digit change, a swap of two constants, deletion of one line, or the replacement shown in
    MUTANTS.md.
+   Re-pin (2026-10-26): 450bbefd (#747) deleted om/sha256/sha256.om, so every case naming it was
+   INVALID (source unreadable). baseline/sha256-om1.om is `git show acb3f15:om/sha256/sha256.om`,
+   byte-identical (sha256 7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21), and
+   every .cases file now names it; the sed line numbers above refer to that copy. omc.om's vs_chk
+   changed after the guard mutant was cut, so its .from no longer matched (substitution INVALID);
+   guard-wrapped.from is now omc.om lines 4059-4063 at 0b77e6ea and .to is the same wrapped-sum
+   check (one ADD of ro and rn, one CMP against the length register l).
 
 5. Encodings used by compiler-mutants/guard-wrapped.to: 0x8B000000 = 2332033024 (ADD Xd, Xn, Xm);
    0xCB000000 = 3405774848 (SUB, already in omc.om); 0xEB00001F = 3942645791 (CMP, already in omc.om).
diff --git a/seed/qualification/om2/leak/leak.cases b/seed/qualification/om2/leak/leak.cases
index 322582b43..a38c0d2b7 100644
--- a/seed/qualification/om2/leak/leak.cases
+++ b/seed/qualification/om2/leak/leak.cases
@@ -12,7 +12,7 @@ art-flags emit seed/qualification/om2/leak/fixtures/flags.om sha:0e89dcd1284414e
 art-local emit seed/qualification/om2/leak/fixtures/local.om sha:b79fd23b5bf7f6a00fb7f4b6058ec436c4ba7cb81b244159086cb575cfc3ef51 - 0
 art-svc emit seed/qualification/om2/leak/fixtures/svc.om sha:b363a48acf9c0a8c6769cda57251e07200ee18884d3f3f87c154182d5a3f2735 - 0
 art-elf emit seed/qualification/om2/leak/fixtures/elf.om sha:4caebbb143d76413098649f9569eadc495aad8ca744a91ba7b29fe1bad4c7471 - 0
-art-sha256-om1 emit om/sha256/sha256.om sha:3b0ee1ffd7247514b1fd685b5cd48e83ccda4d1ded40e18a4237e81eb44bc97f - 0
+art-sha256-om1 emit seed/qualification/om2/baseline/sha256-om1.om sha:3b0ee1ffd7247514b1fd685b5cd48e83ccda4d1ded40e18a4237e81eb44bc97f - 0
 art-public-in emit seed/qualification/om2/leak/fixtures/public-in.om sha:cbe9a0ca26df3fe76fbc1391916bae2e149142bcb5a3516fda247970886ce09e - 0
 art-public-out emit seed/qualification/om2/leak/fixtures/public-out.om sha:4f2b4c9a3b45fddcab74ae8dfb09311fe95c5ba6104eca05d2864e70897064a2 - 0
 art-reachable emit seed/qualification/om2/leak/fixtures/reachable-trap.om sha:be21c3c9b2edbd4c68bc43a79aea4427eb9d8639d08166381474e39efff74b3b - 0
diff --git a/seed/stablehlo/.crumb b/seed/stablehlo/.crumb
new file mode 100644
index 000000000..bec031155
--- /dev/null
+++ b/seed/stablehlo/.crumb
@@ -0,0 +1,20 @@
+{
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-30T02:52:10Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:88b676b032638280e6192f32eab0600f285b216ceff56e2401c7f64f6f14c044",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 7,
+      "generated_at_commit": "10899d703ab2a0002ccf8e5ed567f24b1d62ebe8",
+      "source_tree": "sha256:2399cb998a18806c290ce0afc4dfed3aec4be91a39fe300a488783832c246394"
+    }
+  },
+  "layer": "seed",
+  "name": "stablehlo",
+  "purpose": "Seeded Omega OSC IR scalar unit to StableHLO MLIR, verified on IREE and XLA CPU PJRT interop oracles (Google TPU path)",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/stablehlo/README.md b/seed/stablehlo/README.md
new file mode 100644
index 000000000..cab7a0605
--- /dev/null
+++ b/seed/stablehlo/README.md
@@ -0,0 +1,103 @@
+# seed/stablehlo: OSC IR scalar unit to StableHLO (Google TPU path, first rung)
+
+`irstablehlo.om` is a handwritten Omega program. It reads one OSC IR unit on stdin and writes a
+StableHLO MLIR module that applies one named scalar function elementwise to `N`-element tensors:
+
+```
+irstablehlo N FUNCTION < unit.ir > module.mlir
+```
+
+For `fn vaddi32 a int b int to int / ret add a b` and `N = 8` it writes:
+
+```
+module {
+  func.func public @main(%p0: tensor<8xi32>, %p1: tensor<8xi32>) -> tensor<8xi32> {
+    %i0 = stablehlo.add %p0, %p1 : tensor<8xi32>
+    func.return %i0 : tensor<8xi32>
+  }
+}
+```
+
+## Run the gate
+
+```
+IREE_COMPILE=... IREE_RUN=... PYTHON=... nice -n 19 sh seed/stablehlo/gate-irstablehlo.sh
+```
+
+Exit 0 PASS, 1 FAIL, 3 NOT_RUN (not AArch64 Linux, or an oracle missing). Artifacts go to
+`build/seed/stablehlo`. The gate pins `seed/out/omc` by sha256, builds the translator, translates every
+row of `cases.tsv` twice (byte-identical), compiles and runs each module on two oracles, and compares
+every element exactly. Integer rows are also run through the same Omega function compiled natively by
+omc. It then requires these to be caught: a wrong op (add to subtract, add to multiply), a wrong
+expected value (including one f32 ulp), three malformed modules both oracles must refuse, and 16
+translator refusals that must leave stdout empty.
+
+## Oracles (interop oracle, not Omega-native)
+
+Neither oracle writes the module; both only read what Omega wrote. jax.jit and JAX tracing are unused.
+
+| Oracle | Version (installed 2026-10-26 in a user venv) | Wheel sha256 | Licence |
+|---|---|---|---|
+| IREE `iree-compile` (llvm-cpu) | iree-base-compiler 3.13.0 (`3.13.0rc20261016 @ 89ece87b`) | `230aec9b5d63c49f3f1ba228c35a7ce950075ce7b7780b786c85fa6fb0be3dbb` | Apache-2.0 |
+| IREE `iree-run-module` (`--equality_mode=exact`) | iree-base-runtime 3.13.0 | `2a46a517c7dbdaa8701f9ee324dd94089af51a8251f36bd689949ee37e30d1d1` | Apache-2.0 |
+| XLA CPU PJRT client, via `pjrt-oracle.py` | jaxlib 0.12.0.1 | `40812201c3bcd4cb104b88f71f58fec4cbd0c32ba90e5c92b3fa8f40819f6774` | Apache-2.0 |
+| (driver dependency) | jax 0.12.0.1 / numpy 2.5.4 | `e9dfd256…` / `fe4d21ab…` | Apache-2.0 / BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 |
+
+`pjrt-oracle.py` is a foreign-language oracle driver: it only compiles and runs an existing module and
+compares numbers. Its Omega replacement is a PJRT C API caller written in `.om`, which needs shared
+object and C ABI support (FR-7 in `docs/one_layer/OM_COMPLETION.md`, absent at this pin).
+
+IREE is called with `--iree-input-demote-f64-to-f32=false --iree-input-demote-i64-to-i32=false`;
+without them IREE 3.13 rewrites f64 functions to f32 by default.
+
+## What is established, and what is not
+
+- IMPLEMENTED: the translator for one-block functions over one element type: BIN add, subtract,
+  multiply (all types), divide (f32/f64 only), and, or, xor (integers), integer CONST, MOV, RET.
+  Types ui8..ui64, i8..i64, f32, f64. Wire v1 (as `omc ir` writes it) and wire v7 for f32/f64.
+- EXERCISED on the oracles: i32, ui32, i64, multiply-add and constant rows, plus f32 and f64 add,
+  all matching exactly on both oracles at N = 8.
+- f32/f64 IR is a hand-written wire v7 fixture in the gate, because `omc ir` refuses float words at
+  this pin. No Omega producer of float IR exists yet, so the float rows have no native cross-check.
+- NOT_RUN: any TPU. No result here is hardware qualification.
+
+Refused (with the class on stderr and nothing on stdout): integer div, rem, shl, shr; UN, CMP, CAST,
+CALL, TRAP, BR, CBR; more than one block; requires/ensures contracts; bool; float constants; mixed
+element types; structs, regions, refs; f32/f64 tags in wire v1.
+
+### Semantics
+
+| Omega rule | StableHLO (spec, read 2026-10-26) | Status |
+|---|---|---|
+| Signed add/sub/mul trap 1 on overflow | Integer overflow is implementation-defined ("Errors") | NOT preserved. The gate shows Omega exiting 101 while both oracles return -2147483648 |
+| Unsigned add/sub/mul wrap | Implementation-defined | Same on both oracles; not a spec guarantee |
+| IEEE-754 float add/sub/mul/div | IEEE-754, exceptions give the default result, no flags | Preserved; NaN payloads are not compared |
+| div/rem trap 2, shift trap 7 | No trap | Refused |
+
+## Openness of the Google TPU stack (read 2026-10-26)
+
+| Layer | Status | Source |
+|---|---|---|
+| StableHLO opset and spec | Open, Apache-2.0 | https://github.com/openxla/stablehlo (`docs/spec.md`, main `44151da3`) |
+| XLA compiler, PJRT C API | Open, Apache-2.0 | https://github.com/openxla/xla |
+| JAX, jaxlib (CPU PJRT client) | Open, Apache-2.0 | https://github.com/jax-ml/jax |
+| Mosaic TPU dialect (Pallas TPU) | Dialect definition public (`jaxlib/mosaic/dialect/tpu/tpu.td`), but it reaches the chip only as a `tpu_custom_call` that libtpu compiles | https://github.com/jax-ml/jax/blob/main/jaxlib/mosaic/dialect/tpu/tpu.td |
+| libtpu (TPU compiler backend and runtime) | Closed binary; PyPI licence field "Google Cloud Platform Terms of Service"; x86_64 wheels only (0.0.51) | https://pypi.org/project/libtpu/ |
+| TPU instruction set | No public ISA document found | — |
+| StableHLO reference interpreter | Open, but prebuilt `stablehlo-translate` wheels are linux x86_64 only | https://github.com/openxla/stablehlo/releases |
+
+So the lowest level Omega can write without closed tools is StableHLO text (or Mosaic TPU-dialect MLIR,
+which only libtpu can lower). Everything below that is inside libtpu.
+
+## Path to a TPU receipt (NOT_RUN)
+
+1. Get a Cloud TPU VM through the TPU Research Cloud (https://sites.research.google/trc/). It needs a
+   Google Cloud account and acceptance of Google's terms; libtpu ships on the VM.
+2. Copy `build/seed/stablehlo/case-*.mlir` (made here, sha256 values from the gate output) to the VM.
+   Do not regenerate them there.
+3. Run `pjrt-oracle.py` unchanged with `PJRT_ORACLE_PLATFORM=tpu`: the same `client.compile_and_load` on the
+   TPU PJRT client, with the `cases.tsv` inputs and expected vectors.
+4. Record the libtpu version, TPU generation, module sha256 values and output. Even then the label is
+   "EXERCISED on TPU via closed libtpu": the kernel code below StableHLO is Google's, not Omega's.
+
+f64 is not native on TPUs; expect f64 rows to be refused or emulated, and record which.
diff --git a/seed/stablehlo/cases.tsv b/seed/stablehlo/cases.tsv
new file mode 100644
index 000000000..7c062f7fa
--- /dev/null
+++ b/seed/stablehlo/cases.tsv
@@ -0,0 +1,10 @@
+# fixture	function	type	expected	inputs (tab separated; commas between the N=8 elements)
+# fixture vecadd = vecadd.unit.om through omc ir; f32/f64 = the wire v7 fixtures built by the gate.
+# Expected vectors computed with Wolfram (WolframLanguageEvaluator, 2026-10-26); see README.md.
+vecadd	vaddi32	i32	0,3,-2,2147483647,-2147483648,777777,0,-3	0,1,-1,2147483646,-2147483647,123456,-98765,7	0,2,-1,1,-1,654321,98765,-10
+vecadd	vaddu32	ui32	0,3,0,4294967294,0,123,65536,4294967295	0,1,4294967295,4294967295,2147483648,100,65535,3000000000	0,2,1,4294967295,2147483648,23,1,1294967295
+vecadd	vaddi64	i64	0,0,9223372036854775807,-9223372036854775808,-1,30,-30,3	0,-1,9223372036854775806,-9223372036854775807,5,10,-10,1	0,1,1,-1,-6,20,-20,2
+vecadd	madi32	i32	6,13,22,-31,1,10001,50,2147395601	1,2,3,-4,0,100,-7,46340	5,6,7,8,9,100,-7,46340	1,1,1,1,1,1,1,1
+vecadd	biasi32	i32	-3,0,-6,7,2147483644,-2147483648,997,-4	0,3,-3,10,2147483647,-2147483645,1000,-1
+f32	vaddf32	f32	3.75,0.75,0,1048576.5,0.300000012,16777216,1.99999994e38,-7.625	1.5,0.25,-2,1048576,0.1,16777216,1e38,-7.75	2.25,0.5,2,0.5,0.2,1,1e38,0.125
+f64	vaddf64	f64	0.30000000000000004,9007199254740992,3.75,0,2.0000000000000001e300,0.66666666666666663,0,0	0.1,9007199254740992,1.5,-2,1e300,0.3333333333333333,5,-0.0009765625	0.2,1,2.25,2,1e300,0.3333333333333333,-5,0.0009765625
diff --git a/seed/stablehlo/gate-irstablehlo.sh b/seed/stablehlo/gate-irstablehlo.sh
new file mode 100755
index 000000000..5e6f71ef3
--- /dev/null
+++ b/seed/stablehlo/gate-irstablehlo.sh
@@ -0,0 +1,202 @@
+#!/bin/sh
+# Host-only verification of seed/stablehlo/irstablehlo.om on AArch64 Linux.
+# IREE (iree-compile, iree-run-module) and the XLA CPU PJRT client in jaxlib are
+# interop oracles, not Omega-native: they only read the module Omega wrote and
+# never generate kernels. No result here is hardware qualification.
+# Exit 0 PASS, 1 FAIL, 3 NOT_RUN (an oracle or the host is absent).
+# Oracle locations: IREE_COMPILE, IREE_RUN, PYTHON (defaults from PATH).
+set -eu
+cd "$(dirname "$0")/../.."
+B=build/seed/stablehlo
+D=seed/stablehlo
+fail() { printf 'FAIL %s\n' "$*"; exit 1; }
+notrun() { printf 'NOT_RUN %s\n' "$*"; exit 3; }
+[ "$(uname -sm)" = 'Linux aarch64' ] || notrun 'requires AArch64 Linux'
+IREE_COMPILE=${IREE_COMPILE:-$(command -v iree-compile || true)}
+IREE_RUN=${IREE_RUN:-$(command -v iree-run-module || true)}
+PYTHON=${PYTHON:-$(command -v python3 || true)}
+[ -n "$IREE_COMPILE" ] && [ -x "$IREE_COMPILE" ] || notrun 'requires iree-compile oracle'
+[ -n "$IREE_RUN" ] && [ -x "$IREE_RUN" ] || notrun 'requires iree-run-module oracle'
+[ -n "$PYTHON" ] && "$PYTHON" -c 'import jax, jaxlib, numpy' 2>/dev/null || notrun 'requires jaxlib PJRT CPU oracle'
+OMC=seed/out/omc
+pin=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+[ "$(sha256sum "$OMC" | cut -d ' ' -f 1)" = "$pin" ] || fail 'compiler pin differs'
+rm -rf "$B"
+mkdir -p "$B"
+printf 'SOURCE %s\n' "$(git rev-parse HEAD)"
+printf 'COMPILER %s\n' "$pin"
+printf 'ORACLE iree-compile %s\n' "$("$IREE_COMPILE" --version 2>&1 | sed -n 's/^ *IREE compiler version //p' | head -n 1)"
+printf 'ORACLE iree-run-module %s\n' "$(sha256sum "$IREE_RUN" | cut -d ' ' -f 1)"
+printf 'ORACLE pjrt %s\n' "$(JAX_PLATFORMS=cpu "$PYTHON" -c 'import jax, jaxlib; print("jax", jax.__version__, "jaxlib", jaxlib.__version__)')"
+uname -sm
+
+nice -n 19 "$OMC" < "$D/irstablehlo.om" > "$B/irstablehlo" 2> "$B/compile.err" || fail 'translator compile'
+[ ! -s "$B/compile.err" ] || fail 'translator compiler stderr'
+chmod +x "$B/irstablehlo"
+T="$B/irstablehlo"
+for unit in vecadd refuse; do
+    { printf 'ir\n'; cat "$D/$unit.unit.om"; } | nice -n 19 "$OMC" > "$B/$unit.ir" || fail "$unit ir"
+done
+# Wire v7 fixtures (spec/one-layer-format.md section 10): omc ir refuses float
+# words at this pin, so the f32/f64 scalar IR is written byte by byte here.
+# Header: magic OSC1IR\0, version, nstructs 0, nregions 0, nfuncs 1. Function:
+# name, nparams 2, return tag, nvregs 3 with tags, one block (first 0, count 2),
+# BIN add r2 = r0 + r1, RET r2, empty requires and ensures.
+bytes() { for b in "$@"; do printf "\\$(printf %03o "$b")"; done; }
+fixture() {
+    ver=$1 tag=$2; shift 2
+    bytes 79 83 67 49 73 82 0 "$ver"
+    [ "$ver" = 7 ] && bytes 0 0 0
+    bytes 1 0 "$#"; bytes "$@"
+    bytes 2 "$tag" 3 0 "$tag" "$tag" "$tag" 1 0 0 0 0 0 2 0 0 0 2 0 0 0
+    bytes 3 1 2 0 0 0 1 0 15 2 0 0 0 0 0
+}
+fixture 7 13 118 97 100 100 102 51 50 > "$B/f32.ir"
+fixture 7 14 118 97 100 100 102 54 52 > "$B/f64.ir"
+fixture 1 13 118 97 100 100 102 51 50 > "$B/v1f32.ir"
+
+iree_compile() { nice -n 19 "$IREE_COMPILE" --iree-hal-target-device=local \
+    --iree-hal-local-target-device-backends=llvm-cpu --iree-input-type=stablehlo --iree-input-demote-f64-to-f32=false \
+    --iree-input-demote-i64-to-i32=false "$1" -o "$2"; }
+# iree_check MODULE.vmfb TYPE EXPECTED INPUT...; byte-equality compare.
+iree_check() {
+    vm=$1 ty=$2 ex=$3; shift 3
+    set -- "$@"
+    args=
+    for x in "$@"; do args="$args --input=8x$ty=$x"; done
+    # shellcheck disable=SC2086
+    nice -n 19 "$IREE_RUN" --device=local-task --module="$vm" --function=main $args \
+        --expected_output="8x$ty=$ex" --equality_mode=exact
+}
+pjrt() { PJRT_ORACLE_PLATFORM=cpu nice -n 19 "$PYTHON" "$D/pjrt-oracle.py" "$@" 2>> "$B/pjrt.stderr"; }
+otype() { case "$1" in i32) echo int ;; ui32) echo uint ;; i64) echo long ;; *) echo - ;; esac; }
+
+i=0
+tab=$(printf '\t')
+while IFS="$tab" read -r fx fn ty ex in1 in2 in3; do
+    case "$fx" in ''|'#'*) continue ;; esac
+    i=$((i+1))
+    id="case-$i-$fn"
+    nice -n 19 "$T" 8 "$fn" < "$B/$fx.ir" > "$B/$id.mlir" || fail "$id translate"
+    nice -n 19 "$T" 8 "$fn" < "$B/$fx.ir" > "$B/$id.again.mlir" || fail "$id translate again"
+    cmp -s "$B/$id.mlir" "$B/$id.again.mlir" || fail "$id nondeterministic"
+    set -- "$in1"
+    [ -z "$in2" ] || set -- "$@" "$in2"
+    [ -z "$in3" ] || set -- "$@" "$in3"
+    iree_compile "$B/$id.mlir" "$B/$id.vmfb" 2> "$B/$id.iree-compile.err" || fail "$id iree-compile refused Omega module"
+    iree_check "$B/$id.vmfb" "$ty" "$ex" "$@" > "$B/$id.iree.out" 2>&1 || fail "$id IREE mismatch: $(grep -m1 FAILED "$B/$id.iree.out")"
+    grep -q '^\[SUCCESS\]' "$B/$id.iree.out" || fail "$id IREE gave no SUCCESS line"
+    pjrt "$B/$id.mlir" "$ty" 8 "$ex" "$@" > "$B/$id.pjrt.out" || fail "$id PJRT: $(tail -n 1 "$B/$id.pjrt.out")"
+    # Omega-native differential: the same scalar function, compiled natively by
+    # omc, must give the expected value for every element (integer rows).
+    ot=$(otype "$ty")
+    if [ "$ot" != - ]; then
+        { cat "$D/vecadd.unit.om"; printf 'fn main to int\n'
+          for k in 1 2 3 4 5 6 7 8; do
+              call="$fn"
+              for v in "$@"; do call="$call $ot $(printf '%s' "$v" | cut -d , -f "$k")"; done
+              printf 'if ne %s %s %s\nexit 1\nend\n' "$call" "$ot" "$(printf '%s' "$ex" | cut -d , -f "$k")"
+          done
+          printf 'ret 0\nend\n'; } > "$B/$id.native.om"
+        nice -n 19 "$OMC" < "$B/$id.native.om" > "$B/$id.native" 2> "$B/$id.native.err" || fail "$id native compile"
+        chmod +x "$B/$id.native"
+        nice -n 19 "$B/$id.native" || fail "$id Omega-native result differs from table"
+        native=native
+    else
+        native='native NOT_RUN (omc ir has no float words at this pin)'
+    fi
+    printf 'PASS %s %s deterministic, IREE exact match, PJRT bitwise match, %s\n' "$id" "$ty" "$native"
+done < "$D/cases.tsv"
+[ "$i" = 7 ] || fail "expected 7 case rows, ran $i"
+
+# Negative controls: each must be caught.
+neg=0
+expect_mismatch() {
+    label=$1 mod=$2 ty=$3 ex=$4; shift 4
+    iree_compile "$mod" "$mod.vmfb" 2> "$mod.iree-compile.err" || fail "$label: iree-compile refused instead of mismatching"
+    if iree_check "$mod.vmfb" "$ty" "$ex" "$@" > "$mod.iree.out" 2>&1; then fail "$label: IREE accepted"; fi
+    grep -q '^\[FAILED\]' "$mod.iree.out" || fail "$label: IREE failed without a mismatch line"
+    set +e; pjrt "$mod" "$ty" 8 "$ex" "$@" > "$mod.pjrt.out"; rc=$?; set -e
+    [ "$rc" = 1 ] || fail "$label: PJRT rc $rc, expected 1 (mismatch)"
+    neg=$((neg+1))
+    printf 'PASS negative %s: IREE [FAILED], PJRT MISMATCH\n' "$label"
+}
+expect_refused() {
+    label=$1 mod=$2
+    if iree_compile "$mod" "$mod.vmfb" 2> "$mod.iree-compile.err"; then fail "$label: iree-compile accepted"; fi
+    set +e; pjrt "$mod" i32 8 0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0 > "$mod.pjrt.out"; rc=$?; set -e
+    [ "$rc" = 2 ] || fail "$label: PJRT rc $rc, expected 2 (module refused)"
+    neg=$((neg+1))
+    printf 'PASS negative %s: iree-compile and PJRT refused\n' "$label"
+}
+I32A=0,1,-1,2147483646,-2147483647,123456,-98765,7
+I32B=0,2,-1,1,-1,654321,98765,-10
+I32E=0,3,-2,2147483647,-2147483648,777777,0,-3
+F32A=1.5,0.25,-2,1048576,0.1,16777216,1e38,-7.75
+F32B=2.25,0.5,2,0.5,0.2,1,1e38,0.125
+sed 's/stablehlo\.add/stablehlo.subtract/' "$B/case-1-vaddi32.mlir" > "$B/neg-wrongop.mlir"
+cmp -s "$B/neg-wrongop.mlir" "$B/case-1-vaddi32.mlir" && fail 'mutant identical'
+expect_mismatch 'wrong op (add->subtract) i32' "$B/neg-wrongop.mlir" i32 "$I32E" "$I32A" "$I32B"
+sed 's/stablehlo\.add/stablehlo.multiply/' "$B/case-6-vaddf32.mlir" > "$B/neg-wrongop-f32.mlir"
+expect_mismatch 'wrong op (add->multiply) f32' "$B/neg-wrongop-f32.mlir" f32 \
+    3.75,0.75,0,1048576.5,0.300000012,16777216,1.99999994e38,-7.625 "$F32A" "$F32B"
+cp "$B/case-1-vaddi32.mlir" "$B/neg-wrongexp.mlir"
+expect_mismatch 'wrong expected (element 0 = 1) i32' "$B/neg-wrongexp.mlir" i32 1,3,-2,2147483647,-2147483648,777777,0,-3 "$I32A" "$I32B"
+cp "$B/case-6-vaddf32.mlir" "$B/neg-wrongexp-f32.mlir"
+expect_mismatch 'wrong expected (element 4 one ulp up) f32' "$B/neg-wrongexp-f32.mlir" f32 \
+    3.75,0.75,0,1048576.5,0.300000042,16777216,1.99999994e38,-7.625 "$F32A" "$F32B"
+sed '$d' "$B/case-1-vaddi32.mlir" > "$B/neg-nobrace.mlir"
+expect_refused 'malformed (closing brace dropped)' "$B/neg-nobrace.mlir"
+sed 's/stablehlo\.add/stablehlo.addx/' "$B/case-1-vaddi32.mlir" > "$B/neg-badop.mlir"
+expect_refused 'malformed (unknown op stablehlo.addx)' "$B/neg-badop.mlir"
+sed 's/-> tensor<8xi32>/-> tensor<8xf32>/' "$B/case-1-vaddi32.mlir" > "$B/neg-badtype.mlir"
+expect_refused 'malformed (return type f32 vs i32 value)' "$B/neg-badtype.mlir"
+
+# Documented divergence: Omega signed add traps on overflow; the lifted module does not.
+{ cat "$D/vecadd.unit.om"; printf 'fn main to int\nx = vaddi32 int 2147483647 int 1\nret 0\nend\n'; } > "$B/overflow.native.om"
+nice -n 19 "$OMC" < "$B/overflow.native.om" > "$B/overflow.native" 2> "$B/overflow.native.err" || fail 'overflow native compile'
+chmod +x "$B/overflow.native"
+set +e; nice -n 19 "$B/overflow.native" 2> /dev/null; nrc=$?; set -e
+[ "$nrc" != 0 ] || fail 'Omega native signed overflow did not trap'
+ONES=1,1,1,1,1,1,1,1
+MAXS=2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647
+MINS=-2147483648,-2147483648,-2147483648,-2147483648,-2147483648,-2147483648,-2147483648,-2147483648
+iree_check "$B/case-1-vaddi32.vmfb" i32 "$MINS" "$MAXS" "$ONES" > "$B/overflow.iree.out" 2>&1 || fail 'IREE overflow result was not the wrapped value'
+pjrt "$B/case-1-vaddi32.mlir" i32 8 "$MINS" "$MAXS" "$ONES" > "$B/overflow.pjrt.out" || fail 'PJRT overflow result was not the wrapped value'
+printf 'DIVERGENCE signed overflow: Omega native exit %s (trap); IREE and PJRT return -2147483648 (StableHLO: implementation-defined)\n' "$nrc"
+
+# Translator refusals: exact class on stderr, nonzero status, nothing on stdout.
+refuse() {
+    label=$1 class=$2 input=$3; shift 3
+    set +e; nice -n 19 "$T" "$@" < "$input" > "$B/refuse.out" 2> "$B/refuse.err"; rc=$?; set -e
+    [ "$rc" != 0 ] || fail "refusal $label exited 0"
+    [ ! -s "$B/refuse.out" ] || fail "refusal $label wrote stdout"
+    [ "$(cat "$B/refuse.err")" = "irstablehlo: $class" ] || fail "refusal $label said $(cat "$B/refuse.err")"
+    neg=$((neg+1))
+    printf 'PASS refusal %s -> %s (exit %s)\n' "$label" "$class" "$rc"
+}
+refuse 'integer div' UNSUPPORTED_OP "$B/refuse.ir" 8 divi32
+refuse 'integer shl' UNSUPPORTED_OP "$B/refuse.ir" 8 shlu32
+refuse 'branches' UNSUPPORTED_OP "$B/refuse.ir" 8 maxi32
+refuse 'mixed element types' UNSUPPORTED_TAG "$B/refuse.ir" 8 widen
+refuse 'bool result' UNSUPPORTED_TAG "$B/refuse.ir" 8 isodd
+refuse 'f32 tag in wire v1' UNSUPPORTED_TAG "$B/v1f32.ir" 8 vaddf32
+refuse 'unknown function' NO_FUNCTION "$B/vecadd.ir" 8 nosuch
+refuse 'N zero' USAGE "$B/vecadd.ir" 0 vaddi32
+refuse 'N leading zero' USAGE "$B/vecadd.ir" 08 vaddi32
+refuse 'N above 16777216' USAGE "$B/vecadd.ir" 16777217 vaddi32
+refuse 'N not decimal' USAGE "$B/vecadd.ir" 8x vaddi32
+refuse 'missing function argument' USAGE "$B/vecadd.ir" 8
+{ printf 'X'; tail -c +2 "$B/vecadd.ir"; } > "$B/bad-magic.ir"
+refuse 'bad magic' MAGIC "$B/bad-magic.ir" 8 vaddi32
+{ head -c 7 "$B/vecadd.ir"; bytes 2; tail -c +9 "$B/vecadd.ir"; } > "$B/bad-version.ir"
+refuse 'wire version 2' VERSION "$B/bad-version.ir" 8 vaddi32
+size=$(wc -c < "$B/vecadd.ir")
+head -c $((size-1)) "$B/vecadd.ir" > "$B/truncated.ir"
+refuse 'truncated' TRUNCATED "$B/truncated.ir" 8 vaddi32
+{ cat "$B/vecadd.ir"; bytes 0; } > "$B/trailing.ir"
+refuse 'trailing byte' TRAILING "$B/trailing.ir" 8 vaddi32
+[ "$neg" = 23 ] || fail "expected 23 negative controls and refusals, ran $neg"
+
+sha256sum "$B/irstablehlo" "$B"/case-*.mlir | sed 's/^/SHA256 /'
+printf 'PASS irstablehlo: %s cases on two interop oracles (not Omega-native, not hardware), %s negatives caught\n' "$i" "$neg"
diff --git a/seed/stablehlo/irstablehlo.om b/seed/stablehlo/irstablehlo.om
new file mode 100644
index 000000000..12187931d
--- /dev/null
+++ b/seed/stablehlo/irstablehlo.om
@@ -0,0 +1,729 @@
+note SPDX-License-Identifier: Apache-2.0
+note OSC IR scalar unit to StableHLO MLIR text. One named function is lifted
+note elementwise: every scalar value becomes a tensor of N elements of its type.
+note Usage: irstablehlo N FUNCTION < unit.ir > module.mlir
+note Wire authority spec/one-layer-format.md: version 1 (sections 3-7) as omc ir
+note writes it, and version 7 (section 10) for f32/f64 scalar functions only.
+note StableHLO authority https://github.com/openxla/stablehlo/blob/main/docs/spec.md
+note ops add subtract multiply divide and or xor constant (read 2026-10-26).
+note Handwritten Omega; no host or foreign generator dependency.
+note NOT preserved: Omega signed add/sub/mul trap 1 on overflow. The StableHLO
+note spec section Errors leaves integer overflow implementation-defined, so a
+note lifted signed op neither traps nor has a specified result on overflow.
+note Unsigned wrap is Omega's rule and the tested oracles' behaviour, not a
+note StableHLO spec guarantee. Float ops are IEEE-754 in both.
+note Refused: div rem shl shr on integers (trap 2 and trap 7 have no StableHLO
+note form), UN CMP CAST CALL TRAP BR CBR, more than one block, contracts, bool,
+note float constants, mixed element types, structs, regions, refs.
+note Buffered output: every refusal happens before any stdout write.
+global input uchar 2620252
+global output uchar 4194304
+note state slots: 0 input cursor, 1 input size, 2 output size, 3 nparams,
+note 4 nvregs, 5 wire version, 6 N, 7 element tag, 8 name matches,
+note 9 wanted name length, 10 ninsns, 11 nblocks, 12 block 0 first,
+note 13 block 0 count, 14 return tag, 15 contract bytes
+global state ulong 16
+global types ulong 480
+note cur: SSA value of each vreg; 0 undefined, 1+p parameter p, 100000+k insn k.
+global cur ulong 480
+global ops ulong 4096
+global subs ulong 4096
+global dest ulong 4096
+global arg0 ulong 4096
+global arg1 ulong 4096
+global immed ulong 4096
+global want uchar 64
+global abuf uchar 16
+global digits uchar 24
+text emagic "irstablehlo: MAGIC\n"
+text ever "irstablehlo: VERSION\n"
+text etrunc "irstablehlo: TRUNCATED\n"
+text ecap "irstablehlo: CAPACITY\n"
+text eop "irstablehlo: UNSUPPORTED_OP\n"
+text etype "irstablehlo: UNSUPPORTED_TAG\n"
+text einval "irstablehlo: INVALID\n"
+text etrail "irstablehlo: TRAILING\n"
+text eio "irstablehlo: IO\n"
+text eusage "irstablehlo: USAGE\n"
+text enofn "irstablehlo: NO_FUNCTION\n"
+text thead "module {\n  func.func public @main("
+text tparam ": tensor<"
+text tcomma ", "
+text tarrow ") -> tensor<"
+text tbody "> {\n"
+text tinsn "    %i"
+text tassign " = stablehlo."
+text tof " : tensor<"
+text teol ">\n"
+text tret "    func.return "
+text tclose "  }\n}\n"
+text tconst "constant dense<"
+text tdense "> : tensor<"
+text tadd "add"
+text tsub "subtract"
+text tmul "multiply"
+text tdiv "divide"
+text tand "and"
+text tor "or"
+text txor "xor"
+fn refuse code int to void
+k = long 0
+if eq code 20
+k = write 2 emagic 0 len emagic
+end
+if eq code 21
+k = write 2 ever 0 len ever
+end
+if eq code 22
+k = write 2 etrunc 0 len etrunc
+end
+if eq code 23
+k = write 2 ecap 0 len ecap
+end
+if eq code 24
+k = write 2 eop 0 len eop
+end
+if eq code 25
+k = write 2 etype 0 len etype
+end
+if eq code 26
+k = write 2 einval 0 len einval
+end
+if eq code 27
+k = write 2 etrail 0 len etrail
+end
+if eq code 28
+k = write 2 eio 0 len eio
+end
+if eq code 29
+k = write 2 eusage 0 len eusage
+end
+if eq code 30
+k = write 2 enofn 0 len enofn
+end
+exit code
+end
+fn need ok bool to void
+if not ok
+refuse 26
+end
+end
+fn rd n ulong to ulong
+p = get state 0
+if gt n sub get state 1 p
+refuse 22
+end
+v = ulong 0
+for j ulong n
+v = or v shl ulong get input add p j mul j 8
+end
+put state 0 add p n
+ret v
+end
+fn cap n ulong maxv ulong to ulong
+if gt n maxv
+refuse 23
+end
+ret n
+end
+note Tags 2..9 integers, 13 f32 and 14 f64 (version 7 only); 0 void, 1 bool.
+note Refs, bytes and cells (10..12) need more bytes and are refused here.
+fn typ to ulong
+t = rd 1
+if eq get state 5 7
+if or ge t 15 and ge t 10 le t 12
+refuse 25
+end
+ret t
+end
+if gt t 9
+refuse 25
+end
+ret t
+end
+fn vr to ulong
+v = rd 2
+need lt v get state 4
+ret v
+end
+fn width t ulong to ulong
+if eq t 1
+ret 1
+end
+if or eq t 2 eq t 6
+ret 8
+end
+if or eq t 3 eq t 7
+ret 16
+end
+if or or eq t 4 eq t 8 eq t 13
+ret 32
+end
+ret 64
+end
+fn mask t ulong to ulong
+w = width t
+if eq w 64
+ret 18446744073709551615
+end
+ret sub shl ulong 1 w 1
+end
+note Canonical CONST: unsigned zero-extended, signed sign-extended to 64 bits.
+fn canon v ulong t ulong to ulong
+w = width t
+if eq w 64
+ret v
+end
+v = and v mask t
+if ge t 6
+m = shl ulong 1 sub w 1
+v = sub xor v m m
+end
+ret v
+end
+fn txt n ulong to void
+for j ulong n
+v = rd 1
+need ne v 0
+end
+end
+fn nametxt n ulong to void
+for j ulong n
+v = rd 1
+need and ne v 0 lt v 128
+end
+end
+fn insn i ulong to void
+o = rd 1
+put ops i o
+put subs i 0
+put dest i 65535
+put arg0 i 65535
+put arg1 i 65535
+put immed i 0
+if eq o 1
+put dest i vr
+put immed i rd 8
+ret
+end
+if or eq o 2 eq o 6
+put dest i vr
+put arg0 i vr
+ret
+end
+if or or eq o 3 eq o 4 eq o 5
+put subs i rd 1
+put dest i vr
+put arg0 i vr
+if ne o 4
+put arg1 i vr
+end
+ret
+end
+if eq o 11
+d = rd 2
+if ne d 65535
+need lt d get state 4
+end
+put dest i d
+put immed i rd 2
+n = cap rd 1 6
+for j ulong n
+a = vr
+end
+ret
+end
+if eq o 12
+put immed i rd 1
+ret
+end
+if eq o 13
+put immed i rd 2
+ret
+end
+if eq o 14
+put arg0 i vr
+put immed i rd 2
+put arg1 i rd 2
+ret
+end
+if eq o 15
+v = rd 2
+if ne v 65535
+need lt v get state 4
+end
+put arg0 i v
+ret
+end
+refuse 24
+end
+fn emit v ulong to void
+p = get state 2
+if ge p len output
+refuse 23
+end
+put output p uchar v
+put state 2 add p 1
+end
+fn dec v ulong to void
+n = ulong 0
+x = v
+for j ulong 20
+put digits n uchar add rem x 10 48
+n = add n 1
+x = div x 10
+if eq x 0
+break
+end
+end
+for j ulong n
+emit ulong get digits sub sub n j 1
+end
+end
+fn sdec v ulong to void
+t = get state 7
+if and ge t 6 ge v 9223372036854775808
+emit 45
+dec sub 0 v
+ret
+end
+dec v
+end
+fn emtxt id ulong to void
+if eq id 1
+for j ulong len thead
+emit ulong get thead j
+end
+ret
+end
+if eq id 2
+for j ulong len tparam
+emit ulong get tparam j
+end
+ret
+end
+if eq id 4
+for j ulong len tcomma
+emit ulong get tcomma j
+end
+ret
+end
+if eq id 5
+for j ulong len tarrow
+emit ulong get tarrow j
+end
+ret
+end
+if eq id 6
+for j ulong len tbody
+emit ulong get tbody j
+end
+ret
+end
+if eq id 7
+for j ulong len tinsn
+emit ulong get tinsn j
+end
+ret
+end
+if eq id 8
+for j ulong len tassign
+emit ulong get tassign j
+end
+ret
+end
+if eq id 9
+for j ulong len tof
+emit ulong get tof j
+end
+ret
+end
+if eq id 10
+for j ulong len teol
+emit ulong get teol j
+end
+ret
+end
+if eq id 11
+for j ulong len tret
+emit ulong get tret j
+end
+ret
+end
+if eq id 12
+for j ulong len tclose
+emit ulong get tclose j
+end
+ret
+end
+if eq id 13
+for j ulong len tconst
+emit ulong get tconst j
+end
+ret
+end
+if eq id 14
+for j ulong len tdense
+emit ulong get tdense j
+end
+ret
+end
+if eq id 15
+for j ulong len tadd
+emit ulong get tadd j
+end
+ret
+end
+if eq id 16
+for j ulong len tsub
+emit ulong get tsub j
+end
+ret
+end
+if eq id 17
+for j ulong len tmul
+emit ulong get tmul j
+end
+ret
+end
+if eq id 18
+for j ulong len tdiv
+emit ulong get tdiv j
+end
+ret
+end
+if eq id 19
+for j ulong len tand
+emit ulong get tand j
+end
+ret
+end
+if eq id 20
+for j ulong len tor
+emit ulong get tor j
+end
+ret
+end
+if eq id 21
+for j ulong len txor
+emit ulong get txor j
+end
+ret
+end
+refuse 26
+end
+note Element type: ui8..ui64 for tags 2..5, i8..i64 (signed in StableHLO) for
+note 6..9, f32 and f64 for 13 and 14.
+fn elem to void
+t = get state 7
+if ge t 13
+emit 102
+else
+if le t 5
+emit 117
+end
+emit 105
+end
+dec width t
+end
+fn ttype to void
+dec get state 6
+emit 120
+elem
+end
+fn valc c ulong to void
+emit 37
+if lt c 100000
+emit 112
+dec sub c 1
+else
+emit 105
+dec sub c 100000
+end
+end
+fn defd r ulong to ulong
+c = get cur r
+need ne c 0
+ret c
+end
+fn binname s ulong to ulong
+fl = ge get state 7 13
+if eq s 1
+ret 15
+end
+if eq s 2
+ret 16
+end
+if eq s 3
+ret 17
+end
+if eq s 4
+if fl
+ret 18
+end
+refuse 24
+end
+need and not fl and ge s 5 le s 10
+if eq s 6
+ret 19
+end
+if eq s 7
+ret 20
+end
+if eq s 8
+ret 21
+end
+refuse 24
+ret 0
+end
+fn header to void
+emtxt 1
+for j ulong get state 3
+if ne j 0
+emtxt 4
+end
+emit 37
+emit 112
+dec j
+emtxt 2
+ttype
+emit 62
+end
+emtxt 5
+ttype
+emtxt 6
+end
+fn step k ulong to void
+o = get ops k
+last = eq k sub get state 10 1
+if eq o 15
+need last
+a = get arg0 k
+need ne a 65535
+c = defd a
+emtxt 11
+valc c
+emtxt 9
+ttype
+emtxt 10
+ret
+end
+need not last
+d = get dest k
+if eq o 2
+put cur d defd get arg0 k
+ret
+end
+if eq o 1
+if ge get state 7 13
+refuse 24
+end
+v = get immed k
+need eq v canon v get state 7
+emtxt 7
+dec k
+emtxt 8
+emtxt 13
+sdec v
+emtxt 14
+ttype
+emtxt 10
+put cur d add k 100000
+ret
+end
+if eq o 3
+nm = binname get subs k
+x = defd get arg0 k
+y = defd get arg1 k
+emtxt 7
+dec k
+emtxt 8
+emtxt nm
+emit 32
+valc x
+emtxt 4
+valc y
+emtxt 9
+ttype
+emtxt 10
+put cur d add k 100000
+ret
+end
+refuse 24
+end
+fn lift to void
+t = get state 14
+if or le t 1 and ge t 10 le t 12
+refuse 25
+end
+put state 7 t
+if ne get state 15 0
+refuse 24
+end
+if ne get state 11 1
+refuse 24
+end
+for j ulong get state 4
+if ne get types j t
+refuse 25
+end
+put cur j 0
+end
+ni = get state 10
+need eq get state 12 0
+need eq get state 13 ni
+for j ulong get state 3
+put cur j add j 1
+end
+header
+for k ulong ni
+step k
+end
+emtxt 12
+end
+fn loadfn to void
+start = get state 0
+n = cap rd 1 63
+need ne n 0
+nametxt n
+hit = false
+if eq n get state 9
+hit = true
+for j ulong n
+if ne get input add start add j 1 get want j
+hit = false
+end
+end
+end
+np = cap rd 1 6
+put state 14 typ
+nv = cap rd 2 480
+need ge nv np
+put state 3 np
+put state 4 nv
+for j ulong nv
+t = typ
+need ne t 0
+put types j t
+end
+nb = cap rd 2 512
+need ne nb 0
+put state 11 nb
+for j ulong nb
+f = rd 4
+c = rd 4
+if eq j 0
+put state 12 f
+put state 13 c
+end
+end
+ni = cap rd 4 4096
+need ne ni 0
+put state 10 ni
+for j ulong ni
+insn j
+end
+rq = cap rd 2 255
+txt rq
+en = cap rd 2 255
+txt en
+put state 15 add rq en
+if hit
+need eq get state 8 0
+put state 8 1
+lift
+end
+end
+fn main to int
+if ne argcnt 3
+refuse 29
+end
+k = argread 1 abuf 0 len abuf
+if or lt k 1 gt k 8
+refuse 29
+end
+nv = ulong 0
+for j ulong ulong k
+c = get abuf j
+if or lt c 48 gt c 57
+refuse 29
+end
+nv = add mul nv 10 ulong sub c 48
+end
+if or eq get abuf 0 48 gt nv 16777216
+refuse 29
+end
+put state 6 nv
+k = argread 2 want 0 len want
+if or lt k 1 gt k 63
+refuse 29
+end
+put state 9 ulong k
+n = ulong 0
+for attempt ulong 2620252
+if eq n len input
+refuse 23
+end
+k = read 0 input n sub len input n
+if lt k 0
+refuse 28
+end
+if eq k 0
+break
+end
+n = add n ulong k
+end
+if eq n len input
+refuse 23
+end
+put state 1 n
+magic = new uchar 7 0
+put magic 0 79
+put magic 1 83
+put magic 2 67
+put magic 3 49
+put magic 4 73
+put magic 5 82
+for j ulong 7
+v = rd 1
+if ne v ulong get magic j
+refuse 20
+end
+end
+v = rd 1
+if and ne v 1 ne v 7
+refuse 21
+end
+put state 5 v
+if eq v 7
+if ne rd 1 0
+refuse 24
+end
+if ne rd 2 0
+refuse 24
+end
+end
+nf = cap rd 2 32
+need ne nf 0
+for f ulong nf
+loadfn
+end
+if ne get state 0 n
+refuse 27
+end
+if eq get state 8 0
+refuse 30
+end
+p = ulong 0
+for attempt ulong 4194304
+if eq p get state 2
+break
+end
+k = write 1 output p sub get state 2 p
+if le k 0
+refuse 28
+end
+p = add p ulong k
+end
+ret 0
+end
diff --git a/seed/stablehlo/pjrt-oracle.py b/seed/stablehlo/pjrt-oracle.py
new file mode 100644
index 000000000..8fcd8c221
--- /dev/null
+++ b/seed/stablehlo/pjrt-oracle.py
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: Apache-2.0
+# Interop oracle, not Omega-native; never generates kernels.
+# Compiles an existing StableHLO MLIR text file (written by irstablehlo.om) with
+# the XLA CPU PJRT client shipped in jaxlib, executes @main on the host CPU and
+# compares every result element bit-for-bit with an expected vector.
+# jax.jit and every jax tracing API are unused: the module text is the only input.
+# Host dependency: jaxlib (Apache-2.0), version printed on every run. Omega
+# replacement: a PJRT C API caller in .om once Omega can load a C ABI plugin
+# (FR-7 in docs/one_layer/OM_COMPLETION.md).
+# Usage: pjrt-oracle.py MODULE ELEMTYPE N EXPECTED INPUT...
+# Lists are comma-separated decimals. Exit 0 match, 1 mismatch, 2 module refused
+# by the oracle, 3 oracle unavailable, 4 bad arguments, 5 execution error.
+import os
+import sys
+
+# PJRT_ORACLE_PLATFORM selects the PJRT client: cpu (default, this gate) or tpu
+# (a Cloud TPU VM with libtpu; the TPU receipt path, NOT_RUN so far).
+PLATFORM = os.environ.get("PJRT_ORACLE_PLATFORM", "cpu")
+os.environ["JAX_PLATFORMS"] = PLATFORM
+
+TYPES = {
+    "i8": "int8", "i16": "int16", "i32": "int32", "i64": "int64",
+    "ui8": "uint8", "ui16": "uint16", "ui32": "uint32", "ui64": "uint64",
+    "f32": "float32", "f64": "float64",
+}
+
+
+def main(argv):
+    if len(argv) < 5 or argv[2] not in TYPES:
+        print("usage: pjrt-oracle.py MODULE ELEMTYPE N EXPECTED INPUT...", file=sys.stderr)
+        return 4
+    try:
+        import numpy as np
+        import jax
+        import jaxlib
+        from jax._src.lib import xla_client as xc
+    except ImportError as exc:
+        print(f"ORACLE_MISSING {exc}", file=sys.stderr)
+        return 3
+    dtype = np.dtype(TYPES[argv[2]])
+    count = int(argv[3])
+
+    def vector(text):
+        words = text.split(",")
+        if len(words) != count:
+            raise ValueError(f"expected {count} elements, got {len(words)}")
+        if dtype.kind == "f":
+            return np.array([dtype.type(w) for w in words], dtype=dtype)
+        info = np.iinfo(dtype)
+        values = [int(w) for w in words]
+        if any(v < info.min or v > info.max for v in values):
+            raise ValueError(f"value outside {dtype}")
+        return np.array(values, dtype=dtype)
+
+    try:
+        expected = vector(argv[4])
+        inputs = [vector(t) for t in argv[5:]]
+    except ValueError as exc:
+        print(f"BAD_ARGUMENT {exc}", file=sys.stderr)
+        return 4
+    devices = jax.devices(PLATFORM)
+    client = devices[0].client
+    print(f"PJRT jax={jax.__version__} jaxlib={jaxlib.__version__} "
+          f"platform={client.platform} platform_version={client.platform_version}")
+    with open(argv[1], encoding="utf-8") as handle:
+        module = handle.read()
+    try:
+        executable = client.compile_and_load(
+            module, xc.DeviceList(tuple(devices[:1])), xc.CompileOptions())
+    except Exception as exc:  # the oracle's own refusal is the evidence here
+        print(f"MODULE_REFUSED {type(exc).__name__}: {str(exc).splitlines()[0]}")
+        return 2
+    # jax_enable_x64 keeps 64-bit element types; device_put would otherwise
+    # narrow them to 32 bits. It changes buffer transfer only, not the module.
+    jax.config.update("jax_enable_x64", True)
+    try:
+        buffers = [jax.device_put(x, devices[0]) for x in inputs]
+        results = executable.execute_sharded(buffers).disassemble_into_single_device_arrays()
+    except Exception as exc:
+        print(f"EXECUTE_ERROR {type(exc).__name__}: {str(exc).splitlines()[0]}")
+        return 5
+    if len(results) != 1:
+        print(f"MISMATCH result count {len(results)}")
+        return 1
+    observed = np.asarray(results[0][0])
+    print("OBSERVED " + ",".join(repr(v.item()) for v in observed))
+    if observed.dtype != dtype or observed.shape != expected.shape:
+        print(f"MISMATCH type {observed.dtype}{observed.shape} expected {dtype}{expected.shape}")
+        return 1
+    bits = np.dtype(f"u{dtype.itemsize}")
+    diff = np.nonzero(observed.view(bits) != expected.view(bits))[0]
+    if diff.size:
+        i = int(diff[0])
+        print(f"MISMATCH index {i} observed {observed[i]!r} expected {expected[i]!r}")
+        return 1
+    print("MATCH bitwise")
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main(sys.argv))
diff --git a/seed/stablehlo/refuse.unit.om b/seed/stablehlo/refuse.unit.om
new file mode 100644
index 000000000..355e56583
--- /dev/null
+++ b/seed/stablehlo/refuse.unit.om
@@ -0,0 +1,19 @@
+note Functions irstablehlo must refuse with an empty stdout.
+fn divi32 a int b int to int
+ret div a b
+end
+fn shlu32 a uint b uint to uint
+ret shl a b
+end
+fn maxi32 a int b int to int
+if gt a b
+ret a
+end
+ret b
+end
+fn widen a uint to ulong
+ret ulong a
+end
+fn isodd a int to bool
+ret ne and a 1 0
+end
diff --git a/seed/stablehlo/vecadd.unit.om b/seed/stablehlo/vecadd.unit.om
new file mode 100644
index 000000000..ac12adedc
--- /dev/null
+++ b/seed/stablehlo/vecadd.unit.om
@@ -0,0 +1,16 @@
+note Scalar functions lifted elementwise by irstablehlo: out[i] = f(a[i], b[i]).
+fn vaddi32 a int b int to int
+ret add a b
+end
+fn vaddu32 a uint b uint to uint
+ret add a b
+end
+fn vaddi64 a long b long to long
+ret add a b
+end
+fn madi32 a int b int c int to int
+ret add mul a b c
+end
+fn biasi32 a int to int
+ret add a -3
+end
diff --git a/seed/tensix/.crumb b/seed/tensix/.crumb
new file mode 100644
index 000000000..ce8d649dc
--- /dev/null
+++ b/seed/tensix/.crumb
@@ -0,0 +1,20 @@
+{
+  "extensions": {
+    "generated": {
+      "children": [],
+      "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "compiled_at": "2026-10-30T02:52:07Z",
+      "compiler": "crumb-compile/1",
+      "digest": "sha256:470bfa499639f9ec5724dc0a9f23b0e5dcc00c2bb4572ba2586d522dfecf58d5",
+      "evidence_files": 0,
+      "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+      "files": 19,
+      "generated_at_commit": "d3a08b533f1057b26a7dc32aee5594c5b6fca40f",
+      "source_tree": "sha256:e75194da94e193067a2f00aad9e47ce19af72a88e487a36eae040c2dda64dfda"
+    }
+  },
+  "layer": "seed",
+  "name": "tensix",
+  "purpose": "Tenstorrent Tensix RV32IM vecadd: seeded Omega emitter irrv32.om (OSC IR v1 -> RV32) and asm2 table, interop-oracle gate (ttsim WH/BH, qemu, two disassemblers)",
+  "schema_version": "1.0.0"
+}
diff --git a/seed/tensix/README.md b/seed/tensix/README.md
new file mode 100644
index 000000000..45092b270
--- /dev/null
+++ b/seed/tensix/README.md
@@ -0,0 +1,138 @@
+# seed/tensix: vecadd for the Tenstorrent Tensix RISC-V cores
+
+Each Tensix tile on Tenstorrent Wormhole (n150, n300) and Blackhole (p100, p150) cards contains five
+small RISC-V cores: RISCV B, NC, T0, T1 and T2. This directory writes a 32-bit integer vector add for
+these cores, `out[i] = a[i] + b[i]` modulo 2^32, and checks the result with outside tools.
+
+There are two producers of the kernel words, and the gate requires them to agree byte for byte.
+
+1. **Seeded Omega (`irrv32.om`).** `seed/out/omc` builds `irrv32.om` into an AArch64 program. That program reads the OSC IR v1 of a scalar unit (`fn addu a uint b uint to uint`, in `vecadd.unit.om`) and lifts it into the elementwise loop `out[i] = f(a[i], b[i])`. The words are built from instruction fields inside Omega.
+2. **Rung 6, as in `seed/sm121`.** The unchanged rung-2 assembler `seed/rung2/asm2.bin` reads a plain-text instruction table, `rv32im.tbl` (all 48 RV32I + M instructions), and hand-written listings.
+
+No C, Rust or Python program produces any instruction word.
+
+```sh
+seed/out/omc < seed/tensix/irrv32.om > irrv32 && chmod +x irrv32
+{ printf 'ir\n'; cat seed/tensix/vecadd.unit.om; } | seed/out/omc | ./irrv32 > vecadd.bin   # 44 bytes
+```
+
+`irrv32` accepts exactly one function that takes two `uint` parameters and returns `uint`. The function must be a single block that uses only CONST (emitted as lui+addi), MOV (addi), BIN add/sub/mul/and/or/xor, and RET. It may use at most 7 vregs, which map to x5-x7 and then x14-x17. `div`, `rem`, `shl` and `shr` are refused, because Omega traps on a zero divisor or an out-of-range shift and this kernel has no trap path. Other types, control flow and calls are also refused. Every refusal sets a nonzero exit code (20-28) and writes no bytes.
+
+| File | What it is |
+|---|---|
+| `rv32im.tbl` | RV32IM encodings as asm2 table lines. Registers are written as numbers 0-31, because asm2's register parser uses ARM names. |
+| `irrv32.om` | Seeded Omega emitter: OSC IR v1 scalar uint unit → RV32IM elementwise kernel. |
+| `vecadd.unit.om` | The scalar unit `ret add a b`. Its emitted kernel must equal `vecadd.bin`. |
+| `mix.unit.om`, `mix.expect`, `mix-expect.hex` | A second unit, `((a+b)*3000000000) xor a`, which exercises CONST, MOV, mul and xor. It comes with its hand-written disassembly and 64 expected words. |
+| `vecadd.s2` | The kernel: 11 instructions, 44 bytes. a0 = a, a1 = b, a2 = out, a3 = n; it returns through ra. |
+| `vecadd.bin` | The committed kernel bytes. The gate rebuilds them twice and requires the same bytes both times. |
+| `boot-tt.s2` | 9 instructions placed at L1 0x0, where RISCV B starts after reset. It loads the arguments from 0x1000, calls vecadd, then writes the done mark 0x0600d000 to 0x1010 and spins. |
+| `boot-qemu.s2` | Linux user-mode start code for qemu. It calls vecadd, then makes the `write(1, out, 4n)` and `exit(0)` system calls. |
+| `edges.s2`, `edges.expect` | Every table entry once, with fields at their edge values. `edges.expect` is the disassembly written by hand before any disassembler was run. |
+| `vecadd.expect` | The expected disassembly of the kernel. |
+| `a.hex`, `b.hex`, `expect.hex` | 64 little-endian words each. The first six are hand-picked edge cases; 61 of the 64 sums wrap. |
+| `oracle.py` | The oracle driver: interop oracle, not Omega-native, and it never generates kernels. It loads ttsim and talks to it over PCIe the way a host driver would, or wraps an image in an ELF file for qemu. |
+| `gate-tensix.sh` | The gate script. |
+
+Expected values were computed in Wolfram with this query:
+`WolframLanguageEvaluator: a=Join[{0,2^32-1,2^31,2^31-1,2^32-1,16^^12345678}, Table[Mod[2654435761(i+1),2^32],{i,6,63}]]; b=Join[{0,1,2^31,1,2^32-1,16^^87654321}, Table[Mod[2^32-1-40503 i^2+977 i,2^32],{i,6,63}]]; Mod[a+b,2^32]`.
+It reported 64 words, of which 61 have a+b ≥ 2^32.
+`mix-expect.hex` uses the same `a` and `b` with `BitXor[Mod[Mod[a+b,2^32]*3000000000,2^32],a]`. The CONST split for 3000000000 is lui 0xb2d06, addi -512, also from Wolfram.
+
+## Run
+
+```sh
+mkdir -p build/oracle/ttsim-v1.15.0 && cd build/oracle/ttsim-v1.15.0
+for a in wh bh; do curl -LO https://github.com/tenstorrent/ttsim/releases/download/v1.15.0/libttsim_${a}_aarch64.so; done
+sha256sum libttsim_*   # the gate refuses anything but the pinned sha256 values below
+cd - && nice -n 19 sh seed/tensix/gate-tensix.sh   # 0 PASS, 1 FAIL, 3 NOT_RUN
+```
+
+The host must be AArch64 Linux, because asm2.bin is an AArch64 program. The gate also needs:
+
+- `riscv64-unknown-elf-objdump` and `riscv64-unknown-elf-objcopy`;
+- `llvm-objdump` (version 18);
+- `qemu-riscv32`;
+- `python3`.
+
+If any of these, or a ttsim library, is missing, the gate prints NOT_RUN and exits with code 3.
+
+## What the gate checks
+
+All of these checks are interop oracles, not Omega-native.
+
+1. **Same bytes every build.** Each image is assembled twice and both builds must match byte for byte. The kernel must also equal the committed `vecadd.bin`, and both start images must end with exactly those bytes. omc (pinned sha256) builds `irrv32.om` twice; both builds must be identical. `irrv32` emits each unit twice. Its vecadd output must be byte-identical to asm2's `vecadd.bin`. GNU objdump must print exactly `mix.expect` for the mix kernel.
+2. **Two independent disassemblers.**
+   - GNU objdump must print exactly `vecadd.expect` and `edges.expect`. These cover all 48 table names: 51 words in total.
+   - LLVM objdump must agree with GNU on every mnemonic and register.
+3. **Three runs that compare results.** The kernel runs on:
+   - ttsim Wormhole (Tensix tile (1,1));
+   - ttsim Blackhole (Tensix tile (1,2));
+   - qemu-riscv32.
+
+   Each run must give all 64 sums equal to `expect.hex`. On ttsim, the output buffer is first filled with 0xee bytes, so a kernel that never ran cannot pass. The Omega-emitted vecadd and mix kernels then run on the same three oracles, behind the same start code, against `expect.hex` and `mix-expect.hex`.
+4. **Negative controls.** Every one of these must be caught:
+   - C1: one bit flipped in the table (add becomes sub). Caught by GNU objdump and by ttsim.
+   - C2: one wrong expected value.
+   - C3: the wrong register in the listing. Caught by qemu.
+   - C4: one wrong branch-offset bit. ttsim stops with "invalid pc".
+   - C5: an out-of-range immediate. asm2 refuses it.
+   - C6: the unit mutated from add to sub. The emitted bytes change, and ttsim's output differs.
+   - C7: the emitter mutated (a0 stride 8). Caught by qemu.
+   - C8: a `div` unit. `irrv32` refuses it with exit 24 and emits 0 bytes.
+
+## What is established, and what is NOT
+
+**Established (EXERCISED on oracles, 2026-10-26):**
+
+- The table encodes RV32IM the way two independent disassemblers read it.
+- The kernel computes the right sums on ttsim's models of Wormhole B0 and Blackhole A0 RISCV B, and on qemu.
+- Seeded Omega (`irrv32.om`) emits the same vecadd bytes from the scalar unit's OSC IR, and a second kernel (mix) that is correct on the same three oracles.
+
+**NOT established:**
+
+- **Nothing has run on a Tenstorrent card** (NOT_RUN on hardware).
+- ttsim is Tenstorrent's software model, not silicon.
+- The fp32 SFPU path and the Tensix coprocessor (matrix unit) are not used.
+- `irrv32.om` covers straight-line u32 scalar bodies only. Signed types, traps, control flow, loops inside the body and Tensix coprocessor instructions are not lowered.
+- Only RISCV B is used, on a single tile.
+- There is no NoC traffic, no DRAM, and no tt-metal runtime.
+
+## What is open (sources read 2026-10-26)
+
+- **[tt-isa-documentation](https://github.com/tenstorrent/tt-isa-documentation)** at be833101 (code Apache-2.0, images CC BY-ND 4.0; `LICENSE_understanding.txt` notes that patent rights may be needed). It documents:
+  - the baby RISC-V cores. Wormhole is RV32IM. Blackhole adds Zicsr, Zaamo, Zba, Zbb, part of F/Zfh, and `.ttinsn`; T2 also has V.
+  - L1, soft reset, the PCIe TLB windows and NoC coordinates;
+  - about 120 Tensix coprocessor instructions, each with a bit-encoding diagram and a functional model (for example `TensixCoprocessor/MVMUL.md`).
+
+  Coprocessor instructions are pushed by RISC-V `sw` (`BabyRISCV/PushTensixInstruction.md`). So the RISC-V level, the coprocessor instruction level, and the host-to-tile path are all documented well enough for Omega to emit code without closed tools.
+- **[ttsim](https://github.com/tenstorrent/ttsim)** (Apache-2.0), source at b3620244. [Release v1.15.0](https://github.com/tenstorrent/ttsim/releases/tag/v1.15.0) was published 2026-10-25. Pinned libraries:
+  - `libttsim_wh_aarch64.so`: `e2a56ffe04072a10d477db1ef85cdbd5d392d9fc52043bb949b90a4c01ff6b4f`;
+  - `libttsim_bh_aarch64.so`: `2367dccc964c0ce4a20b14520e5f7ac6191bb227fb20e87aca1e94bf7432ced2`.
+- **[tt-metal](https://github.com/tenstorrent/tt-metal)**, **[tt-umd](https://github.com/tenstorrent/tt-umd)**, **[sfpi](https://github.com/tenstorrent/sfpi)** (GCC-based SFPU compiler) and **[tt-llk](https://github.com/tenstorrent/tt-llk)** are Apache-2.0. **[tt-kmd](https://github.com/tenstorrent/tt-kmd)** (the kernel driver) is GPL-2.0. Licences were read from the GitHub API on 2026-10-26. None of these is used here.
+- **RISC-V Unprivileged ISA 20191213**, chapters 2, 7 and 24, for the instruction formats.
+
+## Before a hardware receipt
+
+1. **A card.** An n150 or p150 card, or Tenstorrent cloud access. We have neither.
+2. **The kernel driver.** tt-kmd (GPL-2.0) must be loaded to map BAR0. The same TLB and soft-reset sequence that `oracle.py` uses on ttsim then works on the card. tt-umd does this from C++.
+3. **Firmware and tile choice.** On real cards the ARC firmware and the tt-metal firmware own the tiles. A raw run must use a tile that nothing else is using and must restore soft reset afterwards. Harvested rows and columns change which NoC coordinates are Tensix tiles.
+4. **Running beyond one tile.** NoC reads and writes are needed for DRAM inputs and for using many tiles.
+5. **What the receipt must contain.**
+   - the card model and serial;
+   - the firmware version;
+   - the tt-kmd version;
+   - the image sha256;
+   - the tile coordinates;
+   - the output compared with `expect.hex`;
+   - the same negative controls, run on the card.
+
+## Host dependencies (oracles only)
+
+| Dependency | Version | Role | Omega replacement |
+|---|---|---|---|
+| GNU objdump | binutils 2.42 | disassembler | none needed (read-only oracle) |
+| LLVM objdump | 18.1.3 | second disassembler | none needed (read-only oracle) |
+| ttsim | v1.15.0 | Tensix simulator | none needed (vendor oracle) |
+| qemu-riscv32 | 8.2.2 | RV32 executor | none needed (read-only oracle) |
+| Python | 3.12.3 | `oracle.py` byte transport | an `.om` host loader (dlopen/FFI word plus ELF byte writer; proposal) |
diff --git a/seed/tensix/a.hex b/seed/tensix/a.hex
new file mode 100644
index 000000000..8155e3d73
--- /dev/null
+++ b/seed/tensix/a.hex
@@ -0,0 +1,64 @@
+00000000
+ffffffff
+00000080
+ffffff7f
+ffffffff
+78563412
+d7538453
+88cdbbf1
+3947f38f
+eac02a2e
+9b3a62cc
+4cb4996a
+fd2dd108
+aea708a7
+5f214045
+109b77e3
+c114af81
+728ee61f
+23081ebe
+d481555c
+85fb8cfa
+3675c498
+e7eefb36
+986833d5
+49e26a73
+fa5ba211
+abd5d9af
+5c4f114e
+0dc948ec
+be42808a
+6fbcb728
+2036efc6
+d1af2665
+82295e03
+33a395a1
+e41ccd3f
+959604de
+46103c7c
+f789731a
+a803abb8
+597de256
+0af719f5
+bb705193
+6cea8831
+1d64c0cf
+ceddf76d
+7f572f0c
+30d166aa
+e14a9e48
+92c4d5e6
+433e0d85
+f4b74423
+a5317cc1
+56abb35f
+0725ebfd
+b89e229c
+69185a3a
+1a9291d8
+cb0bc976
+7c850015
+2dff37b3
+de786f51
+8ff2a6ef
+406cde8d
diff --git a/seed/tensix/b.hex b/seed/tensix/b.hex
new file mode 100644
index 000000000..735977899
--- /dev/null
+++ b/seed/tensix/b.hex
@@ -0,0 +1,64 @@
+00000000
+01000000
+00000080
+01000000
+ffffffff
+21436587
+29d7e9ff
+2fd2e1ff
+c790d8ff
+f112ceff
+ad58c2ff
+fb61b5ff
+db2ea7ff
+4dbf97ff
+511387ff
+e72a75ff
+0f0662ff
+c9a44dff
+150738ff
+f32c21ff
+631609ff
+65c3effe
+f933d5fe
+1f68b9fe
+d75f9cfe
+211b7efe
+fd995efe
+6bdc3dfe
+6be21bfe
+fdabf8fd
+2139d4fd
+d789aefd
+1f9e87fd
+f9755ffd
+651136fd
+63700bfd
+f392dffc
+1579b2fc
+c92284fc
+0f9054fc
+e7c023fc
+51b5f1fb
+4d6dbefb
+dbe889fb
+fb2754fb
+ad2a1dfb
+f1f0e4fa
+c77aabfa
+2fc870fa
+29d934fa
+b5adf7f9
+d345b9f9
+83a179f9
+c5c038f9
+99a3f6f8
+ff49b3f8
+f7b36ef8
+81e128f8
+9dd2e1f7
+4b8799f7
+8bff4ff7
+5d3b05f7
+c13ab9f6
+b7fd6bf6
diff --git a/seed/tensix/boot-qemu.s2 b/seed/tensix/boot-qemu.s2
new file mode 100644
index 000000000..c80ecfb4f
--- /dev/null
+++ b/seed/tensix/boot-qemu.s2
@@ -0,0 +1,20 @@
+; boot-qemu.s2 -- start-up words for the second oracle, qemu-riscv32 in Linux user mode. Same job as
+; boot-tt.s2, different world: the image is loaded at 0x10000 (code at 0x10100), the argument block is at
+; 0x11000 (+0 a, +4 b, +8 out, +12 n words), and the result leaves through Linux system calls:
+; write(1, out, 4n) (a7 = 64) then exit(0) (a7 = 93), RISC-V Linux syscall numbers.
+; 15 instructions (60 bytes); vecadd follows at byte 60.
+  lui 28 0x11           ; t3 = 0x11000, the argument block
+  lw 10 28 0            ; a0 = a
+  lw 11 28 4            ; a1 = b
+  lw 12 28 8            ; a2 = out
+  lw 13 28 12           ; a3 = n
+  jal 1 0 20 0 0        ; ra = next, call vecadd: +40 bytes (imm[10:1] = 20), 10 instructions ahead
+  addi 10 0 1           ; a0 = 1 (stdout)
+  lw 11 28 8            ; a1 = out
+  lw 12 28 12           ; a2 = n
+  slli 12 12 2          ; a2 = 4n bytes
+  addi 17 0 64          ; a7 = write
+  ecall
+  addi 10 0 0           ; a0 = 0
+  addi 17 0 93          ; a7 = exit
+  ecall
diff --git a/seed/tensix/boot-tt.s2 b/seed/tensix/boot-tt.s2
new file mode 100644
index 000000000..3110e8baf
--- /dev/null
+++ b/seed/tensix/boot-tt.s2
@@ -0,0 +1,16 @@
+; boot-tt.s2 -- start-up words for RISCV B of one Tensix tile (Wormhole B0 / Blackhole A0), placed at L1
+; address 0x0000, the reset pc of RISCV B (tt-isa-documentation */TensixTile/SoftReset.md). The host
+; writes this stub followed by vecadd.s2 to L1, writes the argument block, then releases RISCV B from
+; soft reset. No tt-metal firmware is involved: this is the bare-metal launch the firmware would do.
+; Argument block at L1 0x1000: +0 a, +4 b, +8 out, +12 n words, +16 done word.
+; When vecadd returns, the stub writes 0x0600d000 to the done word and spins on itself.
+; 9 instructions (36 bytes); vecadd follows at byte 36.
+  lui 28 1              ; t3 = 0x1000, the argument block
+  lw 10 28 0            ; a0 = a
+  lw 11 28 4            ; a1 = b
+  lw 12 28 8            ; a2 = out
+  lw 13 28 12           ; a3 = n
+  jal 1 0 8 0 0         ; ra = next, call vecadd: +16 bytes (imm[10:1] = 8), 4 instructions ahead
+  lui 29 0x600d         ; t4 = 0x0600d000, the done mark
+  sw 29 28 0 16         ; done word = t4
+  jal 0 0 0 0 0         ; spin: jump to itself
diff --git a/seed/tensix/edges.expect b/seed/tensix/edges.expect
new file mode 100644
index 000000000..83abb9a7f
--- /dev/null
+++ b/seed/tensix/edges.expect
@@ -0,0 +1,51 @@
+lui	x31,0xfffff
+auipc	x1,0x80000
+jal	x0,0x100006
+jal	x30,0xa
+jalr	x5,-2048(x6)
+jalr	x0,2047(x1)
+beq	x1,x2,0x1016
+bne	x31,x30,0x1a
+blt	x3,x4,0x28
+bge	x5,x6,0x4
+bltu	x7,x8,0x48
+bgeu	x9,x10,0x82c
+lb	x11,-1(x12)
+lh	x13,2047(x14)
+lw	x15,-2048(x16)
+lbu	x17,1(x18)
+lhu	x19,0(x20)
+sb	x21,-2017(x22)
+sh	x23,2047(x24)
+sw	x25,-1(x26)
+addi	x27,x28,-2048
+slti	x29,x30,2047
+sltiu	x31,x0,-1
+xori	x1,x2,-1
+ori	x3,x4,1365
+andi	x5,x6,255
+slli	x7,x8,0x1f
+srli	x9,x10,0x1
+srai	x11,x12,0x1f
+add	x31,x30,x29
+sub	x1,x2,x3
+sll	x4,x5,x6
+slt	x7,x8,x9
+sltu	x10,x11,x12
+xor	x13,x14,x15
+srl	x16,x17,x18
+sra	x19,x20,x21
+or	x22,x23,x24
+and	x25,x26,x27
+fence	iorw,iorw
+fence	r,w
+ecall
+ebreak
+mul	x28,x29,x30
+mulh	x31,x1,x2
+mulhsu	x3,x4,x5
+mulhu	x6,x7,x8
+div	x9,x10,x11
+divu	x12,x13,x14
+rem	x15,x16,x17
+remu	x18,x19,x20
diff --git a/seed/tensix/edges.s2 b/seed/tensix/edges.s2
new file mode 100644
index 000000000..669ee2eb4
--- /dev/null
+++ b/seed/tensix/edges.s2
@@ -0,0 +1,55 @@
+; edges.s2 -- every line of rv32im.tbl once, with registers and numbers at the edges of their fields.
+; edges.expect holds, written by hand before any disassembler was run on it, what GNU objdump
+; (-M no-aliases,numeric) must print for each word. Branch and jump targets are absolute (pc + offset),
+; pc = 4 x line number counting from 0.
+  lui 31 0xfffff
+  auipc 1 0x80000
+  jal 0 0 1023 1 255
+  jal 30 -1 1023 1 255
+  jalr 5 6 -2048
+  jalr 0 1 2047
+  beq 1 2 0 63 15 1
+  bne 31 30 -1 63 15 1
+  blt 3 4 0 0 4 0
+  bge 5 6 -1 63 0 1
+  bltu 7 8 0 1 0 0
+  bgeu 9 10 0 0 0 1
+  lb 11 12 -1
+  lh 13 14 2047
+  lw 15 16 -2048
+  lbu 17 18 1
+  lhu 19 20 0
+  sb 21 22 -64 31
+  sh 23 24 63 31
+  sw 25 26 -1 31
+  addi 27 28 -2048
+  slti 29 30 2047
+  sltiu 31 0 -1
+  xori 1 2 -1
+  ori 3 4 1365
+  andi 5 6 255
+  slli 7 8 31
+  srli 9 10 1
+  srai 11 12 31
+  add 31 30 29
+  sub 1 2 3
+  sll 4 5 6
+  slt 7 8 9
+  sltu 10 11 12
+  xor 13 14 15
+  srl 16 17 18
+  sra 19 20 21
+  or 22 23 24
+  and 25 26 27
+  fence 15 15
+  fence 2 1
+  ecall
+  ebreak
+  mul 28 29 30
+  mulh 31 1 2
+  mulhsu 3 4 5
+  mulhu 6 7 8
+  div 9 10 11
+  divu 12 13 14
+  rem 15 16 17
+  remu 18 19 20
diff --git a/seed/tensix/expect.hex b/seed/tensix/expect.hex
new file mode 100644
index 000000000..e41a18bdc
--- /dev/null
+++ b/seed/tensix/expect.hex
@@ -0,0 +1,64 @@
+00000000
+00000000
+00000000
+00000080
+feffffff
+99999999
+002b6e53
+b79f9df1
+00d8cb8f
+dbd3f82d
+489324cc
+47164f6a
+d85c7808
+fb66a0a6
+b034c744
+f7c5ece2
+d01a1181
+3b33341f
+380f56bd
+c7ae765b
+e81196f9
+9b38b497
+e022d135
+b7d0ecd3
+20420772
+1b772010
+a86f38ae
+c72b4f4c
+78ab64ea
+bbee7888
+90f58b26
+f7bf9dc4
+f04dae62
+7b9fbd00
+98b4cb9e
+478dd83c
+8829e4da
+5b89ee78
+c0acf716
+b793ffb4
+403e0653
+5bac0bf1
+08de0f8f
+47d3122d
+188c14cb
+7b081569
+70481407
+f74b12a5
+10130f43
+bb9d0ae1
+f8eb047f
+c7fdfd1c
+28d3f5ba
+1b6cec58
+a0c8e1f6
+b7e8d594
+60ccc832
+9b73bad0
+68deaa6e
+c70c9a0c
+b8fe87aa
+3bb47448
+502d60e6
+f7694a84
diff --git a/seed/tensix/gate-tensix.sh b/seed/tensix/gate-tensix.sh
new file mode 100755
index 000000000..1db0c764f
--- /dev/null
+++ b/seed/tensix/gate-tensix.sh
@@ -0,0 +1,336 @@
+#!/bin/sh
+# Host-only check of the Tenstorrent Tensix RISC-V vecadd (seed/tensix). Two producers of the
+# same RV32IM kernel: (1) the unchanged rung-2 assembler seed/rung2/asm2.bin with the plain-text
+# table rv32im.tbl and hand-written listings; (2) seeded Omega: seed/out/omc builds irrv32.om,
+# which lifts the OSC IR v1 of a scalar uint unit (vecadd.unit.om, mix.unit.om) into the
+# elementwise loop. Every checker below is an interop oracle, not Omega-native: GNU objdump and
+# LLVM objdump disassemble; ttsim (Tenstorrent's open simulator, Wormhole and Blackhole
+# libraries) and qemu-riscv32 execute; oracle.py only moves bytes in and out. None of them
+# generates or edits an instruction. Nothing here touches a Tenstorrent card.
+# Optional: TTSIM_DIR (holds libttsim_wh_aarch64.so and libttsim_bh_aarch64.so of ttsim v1.15.0),
+# RISCV_OBJDUMP, RISCV_OBJCOPY, LLVM_OBJDUMP, QEMU_RISCV32, PYTHON.
+# Exit 0 PASS, 1 FAIL, 3 NOT_RUN (some oracle absent, nothing failed). Artifacts: build/seed/tensix.
+set -u
+cd "$(dirname "$0")/../.."
+R=seed/tensix
+B=build/seed/tensix
+rm -rf "$B"
+mkdir -p "$B"
+: > "$B/gate.log"
+say() { printf '%s\n' "$*" | tee -a "$B/gate.log"; }
+fails=0
+notrun=0
+ok() { say "PASS $*"; }
+bad() { say "FAIL $*"; fails=$((fails + 1)); }
+nr() { say "NOT_RUN $*"; notrun=$((notrun + 1)); }
+sha() { sha256sum "$1" | cut -d ' ' -f 1; }
+first_diff() { cmp "$1" "$2" 2>&1 | sed -n 1p; }
+
+ASM=seed/rung2/asm2.bin
+TAB=$R/rv32im.tbl
+ASM_PIN=6988abe072fac3cdef2240d5ad13a3ecd8fb576fa09112d344b9e7c2315969c4
+OMC=seed/out/omc
+OMC_PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b
+TTSIM_VERSION=v1.15.0
+TTSIM_WH_PIN=e2a56ffe04072a10d477db1ef85cdbd5d392d9fc52043bb949b90a4c01ff6b4f
+TTSIM_BH_PIN=2367dccc964c0ce4a20b14520e5f7ac6191bb227fb20e87aca1e94bf7432ced2
+TTSIM_DIR=${TTSIM_DIR:-build/oracle/ttsim-$TTSIM_VERSION}
+GNU=${RISCV_OBJDUMP:-riscv64-unknown-elf-objdump}
+OBJCOPY=${RISCV_OBJCOPY:-riscv64-unknown-elf-objcopy}
+LLVM=${LLVM_OBJDUMP:-/usr/lib/llvm-18/bin/llvm-objdump}
+QEMU=${QEMU_RISCV32:-qemu-riscv32}
+PY=${PYTHON:-python3}
+have() { command -v "$1" >/dev/null 2>&1; }
+
+[ "$(uname -m)" = aarch64 ] || { say "NOT_RUN asm2.bin is an AArch64 Linux program"; exit 3; }
+[ -f "$ASM" ] && [ "$(sha "$ASM")" = "$ASM_PIN" ] || { say "FAIL assembler $ASM pin differs"; exit 1; }
+say "SOURCE $(git rev-parse HEAD 2>/dev/null || echo unknown)"
+say "COMPILER $ASM sha256=$ASM_PIN (unchanged rung-2 assembler); $OMC sha256=$(sha "$OMC" 2>/dev/null) (pin $OMC_PIN; builds irrv32.om)"
+say "TABLE $TAB sha256=$(sha "$TAB") entries=$(grep -c '^= ' "$TAB")"
+say "PLATFORM $(uname -srm)"
+
+# ---- 1. assemble twice; both builds must be identical and equal the committed vecadd.bin ----
+asm() { cat "$TAB" "$@" | nice -n 19 "$ASM"; }
+build() { # name listing...
+    n=$1
+    shift
+    asm "$@" > "$B/$n.bin" 2> "$B/$n.err" || { bad "asm2 refused $n: $(cat "$B/$n.err")"; return; }
+    asm "$@" > "$B/$n.again.bin" 2>/dev/null
+    cmp -s "$B/$n.bin" "$B/$n.again.bin" && ok "determinism $n ($(wc -c < "$B/$n.bin") bytes, sha256=$(sha "$B/$n.bin"))" ||
+        bad "determinism $n: two builds differ"
+}
+build vecadd $R/vecadd.s2
+build tt $R/boot-tt.s2 $R/vecadd.s2
+build qemu $R/boot-qemu.s2 $R/vecadd.s2
+build edges $R/edges.s2
+cmp -s "$B/vecadd.bin" $R/vecadd.bin && ok "vecadd.bin equals the committed bytes" || bad "vecadd.bin differs from committed $R/vecadd.bin"
+dd if="$B/tt.bin" bs=4 skip=9 2>/dev/null | cmp -s - "$B/vecadd.bin" && ok "tt image = boot-tt (36 bytes) + vecadd" || bad "tt image tail is not vecadd"
+dd if="$B/qemu.bin" bs=4 skip=15 2>/dev/null | cmp -s - "$B/vecadd.bin" && ok "qemu image = boot-qemu (60 bytes) + vecadd" || bad "qemu image tail is not vecadd"
+
+# Fixtures: little-endian uint32 words; expect = (a + b) mod 2^32, computed with Wolfram (see README).
+for f in a b expect; do xxd -r -p $R/$f.hex > "$B/$f.bin"; done
+N=$(grep -c . $R/a.hex)
+for f in a b expect; do
+    [ "$(wc -c < "$B/$f.bin")" -eq $((4 * N)) ] || bad "$f.hex does not hold $N words"
+done
+say "FIXTURE n=$N a=$(sha "$B/a.bin") b=$(sha "$B/b.bin") expect=$(sha "$B/expect.bin")"
+xxd -r -p $R/mix-expect.hex > "$B/mix-expect.bin"
+[ "$(wc -c < "$B/mix-expect.bin")" -eq $((4 * N)) ] || bad "mix-expect.hex does not hold $N words"
+
+# ---- 1b. seeded Omega path: omc builds irrv32.om; irrv32 lifts a scalar unit's OSC IR v1 ----
+# into the elementwise RV32 loop. The kernel bytes come from Omega; the checkers stay oracles.
+omir() { { printf 'ir\n'; cat "$1"; } | nice -n 19 "$OMC" > "$2" 2> "$2.err"; }
+OM_OK=
+if [ ! -x "$OMC" ]; then
+    nr "seeded Omega path: $OMC absent"
+elif [ "$(sha "$OMC")" != "$OMC_PIN" ]; then
+    bad "compiler $OMC pin differs"
+elif ! nice -n 19 "$OMC" < $R/irrv32.om > "$B/irrv32" 2> "$B/irrv32.err"; then
+    bad "omc refused irrv32.om: $(cat "$B/irrv32.err")"
+else
+    nice -n 19 "$OMC" < $R/irrv32.om > "$B/irrv32.again"
+    cmp -s "$B/irrv32" "$B/irrv32.again" && ok "determinism omc irrv32.om ($(wc -c < "$B/irrv32") bytes, sha256=$(sha "$B/irrv32"))" ||
+        bad "determinism: two omc builds of irrv32.om differ"
+    chmod +x "$B/irrv32"
+    OM_OK=1
+    for u in vecadd mix; do
+        if omir $R/$u.unit.om "$B/$u.ir" && "$B/irrv32" < "$B/$u.ir" > "$B/om-$u.bin" 2> "$B/om-$u.err"; then
+            "$B/irrv32" < "$B/$u.ir" > "$B/om-$u.again.bin"
+            cmp -s "$B/om-$u.bin" "$B/om-$u.again.bin" && ok "determinism irrv32 $u.unit.om ($(wc -c < "$B/om-$u.bin") bytes, sha256=$(sha "$B/om-$u.bin"), IR sha256=$(sha "$B/$u.ir"))" ||
+                bad "determinism irrv32 $u: two emissions differ"
+            dd if="$B/tt.bin" bs=4 count=9 2>/dev/null | cat - "$B/om-$u.bin" > "$B/om-$u-tt.bin"
+            dd if="$B/qemu.bin" bs=4 count=15 2>/dev/null | cat - "$B/om-$u.bin" > "$B/om-$u-qemu.bin"
+        else
+            bad "irrv32 path refused $u.unit.om: $(cat "$B/$u.ir.err" "$B/om-$u.err" 2>/dev/null)"
+            OM_OK=
+        fi
+    done
+    [ -n "$OM_OK" ] && { cmp -s "$B/om-vecadd.bin" $R/vecadd.bin && ok "irrv32 vecadd output is byte-identical to the asm2 vecadd.bin" ||
+        bad "irrv32 vecadd differs from asm2 vecadd.bin: $(first_diff "$B/om-vecadd.bin" $R/vecadd.bin)"; }
+fi
+
+# ---- 2. two independent disassemblers ----
+dis_gnu() { "$GNU" -D -b binary -m riscv:rv32 -M no-aliases,numeric "$1" | grep -E '^ +[0-9a-f]+:' | cut -f3- | sed 's/ *#.*//; s/[[:space:]]*$//'; }
+dis_llvm() {
+    "$OBJCOPY" -I binary -O elf32-littleriscv -B riscv --rename-section .data=.text,code,alloc,load,contents "$1" "$1.o" &&
+        "$LLVM" -d -M no-aliases -M numeric --mattr=+m "$1.o" | grep -E '^ +[0-9a-f]+:' | cut -f2- | sed 's/ <.*//; s/[[:space:]]*$//'
+}
+# mnemonic followed by its register operands, in order (immediates are printed in different bases)
+regs() { tr ',()' '   ' | awk '{ s = $1; for (i = 2; i <= NF; i++) if ($i ~ /^x[0-9]+$/) s = s " " $i; print s }'; }
+if have "$GNU"; then
+    say "ORACLE gnu $("$GNU" --version | sed -n 1p)"
+    for p in vecadd edges; do
+        dis_gnu "$B/$p.bin" > "$B/$p.gnu"
+        diff "$B/$p.gnu" $R/$p.expect > "$B/$p.gnu.diff" && ok "GNU objdump $p: $(wc -l < "$B/$p.gnu") words match $p.expect (written by hand)" ||
+            bad "GNU objdump $p differs from $p.expect: $(sed -n 2,3p "$B/$p.gnu.diff" | tr '\n' ' ')"
+    done
+    grep '^  ' $R/edges.s2 | awk '{ print $1 }' > "$B/edges.names"
+    cut -f1 "$B/edges.gnu" | diff - "$B/edges.names" > /dev/null && ok "edges.s2 covers every table entry: $(sort -u "$B/edges.names" | wc -l) of $(grep -c '^= ' "$TAB") names" ||
+        bad "GNU mnemonics differ from the edges.s2 names"
+    [ "$(sort -u "$B/edges.names" | wc -l)" -eq "$(grep -c '^= ' "$TAB")" ] || bad "edges.s2 misses a table entry"
+else
+    nr "GNU objdump ($GNU) absent"
+fi
+if have "$GNU" && [ -n "$OM_OK" ]; then
+    dis_gnu "$B/om-mix.bin" > "$B/om-mix.gnu"
+    diff "$B/om-mix.gnu" $R/mix.expect > "$B/om-mix.gnu.diff" && ok "GNU objdump om-mix (CONST lui+addi, MOV, mul, xor): $(wc -l < "$B/om-mix.gnu") words match mix.expect (written by hand)" ||
+        bad "GNU objdump om-mix differs from mix.expect: $(sed -n 2,3p "$B/om-mix.gnu.diff" | tr '\n' ' ')"
+fi
+if have "$LLVM" && have "$OBJCOPY" && have "$GNU"; then
+    say "ORACLE llvm $("$LLVM" --version | grep -i 'llvm version' | sed 's/^ *//')"
+    for p in vecadd edges; do
+        dis_llvm "$B/$p.bin" > "$B/$p.llvm" || bad "LLVM objdump failed on $p"
+        regs < "$B/$p.llvm" > "$B/$p.llvm.regs"
+        regs < "$B/$p.gnu" > "$B/$p.gnu.regs"
+        cmp -s "$B/$p.llvm.regs" "$B/$p.gnu.regs" && ok "LLVM objdump $p: mnemonics and registers equal GNU's on all $(wc -l < "$B/$p.llvm") words" ||
+            bad "LLVM and GNU disagree on $p"
+    done
+else
+    nr "LLVM objdump ($LLVM) or objcopy ($OBJCOPY) absent"
+fi
+
+# ---- 3. execution oracles ----
+ttsim_run() { # arch image out
+    timeout 600 nice -n 19 "$PY" $R/oracle.py ttsim "$TTSIM_DIR/libttsim_$1_aarch64.so" "$1" "$2" \
+        "$B/a.bin" "$B/b.bin" "$N" "$3" > "$3.log" 2>&1
+}
+qemu_run() { # image out
+    "$PY" $R/oracle.py elf "$1" "$B/a.bin" "$B/b.bin" "$N" "$1.elf" && chmod +x "$1.elf" &&
+        timeout 60 nice -n 19 "$QEMU" "$1.elf" > "$2" 2> "$2.err"
+}
+ttsim_ok() { # arch: 0 when the pinned library is present
+    lib=$TTSIM_DIR/libttsim_$1_aarch64.so
+    eval "pin=\$TTSIM_$(echo "$1" | tr a-z A-Z)_PIN"
+    [ -f "$lib" ] && [ "$(sha "$lib")" = "$pin" ]
+}
+have "$PY" || nr "Python ($PY) absent; ttsim and qemu oracles skipped"
+TT_DONE=
+for arch in wh bh; do
+    if have "$PY" && ttsim_ok $arch; then
+        say "ORACLE ttsim $TTSIM_VERSION libttsim_${arch}_aarch64.so sha256=$(sha "$TTSIM_DIR/libttsim_${arch}_aarch64.so") driver oracle.py sha256=$(sha $R/oracle.py) $("$PY" --version 2>&1)"
+        if ttsim_run $arch "$B/tt.bin" "$B/out-$arch.bin" && cmp -s "$B/out-$arch.bin" "$B/expect.bin"; then
+            ok "ttsim $arch: $N of $N sums equal expect ($(grep '^ttsim' "$B/out-$arch.bin.log"))"
+            TT_DONE=$arch
+        else
+            bad "ttsim $arch: $(tail -n 1 "$B/out-$arch.bin.log") $(first_diff "$B/out-$arch.bin" "$B/expect.bin")"
+        fi
+    else
+        nr "ttsim $arch: $TTSIM_DIR/libttsim_${arch}_aarch64.so absent or not the pinned $TTSIM_VERSION build"
+    fi
+done
+Q_DONE=
+if have "$PY" && have "$QEMU"; then
+    say "ORACLE qemu $("$QEMU" --version | sed -n 1p)"
+    if qemu_run "$B/qemu.bin" "$B/out-qemu.bin" && cmp -s "$B/out-qemu.bin" "$B/expect.bin"; then
+        ok "qemu-riscv32: $N of $N sums equal expect"
+        Q_DONE=1
+    else
+        bad "qemu-riscv32: $(first_diff "$B/out-qemu.bin" "$B/expect.bin") $(cat "$B/out-qemu.bin.err" 2>/dev/null)"
+    fi
+else
+    nr "qemu-riscv32 ($QEMU) absent"
+fi
+# Seeded Omega kernels: the same boot stubs followed by irrv32's output.
+if [ -n "$OM_OK" ]; then
+    for u in vecadd mix; do
+        want=$B/expect.bin
+        [ $u = mix ] && want=$B/mix-expect.bin
+        for arch in wh bh; do
+            if have "$PY" && ttsim_ok $arch; then
+                if ttsim_run $arch "$B/om-$u-tt.bin" "$B/om-$u-$arch.out" && cmp -s "$B/om-$u-$arch.out" "$want"; then
+                    ok "ttsim $arch on Omega-emitted $u: $N of $N words equal $(basename "$want") ($(grep '^ttsim' "$B/om-$u-$arch.out.log"))"
+                else
+                    bad "ttsim $arch on Omega-emitted $u: $(tail -n 1 "$B/om-$u-$arch.out.log") $(first_diff "$B/om-$u-$arch.out" "$want")"
+                fi
+            else
+                nr "ttsim $arch on Omega-emitted $u (library absent)"
+            fi
+        done
+        if have "$PY" && have "$QEMU"; then
+            if qemu_run "$B/om-$u-qemu.bin" "$B/om-$u-qemu.out" && cmp -s "$B/om-$u-qemu.out" "$want"; then
+                ok "qemu-riscv32 on Omega-emitted $u: $N of $N words equal $(basename "$want")"
+            else
+                bad "qemu-riscv32 on Omega-emitted $u: $(first_diff "$B/om-$u-qemu.out" "$want") $(cat "$B/om-$u-qemu.out.err" 2>/dev/null)"
+            fi
+        else
+            nr "qemu-riscv32 on Omega-emitted $u (absent)"
+        fi
+    done
+fi
+
+# ---- 4. negative controls: each mutation must be caught ----
+mutate() { # sed-expr in out: the edit must change the file
+    sed "$1" "$2" > "$3"
+    ! cmp -s "$2" "$3" || { bad "control edit '$1' did not change $2"; return 1; }
+}
+# C1: one bit flipped in the table (add's funct7 bit 30: add becomes sub).
+if mutate 's/^= add     0x00000033/= add     0x40000033/' "$TAB" "$B/c1.tbl"; then
+    cat "$B/c1.tbl" $R/vecadd.s2 | "$ASM" > "$B/c1.bin"
+    if have "$GNU"; then
+        dis_gnu "$B/c1.bin" | cmp -s - $R/vecadd.expect && bad "C1 table bit flip not seen by GNU objdump" ||
+            ok "C1 table bit flip (add->sub) caught by GNU objdump"
+    fi
+    if [ -n "$TT_DONE" ]; then
+        cat "$B/c1.tbl" $R/boot-tt.s2 $R/vecadd.s2 | "$ASM" > "$B/c1-tt.bin"
+        ttsim_run "$TT_DONE" "$B/c1-tt.bin" "$B/c1-out.bin"
+        cmp -s "$B/c1-out.bin" "$B/expect.bin" && bad "C1 table bit flip not seen by ttsim $TT_DONE" ||
+            ok "C1 table bit flip caught by ttsim $TT_DONE ($(first_diff "$B/c1-out.bin" "$B/expect.bin"))"
+    else
+        nr "C1 on ttsim (no ttsim run)"
+    fi
+fi
+# C2: one wrong expected value (last word) must fail against the real ttsim/qemu output.
+sed '$ s/^../00/' $R/expect.hex | xxd -r -p > "$B/c2-expect.bin"
+GOOD=
+[ -n "$TT_DONE" ] && GOOD=$B/out-$TT_DONE.bin
+[ -z "$GOOD" ] && [ -n "$Q_DONE" ] && GOOD=$B/out-qemu.bin
+if [ -n "$GOOD" ]; then
+    cmp -s "$GOOD" "$B/c2-expect.bin" && bad "C2 wrong expected value accepted" ||
+        ok "C2 wrong expected value caught ($(first_diff "$GOOD" "$B/c2-expect.bin"))"
+else
+    nr "C2 (no executed output)"
+fi
+# C3: wrong register in the listing (add t2,t0,t0) must change qemu's output.
+if mutate 's/^  add 7 5 6 /  add 7 5 5 /' $R/vecadd.s2 "$B/c3.s2"; then
+    if [ -n "$Q_DONE" ]; then
+        asm $R/boot-qemu.s2 "$B/c3.s2" > "$B/c3.bin"
+        qemu_run "$B/c3.bin" "$B/c3-out.bin"
+        cmp -s "$B/c3-out.bin" "$B/expect.bin" && bad "C3 wrong register not seen by qemu" ||
+            ok "C3 wrong register caught by qemu-riscv32 ($(first_diff "$B/c3-out.bin" "$B/expect.bin"))"
+    else
+        nr "C3 (no qemu run)"
+    fi
+fi
+# C4: one branch-offset piece wrong (bne imm[11]) must stop ttsim from finishing correctly.
+if mutate 's/^  bne 13 0 -1 63 0 1 /  bne 13 0 -1 63 0 0 /' $R/vecadd.s2 "$B/c4.s2"; then
+    if [ -n "$TT_DONE" ]; then
+        asm $R/boot-tt.s2 "$B/c4.s2" > "$B/c4.bin"
+        if ttsim_run "$TT_DONE" "$B/c4.bin" "$B/c4-out.bin" && cmp -s "$B/c4-out.bin" "$B/expect.bin"; then
+            bad "C4 wrong branch offset not seen by ttsim $TT_DONE"
+        else
+            ok "C4 wrong branch offset caught by ttsim $TT_DONE ($(tail -n 1 "$B/c4-out.bin.log"))"
+        fi
+    else
+        nr "C4 (no ttsim run)"
+    fi
+fi
+# C5: an immediate outside its 12-bit field must be refused by asm2.
+if mutate 's/^  lw 5 10 0 /  lw 5 10 2048 /' $R/vecadd.s2 "$B/c5.s2"; then
+    asm "$B/c5.s2" > "$B/c5.bin" 2> "$B/c5.err" && bad "C5 out-of-range immediate accepted by asm2" ||
+        ok "C5 out-of-range immediate refused by asm2 ($(sed -n 1p "$B/c5.err"))"
+fi
+# C6: the scalar unit mutated (add -> sub) must change irrv32's bytes and ttsim's output.
+if [ -n "$OM_OK" ] && mutate 's/^ret add a b$/ret sub a b/' $R/vecadd.unit.om "$B/c6.unit.om"; then
+    omir "$B/c6.unit.om" "$B/c6.ir" && "$B/irrv32" < "$B/c6.ir" > "$B/c6.bin"
+    cmp -s "$B/c6.bin" $R/vecadd.bin && bad "C6 mutated unit gave the vecadd bytes" ||
+        ok "C6 mutated unit (add->sub) changes irrv32 output ($(first_diff "$B/c6.bin" $R/vecadd.bin))"
+    if [ -n "$TT_DONE" ]; then
+        dd if="$B/tt.bin" bs=4 count=9 2>/dev/null | cat - "$B/c6.bin" > "$B/c6-tt.bin"
+        ttsim_run "$TT_DONE" "$B/c6-tt.bin" "$B/c6-out.bin"
+        cmp -s "$B/c6-out.bin" "$B/expect.bin" && bad "C6 mutated unit not seen by ttsim $TT_DONE" ||
+            ok "C6 mutated unit caught by ttsim $TT_DONE ($(first_diff "$B/c6-out.bin" "$B/expect.bin"))"
+    else
+        nr "C6 on ttsim (no ttsim run)"
+    fi
+elif [ -z "$OM_OK" ]; then
+    nr "C6 (seeded Omega path did not run)"
+fi
+# C7: the emitter mutated (pointer a0 stride 4 -> 8) must change the kernel that qemu runs.
+if [ -n "$OM_OK" ] && mutate 's/^itype 4 10 0 10 19$/itype 8 10 0 10 19/' $R/irrv32.om "$B/c7.om"; then
+    if "$OMC" < "$B/c7.om" > "$B/c7-irrv32" && chmod +x "$B/c7-irrv32" && "$B/c7-irrv32" < "$B/vecadd.ir" > "$B/c7.bin"; then
+        if [ -n "$Q_DONE" ]; then
+            dd if="$B/qemu.bin" bs=4 count=15 2>/dev/null | cat - "$B/c7.bin" > "$B/c7-qemu.bin"
+            qemu_run "$B/c7-qemu.bin" "$B/c7-out.bin"
+            cmp -s "$B/c7-out.bin" "$B/expect.bin" && bad "C7 mutated emitter not seen by qemu" ||
+                ok "C7 mutated emitter (stride 8) caught by qemu-riscv32 ($(first_diff "$B/c7-out.bin" "$B/expect.bin"))"
+        else
+            nr "C7 (no qemu run)"
+        fi
+    else
+        bad "C7 mutated emitter did not build or run"
+    fi
+elif [ -z "$OM_OK" ]; then
+    nr "C7 (seeded Omega path did not run)"
+fi
+# C8: a unit irrv32 cannot lower faithfully (div traps on zero in Omega) must be refused, no bytes out.
+if [ -n "$OM_OK" ] && mutate 's/^ret add a b$/ret div a b/' $R/vecadd.unit.om "$B/c8.unit.om"; then
+    omir "$B/c8.unit.om" "$B/c8.ir"
+    "$B/irrv32" < "$B/c8.ir" > "$B/c8.bin" 2> "$B/c8.err"
+    rc=$?
+    [ "$rc" -ne 0 ] && [ ! -s "$B/c8.bin" ] && ok "C8 div unit refused by irrv32 (exit $rc, $(cat "$B/c8.err"), 0 bytes)" ||
+        bad "C8 div unit not refused (exit $rc, $(wc -c < "$B/c8.bin") bytes)"
+elif [ -z "$OM_OK" ]; then
+    nr "C8 (seeded Omega path did not run)"
+fi
+
+sha256sum $R/* "$ASM" "$OMC" > "$B/SHA256SUMS" 2>/dev/null
+if [ "$fails" -gt 0 ]; then
+    say "RESULT FAIL ($fails failed, $notrun not run)"
+    exit 1
+fi
+if [ "$notrun" -gt 0 ]; then
+    say "RESULT NOT_RUN ($notrun checks could not run; nothing failed)"
+    exit 3
+fi
+say "RESULT PASS (interop oracles, not Omega-native; no Tenstorrent hardware was used)"
+exit 0
diff --git a/seed/tensix/irrv32.om b/seed/tensix/irrv32.om
new file mode 100644
index 000000000..1491f3c95
--- /dev/null
+++ b/seed/tensix/irrv32.om
@@ -0,0 +1,360 @@
+note SPDX-License-Identifier: Apache-2.0
+note OSC IR v1 scalar uint unit to an RV32IM elementwise kernel for a Tensix baby RISC-V core.
+note Wire authority spec/one-layer-format.md. Encodings: RISC-V unprivileged ISA, RV32I and M.
+note Input: one function of two uint params returning uint, one block, CONST MOV BIN RET only.
+note Output: raw little-endian RV32 words of the loop out[i] = f(a[i], b[i]) for i below n.
+note Kernel ABI: a0 = a, a1 = b, a2 = out, a3 = n (32-bit words), return through ra.
+note Vreg k maps to x5 x6 x7 for k below 3, then x14 x15 x16 x17; at most 7 vregs.
+note Supported BIN: add sub mul and or xor (u32 wraps, as RV32 does). div rem shl shr are
+note refused because Omega traps on zero divisors and shift range and this kernel has no trap path.
+note Buffered output: every refusal happens before any stdout write.
+global input uchar 65536
+global output uchar 4096
+note state slots: 0 input cursor, 1 input size, 2 output size, 3 nvregs, 4 ninsns, 5 defined mask
+global state ulong 8
+global ops ulong 64
+global subs ulong 64
+global dest ulong 64
+global arg0 ulong 64
+global arg1 ulong 64
+global immed ulong 64
+text emagic "irrv32: MAGIC\n"
+text ever "irrv32: VERSION\n"
+text etrunc "irrv32: TRUNCATED\n"
+text ecap "irrv32: CAPACITY\n"
+text eop "irrv32: UNSUPPORTED_OP\n"
+text eshape "irrv32: UNSUPPORTED_SHAPE\n"
+text einval "irrv32: INVALID\n"
+text etrail "irrv32: TRAILING\n"
+text eio "irrv32: IO\n"
+fn refuse code int to void
+k = long 0
+if eq code 20
+k = write 2 emagic 0 len emagic
+end
+if eq code 21
+k = write 2 ever 0 len ever
+end
+if eq code 22
+k = write 2 etrunc 0 len etrunc
+end
+if eq code 23
+k = write 2 ecap 0 len ecap
+end
+if eq code 24
+k = write 2 eop 0 len eop
+end
+if eq code 25
+k = write 2 eshape 0 len eshape
+end
+if eq code 26
+k = write 2 einval 0 len einval
+end
+if eq code 27
+k = write 2 etrail 0 len etrail
+end
+if eq code 28
+k = write 2 eio 0 len eio
+end
+exit code
+end
+fn need ok bool to void
+if not ok
+refuse 26
+end
+end
+fn rd n ulong to ulong
+p = get state 0
+if gt n sub get state 1 p
+refuse 22
+end
+v = ulong 0
+for j ulong n
+v = or v shl ulong get input add p j mul j 8
+end
+put state 0 add p n
+ret v
+end
+fn vr to ulong
+v = rd 2
+need lt v get state 3
+ret v
+end
+fn isdef v ulong to bool
+ret ne and get state 5 shl ulong 1 v 0
+end
+fn def v ulong to void
+put state 5 or get state 5 shl ulong 1 v
+end
+fn reg v ulong to ulong
+if lt v 3
+ret add v 5
+end
+ret add v 11
+end
+fn emitw w ulong to void
+p = get state 2
+if gt add p 4 len output
+refuse 23
+end
+for j ulong 4
+put output add p j uchar and shr w mul j 8 255
+end
+put state 2 add p 4
+end
+note R-type: funct7 rs2 rs1 funct3 rd, opcode 51 (OP).
+fn rtype f7 ulong rs2 ulong rs1 ulong f3 ulong dr ulong to void
+w = or shl f7 25 shl rs2 20
+w = or w or shl rs1 15 shl f3 12
+w = or w or shl dr 7 51
+emitw w
+end
+note I-type: imm is the low 12 bits of the two's-complement immediate (4095 is -1).
+fn itype imm ulong rs1 ulong f3 ulong dr ulong op ulong to void
+w = or shl and imm 4095 20 shl rs1 15
+w = or w or shl f3 12 shl dr 7
+w = or w op
+emitw w
+end
+note S-type: store word rs2 to imm(rs1), opcode 35 (STORE).
+fn stype imm ulong rs2 ulong rs1 ulong f3 ulong to void
+w = or shl shr imm 5 25 shl rs2 20
+w = or w or shl rs1 15 shl f3 12
+w = or w or shl and imm 31 7 35
+emitw w
+end
+note B-type: off is the 13-bit two's-complement byte offset (8192 minus k is -k), opcode 99.
+fn btype off ulong rs1 ulong rs2 ulong f3 ulong to void
+b12 = and shr off 12 1
+b11 = and shr off 11 1
+b10 = and shr off 5 63
+b4 = and shr off 1 15
+w = or shl b12 31 shl b10 25
+w = or w or shl rs2 20 shl rs1 15
+w = or w or shl f3 12 shl b4 8
+w = or w or shl b11 7 99
+emitw w
+end
+note U-type: 20-bit upper immediate, opcode 55 (LUI).
+fn utype imm ulong dr ulong op ulong to void
+emitw or shl and imm 1048575 12 or shl dr 7 op
+end
+fn insn i ulong to void
+op = rd 1
+put ops i op
+known = or or eq op 1 eq op 2 or eq op 3 eq op 15
+if not known
+refuse 24
+end
+if eq op 1
+d = vr
+v = rd 8
+if gt v 4294967295
+refuse 26
+end
+put dest i d
+put immed i v
+def d
+end
+if eq op 2
+d = vr
+a = vr
+need isdef a
+put dest i d
+put arg0 i a
+def d
+end
+if eq op 3
+s = rd 1
+d = vr
+a = vr
+b = vr
+ok = or or eq s 1 eq s 2 eq s 3
+ok = or ok or or eq s 6 eq s 7 eq s 8
+if not ok
+refuse 24
+end
+need isdef a
+need isdef b
+put subs i s
+put dest i d
+put arg0 i a
+put arg1 i b
+def d
+end
+if eq op 15
+a = vr
+need isdef a
+put arg0 i a
+end
+end
+fn skip n ulong to void
+for j ulong n
+k = rd 1
+end
+end
+fn loadfn to void
+skip rd 1
+if ne rd 1 2
+refuse 25
+end
+if ne rd 1 4
+refuse 25
+end
+nv = rd 2
+if gt nv 7
+refuse 23
+end
+need ge nv 2
+put state 3 nv
+for j ulong nv
+if ne rd 1 4
+refuse 25
+end
+end
+if ne rd 2 1
+refuse 24
+end
+bf = rd 4
+bc = rd 4
+ni = rd 4
+if gt ni 64
+refuse 23
+end
+need gt ni 0
+need eq bf 0
+need eq bc ni
+put state 4 ni
+put state 5 3
+for i ulong ni
+insn i
+end
+skip rd 2
+skip rd 2
+for i ulong ni
+isret = eq get ops i 15
+last = eq i sub ni 1
+if ne isret last
+refuse 24
+end
+end
+end
+fn kernel to void
+ni = get state 4
+nl = ulong 0
+for i ulong ni
+op = get ops i
+if eq op 1
+nl = add nl 2
+end
+if or eq op 2 eq op 3
+nl = add nl 1
+end
+end
+note beq a3, x0, done: forward 4 * (9 + body words) bytes
+btype mul 4 add 9 nl 13 0 0
+note lw t0, 0(a0); lw t1, 0(a1): the two params, vregs 0 and 1
+itype 0 10 2 5 3
+itype 0 11 2 6 3
+rv = ulong 0
+for i ulong ni
+op = get ops i
+d = reg get dest i
+if eq op 1
+v = get immed i
+utype shr add v 2048 12 d 55
+itype and v 4095 d 0 d 19
+end
+if eq op 2
+itype 0 reg get arg0 i 0 d 19
+end
+if eq op 3
+s = get subs i
+f7 = ulong 0
+f3 = ulong 0
+if eq s 2
+f7 = ulong 32
+end
+if eq s 3
+f7 = ulong 1
+end
+if eq s 6
+f3 = ulong 7
+end
+if eq s 7
+f3 = ulong 6
+end
+if eq s 8
+f3 = ulong 4
+end
+rtype f7 reg get arg1 i reg get arg0 i f3 d
+end
+if eq op 15
+rv = reg get arg0 i
+end
+end
+note sw result, 0(a2); advance a0 a1 a2 by 4; a3 -= 1; bne a3, x0, loop; jalr x0, 0(ra)
+stype 0 rv 12 2
+itype 4 10 0 10 19
+itype 4 11 0 11 19
+itype 4 12 0 12 19
+itype 4095 13 0 13 19
+btype sub 8192 mul 4 add 7 nl 13 0 1
+itype 0 1 0 0 103
+end
+fn main to int
+n = ulong 0
+for attempt ulong 65536
+if eq n len input
+refuse 23
+end
+k = read 0 input n sub len input n
+if lt k 0
+refuse 28
+end
+if eq k 0
+break
+end
+n = add n ulong k
+end
+if eq n len input
+refuse 23
+end
+put state 1 n
+magic = new uchar 7 0
+put magic 0 79
+put magic 1 83
+put magic 2 67
+put magic 3 49
+put magic 4 73
+put magic 5 82
+for j ulong 7
+v = rd 1
+if ne v ulong get magic j
+refuse 20
+end
+end
+if ne rd 1 1
+refuse 21
+end
+if ne rd 2 1
+refuse 25
+end
+loadfn
+if ne get state 0 n
+refuse 27
+end
+kernel
+p = ulong 0
+for attempt ulong 4096
+if eq p get state 2
+break
+end
+k = write 1 output p sub get state 2 p
+if le k 0
+refuse 28
+end
+p = add p ulong k
+end
+ret 0
+end
diff --git a/seed/tensix/mix-expect.hex b/seed/tensix/mix-expect.hex
new file mode 100644
index 000000000..02d32cf56
--- /dev/null
+++ b/seed/tensix/mix-expect.hex
@@ -0,0 +1,64 @@
+00000000
+ffffffff
+00000080
+ffffff7f
+ffbba065
+78788286
+d7534e30
+88ffee12
+3947a3d6
+eaaa90eb
+9b4af6e4
+4ca647eb
+fd7d46d9
+ae8dc8b0
+5f811811
+10291764
+c1747731
+722459cf
+23980859
+d49388af
+85cb9f0d
+369f7c68
+e7ae35d6
+985a6012
+49222dd7
+fab10966
+ab65a6ee
+5c5dd24f
+0dd93e54
+bee818ef
+6f5c9d21
+2084c365
+d18fb856
+820321b9
+33735a96
+e40e5d94
+9566bbcb
+467a630a
+f7091dd7
+a83146a2
+59fd3908
+0a9d206c
+bb805759
+6cf8ccc0
+1db430c1
+cef7fa4e
+7f77b621
+3063f284
+e1aa616d
+926e0ff5
+432e287d
+f4a59bf1
+a5817465
+56411234
+07e541d4
+b8ac0142
+695851b3
+1a78f3f2
+cb3be3b4
+7c976145
+2d6f3066
+ded27201
+8f92052e
+40de46a4
diff --git a/seed/tensix/mix.expect b/seed/tensix/mix.expect
new file mode 100644
index 000000000..9aafd51ac
--- /dev/null
+++ b/seed/tensix/mix.expect
@@ -0,0 +1,16 @@
+beq	x13,x0,0x3c
+lw	x5,0(x10)
+lw	x6,0(x11)
+lui	x14,0xb2d06
+addi	x14,x14,-512
+add	x7,x5,x6
+mul	x15,x7,x14
+addi	x16,x15,0
+xor	x17,x16,x5
+sw	x17,0(x12)
+addi	x10,x10,4
+addi	x11,x11,4
+addi	x12,x12,4
+addi	x13,x13,-1
+bne	x13,x0,0x4
+jalr	x0,0(x1)
diff --git a/seed/tensix/mix.unit.om b/seed/tensix/mix.unit.om
new file mode 100644
index 000000000..c014ff30f
--- /dev/null
+++ b/seed/tensix/mix.unit.om
@@ -0,0 +1,7 @@
+note Exercises CONST (lui+addi), MOV, mul and xor in irrv32.om: out[i] = ((a[i]+b[i])*3000000000) xor a[i].
+fn mix a uint b uint to uint
+x = add a b
+y = mul x uint 3000000000
+z = y
+ret xor z a
+end
diff --git a/seed/tensix/oracle.py b/seed/tensix/oracle.py
new file mode 100755
index 000000000..5990f32f6
--- /dev/null
+++ b/seed/tensix/oracle.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python3
+# oracle.py -- interop oracle, not Omega-native; never generates kernels.
+#
+# Host dependency (oracle only): Python 3 standard library (ctypes, struct). It moves bytes that asm2 made
+# into two outside checkers and moves the result back out; it never writes, changes or chooses an
+# instruction word. Omega replacement: an .om host loader once Omega has a dlopen/FFI word (ttsim path)
+# and a byte-writer for ELF headers (qemu path); both are proposals, not implemented.
+#
+#   oracle.py ttsim LIB ARCH IMAGE A B N OUT
+#       Tenstorrent ttsim (libttsim_{wh,bh}), the vendor's open simulator, driven through its PCI Express
+#       interface only, the way a host driver drives a card: read BAR0 from config space, point one TLB
+#       window at Tensix tile L1, hold the tile's five RISC-V cores in soft reset, write IMAGE at L1 0x0
+#       (the reset pc of RISCV B), the argument block at 0x1000, A at 0x2000, B at 0x3000, then release
+#       RISCV B only and clock until the stub writes the done mark 0x0600d000 at 0x1010. OUT gets the 4N
+#       bytes at 0x4000. ARCH is wh (Wormhole B0, n150) or bh (Blackhole A0, p150).
+#   oracle.py elf IMAGE A B N OUT
+#       Wraps IMAGE in a 32-bit RISC-V ELF executable for qemu-riscv32 (Linux user mode): one load segment
+#       at 0x10000, IMAGE at 0x10100 (the entry), argument block 0x11000, A 0x12000, B 0x13000, out 0x14000.
+# Sources (read 2026-10-26): tt-isa-documentation be833101 WormholeB0/PCIExpressTile/TLBs.md,
+# BlackholeA0/PCIExpressTile/HostToDeviceTLBs.md, */TensixTile/SoftReset.md, */NoC/Coordinates.md;
+# ttsim b3620244 src/libttsim.cpp (API), src/pcie.cpp (config space); ELF: System V gABI, RISC-V psABI.
+import ctypes, struct, sys
+
+L1_ARGS, L1_A, L1_B, L1_OUT, DONE = 0x1000, 0x2000, 0x3000, 0x4000, 0x0600D000
+SOFT_RESET_0 = 0xFFB121B0           # RISCV_DEBUG_REG_SOFT_RESET_0 (BH SoftReset.md; WH tile_regs 0xFFB12000+0x1B0)
+ALL_CORES, BRISC = 0x47800, 0x800   # bits 11 (B), 12-14 (T0-T2), 18 (NC)
+TLB_CFG = 0x1FC00000                # TLB configuration array in BAR0 (both architectures)
+
+
+def die(msg):
+    sys.stderr.write("oracle: " + msg + "\n")
+    sys.exit(1)
+
+
+def words(path, n):
+    data = open(path, "rb").read()
+    if len(data) != 4 * n:
+        die("%s has %d bytes, want %d" % (path, len(data), 4 * n))
+    return data
+
+
+def ttsim(lib_path, arch, image_path, a_path, b_path, n, out_path):
+    lib = ctypes.CDLL(lib_path)
+    u32, u64, vp = ctypes.c_uint32, ctypes.c_uint64, ctypes.c_void_p
+    lib.libttsim_pci_config_rd32.restype = u32
+    lib.libttsim_pci_config_rd32.argtypes = [u32, u32]
+    lib.libttsim_pci_mem_wr_bytes.argtypes = [u64, vp, u32]
+    lib.libttsim_pci_mem_rd_bytes.argtypes = [u64, vp, u32]
+    lib.libttsim_clock.argtypes = [u32]
+    lib.libttsim_init()
+    ident = lib.libttsim_pci_config_rd32(0, 0x0)
+    want = {"wh": 0x401E1E52, "bh": 0xB1401E52}[arch]
+    if ident != want:
+        die("config space id 0x%08x, want 0x%08x for %s" % (ident, want, arch))
+    if not lib.libttsim_pci_config_rd32(0, 0x4) & 2:
+        die("BAR memory decode (Command.MSE) is off")
+    bar0 = (lib.libttsim_pci_config_rd32(0, 0x10) & ~0xF) | (lib.libttsim_pci_config_rd32(0, 0x14) << 32)
+
+    def wr(addr, data):
+        buf = ctypes.create_string_buffer(data, len(data))
+        lib.libttsim_pci_mem_wr_bytes(bar0 + addr, buf, len(data))
+
+    def rd(addr, size):
+        buf = ctypes.create_string_buffer(size)
+        lib.libttsim_pci_mem_rd_bytes(bar0 + addr, buf, size)
+        return buf.raw
+
+    if arch == "wh":
+        # 1 MiB windows: local_offset = top 16 bits of the 36-bit tile address, x_end at bit 16, y_end at 22.
+        x, y, shift = 1, 1, 20       # NoC #0 (1,1) is a Tensix tile (WormholeB0/NoC/Coordinates.md)
+
+        def point(window, tile_addr):
+            cfg = (tile_addr >> shift) | (x << 16) | (y << 22)
+            wr(TLB_CFG + 8 * window, struct.pack("> 21, x_end at bit 43, y_end at 49.
+        x, y, shift = 1, 2, 21       # NoC #0 (1,2) is a Tensix tile (BlackholeA0/NoC/Coordinates.md)
+
+        def point(window, tile_addr):
+            cfg = (tile_addr >> shift) | (x << 43) | (y << 49)
+            for i in range(3):                                   # three 32-bit register writes
+                wr(TLB_CFG + 12 * window + 4 * i, struct.pack("> (32 * i)) & 0xFFFFFFFF))
+            return window << shift
+
+    l1 = point(0, 0)
+    regs = point(1, SOFT_RESET_0 & ~((1 << shift) - 1)) + (SOFT_RESET_0 & ((1 << shift) - 1))
+    reset_before = struct.unpack("= limit:
+            die("no done mark after %d clocks" % clocks)
+        lib.libttsim_clock(step)
+        clocks += step
+    open(out_path, "wb").write(rd(l1 + L1_OUT, 4 * n))
+    wr(regs, struct.pack(" args:
+        die("image too large")
+    body = bytearray(out + 4 * n)
+    body[code:code + len(image)] = image
+    body[args:args + 16] = struct.pack(" vaddr 0x10000, read/write/execute, page aligned.
+    phdr = struct.pack("expected verdict (first two words of `oracle.js check`)
+# Hand-written from spec/one-layer-format.md sections 3 and 10, not generated.
+bad_magic	REFUSE MAGIC
+bad_version2	REFUSE VERSION
+bad_version6	REFUSE VERSION
+bad_version8	REFUSE VERSION
+bitcast	ACCEPT v7
+cap_fname	REFUSE CAPACITY
+cap_nfuncs	REFUSE CAPACITY
+cap_nstructs	REFUSE CAPACITY
+cap_v1_input	REFUSE CAPACITY
+cap_v7_input	REFUSE CAPACITY
+convert	ACCEPT v7
+float_ops	ACCEPT v7
+gratuitous_v7	REFUSE VERSION
+gratuitous_v7_empty	REFUSE VERSION
+init_diamond	ACCEPT v7
+inv_bitcast_bool	REFUSE INVALID
+inv_bitcast_cross	REFUSE INVALID
+inv_bitcast_none	REFUSE INVALID
+inv_bitcast_width	REFUSE INVALID
+inv_cast_bool	REFUSE INVALID
+inv_cast_to_bool	REFUSE INVALID
+inv_class4	REFUSE INVALID
+inv_count0	REFUSE INVALID
+inv_count_big	REFUSE INVALID
+inv_dup_func	REFUSE INVALID
+inv_dup_local	REFUSE INVALID
+inv_dup_module	REFUSE INVALID
+inv_export_memory	REFUSE INVALID
+inv_export_region	REFUSE INVALID
+inv_f32_const_upper	REFUSE INVALID
+inv_float_and	REFUSE INVALID
+inv_float_bnot	REFUSE INVALID
+inv_float_lnot	REFUSE INVALID
+inv_float_rem	REFUSE INVALID
+inv_float_shl	REFUSE INVALID
+inv_fname_8bit	REFUSE INVALID
+inv_foreign_init	REFUSE INVALID
+inv_foreign_load	REFUSE INVALID
+inv_foreign_store	REFUSE INVALID
+inv_index_bool	REFUSE INVALID
+inv_index_float	REFUSE INVALID
+inv_init_after_use	REFUSE INVALID
+inv_init_one_branch	REFUSE INVALID
+inv_loop_carried	REFUSE INVALID
+inv_missing_init	REFUSE INVALID
+inv_mod_init	REFUSE INVALID
+inv_nregions	REFUSE INVALID
+inv_owner_local_module	REFUSE INVALID
+inv_owner_missing	REFUSE INVALID
+inv_owner_module0	REFUSE INVALID
+inv_reg_undef	REFUSE INVALID
+inv_rinit_module	REFUSE INVALID
+inv_rinit_none	REFUSE INVALID
+inv_rinit_region_none	REFUSE INVALID
+inv_rinit_type	REFUSE INVALID
+inv_rload_dst_none	REFUSE INVALID
+inv_rload_index_8000	REFUSE INVALID
+inv_rload_index_none	REFUSE INVALID
+inv_rload_region_none	REFUSE INVALID
+inv_rload_region_oob	REFUSE INVALID
+inv_rload_type	REFUSE INVALID
+inv_rname_64	REFUSE INVALID
+inv_rname_8bit	REFUSE INVALID
+inv_rname_dot	REFUSE INVALID
+inv_rname_empty	REFUSE INVALID
+inv_rname_nul	REFUSE INVALID
+inv_rstore_src_fffe	REFUSE INVALID
+inv_rstore_src_oob	REFUSE INVALID
+inv_rstore_type	REFUSE INVALID
+inv_rtag_bool	REFUSE INVALID
+inv_rtag_cells	REFUSE INVALID
+inv_shadow	REFUSE INVALID
+inv_store_before_init	REFUSE INVALID
+inv_text_init	REFUSE INVALID
+inv_text_len	REFUSE INVALID
+inv_text_store	REFUSE INVALID
+inv_text_u32	REFUSE INVALID
+inv_unreachable_use	REFUSE INVALID
+inv_v1_dup_func	REFUSE INVALID
+local_fresh	ACCEPT v7
+ok_count_max	ACCEPT v7
+ok_fname_empty	ACCEPT v7
+ok_loop_init_before	ACCEPT v7
+ok_own_local	ACCEPT v7
+persist	ACCEPT v7
+rt_f32	ACCEPT v7
+rt_f64	ACCEPT v7
+rt_i32	ACCEPT v7
+rt_u64	ACCEPT v7
+rt_u8	ACCEPT v7
+text_read	ACCEPT v7
+trailing	REFUSE TRAILING
+trunc_empty	REFUSE TRUNCATED
+trunc_header	REFUSE TRUNCATED
+trunc_initdata	REFUSE TRUNCATED
+trunc_last	REFUSE TRUNCATED
+trunc_magic	REFUSE TRUNCATED
+unsup_class3	REFUSE UNSUPPORTED_OP
+unsup_op0	REFUSE UNSUPPORTED_OP
+unsup_op20	REFUSE UNSUPPORTED_OP
+unsup_op34	REFUSE UNSUPPORTED_OP
+unsup_op7	REFUSE UNSUPPORTED_OP
+unsup_op9	REFUSE UNSUPPORTED_OP
+unsup_structs	REFUSE UNSUPPORTED_TAG
+unsup_tag10	REFUSE UNSUPPORTED_TAG
+unsup_tag15	REFUSE UNSUPPORTED_TAG
+v1_arith	ACCEPT v1
+v1_loop	ACCEPT v1
+v1_op30	REFUSE UNSUPPORTED_OP
+v1_tag13	REFUSE UNSUPPORTED_TAG
+v1_tag14_ret	REFUSE UNSUPPORTED_TAG
+v1_unsup_op10	REFUSE UNSUPPORTED_OP
+v7_input_at_v1_cap	REFUSE TRAILING
diff --git a/seed/wasm/v7/expect/run/bitcast.out b/seed/wasm/v7/expect/run/bitcast.out
new file mode 100644
index 000000000..d37ab94f2
--- /dev/null
+++ b/seed/wasm/v7/expect/run/bitcast.out
@@ -0,0 +1,10 @@
+f32_u32 = 3212836864
+u32_f32 = 0x3f800000
+i32_f32 = 0xffffffff
+f64_i64 = -9223372036854775808
+u64_f64 = 0x7ff8000000000001
+u8_i8 = -56
+i8_u8 = 255
+i16_u16 = 32768
+u16_i16 = -1
+f32_f32 = 0x7f800001
diff --git a/seed/wasm/v7/expect/run/bitcast.script b/seed/wasm/v7/expect/run/bitcast.script
new file mode 100644
index 000000000..96e23be7a
--- /dev/null
+++ b/seed/wasm/v7/expect/run/bitcast.script
@@ -0,0 +1,10 @@
+call f32_u32 0xbf800000
+call u32_f32 1065353216
+call i32_f32 -1
+call f64_i64 0x8000000000000000
+call u64_f64 9221120237041090561
+call u8_i8 200
+call i8_u8 -1
+call i16_u16 -32768
+call u16_i16 65535
+call f32_f32 0x7f800001
diff --git a/seed/wasm/v7/expect/run/convert.out b/seed/wasm/v7/expect/run/convert.out
new file mode 100644
index 000000000..f3cf7c6b9
--- /dev/null
+++ b/seed/wasm/v7/expect/run/convert.out
@@ -0,0 +1,48 @@
+f64_i32 = 0
+f64_i32 = 2147483647
+f64_i32 = -2147483648
+f64_i32 = 0
+f64_i32 = 2147483647
+f64_i32 = -2
+f64_i32 = 2147483647
+f64_i32 = -2147483648
+f64_u8 = 0
+f64_u8 = 255
+f64_u8 = 255
+f64_u8 = 0
+f32_i8 = 127
+f32_i8 = -128
+f32_i8 = -128
+f32_i8 = 0
+f64_u64 = 18446744073709551615
+f64_u64 = 0
+f64_u64 = 9223372036854775808
+f64_i64 = 9223372036854775807
+f64_i64 = -9223372036854775808
+f32_u32 = 4294967295
+f32_u32 = 4294967040
+f32_i16 = 0
+u64_f32 = 0x5f000001
+u64_f32 = 0x5f800000
+u64_f32 = 0x4b800000
+u64_f32 = 0x4b800002
+i32_f32 = 0x4b800000
+i32_f32 = 0xcf000000
+i32_f32 = 0xcb800002
+u64_f64 = 0x4340000000000000
+u64_f64 = 0x43f0000000000000
+i64_f64 = 0xc3e0000000000000
+i64_f64 = 0x4340000000000002
+f64_f32 = 0x3f800000
+f64_f32 = 0x3f800002
+f64_f32 = 0x7f800000
+f64_f32 = 0x7f800000
+f64_f32 = 0x80000000
+f32_f64 = 0x3ff0000020000000
+f32_f64 = 0xfff0000000000000
+f64_f64 = 0x8000000000000000
+i32_u8 TRAP code=5
+i32_u8 = 255
+i32_u8 TRAP code=5
+u64_i64 TRAP code=5
+u64_i64 = 9223372036854775807
diff --git a/seed/wasm/v7/expect/run/convert.script b/seed/wasm/v7/expect/run/convert.script
new file mode 100644
index 000000000..c8d42f790
--- /dev/null
+++ b/seed/wasm/v7/expect/run/convert.script
@@ -0,0 +1,48 @@
+call f64_i32 0x7ff8000000000000
+call f64_i32 0x7ff0000000000000
+call f64_i32 0xfff0000000000000
+call f64_i32 0x8000000000000000
+call f64_i32 0x41e65a0bc0000000
+call f64_i32 0xc007333333333333
+call f64_i32 0x41dffffffff9999a
+call f64_i32 0xc1e0000000200000
+call f64_u8 0xbff8000000000000
+call f64_u8 0x406ffccccccccccd
+call f64_u8 0x4070000000000000
+call f64_u8 0xfff8000000000000
+call f32_i8 0x42ff0000
+call f32_i8 0xc300e666
+call f32_i8 0xc3010000
+call f32_i8 0x7fc00000
+call f64_u64 0x43f0000000000000
+call f64_u64 0xfff0000000000000
+call f64_u64 0x43e0000000000000
+call f64_i64 0x43e0000000000000
+call f64_i64 0xc3e0000000000000
+call f32_u32 0x4f800000
+call f32_u32 0x4f7fffff
+call f32_i16 0x80000000
+call u64_f32 9223372586610589697
+call u64_f32 18446744073709551615
+call u64_f32 16777217
+call u64_f32 16777219
+call i32_f32 16777217
+call i32_f32 -2147483648
+call i32_f32 -16777219
+call u64_f64 9007199254740993
+call u64_f64 18446744073709551615
+call i64_f64 -9223372036854775808
+call i64_f64 9007199254740995
+call f64_f32 0x3ff0000010000000
+call f64_f32 0x3ff0000030000000
+call f64_f32 0x7ff0000000000000
+call f64_f32 0x48078287f49c4a1d
+call f64_f32 0x8000000000000000
+call f32_f64 0x3f800001
+call f32_f64 0xff800000
+call f64_f64 0x8000000000000000
+call i32_u8 300
+call i32_u8 255
+call i32_u8 -1
+call u64_i64 9223372036854775808
+call u64_i64 9223372036854775807
diff --git a/seed/wasm/v7/expect/run/float_ops.out b/seed/wasm/v7/expect/run/float_ops.out
new file mode 100644
index 000000000..9a40ea2e3
--- /dev/null
+++ b/seed/wasm/v7/expect/run/float_ops.out
@@ -0,0 +1,19 @@
+fadd = 0x3f800000
+fadd = 0x7f800000
+fmul = 0x40c00000
+dsub = 0x0000000000000000
+ddiv = 0x7ff0000000000000
+ddiv = 0xfff0000000000000
+ddiv = 0x3fd5555555555555
+fneg = 0xffc00001
+fneg = 0x80000000
+dneg = 0x0000000000000000
+feq = 0
+fne = 1
+flt = 0
+feq = 1
+flt = 0
+dge = 1
+kf = 0x7fa00001
+kd = 0xfff0000000000001
+fneg = 0xffa00001
diff --git a/seed/wasm/v7/expect/run/float_ops.script b/seed/wasm/v7/expect/run/float_ops.script
new file mode 100644
index 000000000..85775c1bf
--- /dev/null
+++ b/seed/wasm/v7/expect/run/float_ops.script
@@ -0,0 +1,19 @@
+call fadd 0x3f800000 0x33800000
+call fadd 0x7f7fffff 0x7f7fffff
+call fmul 0x40000000 0x40400000
+call dsub 0x3ff0000000000000 0x3ff0000000000000
+call ddiv 0x3ff0000000000000 0x0000000000000000
+call ddiv 0xbff0000000000000 0x0000000000000000
+call ddiv 0x3ff0000000000000 0x4008000000000000
+call fneg 0x7fc00001
+call fneg 0x00000000
+call dneg 0x8000000000000000
+call feq 0x7fc00000 0x7fc00000
+call fne 0x7fc00000 0x7fc00000
+call flt 0x7fc00000 0x3f800000
+call feq 0x00000000 0x80000000
+call flt 0x80000000 0x00000000
+call dge 0x4000000000000000 0x3ff0000000000000
+call kf
+call kd
+call fneg 0x7fa00001
diff --git a/seed/wasm/v7/expect/run/init_diamond.out b/seed/wasm/v7/expect/run/init_diamond.out
new file mode 100644
index 000000000..87edde9fd
--- /dev/null
+++ b/seed/wasm/v7/expect/run/init_diamond.out
@@ -0,0 +1,2 @@
+pick = -3
+pick = 4
diff --git a/seed/wasm/v7/expect/run/init_diamond.script b/seed/wasm/v7/expect/run/init_diamond.script
new file mode 100644
index 000000000..00284831f
--- /dev/null
+++ b/seed/wasm/v7/expect/run/init_diamond.script
@@ -0,0 +1,2 @@
+call pick 1
+call pick 0
diff --git a/seed/wasm/v7/expect/run/local_fresh.out b/seed/wasm/v7/expect/run/local_fresh.out
new file mode 100644
index 000000000..a1ac3c5fd
--- /dev/null
+++ b/seed/wasm/v7/expect/run/local_fresh.out
@@ -0,0 +1,5 @@
+swap = 5
+swap = 5
+swap = 5
+swap TRAP code=3
+reinit = 7
diff --git a/seed/wasm/v7/expect/run/local_fresh.script b/seed/wasm/v7/expect/run/local_fresh.script
new file mode 100644
index 000000000..941d76ddc
--- /dev/null
+++ b/seed/wasm/v7/expect/run/local_fresh.script
@@ -0,0 +1,5 @@
+call swap 0 11
+call swap 0 12
+call swap 3 1
+call swap 4 1
+call reinit 0
diff --git a/seed/wasm/v7/expect/run/ok_loop_init_before.out b/seed/wasm/v7/expect/run/ok_loop_init_before.out
new file mode 100644
index 000000000..dc5f63fce
--- /dev/null
+++ b/seed/wasm/v7/expect/run/ok_loop_init_before.out
@@ -0,0 +1,2 @@
+f = 0
+f = 5
diff --git a/seed/wasm/v7/expect/run/ok_loop_init_before.script b/seed/wasm/v7/expect/run/ok_loop_init_before.script
new file mode 100644
index 000000000..314790397
--- /dev/null
+++ b/seed/wasm/v7/expect/run/ok_loop_init_before.script
@@ -0,0 +1,2 @@
+call f 0
+call f 5
diff --git a/seed/wasm/v7/expect/run/ok_own_local.out b/seed/wasm/v7/expect/run/ok_own_local.out
new file mode 100644
index 000000000..de6da9d4d
--- /dev/null
+++ b/seed/wasm/v7/expect/run/ok_own_local.out
@@ -0,0 +1,3 @@
+a = 9
+b = 0
+b TRAP code=3
diff --git a/seed/wasm/v7/expect/run/ok_own_local.script b/seed/wasm/v7/expect/run/ok_own_local.script
new file mode 100644
index 000000000..f82c2c033
--- /dev/null
+++ b/seed/wasm/v7/expect/run/ok_own_local.script
@@ -0,0 +1,3 @@
+call a 9
+call b 0
+call b 2
diff --git a/seed/wasm/v7/expect/run/persist.out b/seed/wasm/v7/expect/run/persist.out
new file mode 100644
index 000000000..2ab31dd45
--- /dev/null
+++ b/seed/wasm/v7/expect/run/persist.out
@@ -0,0 +1,10 @@
+bump = 1
+bump = 2
+partial TRAP code=3
+bump = 4
+region c 04000000
+ovf TRAP code=1
+region c 04000000
+ovf = 77
+region c 4d000000
+bump = 78
diff --git a/seed/wasm/v7/expect/run/persist.plain b/seed/wasm/v7/expect/run/persist.plain
new file mode 100644
index 000000000..0132d5e56
--- /dev/null
+++ b/seed/wasm/v7/expect/run/persist.plain
@@ -0,0 +1,10 @@
+bump = 1
+bump = 2
+partial TRAP
+bump = 4
+region c 04000000
+ovf TRAP
+region c 04000000
+ovf = 77
+region c 4d000000
+bump = 78
diff --git a/seed/wasm/v7/expect/run/persist.script b/seed/wasm/v7/expect/run/persist.script
new file mode 100644
index 000000000..2532bab39
--- /dev/null
+++ b/seed/wasm/v7/expect/run/persist.script
@@ -0,0 +1,12 @@
+call bump
+call bump
+# writes 3 then traps reading index 1: the write persists
+call partial
+call bump
+region c
+# overflow trap before the store: nothing written
+call ovf 2147483647
+region c
+call ovf 1
+region c
+call bump
diff --git a/seed/wasm/v7/expect/run/rt_f32.out b/seed/wasm/v7/expect/run/rt_f32.out
new file mode 100644
index 000000000..7f88e464e
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_f32.out
@@ -0,0 +1,6 @@
+set = void
+set = void
+get = 0x7fa00001
+get = 0x80000000
+get TRAP code=3
+region g 0100a07f00000080
diff --git a/seed/wasm/v7/expect/run/rt_f32.script b/seed/wasm/v7/expect/run/rt_f32.script
new file mode 100644
index 000000000..b8f70c3e8
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_f32.script
@@ -0,0 +1,7 @@
+# signaling-NaN payload and -0 survive RSTORE/RLOAD bit-exactly
+call set 0 0x7fa00001
+call set 1 0x80000000
+call get 0
+call get 1
+call get 2
+region g
diff --git a/seed/wasm/v7/expect/run/rt_f64.out b/seed/wasm/v7/expect/run/rt_f64.out
new file mode 100644
index 000000000..64e8867a0
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_f64.out
@@ -0,0 +1,6 @@
+set = void
+set = void
+get = 0xfff8000000000123
+get = 0x3ff0000000000000
+get TRAP code=3
+region g 000000000000f03f230100000000f8ff
diff --git a/seed/wasm/v7/expect/run/rt_f64.script b/seed/wasm/v7/expect/run/rt_f64.script
new file mode 100644
index 000000000..8fea223da
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_f64.script
@@ -0,0 +1,6 @@
+call set 1 0xfff8000000000123
+call set 0 0x3ff0000000000000
+call get 1
+call get 0
+call get -1
+region g
diff --git a/seed/wasm/v7/expect/run/rt_i32.out b/seed/wasm/v7/expect/run/rt_i32.out
new file mode 100644
index 000000000..66fac4df0
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_i32.out
@@ -0,0 +1,6 @@
+set = void
+set = void
+get = -2
+get = 2147483647
+set TRAP code=3
+region g feffffff00000000ffffff7f
diff --git a/seed/wasm/v7/expect/run/rt_i32.script b/seed/wasm/v7/expect/run/rt_i32.script
new file mode 100644
index 000000000..92a074378
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_i32.script
@@ -0,0 +1,6 @@
+call set 0 -2
+call set 2 2147483647
+call get 0
+call get 2
+call set 3 1
+region g
diff --git a/seed/wasm/v7/expect/run/rt_u64.out b/seed/wasm/v7/expect/run/rt_u64.out
new file mode 100644
index 000000000..a662cfbfe
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_u64.out
@@ -0,0 +1,6 @@
+set = void
+get = 18446744073709551615
+geti TRAP code=3
+geti = 18446744073709551615
+geti TRAP code=3
+region g 0000000000000000ffffffffffffffff
diff --git a/seed/wasm/v7/expect/run/rt_u64.script b/seed/wasm/v7/expect/run/rt_u64.script
new file mode 100644
index 000000000..15cf53267
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_u64.script
@@ -0,0 +1,6 @@
+call set 1 18446744073709551615
+call get 1
+call geti -1
+call geti 1
+call geti 2
+region g
diff --git a/seed/wasm/v7/expect/run/rt_u8.out b/seed/wasm/v7/expect/run/rt_u8.out
new file mode 100644
index 000000000..77ca86829
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_u8.out
@@ -0,0 +1,8 @@
+set = void
+set = void
+get = 255
+get = 7
+get TRAP code=3
+set TRAP code=3
+get = 0
+region g ff000007
diff --git a/seed/wasm/v7/expect/run/rt_u8.script b/seed/wasm/v7/expect/run/rt_u8.script
new file mode 100644
index 000000000..9c7a039a6
--- /dev/null
+++ b/seed/wasm/v7/expect/run/rt_u8.script
@@ -0,0 +1,8 @@
+call set 0 255
+call set 3 7
+call get 0
+call get 3
+call get 4
+call set -1 1
+call get 1
+region g
diff --git a/seed/wasm/v7/expect/run/text_read.out b/seed/wasm/v7/expect/run/text_read.out
new file mode 100644
index 000000000..7002c5fe5
--- /dev/null
+++ b/seed/wasm/v7/expect/run/text_read.out
@@ -0,0 +1,6 @@
+tget = 82
+tget = 88
+tget TRAP code=3
+eget TRAP code=3
+region t 52474258
+region e 
diff --git a/seed/wasm/v7/expect/run/text_read.script b/seed/wasm/v7/expect/run/text_read.script
new file mode 100644
index 000000000..2ae214957
--- /dev/null
+++ b/seed/wasm/v7/expect/run/text_read.script
@@ -0,0 +1,6 @@
+call tget 0
+call tget 3
+call tget 4
+call eget 0
+region t
+region e
diff --git a/seed/wasm/v7/expect/run/v1_arith.out b/seed/wasm/v7/expect/run/v1_arith.out
new file mode 100644
index 000000000..6ca88881e
--- /dev/null
+++ b/seed/wasm/v7/expect/run/v1_arith.out
@@ -0,0 +1,14 @@
+addi TRAP code=1
+addi = -2
+addu = 44
+divi TRAP code=1
+remi = 0
+divi TRAP code=2
+remi = -1
+shl8 TRAP code=1
+shl8 = -128
+shl8 TRAP code=7
+shr8 = -1
+negu = 65535
+memory = 1
+stop TRAP code=9
diff --git a/seed/wasm/v7/expect/run/v1_arith.script b/seed/wasm/v7/expect/run/v1_arith.script
new file mode 100644
index 000000000..d012343dc
--- /dev/null
+++ b/seed/wasm/v7/expect/run/v1_arith.script
@@ -0,0 +1,14 @@
+call addi 2147483647 1
+call addi -5 3
+call addu 200 100
+call divi -9223372036854775808 -1
+call remi -9223372036854775808 -1
+call divi 7 0
+call remi -7 2
+call shl8 64 1
+call shl8 -64 1
+call shl8 1 8
+call shr8 -128 7
+call negu 1
+call memory 0
+call stop
diff --git a/seed/wasm/v7/expect/run/v1_loop.out b/seed/wasm/v7/expect/run/v1_loop.out
new file mode 100644
index 000000000..9dd93b81e
--- /dev/null
+++ b/seed/wasm/v7/expect/run/v1_loop.out
@@ -0,0 +1,4 @@
+sum = 45
+twice = 90
+sum = 0
+sum = 704982704
diff --git a/seed/wasm/v7/expect/run/v1_loop.script b/seed/wasm/v7/expect/run/v1_loop.script
new file mode 100644
index 000000000..7eafbc376
--- /dev/null
+++ b/seed/wasm/v7/expect/run/v1_loop.script
@@ -0,0 +1,4 @@
+call sum 10
+call twice 10
+call sum 0
+call sum 100000
diff --git a/seed/wasm/v7/oracle.js b/seed/wasm/v7/oracle.js
new file mode 100755
index 000000000..6ef554f9e
--- /dev/null
+++ b/seed/wasm/v7/oracle.js
@@ -0,0 +1,773 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: Apache-2.0
+// Independent read-only oracle for OSC IR wire versions 1 and 7.
+//
+// Written from spec/one-layer-format.md sections 3..7 and 10 and
+// docs/one_layer/OMEGESE.md 11.1/11.2 only. It shares no code with
+// seed/wasm/irwasm.om, seed/wasm/oracle.js, seed/omc/omc.om, the C IR tools,
+// or seed/wasm/v7/writer.js (the fixture writer). It is a referee: it never
+// produces IR or wasm.
+//
+//   node oracle.js check UNIT            -> ACCEPT v1|v7 / REFUSE CLASS detail
+//   node oracle.js run [--codes] UNIT SCRIPT
+//
+// Exit: check 0 accept, 1 refuse, 2 usage. run 0 done, 1 unit refused,
+// 2 usage/script error, 3 oracle resource limit (not an Omega result).
+'use strict';
+
+const fs = require('fs');
+
+const MAGIC = [0x4f, 0x53, 0x43, 0x31, 0x49, 0x52, 0x00];
+const V1_INPUT_MAX = 2620251;
+const V7_INPUT_MAX = 8388608;
+const MAX_FUNCS = 32;
+const MAX_PARAMS = 6;
+const MAX_VREGS = 480;
+const MAX_BLOCKS = 512;
+const MAX_INSNS = 4096;
+const MAX_STRUCTS = 16;
+const MAX_REGIONS = 1024;
+const MAX_COUNT = 16777216;
+const NAME_MAX = 63;
+const CLAUSE_MAX = 255;
+const NONE = 0xffff;
+const STEP_LIMIT = 200000000;
+
+// Scalar wire tags.
+const T_VOID = 0, T_BOOL = 1, T_F32 = 13, T_F64 = 14;
+const isInt = (t) => t >= 2 && t <= 9;
+const isFloat = (t) => t === T_F32 || t === T_F64;
+const isValue = (t) => t === T_BOOL || isInt(t) || isFloat(t);
+const isSigned = (t) => t >= 6 && t <= 9;
+const intWidth = (t) => [0, 1, 8, 16, 32, 64, 8, 16, 32, 64][t];
+const elemBytes = (t) => (t === T_F32 ? 4 : t === T_F64 ? 8 : intWidth(t) / 8);
+const BITCAST_SET = { 2: 0, 6: 0, 3: 1, 7: 1, 4: 2, 8: 2, 13: 2, 5: 3, 9: 3, 14: 3 };
+
+// Opcodes.
+const OP = {
+  CONST: 1, MOV: 2, BIN: 3, UN: 4, CMP: 5, CAST: 6, LOAD: 9, STORE: 10,
+  CALL: 11, TRAP: 12, BR: 13, CBR: 14, RET: 15,
+  RLOAD: 30, RSTORE: 31, BITCAST: 32, RINIT: 33,
+};
+const isTerm = (op) => op === OP.BR || op === OP.CBR || op === OP.RET;
+
+class Refusal extends Error {
+  constructor(cls, detail) {
+    super(cls + ' ' + detail);
+    this.cls = cls;
+    this.detail = detail;
+  }
+}
+const refuse = (cls, detail) => { throw new Refusal(cls, detail); };
+
+// ---------------------------------------------------------------- reader
+class Reader {
+  constructor(buf) { this.buf = buf; this.pos = 0; }
+  need(n, what) {
+    if (this.pos + n > this.buf.length) refuse('TRUNCATED', what + ' at byte ' + this.pos);
+  }
+  u8(what) { this.need(1, what); return this.buf[this.pos++]; }
+  u16(what) { this.need(2, what); const v = this.buf[this.pos] | (this.buf[this.pos + 1] << 8); this.pos += 2; return v; }
+  u32(what) { this.need(4, what); const v = this.buf.readUInt32LE(this.pos); this.pos += 4; return v; }
+  u64(what) { this.need(8, what); const v = this.buf.readBigUInt64LE(this.pos); this.pos += 8; return v; }
+  bytes(n, what) { this.need(n, what); const b = this.buf.subarray(this.pos, this.pos + n); this.pos += n; return b; }
+}
+
+function readTag(r, v7, what) {
+  const t = r.u8(what);
+  if (t <= 9) return t;
+  if ((t === T_F32 || t === T_F64) && v7) return t;
+  refuse('UNSUPPORTED_TAG', what + ' tag ' + t);
+}
+
+// Register-like u16 field. 0x8000..0xFFFE never designates anything (spec 3.5
+// RANGE; 10.1 INVALID). 0xFFFF is the "none" sentinel, checked per use.
+function readReg(r, what) {
+  const v = r.u16(what);
+  if (v >= 0x8000 && v !== NONE) refuse('INVALID', what + ' operand 0x' + v.toString(16));
+  return v;
+}
+
+function readFuncText(r, lenBytes, max, what) {
+  const n = lenBytes === 1 ? r.u8(what + ' length') : r.u16(what + ' length');
+  if (n > max) refuse('CAPACITY', what + ' length ' + n);
+  const b = r.bytes(n, what);
+  for (const c of b) if (c === 0) refuse('INVALID', what + ' contains NUL');
+  return b;
+}
+
+function readRegion(r, i) {
+  const what = 'region ' + i;
+  const n = r.u8(what + ' name length');
+  if (n === 0 || n > NAME_MAX) refuse('INVALID', what + ' name length ' + n);
+  const nb = r.bytes(n, what + ' name');
+  for (const c of nb) {
+    if (c === 0 || c >= 0x80 || c === 0x2e) refuse('INVALID', what + ' name byte 0x' + c.toString(16));
+  }
+  const name = nb.toString('latin1');
+  const tag = r.u8(what + ' element');
+  if (!(isInt(tag) || isFloat(tag))) refuse('INVALID', what + ' element tag ' + tag);
+  const cls = r.u8(what + ' class');
+  if (cls === 3) refuse('UNSUPPORTED_OP', what + ' class 3 (workgroup)');
+  if (cls > 3) refuse('INVALID', what + ' class ' + cls);
+  const owner = r.u16(what + ' owner');
+  const count = r.u32(what + ' count');
+  if (count > MAX_COUNT) refuse('INVALID', what + ' count ' + count);
+  if (cls !== 2 && count === 0) refuse('INVALID', what + ' mutable count 0');
+  const initlen = r.u32(what + ' initial length');
+  if (cls !== 2 && initlen !== 0) refuse('INVALID', what + ' initial data on class ' + cls);
+  if (cls === 2 && tag !== 2) refuse('INVALID', what + ' text element tag ' + tag);
+  if (cls === 2 && initlen !== count) refuse('INVALID', what + ' text length ' + initlen + ' != count ' + count);
+  const init = Buffer.from(r.bytes(initlen, what + ' initial data'));
+  return { name, tag, cls, owner, count, init };
+}
+
+function readInsn(r, v7, what) {
+  const op = r.u8(what + ' opcode');
+  const ins = { op, sub: 0, dst: NONE, a: NONE, b: NONE, c: NONE, imm: 0n, args: [] };
+  const reg = (k) => readReg(r, what + ' ' + k);
+  switch (op) {
+    case OP.CONST: ins.dst = reg('dst'); ins.imm = r.u64(what + ' imm'); break;
+    case OP.MOV: case OP.CAST: ins.dst = reg('dst'); ins.a = reg('a'); break;
+    case OP.BIN: case OP.CMP:
+      ins.sub = r.u8(what + ' sub'); ins.dst = reg('dst'); ins.a = reg('a'); ins.b = reg('b'); break;
+    case OP.UN: ins.sub = r.u8(what + ' sub'); ins.dst = reg('dst'); ins.a = reg('a'); break;
+    // LOAD/STORE (9/10) need a reference register, which this profile has not.
+    case OP.CALL: {
+      ins.dst = reg('dst'); ins.callee = reg('callee');
+      const n = r.u8(what + ' nargs');
+      if (n > MAX_PARAMS) refuse('CAPACITY', what + ' nargs ' + n);
+      for (let k = 0; k < n; k++) ins.args.push(reg('arg' + k));
+      break;
+    }
+    case OP.TRAP: ins.imm = BigInt(r.u8(what + ' trap code')); break;
+    case OP.BR: ins.blkT = reg('target'); break;
+    case OP.CBR: ins.a = reg('cond'); ins.blkT = reg('true target'); ins.blkF = reg('false target'); break;
+    case OP.RET: ins.a = reg('a'); break;
+    default:
+      if (op >= 30 && op <= 33 && v7) {
+        if (op === OP.RLOAD) { ins.dst = reg('dst'); ins.rg = reg('region'); ins.b = reg('index'); }
+        else if (op === OP.RSTORE) { ins.rg = reg('region'); ins.b = reg('index'); ins.c = reg('src'); }
+        else if (op === OP.BITCAST) { ins.dst = reg('dst'); ins.a = reg('src'); }
+        else { ins.rg = reg('region'); ins.a = reg('init'); }
+        break;
+      }
+      refuse('UNSUPPORTED_OP', what + ' opcode ' + op);
+  }
+  return ins;
+}
+
+function readFunc(r, v7, fi) {
+  const what = 'function ' + fi;
+  const nameBytes = readFuncText(r, 1, NAME_MAX, what + ' name');
+  for (const c of nameBytes) if (c >= 0x80) refuse('INVALID', what + ' name byte 0x' + c.toString(16));
+  const name = nameBytes.toString('latin1');
+  const nparams = r.u8(what + ' nparams');
+  const ret = readTag(r, v7, what + ' return');
+  const nvregs = r.u16(what + ' nvregs');
+  if (nvregs > MAX_VREGS) refuse('CAPACITY', what + ' nvregs ' + nvregs);
+  const vtype = [];
+  for (let k = 0; k < nvregs; k++) vtype.push(readTag(r, v7, what + ' register ' + k));
+  const nblocks = r.u16(what + ' nblocks');
+  if (nblocks > MAX_BLOCKS) refuse('CAPACITY', what + ' nblocks ' + nblocks);
+  const blocks = [];
+  for (let k = 0; k < nblocks; k++) blocks.push({ first: r.u32(what + ' block first'), count: r.u32(what + ' block count') });
+  const ninsns = r.u32(what + ' ninsns');
+  if (ninsns > MAX_INSNS) refuse('CAPACITY', what + ' ninsns ' + ninsns);
+  const insns = [];
+  for (let k = 0; k < ninsns; k++) insns.push(readInsn(r, v7, what + ' insn ' + k));
+  readFuncText(r, 2, CLAUSE_MAX, what + ' requires');
+  readFuncText(r, 2, CLAUSE_MAX, what + ' ensures');
+  return { name, nameBytes, nparams, ret, nvregs, vtype, blocks, insns };
+}
+
+// ------------------------------------------------------------ validation
+function canonicalConst(t, imm) {
+  if (t === T_BOOL) return imm === 0n || imm === 1n;
+  if (t === T_F64) return true;
+  if (t === T_F32) return imm >> 32n === 0n; // M:f32upper
+  const w = BigInt(intWidth(t));
+  if (isSigned(t)) return BigInt.asUintN(64, BigInt.asIntN(Number(w), imm)) === imm;
+  return imm >> w === 0n;
+}
+
+function validateFunc(u, fi) {
+  const f = u.funcs[fi];
+  const bad = (m) => refuse('INVALID', 'function ' + fi + ' (' + f.name + '): ' + m);
+  if (f.nparams > MAX_PARAMS) bad('nparams ' + f.nparams);
+  if (f.nparams > f.nvregs) bad('nparams exceeds nvregs');
+  if (!(f.ret === T_VOID || isValue(f.ret))) bad('return tag ' + f.ret);
+  f.vtype.forEach((t, k) => { if (!isValue(t)) bad('register ' + k + ' tag ' + t); });
+  if (f.blocks.length === 0 || f.insns.length === 0) bad('empty body');
+  let next = 0;
+  f.blocks.forEach((b, k) => {
+    if (b.first !== next || b.count === 0) bad('block ' + k + ' does not partition');
+    next = b.first + b.count;
+    if (next > f.insns.length) bad('block ' + k + ' past end');
+  });
+  if (next !== f.insns.length) bad('blocks do not cover instructions');
+  f.blocks.forEach((b, k) => {
+    for (let j = b.first; j < b.first + b.count; j++) {
+      const last = j === b.first + b.count - 1;
+      if (isTerm(f.insns[j].op) !== last) bad('block ' + k + ' terminator placement');
+    }
+  });
+
+  const ty = (r, k) => {
+    if (r === NONE || r >= f.nvregs) bad(k + ' register ' + r + ' outside table');
+    return f.vtype[r];
+  };
+  const region = (g, k) => {
+    if (g === NONE || g >= u.regions.length) bad(k + 'region ' + g + ' outside table');
+    const rg = u.regions[g];
+    if (rg.cls === 1 && rg.owner !== fi) bad(k + 'region ' + rg.name + ' owned by function ' + rg.owner); // M:owner
+    return rg;
+  };
+  const blk = (b) => { if (b === NONE || b >= f.blocks.length) bad('branch target ' + b); };
+
+  f.insns.forEach((ins, j) => {
+    const at = 'insn ' + j + ' ';
+    switch (ins.op) {
+      case OP.CONST: if (!canonicalConst(ty(ins.dst, at + 'dst'), ins.imm)) bad(at + 'non-canonical constant'); break;
+      case OP.MOV: if (ty(ins.dst, at + 'dst') !== ty(ins.a, at + 'a')) bad(at + 'MOV type'); break;
+      case OP.BIN: {
+        const t = ty(ins.dst, at + 'dst');
+        if (ty(ins.a, at + 'a') !== t) bad(at + 'BIN a type');
+        const tb = ty(ins.b, at + 'b');
+        const s = ins.sub;
+        if (s < 1 || s > 10) bad(at + 'BIN sub ' + s);
+        if (isFloat(t)) { if (s > 4 || tb !== t) bad(at + 'float BIN sub ' + s); }
+        else if (t === T_BOOL) { if (s < 6 || s > 8 || tb !== t) bad(at + 'bool BIN sub ' + s); }
+        else if (s >= 9) { if (!isInt(tb)) bad(at + 'shift amount type'); }
+        else if (tb !== t) bad(at + 'BIN b type');
+        break;
+      }
+      case OP.UN: {
+        const t = ty(ins.dst, at + 'dst');
+        if (ty(ins.a, at + 'a') !== t) bad(at + 'UN type');
+        const ok = ins.sub === 1 ? isInt(t) || isFloat(t) : ins.sub === 2 ? isInt(t) : ins.sub === 3 ? t === T_BOOL : false;
+        if (!ok) bad(at + 'UN sub ' + ins.sub + ' on tag ' + t);
+        break;
+      }
+      case OP.CMP:
+        if (ins.sub < 1 || ins.sub > 6) bad(at + 'CMP sub ' + ins.sub);
+        if (ty(ins.dst, at + 'dst') !== T_BOOL) bad(at + 'CMP dst not bool');
+        if (ty(ins.a, at + 'a') !== ty(ins.b, at + 'b')) bad(at + 'CMP operand types');
+        break;
+      case OP.CAST: {
+        const d = ty(ins.dst, at + 'dst'), s = ty(ins.a, at + 'a');
+        if (!(isInt(d) || isFloat(d)) || !(isInt(s) || isFloat(s))) bad(at + 'CAST types');
+        break;
+      }
+      case OP.CALL: {
+        if (ins.callee === NONE || ins.callee >= fi) bad(at + 'callee ' + ins.callee + ' is not an earlier function');
+        const g = u.funcs[ins.callee];
+        if (ins.args.length !== g.nparams) bad(at + 'CALL arity');
+        ins.args.forEach((a, k) => { if (ty(a, at + 'arg') !== g.vtype[k]) bad(at + 'CALL arg ' + k + ' type'); });
+        if (g.ret === T_VOID) { if (ins.dst !== NONE) bad(at + 'void call with destination'); }
+        else if (ty(ins.dst, at + 'dst') !== g.ret) bad(at + 'CALL result type');
+        break;
+      }
+      case OP.TRAP: if (ins.imm < 1n || ins.imm > 14n) bad(at + 'trap code ' + ins.imm); break;
+      case OP.BR: blk(ins.blkT); break;
+      case OP.CBR:
+        if (ty(ins.a, at + 'cond') !== T_BOOL) bad(at + 'CBR condition not bool');
+        blk(ins.blkT); blk(ins.blkF);
+        break;
+      case OP.RET:
+        if (f.ret === T_VOID) { if (ins.a !== NONE) bad(at + 'value returned from void'); }
+        else if (ty(ins.a, at + 'a') !== f.ret) bad(at + 'RET type');
+        break;
+      case OP.RLOAD: {
+        const t = ty(ins.dst, at + 'dst');
+        const rg = region(ins.rg, at);
+        if (!isInt(ty(ins.b, at + 'index'))) bad(at + 'index type');
+        if (t !== rg.tag) bad(at + 'RLOAD element type');
+        break;
+      }
+      case OP.RSTORE: {
+        const rg = region(ins.rg, at);
+        if (rg.cls === 2) bad(at + 'RSTORE into read-only text ' + rg.name); // M:textro
+        if (!isInt(ty(ins.b, at + 'index'))) bad(at + 'index type');
+        if (ty(ins.c, at + 'src') !== rg.tag) bad(at + 'RSTORE element type');
+        break;
+      }
+      case OP.BITCAST: {
+        const d = ty(ins.dst, at + 'dst'), s = ty(ins.a, at + 'src');
+        if (BITCAST_SET[d] === undefined || BITCAST_SET[d] !== BITCAST_SET[s]) bad(at + 'BITCAST ' + s + '->' + d);
+        break;
+      }
+      case OP.RINIT: {
+        const rg = region(ins.rg, at);
+        if (rg.cls !== 1) bad(at + 'RINIT of non-local region ' + rg.name);
+        if (ty(ins.a, at + 'init') !== rg.tag) bad(at + 'RINIT type');
+        break;
+      }
+      default: bad(at + 'opcode ' + ins.op);
+    }
+  });
+  definiteAssignment(u, f, fi, bad);
+}
+
+// Uses and definitions of one instruction (registers only).
+function usesOf(ins) {
+  switch (ins.op) {
+    case OP.MOV: case OP.UN: case OP.CAST: case OP.BITCAST: case OP.RET: case OP.CBR: case OP.RINIT:
+      return ins.a === NONE ? [] : [ins.a];
+    case OP.BIN: case OP.CMP: return [ins.a, ins.b];
+    case OP.CALL: return ins.args;
+    case OP.RLOAD: return [ins.b];
+    case OP.RSTORE: return [ins.b, ins.c];
+    default: return [];
+  }
+}
+function defOf(ins) {
+  switch (ins.op) {
+    case OP.CONST: case OP.MOV: case OP.BIN: case OP.UN: case OP.CMP: case OP.CAST:
+    case OP.RLOAD: case OP.BITCAST: case OP.CALL:
+      return ins.dst === NONE ? -1 : ins.dst;
+    default: return -1;
+  }
+}
+
+// Greatest-fixed-point must-analysis over registers and local-region
+// initialization bits (spec 10.2). State vector: nvregs register bits, then
+// one bit per region (only class-1 regions owned by this function matter).
+function definiteAssignment(u, f, fi, bad) {
+  const nb = f.blocks.length, nr = f.nvregs, ng = u.regions.length, n = nr + ng;
+  const entry = new Uint8Array(n);
+  for (let k = 0; k < f.nparams; k++) entry[k] = 1;
+  const succ = f.blocks.map((b) => {
+    const t = f.insns[b.first + b.count - 1];
+    return t.op === OP.BR ? [t.blkT] : t.op === OP.CBR ? [t.blkT, t.blkF] : [];
+  });
+  const reach = new Uint8Array(nb);
+  const stack = [0];
+  reach[0] = 1;
+  while (stack.length) {
+    for (const s of succ[stack.pop()]) if (!reach[s]) { reach[s] = 1; stack.push(s); }
+  }
+  const preds = Array.from({ length: nb }, () => []);
+  succ.forEach((ss, b) => { if (reach[b]) for (const s of ss) preds[s].push(b); });
+
+  const transfer = (b, inState, check) => {
+    const st = Uint8Array.from(inState);
+    const blk = f.blocks[b];
+    for (let j = blk.first; j < blk.first + blk.count; j++) {
+      const ins = f.insns[j];
+      if (check) {
+        for (const r of usesOf(ins)) if (!st[r]) bad('insn ' + j + ' uses register ' + r + ' before definite assignment');
+        if ((ins.op === OP.RLOAD || ins.op === OP.RSTORE) && u.regions[ins.rg].cls === 1 && !st[nr + ins.rg]) { // M:initcheck
+          bad('insn ' + j + ' accesses local region ' + u.regions[ins.rg].name + ' before RINIT on every path');
+        }
+      }
+      const d = defOf(ins);
+      if (d >= 0) st[d] = 1;
+      if (ins.op === OP.RINIT) st[nr + ins.rg] = 1;
+    }
+    return st;
+  };
+
+  // Reachable blocks start at TOP (everything assigned) and only shrink.
+  const out = f.blocks.map((_, b) => (reach[b] ? new Uint8Array(n).fill(1) : null));
+  const inOf = (b) => {
+    if (!reach[b]) return entry; // unreachable: validated from the entry state
+    const st = b === 0 ? Uint8Array.from(entry) : new Uint8Array(n).fill(1);
+    for (const p of preds[b]) {
+      const o = out[p];
+      for (let k = 0; k < n; k++) st[k] &= o[k]; // M:meet
+    }
+    return st;
+  };
+  let changed = true;
+  while (changed) {
+    changed = false;
+    for (let b = 0; b < nb; b++) {
+      if (!reach[b]) continue;
+      const o = transfer(b, inOf(b), false);
+      for (let k = 0; k < n; k++) if (o[k] !== out[b][k]) { out[b] = o; changed = true; break; }
+    }
+  }
+  for (let b = 0; b < nb; b++) transfer(b, inOf(b), true);
+}
+
+function validateUnit(u) {
+  const bad = (m) => refuse('INVALID', m);
+  const module = new Set();
+  u.regions.forEach((rg, i) => {
+    if (rg.cls === 1) {
+      if (rg.owner === NONE || rg.owner >= u.funcs.length) bad('region ' + i + ' local owner ' + rg.owner);
+    } else {
+      if (rg.owner !== NONE) bad('region ' + i + ' module owner ' + rg.owner);
+      if (module.has(rg.name)) bad('duplicate module region ' + rg.name);
+      module.add(rg.name);
+    }
+  });
+  const locals = new Set();
+  u.regions.forEach((rg) => {
+    if (rg.cls !== 1) return;
+    if (module.has(rg.name)) bad('local region ' + rg.name + ' shadows a module region');
+    const key = rg.owner + '/' + rg.name;
+    if (locals.has(key)) bad('duplicate local region ' + rg.name + ' in function ' + rg.owner);
+    locals.add(key);
+  });
+  const exportsSeen = new Set();
+  const exp = (name) => { if (exportsSeen.has(name)) bad('export name collision ' + JSON.stringify(name)); exportsSeen.add(name); }; // M:export
+  if (u.version === 7) {
+    exp('memory');
+    u.regions.forEach((rg) => { if (rg.cls !== 1) exp('region.' + rg.name); });
+  }
+  u.funcs.forEach((f) => exp(f.name));
+}
+
+function usesV7(u) {
+  if (u.regions.length > 0) return true;
+  for (const f of u.funcs) {
+    if (isFloat(f.ret) || f.vtype.some(isFloat)) return true;
+    if (f.insns.some((i) => i.op >= 30 && i.op <= 33)) return true;
+  }
+  return false;
+}
+
+function decode(buf) {
+  if (buf.length > V7_INPUT_MAX) refuse('CAPACITY', 'input ' + buf.length + ' bytes');
+  const headIsV7 = buf.length >= 8 && MAGIC.every((m, i) => buf[i] === m) && buf[7] === 7;
+  if (buf.length > V1_INPUT_MAX && !headIsV7) refuse('CAPACITY', 'input ' + buf.length + ' bytes');
+  const r = new Reader(buf);
+  for (let i = 0; i < 7; i++) if (r.u8('magic') !== MAGIC[i]) refuse('MAGIC', 'byte ' + i);
+  const version = r.u8('version');
+  if (version !== 1 && version !== 7) refuse('VERSION', 'version ' + version);
+  const v7 = version === 7;
+  const u = { version, regions: [], funcs: [] };
+  if (v7) {
+    const ns = r.u8('nstructs');
+    if (ns > MAX_STRUCTS) refuse('CAPACITY', 'nstructs ' + ns);
+    if (ns > 0) refuse('UNSUPPORTED_TAG', 'struct table (' + ns + ' structs)');
+    const ng = r.u16('nregions');
+    if (ng > MAX_REGIONS) refuse('INVALID', 'nregions ' + ng);
+    for (let i = 0; i < ng; i++) u.regions.push(readRegion(r, i));
+  }
+  const nf = r.u16('nfuncs');
+  if (nf > MAX_FUNCS) refuse('CAPACITY', 'nfuncs ' + nf);
+  for (let i = 0; i < nf; i++) {
+    u.funcs.push(readFunc(r, v7, i));
+    validateFunc(u, i);
+  }
+  validateUnit(u);
+  if (r.pos !== buf.length) refuse('TRAILING', (buf.length - r.pos) + ' bytes after last function'); // M:trailing
+  if (v7 && !usesV7(u)) refuse('VERSION', 'gratuitous v7: no region, float or memory opcode'); // M:gratuitous
+  return u;
+}
+
+// ----------------------------------------------------------- interpreter
+// Integer and bool registers hold their mathematical value as a BigInt
+// (unsigned 0..2^w-1, signed sign-extended, bool 0/1). Float registers hold
+// their raw IEEE bits as a BigInt so CONST/MOV/RLOAD/RSTORE/RINIT/BITCAST
+// transport NaN payloads exactly; arithmetic converts through a DataView.
+class Trap { constructor(code) { this.code = code; } }
+const trap = (code) => { throw new Trap(code); };
+
+const scratch = new DataView(new ArrayBuffer(8));
+function f32val(bits) { scratch.setUint32(0, Number(bits), true); return scratch.getFloat32(0, true); }
+function f32bits(x) { scratch.setFloat32(0, x, true); return BigInt(scratch.getUint32(0, true)); }
+function f64val(bits) { scratch.setBigUint64(0, bits, true); return scratch.getFloat64(0, true); }
+function f64bits(x) { scratch.setFloat64(0, x, true); return scratch.getBigUint64(0, true); }
+const fval = (t, bits) => (t === T_F32 ? f32val(bits) : f64val(bits));
+const fbits = (t, x) => (t === T_F32 ? f32bits(Math.fround(x)) : f64bits(x));
+
+function intMin(t) { return isSigned(t) ? -(1n << BigInt(intWidth(t) - 1)) : 0n; }
+function intMax(t) { return isSigned(t) ? (1n << BigInt(intWidth(t) - 1)) - 1n : (1n << BigInt(intWidth(t))) - 1n; }
+function wrapInt(t, v) { const w = intWidth(t); return isSigned(t) ? BigInt.asIntN(w, v) : BigInt.asUintN(w, v); }
+function checked(t, v) {
+  if (!isSigned(t)) return BigInt.asUintN(intWidth(t), v);
+  if (v < intMin(t) || v > intMax(t)) trap(1);
+  return v;
+}
+
+// Integer to f32 with one rounding (nearest, ties to even), from the exact
+// BigInt. Converting through a double first could round twice.
+function bigToF32Bits(v) {
+  const neg = v < 0n;
+  let m = neg ? -v : v;
+  let x;
+  if (m < (1n << 24n)) x = Number(m);
+  else {
+    const shift = m.toString(2).length - 24;
+    let top = m >> BigInt(shift);
+    const rest = m - (top << BigInt(shift));
+    const half = 1n << BigInt(shift - 1);
+    if (rest > half || (rest === half && (top & 1n) === 1n)) top += 1n;
+    x = Number(top) * 2 ** shift; // M:i2f32
+  }
+  return f32bits(neg ? -x : x);
+}
+
+function castValue(dt, st, v) {
+  if (isInt(st) && isInt(dt)) {
+    if (v < intMin(dt) || v > intMax(dt)) trap(5); // M:cast5
+    return v;
+  }
+  if (isFloat(st) && isInt(dt)) {
+    const x = fval(st, v);
+    if (Number.isNaN(x)) return 0n; // M:satnan
+    if (x === Infinity) return intMax(dt);
+    if (x === -Infinity) return intMin(dt);
+    const t = BigInt(Math.trunc(x));
+    if (t < intMin(dt)) return intMin(dt); // M:satlow
+    if (t > intMax(dt)) return intMax(dt); // M:sathigh
+    return t;
+  }
+  if (isInt(st) && isFloat(dt)) return dt === T_F32 ? bigToF32Bits(v) : f64bits(Number(v));
+  if (st === dt) return v;
+  return fbits(dt, fval(st, v));
+}
+
+function bitcastValue(dt, st, v) {
+  let bits;
+  if (isFloat(st)) bits = v;
+  else bits = BigInt.asUintN(intWidth(st), v);
+  if (isFloat(dt)) return bits;
+  return isSigned(dt) ? BigInt.asIntN(intWidth(dt), bits) : bits; // M:bcsign
+}
+
+function binInt(t, sub, a, b, tb) {
+  const w = intWidth(t);
+  switch (sub) {
+    case 1: return checked(t, a + b);
+    case 2: return checked(t, a - b);
+    case 3: return checked(t, a * b);
+    case 4:
+      if (b === 0n) trap(2);
+      return checked(t, a / b);
+    case 5:
+      if (b === 0n) trap(2);
+      return a % b;
+    case 6: return a & b;
+    case 7: return a | b;
+    case 8: return a ^ b;
+    case 9:
+      if (b < 0n || b >= BigInt(w)) trap(7);
+      return isSigned(t) ? checked(t, a << b) : BigInt.asUintN(w, a << b);
+    case 10:
+      if (b < 0n || b >= BigInt(w)) trap(7);
+      return a >> b;
+  }
+  throw new Error('unreachable BIN ' + sub + ' ' + tb);
+}
+
+function binFloat(t, sub, a, b) {
+  const x = fval(t, a), y = fval(t, b);
+  const r = sub === 1 ? x + y : sub === 2 ? x - y : sub === 3 ? x * y : x / y;
+  return fbits(t, r);
+}
+
+function cmpValues(sub, x, y) {
+  switch (sub) {
+    case 1: return x === y;
+    case 2: return !(x === y);
+    case 3: return x < y;
+    case 4: return x <= y;
+    case 5: return x > y;
+    case 6: return x >= y;
+  }
+  return false;
+}
+
+class Region {
+  constructor(rg) {
+    this.rg = rg;
+    this.w = elemBytes(rg.tag);
+    this.mem = new Uint8Array(rg.count * this.w);
+    if (rg.cls === 2) this.mem.set(rg.init);
+  }
+  index(i) {
+    if (i < 0n || i >= BigInt(this.rg.count)) trap(3); // M:bounds
+    return Number(i) * this.w;
+  }
+  elemBits(v) { return isFloat(this.rg.tag) ? v : BigInt.asUintN(8 * this.w, v); }
+  load(i) {
+    const off = this.index(i);
+    let bits = 0n;
+    for (let k = this.w - 1; k >= 0; k--) bits = (bits << 8n) | BigInt(this.mem[off + k]);
+    const t = this.rg.tag;
+    if (isFloat(t)) return bits;
+    return isSigned(t) ? BigInt.asIntN(8 * this.w, bits) : bits;
+  }
+  writeAt(off, bits) {
+    for (let k = 0; k < this.w; k++) { this.mem[off + k] = Number(bits & 0xffn); bits >>= 8n; }
+  }
+  store(i, v) { this.writeAt(this.index(i), this.elemBits(v)); }
+  fill(v) {
+    this.writeAt(0, this.elemBits(v));
+    for (let have = this.w; have < this.mem.length; have *= 2) {
+      this.mem.copyWithin(have, 0, Math.min(have, this.mem.length - have));
+    }
+  }
+  hex() { return Buffer.from(this.mem).toString('hex'); }
+}
+
+class Instance {
+  constructor(u) {
+    this.u = u;
+    this.steps = 0;
+    this.module = u.regions.map((rg) => (rg.cls === 1 ? null : new Region(rg)));
+  }
+  call(fi, args) {
+    const u = this.u, f = u.funcs[fi];
+    const regs = new Array(f.nvregs).fill(0n);
+    for (let k = 0; k < args.length; k++) regs[k] = args[k];
+    // Fresh local storage on every invocation (spec 10.1 class 1).
+    const local = u.regions.map((rg) => (rg.cls === 1 && rg.owner === fi ? new Region(rg) : null));
+    const reg = (g) => this.module[g] || local[g];
+    let b = 0;
+    for (;;) {
+      const blk = f.blocks[b];
+      let nextBlock = -1;
+      for (let j = blk.first; j < blk.first + blk.count; j++) {
+        if (++this.steps > STEP_LIMIT) throw new Error('step limit ' + STEP_LIMIT + ' exceeded');
+        const ins = f.insns[j];
+        const T = (r) => f.vtype[r];
+        switch (ins.op) {
+          case OP.CONST: regs[ins.dst] = isSigned(T(ins.dst)) ? BigInt.asIntN(intWidth(T(ins.dst)), ins.imm) : ins.imm; break;
+          case OP.MOV: regs[ins.dst] = regs[ins.a]; break;
+          case OP.BIN: {
+            const t = T(ins.dst);
+            if (isFloat(t)) regs[ins.dst] = binFloat(t, ins.sub, regs[ins.a], regs[ins.b]);
+            else regs[ins.dst] = binInt(t, ins.sub, regs[ins.a], regs[ins.b], T(ins.b));
+            break;
+          }
+          case OP.UN: {
+            const t = T(ins.dst), a = regs[ins.a];
+            if (ins.sub === 1) {
+              if (t === T_F32) regs[ins.dst] = a ^ 0x80000000n; // M:fneg
+              else if (t === T_F64) regs[ins.dst] = a ^ 0x8000000000000000n;
+              else regs[ins.dst] = isSigned(t) ? checked(t, -a) : wrapInt(t, -a);
+            } else if (ins.sub === 2) regs[ins.dst] = wrapInt(t, ~a);
+            else regs[ins.dst] = 1n - a;
+            break;
+          }
+          case OP.CMP: {
+            const t = T(ins.a);
+            const x = isFloat(t) ? fval(t, regs[ins.a]) : regs[ins.a];
+            const y = isFloat(t) ? fval(t, regs[ins.b]) : regs[ins.b];
+            regs[ins.dst] = cmpValues(ins.sub, x, y) ? 1n : 0n;
+            break;
+          }
+          case OP.CAST: regs[ins.dst] = castValue(T(ins.dst), T(ins.a), regs[ins.a]); break;
+          case OP.CALL: {
+            const r = this.call(ins.callee, ins.args.map((a) => regs[a]));
+            if (ins.dst !== NONE) regs[ins.dst] = r;
+            break;
+          }
+          case OP.TRAP: trap(Number(ins.imm)); break;
+          case OP.BR: nextBlock = ins.blkT; break;
+          case OP.CBR: nextBlock = regs[ins.a] === 1n ? ins.blkT : ins.blkF; break;
+          case OP.RET: return ins.a === NONE ? null : regs[ins.a];
+          case OP.RLOAD: regs[ins.dst] = reg(ins.rg).load(regs[ins.b]); break;
+          case OP.RSTORE: reg(ins.rg).store(regs[ins.b], regs[ins.c]); break;
+          case OP.BITCAST: regs[ins.dst] = bitcastValue(T(ins.dst), T(ins.a), regs[ins.a]); break;
+          case OP.RINIT: reg(ins.rg).fill(regs[ins.a]); break;
+          default: throw new Error('unreachable opcode ' + ins.op);
+        }
+      }
+      b = nextBlock;
+    }
+  }
+}
+
+// ------------------------------------------------------------------- CLI
+function usage(msg) {
+  process.stderr.write('oracle: ' + msg + '\n' +
+    'usage: oracle.js check UNIT\n       oracle.js run [--codes] UNIT SCRIPT\n');
+  process.exit(2);
+}
+
+function readFile(p) {
+  try { return fs.readFileSync(p); } catch (e) { usage('cannot read ' + p + ': ' + e.code); }
+}
+
+function decodeOrRefusal(buf) {
+  try { return { unit: decode(buf) }; } catch (e) {
+    if (e instanceof Refusal) return { refusal: e };
+    throw e;
+  }
+}
+
+function parseArg(t, s) {
+  if (isFloat(t)) {
+    const digits = t === T_F32 ? 8 : 16;
+    if (!new RegExp('^0x[0-9a-fA-F]{' + digits + '}$').test(s)) return null;
+    return BigInt(s);
+  }
+  if (!/^-?[0-9]+$/.test(s)) return null;
+  const v = BigInt(s);
+  if (t === T_BOOL) return v === 0n || v === 1n ? v : null;
+  return v >= intMin(t) && v <= intMax(t) ? v : null;
+}
+
+function formatValue(t, v) {
+  if (t === T_VOID) return 'void';
+  if (t === T_F32) return '0x' + v.toString(16).padStart(8, '0');
+  if (t === T_F64) return '0x' + v.toString(16).padStart(16, '0');
+  return v.toString(10);
+}
+
+function main(argv) {
+  const codes = argv.includes('--codes');
+  const args = argv.filter((a) => a !== '--codes');
+  const cmd = args[0];
+  if (cmd === 'check' && args.length === 2 && !codes) {
+    const res = decodeOrRefusal(readFile(args[1]));
+    if (res.refusal) {
+      process.stdout.write('REFUSE ' + res.refusal.cls + ' ' + res.refusal.detail + '\n');
+      return 1;
+    }
+    process.stdout.write('ACCEPT v' + res.unit.version + '\n');
+    return 0;
+  }
+  if (cmd === 'run' && args.length === 3) {
+    const res = decodeOrRefusal(readFile(args[1]));
+    if (res.refusal) {
+      process.stderr.write('REFUSE ' + res.refusal.cls + ' ' + res.refusal.detail + '\n');
+      return 1;
+    }
+    const u = res.unit;
+    const script = readFile(args[2]).toString('utf8').split('\n');
+    const inst = new Instance(u);
+    const out = [];
+    const flush = () => { if (out.length) process.stdout.write(out.join('')); out.length = 0; };
+    for (let ln = 0; ln < script.length; ln++) {
+      const line = script[ln].trim();
+      if (line === '' || line.startsWith('#')) continue;
+      const w = line.split(/\s+/);
+      const bad = (m) => { flush(); usage('script line ' + (ln + 1) + ': ' + m); };
+      if (w[0] === 'call') {
+        const fi = u.funcs.findIndex((f) => f.name === w[1]);
+        if (fi < 0) bad('no function ' + w[1]);
+        const f = u.funcs[fi];
+        if (w.length - 2 !== f.nparams) bad('expected ' + f.nparams + ' arguments');
+        const vals = w.slice(2).map((s, k) => {
+          const v = parseArg(f.vtype[k], s);
+          if (v === null) bad('argument ' + s + ' does not fit tag ' + f.vtype[k]);
+          return v;
+        });
+        try {
+          const r = inst.call(fi, vals); // M:callsite
+          out.push(f.name + ' = ' + formatValue(f.ret, r) + '\n');
+        } catch (e) {
+          if (!(e instanceof Trap)) { flush(); process.stderr.write('oracle: ' + e.message + '\n'); return 3; }
+          out.push(f.name + ' TRAP' + (codes ? ' code=' + e.code : '') + '\n');
+        }
+      } else if (w[0] === 'region' && w.length === 2) {
+        const g = u.regions.findIndex((rg) => rg.cls !== 1 && rg.name === w[1]);
+        if (g < 0) bad('no module region ' + w[1]);
+        out.push('region ' + w[1] + ' ' + inst.module[g].hex() + '\n');
+      } else bad('unknown command ' + JSON.stringify(line));
+    }
+    flush();
+    return 0;
+  }
+  usage('bad arguments');
+}
+
+process.exitCode = main(process.argv.slice(2));
diff --git a/seed/wasm/v7/test-oracle.sh b/seed/wasm/v7/test-oracle.sh
new file mode 100755
index 000000000..a08bb14b2
--- /dev/null
+++ b/seed/wasm/v7/test-oracle.sh
@@ -0,0 +1,208 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: Apache-2.0
+# Self-test of the independent OSC IR v7 oracle (seed/wasm/v7/oracle.js).
+#
+# 1. writer.js emits every fixture unit into $BUILD/v7-oracle/units.
+# 2. oracle.js check / run results are compared with the hand-written
+#    expectations in seed/wasm/v7/expect/ (check.txt, run/*.script + .out).
+# 3. Usage/exit-code controls and a source-independence check.
+# 4. Mutants: patched copies of oracle.js in $BUILD/v7-oracle/mutants/ (each
+#    replaces the one line tagged `// M:`); every mutant must produce
+#    at least one mismatch against the same expectations.
+#
+# Exit 0 PASS, 1 FAIL.
+set -euo pipefail
+
+here=$(cd "$(dirname "$0")" && pwd)
+root=$(cd "$here/../../.." && pwd)
+out=${BUILD:-$root/build}/v7-oracle
+units=$out/units
+expect=$here/expect
+fail=0
+note() { printf '%s\n' "$*"; }
+bad() { note "FAIL: $*"; fail=1; }
+
+rm -rf "$out"
+mkdir -p "$units" "$out/runs"
+node "$here/writer.js" "$units" >/dev/null
+
+# suite ORACLE STOP_AT_FIRST -> prints mismatches to stdout, returns count via $mism
+suite() {
+  local oracle=$1 first=$2 name want got rc wantrc u s base
+  mism=0
+  checks=0
+  runs=0
+  while IFS=$'\t' read -r name want; do
+    case $name in ''|'#'*) continue ;; esac
+    checks=$((checks + 1))
+    set +e
+    got=$(node "$oracle" check "$units/$name.unit" 2>&1)
+    rc=$?
+    set -e
+    wantrc=1
+    [ "${want%% *}" = ACCEPT ] && wantrc=0
+    if [ "$(printf '%s' "$got" | cut -d' ' -f1-2)" != "$want" ] || [ "$rc" != "$wantrc" ]; then
+      note "  mismatch check $name: want '$want' rc $wantrc, got '$got' rc $rc"
+      mism=$((mism + 1))
+      [ "$first" = 1 ] && return 0
+    fi
+  done < "$expect/check.txt"
+  for s in "$expect"/run/*.script; do
+    base=$(basename "$s" .script)
+    u=$units/$base.unit
+    runs=$((runs + 1))
+    set +e
+    node "$oracle" run --codes "$u" "$s" > "$out/runs/$base.got" 2> "$out/runs/$base.err"
+    rc=$?
+    set -e
+    if [ "$rc" != 0 ] || ! cmp -s "$out/runs/$base.got" "$expect/run/$base.out"; then
+      note "  mismatch run $base (rc $rc)"
+      mism=$((mism + 1))
+      [ "$first" = 1 ] && return 0
+    fi
+    if [ -f "$expect/run/$base.plain" ]; then
+      runs=$((runs + 1))
+      set +e
+      node "$oracle" run "$u" "$s" > "$out/runs/$base.plain.got" 2>&1
+      rc=$?
+      set -e
+      if [ "$rc" != 0 ] || ! cmp -s "$out/runs/$base.plain.got" "$expect/run/$base.plain"; then
+        note "  mismatch run (plain) $base (rc $rc)"
+        mism=$((mism + 1))
+        [ "$first" = 1 ] && return 0
+      fi
+    fi
+  done
+  return 0
+}
+
+# --- fixture set == expectation set (no silently skipped unit)
+comm -3 <(cd "$units" && ls -- *.unit | sed 's/\.unit$//' | sort) \
+        <(grep -v '^#' "$expect/check.txt" | cut -f1 | sed '/^$/d' | sort) > "$out/setdiff"
+if [ -s "$out/setdiff" ]; then bad "fixture set differs from expect/check.txt:"; cat "$out/setdiff"; fi
+for s in "$expect"/run/*.script; do
+  [ -f "$units/$(basename "$s" .script).unit" ] || bad "run script without unit: $s"
+  [ -f "${s%.script}.out" ] || bad "run script without .out: $s"
+done
+
+# --- unpatched oracle: zero mismatches
+suite "$here/oracle.js" 0
+[ "$mism" = 0 ] || bad "oracle: $mism mismatches"
+nchecks=$checks nruns=$runs
+note "oracle: checks=$nchecks runs=$nruns mismatches=$mism"
+
+# --- usage and exit-code controls
+expect_rc() { # WANT_RC DESCRIPTION CMD...
+  local want=$1 what=$2 rc
+  shift 2
+  set +e
+  "$@" > "$out/ctl.out" 2> "$out/ctl.err"
+  rc=$?
+  set -e
+  [ "$rc" = "$want" ] || bad "control '$what': rc $rc, want $want"
+}
+ctl=$out/ctl
+mkdir -p "$ctl"
+printf 'call nosuch\n' > "$ctl/unknown.s"
+printf 'call get\n' > "$ctl/arity.s"
+printf 'call set 0 256\n' > "$ctl/range.s"
+printf 'call set 0 -1\n' > "$ctl/neg.s"
+printf 'call set 0x1 0x3f8000\n' > "$ctl/floatarg.s"
+printf 'jump get 0\n' > "$ctl/verb.s"
+printf 'region nosuch\n' > "$ctl/region.s"
+printf 'call get 0\n' > "$ctl/ok.s"
+O=$here/oracle.js
+expect_rc 2 'check without unit' node "$O" check
+expect_rc 2 'unknown command' node "$O" frob "$units/rt_u8.unit"
+expect_rc 2 'run without script' node "$O" run --codes "$units/rt_u8.unit"
+expect_rc 2 'missing unit file' node "$O" check "$units/does-not-exist.unit"
+expect_rc 2 'unknown function' node "$O" run "$units/rt_u8.unit" "$ctl/unknown.s"
+expect_rc 2 'wrong arity' node "$O" run "$units/rt_u8.unit" "$ctl/arity.s"
+expect_rc 2 'u8 argument 256' node "$O" run "$units/rt_u8.unit" "$ctl/range.s"
+expect_rc 2 'u8 argument -1' node "$O" run "$units/rt_u8.unit" "$ctl/neg.s"
+expect_rc 2 'short float argument' node "$O" run "$units/rt_f32.unit" "$ctl/floatarg.s"
+expect_rc 2 'unknown script verb' node "$O" run "$units/rt_u8.unit" "$ctl/verb.s"
+expect_rc 2 'unknown region' node "$O" run "$units/rt_u8.unit" "$ctl/region.s"
+expect_rc 1 'run of refused unit' node "$O" run "$units/inv_missing_init.unit" "$ctl/ok.s"
+[ -s "$out/ctl.out" ] && bad 'run of refused unit wrote stdout'
+grep -q '^REFUSE INVALID ' "$out/ctl.err" || bad 'run of refused unit: no REFUSE on stderr'
+expect_rc 0 '--codes before verb' node "$O" --codes run "$units/rt_u8.unit" "$ctl/ok.s"
+[ "$(cat "$out/ctl.out")" = 'get = 0' ] || bad "--codes before verb printed '$(cat "$out/ctl.out")'"
+
+# --- independence: neither file loads the other or any repo producer/backend
+for f in oracle.js writer.js; do
+  reqs=$(grep -v '^ *//' "$here/$f" | grep -o "require([^)]*)" | sort -u | tr '\n' ' ')
+  case $f in
+    oracle.js) [ "$reqs" = "require('fs') " ] || bad "$f requires: $reqs" ;;
+    writer.js) [ "$reqs" = "require('fs') require('path') " ] || bad "$f requires: $reqs" ;;
+  esac
+done
+# Outside comments, neither file names a sibling implementation.
+for pair in 'oracle.js:writer\.js' 'writer.js:oracle\.js'; do
+  f=${pair%%:*}
+  if grep -v '^ *//' "$here/$f" | grep -q "irwasm\|omc\.om\|osc_ir\|${pair#*:}"; then
+    bad "$f names a sibling implementation outside comments"
+  fi
+done
+
+# A mutant "caught" against a failing baseline proves nothing.
+if [ "$fail" != 0 ]; then
+  note "V7ORACLE FAIL checks=$nchecks runs=$nruns mutants=NOT_RUN (baseline failed)"
+  exit 1
+fi
+
+# --- mutants
+mutants=$(cat <<'EOF'
+bounds	    if (i < 0n) trap(3);
+bounds:off1	    if (i < 0n || i > BigInt(this.rg.count)) trap(3);
+initcheck	        if (false) {
+meet	      for (let k = 0; k < n; k++) st[k] |= o[k];
+satnan	    if (Number.isNaN(x)) return intMax(dt);
+satlow	    if (t < intMin(dt)) return 0n;
+sathigh	    if (t > intMax(dt)) return wrapInt(dt, t);
+owner	    void rg;
+textro	        void rg;
+callsite	          const r = new Instance(u).call(fi, vals);
+callsite:rollback	          const snap = inst.module.map((g) => g && g.mem.slice()); let r; try { r = inst.call(fi, vals); } catch (e) { inst.module.forEach((g, k) => { if (g) g.mem.set(snap[k]); }); throw e; }
+gratuitous	  void 0;
+f32upper	  if (t === T_F32) return true;
+i2f32	    x = Number(m);
+bcsign	  return bits;
+export	  const exp = () => {};
+trailing	  void 0;
+fneg	              if (t === T_F32) regs[ins.dst] = f32bits(-f32val(a));
+cast5	    if (false) trap(5);
+EOF
+)
+nm=0 caught=0
+mdir=$out/mutants
+while IFS=$'\t' read -r tag repl; do
+  marker=${tag%%:*}
+  mname=${tag/:/_}
+  nm=$((nm + 1))
+  hits=$(grep -c "// M:$marker\$" "$O" || true)
+  if [ "$hits" != 1 ]; then bad "mutant $mname: marker M:$marker found $hits times"; continue; fi
+  mkdir -p "$mdir/$mname"
+  MREPL=$repl MMARK="// M:$marker" node -e '
+    const fs = require("fs");
+    const lines = fs.readFileSync(process.argv[1], "utf8").split("\n");
+    const i = lines.findIndex((l) => l.endsWith(process.env.MMARK));
+    lines[i] = process.env.MREPL;
+    fs.writeFileSync(process.argv[2], lines.join("\n"));
+  ' "$O" "$mdir/$mname/oracle.js"
+  if cmp -s "$O" "$mdir/$mname/oracle.js"; then bad "mutant $mname: patch changed nothing"; continue; fi
+  suite "$mdir/$mname/oracle.js" 1 > "$mdir/$mname/log"
+  if [ "$mism" -gt 0 ]; then
+    caught=$((caught + 1))
+    note "mutant $mname: caught ($(sed 's/^  mismatch //' "$mdir/$mname/log" | head -n1))"
+  else
+    bad "mutant $mname: SURVIVED"
+  fi
+done <<< "$mutants"
+
+if [ "$fail" = 0 ] && [ "$caught" = "$nm" ]; then
+  note "V7ORACLE PASS checks=$nchecks runs=$nruns mutants=$caught/$nm"
+  exit 0
+fi
+note "V7ORACLE FAIL checks=$nchecks runs=$nruns mutants=$caught/$nm"
+exit 1
diff --git a/seed/wasm/v7/writer.js b/seed/wasm/v7/writer.js
new file mode 100755
index 000000000..cda8b2183
--- /dev/null
+++ b/seed/wasm/v7/writer.js
@@ -0,0 +1,453 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: Apache-2.0
+// Hand-written OSC IR v1/v7 byte writer and fixture set for the v7 oracle.
+//
+// Independent of seed/wasm/v7/oracle.js (no shared code: this file encodes,
+// the oracle decodes) and of every producer/backend. Wire layout from
+// spec/one-layer-format.md sections 3 and 10.
+//
+//   node writer.js OUTDIR      writes OUTDIR/.unit for every fixture
+//   require('./writer.js').encode(desc) -> Buffer
+//
+// desc = { version: 1|7, regions: [{ name, tag, cls, owner, count, init }],
+//          funcs: [{ name, params: [tag..], ret: tag, regs: [tag..] (after the
+//          params), blocks: [[insn..]..] }] }
+// Tags may be names (u8 .. f64) or numbers. Register operand 'none' = 0xFFFF.
+'use strict';
+
+const fs = require('fs');
+const path = require('path');
+
+const TAG = { void: 0, bool: 1, u8: 2, u16: 3, u32: 4, u64: 5, i8: 6, i16: 7, i32: 8, i64: 9, f32: 13, f64: 14 };
+const tagOf = (t) => (typeof t === 'number' ? t : TAG[t]);
+const BINSUB = { add: 1, sub: 2, mul: 3, div: 4, rem: 5, and: 6, or: 7, xor: 8, shl: 9, shr: 10 };
+const UNSUB = { neg: 1, bnot: 2, lnot: 3 };
+const CMPSUB = { eq: 1, ne: 2, lt: 3, le: 4, gt: 5, ge: 6 };
+
+class Bytes {
+  constructor() { this.a = []; }
+  u8(v) { if (v < 0 || v > 255) throw new Error('u8 ' + v); this.a.push(v); }
+  u16(v) { this.u8(v & 0xff); this.u8((v >>> 8) & 0xff); }
+  u32(v) { for (let k = 0; k < 4; k++) this.u8(Math.floor(v / 2 ** (8 * k)) % 256); }
+  u64(v) { let x = BigInt.asUintN(64, BigInt(v)); for (let k = 0; k < 8; k++) { this.u8(Number(x & 0xffn)); x >>= 8n; } }
+  raw(list) { for (const b of list) this.u8(b); }
+  str(s, lenWidth) {
+    const b = Buffer.from(s, 'latin1');
+    if (lenWidth === 2) this.u16(b.length); else this.u8(b.length);
+    this.raw(b);
+  }
+}
+
+const regField = (v) => (v === 'none' ? 0xffff : v);
+
+function insn(w, ins) {
+  const [op, ...f] = ins;
+  const r = (v) => w.u16(regField(v));
+  switch (op) {
+    case 'const': w.u8(1); r(f[0]); w.u64(f[1]); break;
+    case 'mov': w.u8(2); r(f[0]); r(f[1]); break;
+    case 'bin': w.u8(3); w.u8(typeof f[0] === 'number' ? f[0] : BINSUB[f[0]]); r(f[1]); r(f[2]); r(f[3]); break;
+    case 'un': w.u8(4); w.u8(typeof f[0] === 'number' ? f[0] : UNSUB[f[0]]); r(f[1]); r(f[2]); break;
+    case 'cmp': w.u8(5); w.u8(CMPSUB[f[0]]); r(f[1]); r(f[2]); r(f[3]); break;
+    case 'cast': w.u8(6); r(f[0]); r(f[1]); break;
+    case 'call': w.u8(11); r(f[0]); r(f[1]); w.u8(f.length - 2); f.slice(2).forEach(r); break;
+    case 'trap': w.u8(12); w.u8(f[0]); break;
+    case 'br': w.u8(13); r(f[0]); break;
+    case 'cbr': w.u8(14); r(f[0]); r(f[1]); r(f[2]); break;
+    case 'ret': w.u8(15); r(f[0]); break;
+    case 'rload': w.u8(30); r(f[0]); r(f[1]); r(f[2]); break;
+    case 'rstore': w.u8(31); r(f[0]); r(f[1]); r(f[2]); break;
+    case 'bitcast': w.u8(32); r(f[0]); r(f[1]); break;
+    case 'rinit': w.u8(33); r(f[0]); r(f[1]); break;
+    case 'raw': w.raw(f); break; // opcode byte and fields verbatim
+    default: throw new Error('writer: unknown insn ' + op);
+  }
+}
+
+const TERMS = new Set(['br', 'cbr', 'ret']);
+
+function func(w, fn, version) {
+  w.str(fn.name, 1);
+  const params = fn.params || [];
+  w.u8(fn.nparams === undefined ? params.length : fn.nparams);
+  w.u8(tagOf(fn.ret || 'void'));
+  const regs = params.concat(fn.regs || []);
+  w.u16(regs.length);
+  regs.forEach((t) => w.u8(tagOf(t)));
+  const blocks = fn.blocks;
+  w.u16(blocks.length);
+  let first = 0;
+  for (const b of blocks) { w.u32(first); w.u32(b.length); first += b.length; }
+  w.u32(first);
+  for (const b of blocks) for (const i of b) insn(w, i);
+  w.str(fn.requires || '', 2);
+  w.str(fn.ensures || '', 2);
+  void version;
+}
+
+function encode(desc) {
+  const w = new Bytes();
+  w.raw([0x4f, 0x53, 0x43, 0x31, 0x49, 0x52, 0x00]);
+  w.u8(desc.version);
+  if (desc.version !== 1) {
+    w.u8(desc.nstructs || 0);
+    const regions = desc.regions || [];
+    w.u16(desc.nregions === undefined ? regions.length : desc.nregions);
+    for (const g of regions) {
+      w.str(g.name, 1);
+      w.u8(tagOf(g.tag));
+      w.u8(g.cls);
+      w.u16(g.owner === undefined ? (g.cls === 1 ? 0 : 0xffff) : g.owner);
+      w.u32(g.count);
+      const init = g.init ? Buffer.from(g.init, 'latin1') : Buffer.alloc(0);
+      w.u32(g.initlen === undefined ? init.length : g.initlen);
+      w.raw(init);
+    }
+  }
+  w.u16(desc.nfuncs === undefined ? desc.funcs.length : desc.nfuncs);
+  for (const fn of desc.funcs) func(w, fn, desc.version);
+  return Buffer.from(w.a);
+}
+
+// ------------------------------------------------------------- fixtures
+// Register numbering in each function: params first, then `regs`.
+const fx = {};
+const mod = (name, tag, count) => ({ name, tag, cls: 0, owner: 0xffff, count });
+const text = (name, s) => ({ name, tag: 'u8', cls: 2, owner: 0xffff, count: Buffer.from(s, 'latin1').length, init: s });
+const loc = (name, tag, count, owner) => ({ name, tag, cls: 1, owner, count });
+
+// set(i, v) -> void ; get(i) -> T over one module region 0 of element T.
+function setget(tag, idx, count, extra) {
+  return {
+    version: 7,
+    regions: [mod('g', tag, count)],
+    funcs: [
+      { name: 'set', params: [idx, tag], blocks: [[['rstore', 0, 0, 1], ['ret', 'none']]] },
+      { name: 'get', params: [idx], ret: tag, regs: [tag], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] },
+    ].concat(extra || []),
+  };
+}
+
+fx.rt_u8 = setget('u8', 'i32', 4);
+fx.rt_i32 = setget('i32', 'u32', 3);
+fx.rt_u64 = setget('u64', 'u64', 2, [
+  { name: 'geti', params: ['i64'], ret: 'u64', regs: ['u64'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] },
+]);
+fx.rt_f32 = setget('f32', 'u8', 2);
+fx.rt_f64 = setget('f64', 'i16', 2);
+
+// Text read, including an empty text table.
+fx.text_read = {
+  version: 7,
+  regions: [text('t', 'RGBX'), text('e', '')],
+  funcs: [
+    { name: 'tget', params: ['u32'], ret: 'u8', regs: ['u8'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] },
+    { name: 'eget', params: ['u32'], ret: 'u8', regs: ['u8'], blocks: [[['rload', 1, 1, 0], ['ret', 1]]] },
+  ],
+};
+
+// Local storage: initialized to 5 on every call, old value returned, then overwritten.
+// reinit: RINIT 5, store 9, RINIT 7, load -> 7 (re-init resets the whole region).
+fx.local_fresh = {
+  version: 7,
+  regions: [loc('l', 'u32', 4, 0), loc('l', 'u32', 2, 1)],
+  funcs: [
+    { name: 'swap', params: ['u32', 'u32'], ret: 'u32', regs: ['u32', 'u32'],
+      blocks: [[['const', 2, 5], ['rinit', 0, 2], ['rload', 3, 0, 0], ['rstore', 0, 0, 1], ['ret', 3]]] },
+    { name: 'reinit', params: ['u32'], ret: 'u32', regs: ['u32', 'u32', 'u32', 'u32'],
+      blocks: [[['const', 1, 5], ['rinit', 1, 1], ['const', 2, 9], ['rstore', 1, 0, 2],
+        ['const', 3, 7], ['rinit', 1, 3], ['rload', 4, 1, 0], ['ret', 4]]] },
+  ],
+};
+
+// Module persistence across calls, a partial write before a bounds trap, and
+// an overflow trap before any write.
+fx.persist = {
+  version: 7,
+  regions: [mod('c', 'u32', 1)],
+  funcs: [
+    { name: 'bump', ret: 'u32', regs: ['u64', 'u32', 'u32', 'u32'],
+      blocks: [[['const', 0, 0], ['rload', 1, 0, 0], ['const', 2, 1], ['bin', 'add', 3, 1, 2],
+        ['rstore', 0, 0, 3], ['ret', 3]]] },
+    { name: 'partial', ret: 'u32', regs: ['u64', 'u32', 'u32', 'u32', 'u64', 'u32'],
+      blocks: [[['const', 0, 0], ['rload', 1, 0, 0], ['const', 2, 1], ['bin', 'add', 3, 1, 2],
+        ['rstore', 0, 0, 3], ['const', 4, 1], ['rload', 5, 0, 4], ['ret', 5]]] },
+    { name: 'ovf', params: ['i32'], ret: 'u32', regs: ['i32', 'u64', 'u32', 'u32'],
+      blocks: [[['bin', 'add', 1, 0, 0], ['const', 2, 0], ['const', 3, 77], ['rstore', 0, 2, 3],
+        ['ret', 3]]] },
+  ],
+};
+
+// Bitcasts across each width set.
+const bc = (name, from, to) => ({ name, params: [from], ret: to, regs: [to], blocks: [[['bitcast', 1, 0], ['ret', 1]]] });
+fx.bitcast = {
+  version: 7,
+  funcs: [
+    bc('f32_u32', 'f32', 'u32'), bc('u32_f32', 'u32', 'f32'), bc('i32_f32', 'i32', 'f32'),
+    bc('f64_i64', 'f64', 'i64'), bc('u64_f64', 'u64', 'f64'), bc('u8_i8', 'u8', 'i8'),
+    bc('i8_u8', 'i8', 'u8'), bc('i16_u16', 'i16', 'u16'), bc('u16_i16', 'u16', 'i16'),
+    bc('f32_f32', 'f32', 'f32'),
+  ],
+};
+
+// Conversions (CAST).
+const cv = (name, from, to) => ({ name, params: [from], ret: to, regs: [to], blocks: [[['cast', 1, 0], ['ret', 1]]] });
+fx.convert = {
+  version: 7,
+  funcs: [
+    cv('f64_i32', 'f64', 'i32'), cv('f64_u8', 'f64', 'u8'), cv('f32_i8', 'f32', 'i8'),
+    cv('f64_u64', 'f64', 'u64'), cv('f64_i64', 'f64', 'i64'), cv('f32_u32', 'f32', 'u32'),
+    cv('f32_i16', 'f32', 'i16'),
+    cv('u64_f32', 'u64', 'f32'), cv('i32_f32', 'i32', 'f32'), cv('u64_f64', 'u64', 'f64'),
+    cv('i64_f64', 'i64', 'f64'), cv('f64_f32', 'f64', 'f32'), cv('f32_f64', 'f32', 'f64'),
+    cv('f64_f64', 'f64', 'f64'), cv('i32_u8', 'i32', 'u8'), cv('u64_i64', 'u64', 'i64'),
+  ],
+};
+
+// Float arithmetic, negation and comparison.
+const fb = (name, t, sub) => ({ name, params: [t, t], ret: t, regs: [t], blocks: [[['bin', sub, 2, 0, 1], ['ret', 2]]] });
+const fc = (name, t, sub) => ({ name, params: [t, t], ret: 'bool', regs: ['bool'], blocks: [[['cmp', sub, 2, 0, 1], ['ret', 2]]] });
+fx.float_ops = {
+  version: 7,
+  funcs: [
+    fb('fadd', 'f32', 'add'), fb('fmul', 'f32', 'mul'), fb('dsub', 'f64', 'sub'), fb('ddiv', 'f64', 'div'),
+    { name: 'fneg', params: ['f32'], ret: 'f32', regs: ['f32'], blocks: [[['un', 'neg', 1, 0], ['ret', 1]]] },
+    { name: 'dneg', params: ['f64'], ret: 'f64', regs: ['f64'], blocks: [[['un', 'neg', 1, 0], ['ret', 1]]] },
+    fc('feq', 'f32', 'eq'), fc('fne', 'f32', 'ne'), fc('flt', 'f32', 'lt'), fc('dge', 'f64', 'ge'),
+    { name: 'kf', ret: 'f32', regs: ['f32'], blocks: [[['const', 0, 0x7fa00001], ['ret', 0]]] },
+    { name: 'kd', ret: 'f64', regs: ['f64'], blocks: [[['const', 0, 0xfff0000000000001n], ['ret', 0]]] },
+  ],
+};
+
+// Initialization on both branches of a diamond, used after the join (accept).
+fx.init_diamond = {
+  version: 7,
+  regions: [loc('d', 'i16', 3, 0)],
+  funcs: [
+    { name: 'pick', params: ['bool'], ret: 'i16', regs: ['i16', 'i16', 'u8', 'i16'],
+      blocks: [
+        [['cbr', 0, 1, 2]],
+        [['const', 1, 0xfffffffffffffffdn], ['rinit', 0, 1], ['br', 3]],
+        [['const', 2, 4], ['rinit', 0, 2], ['br', 3]],
+        [['const', 3, 2], ['rload', 4, 0, 3], ['ret', 4]],
+      ] },
+  ],
+};
+
+// v1 units (no region, no float, no v7 opcode).
+fx.v1_arith = {
+  version: 1,
+  funcs: [
+    { name: 'addi', params: ['i32', 'i32'], ret: 'i32', regs: ['i32'], blocks: [[['bin', 'add', 2, 0, 1], ['ret', 2]]] },
+    { name: 'addu', params: ['u8', 'u8'], ret: 'u8', regs: ['u8'], blocks: [[['bin', 'add', 2, 0, 1], ['ret', 2]]] },
+    { name: 'divi', params: ['i64', 'i64'], ret: 'i64', regs: ['i64'], blocks: [[['bin', 'div', 2, 0, 1], ['ret', 2]]] },
+    { name: 'remi', params: ['i64', 'i64'], ret: 'i64', regs: ['i64'], blocks: [[['bin', 'rem', 2, 0, 1], ['ret', 2]]] },
+    { name: 'shl8', params: ['i8', 'u32'], ret: 'i8', regs: ['i8'], blocks: [[['bin', 'shl', 2, 0, 1], ['ret', 2]]] },
+    { name: 'shr8', params: ['i8', 'u32'], ret: 'i8', regs: ['i8'], blocks: [[['bin', 'shr', 2, 0, 1], ['ret', 2]]] },
+    { name: 'negu', params: ['u16'], ret: 'u16', regs: ['u16'], blocks: [[['un', 'neg', 1, 0], ['ret', 1]]] },
+    { name: 'memory', params: ['bool'], ret: 'bool', regs: ['bool'], blocks: [[['un', 'lnot', 1, 0], ['ret', 1]]] },
+    { name: 'stop', params: [], ret: 'void', blocks: [[['trap', 9], ['ret', 'none']]] },
+  ],
+};
+// sum(n) = 0 + 1 + .. + (n-1), looping; twice(n) calls sum.
+fx.v1_loop = {
+  version: 1,
+  funcs: [
+    { name: 'sum', params: ['u32'], ret: 'u32', regs: ['u32', 'u32', 'bool', 'u32'],
+      blocks: [
+        [['const', 1, 0], ['const', 2, 0], ['br', 1]],
+        [['cmp', 'lt', 3, 2, 0], ['cbr', 3, 2, 3]],
+        [['bin', 'add', 1, 1, 2], ['const', 4, 1], ['bin', 'add', 2, 2, 4], ['br', 1]],
+        [['ret', 1]],
+      ] },
+    { name: 'twice', params: ['u32'], ret: 'u32', regs: ['u32', 'u32'],
+      blocks: [[['call', 1, 0, 0], ['bin', 'add', 2, 1, 1], ['ret', 2]]] },
+  ],
+};
+
+// ----------------------------------------------------- malformed units
+const tiny = (extra) => Object.assign({
+  version: 7,
+  regions: [mod('g', 'u32', 2)],
+  funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] }],
+}, extra || {});
+const local1 = (body, regs, extra) => Object.assign({
+  version: 7,
+  regions: [loc('l', 'u32', 2, 0)],
+  funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: regs || ['u32', 'u32'], blocks: body }],
+}, extra || {});
+
+// Reader classes.
+const bytesOf = {};
+bytesOf.bad_magic = () => { const b = encode(tiny()); b[3] = 0x32; return b; };
+bytesOf.bad_version2 = () => { const b = encode(tiny()); b[7] = 2; return b; };
+bytesOf.bad_version6 = () => { const b = encode(tiny()); b[7] = 6; return b; };
+bytesOf.bad_version8 = () => { const b = encode(tiny()); b[7] = 8; return b; };
+bytesOf.trunc_empty = () => Buffer.alloc(0);
+bytesOf.trunc_magic = () => encode(tiny()).subarray(0, 4);
+bytesOf.trunc_header = () => encode(tiny()).subarray(0, 8);
+bytesOf.trunc_last = () => { const b = encode(tiny()); return b.subarray(0, b.length - 1); };
+bytesOf.trunc_initdata = () => encode({ version: 7, regions: [text('t', 'RGBX')], funcs: [] }).subarray(0, 8 + 1 + 2 + 2 + 1 + 1 + 2 + 4 + 4 + 2);
+bytesOf.trailing = () => Buffer.concat([encode(tiny()), Buffer.from([0])]);
+bytesOf.cap_v7_input = () => { const b = Buffer.alloc(8388609); encode(tiny()).copy(b); return b; };
+bytesOf.cap_v1_input = () => { const b = Buffer.alloc(2620252); encode(fx.v1_arith).copy(b); return b; };
+bytesOf.v7_input_at_v1_cap = () => {
+  // A v7 header over the v1 cap is not a capacity refusal; it fails later as TRAILING.
+  const b = Buffer.alloc(2620252); encode(tiny()).copy(b); return b;
+};
+
+fx.cap_nfuncs = { version: 7, regions: [mod('g', 'u8', 1)], nfuncs: 33, funcs: [] };
+fx.cap_fname = tiny({ funcs: [{ name: 'x'.repeat(64), ret: 'void', blocks: [[['ret', 'none']]] }] });
+fx.cap_nstructs = tiny({ nstructs: 17 });
+fx.unsup_structs = tiny({ nstructs: 1 });
+fx.unsup_class3 = tiny({ regions: [{ name: 'w', tag: 'u32', cls: 3, owner: 0xffff, count: 4 }] });
+fx.unsup_op7 = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['raw', 7, 1, 0, 0, 0], ['ret', 0]]] }] });
+fx.unsup_op20 = tiny({ funcs: [{ name: 'f', ret: 'void', blocks: [[['raw', 20, 0, 0], ['ret', 'none']]] }] });
+fx.unsup_op34 = tiny({ funcs: [{ name: 'f', ret: 'void', blocks: [[['raw', 34], ['ret', 'none']]] }] });
+fx.unsup_op0 = tiny({ funcs: [{ name: 'f', ret: 'void', blocks: [[['raw', 0], ['ret', 'none']]] }] });
+fx.unsup_op9 = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['raw', 9, 1, 0, 0, 0, 0, 0], ['ret', 1]]] }] });
+fx.v1_unsup_op10 = { version: 1, funcs: [{ name: 'f', params: ['u32'], ret: 'void', blocks: [[['raw', 10, 0, 0, 0, 0, 0, 0], ['ret', 'none']]] }] };
+fx.unsup_tag10 = tiny({ funcs: [{ name: 'f', ret: 'void', regs: [10], blocks: [[['ret', 'none']]] }] });
+fx.unsup_tag15 = tiny({ funcs: [{ name: 'f', ret: 'void', regs: [15], blocks: [[['ret', 'none']]] }] });
+fx.v1_op30 = { version: 1, funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['raw', 30, 1, 0, 0, 0, 0, 0], ['ret', 1]]] }] };
+fx.v1_tag13 = { version: 1, funcs: [{ name: 'f', params: ['f32'], ret: 'void', blocks: [[['ret', 'none']]] }] };
+fx.v1_tag14_ret = { version: 1, funcs: [{ name: 'f', ret: 'f64', regs: ['f64'], blocks: [[['const', 0, 0], ['ret', 0]]] }] };
+
+// Region table INVALIDs.
+const oneRegion = (g) => tiny({ regions: [g] });
+fx.inv_class4 = oneRegion({ name: 'g', tag: 'u32', cls: 4, owner: 0xffff, count: 2 });
+fx.inv_rtag_bool = oneRegion({ name: 'g', tag: 'bool', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rtag_cells = oneRegion({ name: 'g', tag: 12, cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rname_empty = oneRegion({ name: '', tag: 'u32', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rname_dot = oneRegion({ name: 'a.b', tag: 'u32', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rname_nul = oneRegion({ name: 'a\u0000', tag: 'u32', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rname_8bit = oneRegion({ name: 'g\u00e9', tag: 'u32', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_rname_64 = oneRegion({ name: 'r'.repeat(64), tag: 'u32', cls: 0, owner: 0xffff, count: 2 });
+fx.inv_mod_init = oneRegion({ name: 'g', tag: 'u32', cls: 0, owner: 0xffff, count: 1, init: 'abcd' });
+fx.inv_text_len = oneRegion({ name: 'g', tag: 'u8', cls: 2, owner: 0xffff, count: 5, init: 'RGBX' });
+fx.inv_text_u32 = oneRegion({ name: 'g', tag: 'u32', cls: 2, owner: 0xffff, count: 4, init: 'RGBX' });
+fx.inv_count0 = oneRegion({ name: 'g', tag: 'u32', cls: 0, owner: 0xffff, count: 0 });
+fx.inv_count_big = oneRegion({ name: 'g', tag: 'u8', cls: 0, owner: 0xffff, count: 16777217 });
+fx.ok_count_max = tiny({ regions: [mod('g', 'u32', 2), mod('h', 'u8', 16777216)] });
+fx.inv_nregions = tiny({ nregions: 1025, regions: [] });
+fx.inv_owner_local_module = tiny({ regions: [mod('g', 'u32', 2), loc('l', 'u32', 2, 0xffff)] });
+fx.inv_owner_missing = tiny({ regions: [mod('g', 'u32', 2), loc('l', 'u32', 2, 1)] });
+fx.inv_owner_module0 = oneRegion({ name: 'g', tag: 'u32', cls: 0, owner: 0, count: 2 });
+fx.inv_dup_module = tiny({ regions: [mod('g', 'u32', 2), text('g', 'xy')] });
+fx.inv_shadow = tiny({ regions: [mod('g', 'u32', 2), loc('g', 'u32', 2, 0)] });
+fx.inv_dup_local = tiny({ regions: [mod('g', 'u32', 2), loc('l', 'u8', 1, 0), loc('l', 'u8', 1, 0)] });
+
+// Export collisions (v7 reserves memory and region.NAME); duplicate functions.
+const named = (n) => ({ name: n, ret: 'void', blocks: [[['ret', 'none']]] });
+fx.inv_export_memory = tiny({ funcs: tiny().funcs.concat([named('memory')]) });
+fx.inv_export_region = tiny({ funcs: tiny().funcs.concat([named('region.g')]) });
+fx.inv_dup_func = tiny({ funcs: tiny().funcs.concat([named('f')]) });
+fx.inv_v1_dup_func = { version: 1, funcs: [named('f'), named('f')] };
+fx.ok_fname_empty = tiny({ funcs: tiny().funcs.concat([named('')]) });
+fx.inv_fname_8bit = tiny({ funcs: tiny().funcs.concat([named('h\u00e9')]) });
+
+// Local initialization controls.
+fx.inv_missing_init = local1([[['const', 1, 0], ['rload', 2, 0, 1], ['ret', 2]]]);
+fx.inv_init_after_use = local1([[['const', 1, 0], ['rload', 2, 0, 1], ['rinit', 0, 0], ['ret', 2]]]);
+fx.inv_store_before_init = local1([[['const', 1, 0], ['rstore', 0, 1, 0], ['rinit', 0, 0], ['ret', 0]]]);
+fx.inv_init_one_branch = local1([
+  [['const', 1, 0], ['cmp', 'eq', 3, 0, 1], ['cbr', 3, 1, 2]],
+  [['rinit', 0, 0], ['br', 2]],
+  [['rload', 2, 0, 1], ['ret', 2]],
+], ['u32', 'u32', 'bool']);
+// Header 1 loads; RINIT happens only in body 2, which loops back to 1.
+fx.inv_loop_carried = local1([
+  [['const', 1, 0], ['br', 1]],
+  [['rload', 2, 0, 1], ['cmp', 'eq', 3, 2, 0], ['cbr', 3, 3, 2]],
+  [['rinit', 0, 0], ['br', 1]],
+  [['ret', 2]],
+], ['u32', 'u32', 'bool']);
+fx.ok_loop_init_before = local1([
+  [['const', 1, 0], ['rinit', 0, 0], ['br', 1]],
+  [['rload', 2, 0, 1], ['cmp', 'eq', 3, 2, 0], ['cbr', 3, 3, 2]],
+  [['rinit', 0, 1], ['br', 1]],
+  [['ret', 2]],
+], ['u32', 'u32', 'bool']);
+fx.inv_unreachable_use = local1([
+  [['rinit', 0, 0], ['const', 1, 0], ['rload', 2, 0, 1], ['ret', 2]],
+  [['const', 1, 0], ['rload', 2, 0, 1], ['ret', 2]],
+]);
+fx.inv_reg_undef = local1([[['rinit', 0, 0], ['rload', 2, 0, 1], ['ret', 2]]]);
+
+// Ownership.
+const twoFuncLocal = (body1) => ({
+  version: 7,
+  regions: [loc('l', 'u32', 2, 0), mod('g', 'u32', 2)],
+  funcs: [
+    { name: 'a', params: ['u32'], ret: 'u32', regs: ['u32', 'u32'],
+      blocks: [[['rinit', 0, 0], ['const', 1, 0], ['rload', 2, 0, 1], ['ret', 2]]] },
+    { name: 'b', params: ['u32'], ret: 'u32', regs: ['u32', 'u32'], blocks: [body1] },
+  ],
+});
+fx.ok_own_local = twoFuncLocal([['rload', 2, 1, 0], ['ret', 2]]);
+fx.inv_foreign_load = twoFuncLocal([['const', 1, 0], ['rload', 2, 0, 1], ['ret', 2]]);
+fx.inv_foreign_init = twoFuncLocal([['rinit', 0, 0], ['ret', 0]]);
+fx.inv_foreign_store = twoFuncLocal([['const', 1, 0], ['rstore', 0, 1, 0], ['ret', 0]]);
+fx.inv_rinit_module = twoFuncLocal([['rinit', 1, 0], ['ret', 0]]);
+
+// Read-only text.
+const textUnit = (body, regs) => ({
+  version: 7,
+  regions: [text('t', 'RGBX')],
+  funcs: [{ name: 'f', params: ['u8'], ret: 'u8', regs: regs || ['u32'], blocks: [body] }],
+});
+fx.inv_text_store = textUnit([['const', 1, 0], ['rstore', 0, 1, 0], ['ret', 0]]);
+fx.inv_text_init = textUnit([['rinit', 0, 0], ['ret', 0]]);
+
+// Operands: sentinel / out of table.
+fx.inv_rload_dst_none = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', blocks: [[['rload', 'none', 0, 0], ['ret', 0]]] }] });
+fx.inv_rload_region_none = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 'none', 0], ['ret', 1]]] }] });
+fx.inv_rload_index_none = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 0, 'none'], ['ret', 1]]] }] });
+fx.inv_rload_region_oob = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 1, 0], ['ret', 1]]] }] });
+fx.inv_rload_index_8000 = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 0, 0x8000], ['ret', 1]]] }] });
+fx.inv_rstore_src_fffe = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', blocks: [[['rstore', 0, 0, 0xfffe], ['ret', 0]]] }] });
+fx.inv_rstore_src_oob = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'u32', blocks: [[['rstore', 0, 0, 1], ['ret', 0]]] }] });
+fx.inv_bitcast_none = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'i32', regs: ['i32'], blocks: [[['bitcast', 1, 'none'], ['ret', 1]]] }] });
+fx.inv_rinit_none = local1([[['rinit', 0, 'none'], ['ret', 0]]]);
+fx.inv_rinit_region_none = local1([[['rinit', 'none', 0], ['ret', 0]]]);
+
+// Typing.
+fx.inv_index_float = tiny({ funcs: [{ name: 'f', params: ['f32'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] }] });
+fx.inv_index_bool = tiny({ funcs: [{ name: 'f', params: ['bool'], ret: 'u32', regs: ['u32'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] }] });
+fx.inv_rload_type = tiny({ funcs: [{ name: 'f', params: ['u32'], ret: 'i32', regs: ['i32'], blocks: [[['rload', 1, 0, 0], ['ret', 1]]] }] });
+fx.inv_rstore_type = tiny({ funcs: [{ name: 'f', params: ['u32', 'u64'], ret: 'void', blocks: [[['rstore', 0, 0, 1], ['ret', 'none']]] }] });
+fx.inv_rinit_type = local1([[['const', 1, 0], ['cast', 2, 1], ['rinit', 0, 2], ['ret', 0]]], ['u32', 'i32']);
+fx.inv_bitcast_cross = { version: 7, funcs: [bc('f', 'u32', 'f64')] };
+fx.inv_bitcast_bool = { version: 7, funcs: [bc('f', 'bool', 'u8'), bc('g', 'f32', 'f32')] };
+fx.inv_bitcast_width = { version: 7, funcs: [bc('f', 'u8', 'u16'), bc('g', 'f32', 'f32')] };
+fx.inv_float_rem = { version: 7, funcs: [fb('f', 'f32', 'rem')] };
+fx.inv_float_shl = { version: 7, funcs: [fb('f', 'f64', 'shl')] };
+fx.inv_float_and = { version: 7, funcs: [fb('f', 'f64', 'and')] };
+fx.inv_float_bnot = { version: 7, funcs: [{ name: 'f', params: ['f32'], ret: 'f32', regs: ['f32'], blocks: [[['un', 'bnot', 1, 0], ['ret', 1]]] }] };
+fx.inv_float_lnot = { version: 7, funcs: [{ name: 'f', params: ['f64'], ret: 'f64', regs: ['f64'], blocks: [[['un', 'lnot', 1, 0], ['ret', 1]]] }] };
+fx.inv_f32_const_upper = { version: 7, funcs: [{ name: 'f', ret: 'f32', regs: ['f32'], blocks: [[['const', 0, 0x100000000n], ['ret', 0]]] }] };
+fx.inv_cast_bool = { version: 7, funcs: [cv('f', 'bool', 'f32')] };
+fx.inv_cast_to_bool = { version: 7, funcs: [cv('f', 'f64', 'bool')] };
+
+// Version selection.
+fx.gratuitous_v7 = { version: 7, funcs: fx.v1_loop.funcs };
+fx.gratuitous_v7_empty = { version: 7, funcs: [] };
+
+function writeAll(dir) {
+  fs.mkdirSync(dir, { recursive: true });
+  const names = [];
+  for (const [n, d] of Object.entries(fx)) { fs.writeFileSync(path.join(dir, n + '.unit'), encode(d)); names.push(n); }
+  for (const [n, f] of Object.entries(bytesOf)) { fs.writeFileSync(path.join(dir, n + '.unit'), f()); names.push(n); }
+  return names;
+}
+
+module.exports = { encode, fixtures: fx, rawFixtures: bytesOf, writeAll };
+
+if (require.main === module) {
+  if (process.argv.length !== 3) {
+    process.stderr.write('usage: writer.js OUTDIR\n');
+    process.exit(2);
+  }
+  const names = writeAll(process.argv[2]);
+  process.stdout.write(names.length + ' fixtures\n');
+}
diff --git a/spec/.crumb b/spec/.crumb
index a226ce192..59a8f5458 100644
--- a/spec/.crumb
+++ b/spec/.crumb
@@ -20,14 +20,14 @@
         }
       ],
       "children_root": "sha256:6834a3241647d3a098283d4eafedbdb1428dfa4d834f9ed5f22025b6d2303093",
-      "compiled_at": "2026-10-30T11:28:28Z",
+      "compiled_at": "2026-10-30T17:38:28Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986",
+      "digest": "sha256:fb0896eda0ddbdbb472ae89c56f44fc72ff7c6674acfb4d6f4d3bf297f447999",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 63,
-      "generated_at_commit": "a8a6a3d3c47ce797430f045edc5eae11594ba36d",
-      "source_tree": "sha256:4cb3bb1977c84caacc34366f814d6fe403a2eda7b89b916948d29541675c59bb"
+      "files": 66,
+      "generated_at_commit": "5c159484b40345f76ad15937305aac155a808bc8",
+      "source_tree": "sha256:d5cce7865f6267d69fdeb1fc288a9ef139e7748ae98f9b6c86e56dee4360c519"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/spec/empirical-optimizer.md b/spec/empirical-optimizer.md
index 5b23f32cb..798ed1d98 100644
--- a/spec/empirical-optimizer.md
+++ b/spec/empirical-optimizer.md
@@ -83,6 +83,15 @@ model is a fixed 28,112-byte blob, well under the 64 KiB generation limit.
   √(σ²(1 + φ'Λ⁻¹φ)) × `sd_scale`. The leverage term widens the spread away
   from the training data. σ² has a floor of 0.03² (about 2%).
 - **A cell** needs 12 observations (`RX_CM_MIN_OBS`) before it predicts.
+- **An unknown semantic operation** is not a cell. `rx_cm_cell` returns
+  `RX_CM_CELL_NONE`, which is never used as an index. Prediction, decision
+  and observation refuse it (`RX_CM_ERR_UNSUPPORTED`, decision `RX_CM_REFUSE`)
+  and do not read or write another family's statistics. An unknown core class
+  is still the OTHER bucket, and pressure past the last bucket still saturates.
+  Those are declared buckets, not a catch-all operation. Adding a family
+  widens `RX_CM_OPS`, changes `RX_CM_CELLS`, and bumps the blob version. A
+  blob whose version, basis size, cell count, arm cap or core count disagrees
+  is refused.
 - **Pressure cells** do not refit the whole curve. They hold a two-number
   correction over the quiet cell of the same core class: log2 cost under
   pressure = quiet prediction + a + b × (doublings past cache). Four
diff --git a/spec/offline-evidence-v1.md b/spec/offline-evidence-v1.md
index e468163e3..4ba1b335e 100644
--- a/spec/offline-evidence-v1.md
+++ b/spec/offline-evidence-v1.md
@@ -89,9 +89,19 @@ Semantics the evaluator is allowed to rely on:
   refused. `kind=storage` and `kind=persist` are ops whose `bw` is a storage resource.
 - `dep a b`: b starts after a ends. Cycles are refused.
 - `buffer`: live from the start of `first` to the end of `last`. Missing `first` means
-  live from t=0 (resident state); missing `last` means live until the end. Peak live bytes
+  live from t=0 (resident state); missing `last` means live until the end. The occupied
+  interval is half-open `[start, end)`: live at time t when `start <= t < end`. `start`
+  is the scheduled start of `first` (or 0); `end` is the scheduled end of `last` (or the
+  makespan). `end == start` is empty (a zero-duration operation or buffer): it contributes
+  no live bytes and cannot offset another buffer. `end` earlier than `start` is inverted:
+  the evaluator refuses `REFUSED_LIFETIME` before any capacity certificate or ranking,
+  naming the buffer, both endpoint operations (`omitted` when the field is absent) and the
+  resolved times. At one timestamp, frees of intervals that started earlier are applied
+  before allocations, so a buffer that ends when another starts does not occupy both
+  (completion/allocation tie). An accepted ledger never goes negative. Peak live bytes
   per capacity resource must not exceed `cap`, else `REFUSED_CAPACITY` naming the time
-  and the buffers.
+  and the buffers. No frozen field was added; this is the interval convention for the
+  words already in v1.
 - `sync id=X ops=a,b,...`: declares a barrier op `X` (no cost, no engine) that completes
   when every listed op has completed. Order later work after it with `dep X y`. A barrier
   with a measured cost is written as `op id=X kind=barrier t_ns=... prov=...` plus `dep` lines.
diff --git a/spec/security-compose-ownership.md b/spec/security-compose-ownership.md
new file mode 100644
index 000000000..551f75a42
--- /dev/null
+++ b/spec/security-compose-ownership.md
@@ -0,0 +1,52 @@
+# SC1 dependency and ownership map
+
+Programme #673; source reconciliation starts at Omega main
+`00eb0e7106d2f8fc841e5e16eb624fa1bd029111`. Main lacks the staged authority
+and native/control paths. Never infer a merged production owner from a draft.
+
+| Contract/surface | Existing owner | Exclusive proposal writer / dependency |
+|---|---|---|
+| #625 contracts | ORPHAN semantics coordinator | TURING integrates SC1 spec and acceptance; independent contract review corrected draft mismatches |
+| #756 quantities, #636 compiler | ORPHAN/CompilerLane | QuantityLane owns om/quantity only; no compiler semantic change; TURING integrates actual consumer build |
+| #670 authority, #659/#649 recovery | Existing authority stack | TURING focused cleanup compile repair on #688; production fencing/ABA/durable epoch remain owner defects, not helper claims |
+| #757 reservations | Authority/store writer | BudgetLane owns new pure reserve.om/envelope.om; actual omnet snapshot schema/standing reservation remains WORM decision |
+| #758/#623 secrecy/validation | ORPHAN translation/checker owner | SecrecyLane owns new relational fixtures; pinned #752 scanner reused; target/model/disclosure and whole-consumer correspondence remain checker owner |
+| #759 public envelopes | Existing scheduler/admission owner | Pure paired envelope helper only; no qualified .om scheduler seam, actual dsbatch scheduling/capacity enforcement BLOCKED |
+| #760/#647 analysis | Existing analysis owner | GameLane owns bounded offline game/certificate experiment, no general verifier replacement |
+| #583 cost model | Existing cost-model owner | Synthetic ranking only until qualified real cost evidence; no runtime admission |
+| #671 ingress | Existing parser/omnet owners | ConsumerQuantity migrates real socket original-length/cursor sites; remaining parser sites inventoried, not silently qualified |
+| omnet #3 | WORM TKA/store/daemon/Headscale | Isolated proposal at PR#4 immutable base; ConsumerQuantity writes socket.om/rpc.om, ConsumerSecret writes helpers.om, qualifier only qualification/security3/; WORM live tree untouched |
+| #624 qualification | ORPHAN qualification coordinator | TURING integrates exact evidence, independent reviews, clean replay and matrix; no gate/registry policy edit |
+
+TURING is the sole build/registry/compiler integration writer for these proposals.
+No compiler or registry change is currently made. The consumer build change adds
+one existing-source composition input; new implementation and fixtures are .om.
+Workers never share writable source files. Existing owner branches remain theirs;
+proposal merges require normal owner review and approval gates.
+
+## Reconciled source inputs
+
+- Authority base `a35697e94b5eeb72efadfee6edab7f14344aea43`.
+- #685 `346c9ad3d171a19ea3f015773a41ceeb3feac8f1`: acquire-before-read repair.
+- #686 `c0b9a84b27a904dbd23af9dae0b95a5f198e46c8`: exact record/generation EOF consumption.
+- #687 `95529421e9a0e6d6d63ca5d8b8cdfaf443e0ef78`: unlink-error reporting, NOT stale-pid ABA repair.
+- #688 `08bd7aa7d7b73864e56163772ccceaa9cc91de0b`: write-failure cleanup; its cleanup gate failed pinned compilation, corrected by focused #769 without production behavior changes.
+- Existing signed M19/R11/R13/operator failures remain historical failures; four native fixtures do not erase them or qualify the full coordinator.
+- omnet #2 is actual TKA/model/signature code, not the obsolete AGENTS-only tracker snapshot. #4 at `1e075776855d4389b69b23b54b49ed230d488717` adds the existing daemon and snapshot implementation. Current active Headscale work is not an immutable dependency and is not edited here.
+- OM-2 compiler work #750/#753/#754/#764 and translation #755 remain separate owner branches. Scanner input is #752 at `155ff3178f35013e405ed40d09a7dd75ede2a403`; emitted evidence pins it, not a moving checkout.
+- Current consumer compiler `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61` must not be replaced by authority stack's older `66b4cf34e5cd2c8ff003bd142e7309f52178b66c2380f78ac313b6eb8b67471b`: the old exec operation closes inherited descriptors needed by tkad rollover.
+
+## Coordination records
+
+- [#673 original map](https://github.com/aien-dev/omega-mv/issues/673#issuecomment-6402294156)
+- [#625 contract discussion](https://github.com/aien-dev/omega-mv/issues/625#issuecomment-6402400478)
+- [#636 compiler seam request](https://github.com/aien-dev/omega-mv/issues/636#issuecomment-6402300850)
+- [omnet owner seam](https://github.com/aien-dev/omnet/issues/3#issuecomment-6402300478)
+- [Concrete no-op/accounting/quantity handoff](https://github.com/aien-dev/omnet/issues/3#issuecomment-6402476068)
+- [#4 integration compatibility warning](https://github.com/aien-dev/omnet/pull/4#issuecomment-6402415511)
+
+No issue closure, ready-to-merge label, merge override, deployment, live service
+restart or GPU operation is authorized by this evidence. Formal policy correctness,
+remote identity authentication, durable aggregate resource admission, scheduler
+noninterference, complete emitted-secret closure and power loss are separate rows,
+not conclusions inferred from component results.
diff --git a/spec/security-compose-v1.md b/spec/security-compose-v1.md
new file mode 100644
index 000000000..3cfcba978
--- /dev/null
+++ b/spec/security-compose-v1.md
@@ -0,0 +1,152 @@
+# Security composition profile SC1, revision 2
+
+Status: reviewed implementation contract; qualification remains per obligation, never a blanket PASS. Revision 2 supersedes the draft hash `8bc52be7a480e279fb77673648a2f7775ba6d4841a8b1e6c427531b25d4d1860` after independent review exposed mismatched consumer assumptions. Earlier receipts retain that draft identity; they do not automatically qualify this revision.
+Owner: #625 contracts; #673 integrator. Existing owner implementations and policies remain authoritative until an explicitly reviewed change lands.
+
+## 1. Profiles, identities and trust
+
+SC1 is additive. OM-1, OM-2, translation-v1 S1, compiler bootstrap and intentional cryptographic modular arithmetic retain their meanings. Every result binds exact source, compiler source/binary, profile, executable bytes, target/ABI, checker, model, policy and fixture. UNKNOWN, timeout, unsupported instructions, missing or mismatched bindings never become PASS.
+
+- SC1-Q: nominal checked quantity and object-bound slice helpers. Raw construction, field writes and extraction are trusted, not sealed provenance. A qualified consumer needs a hash-bound inventory of every quantity-producing/effect site; each uses checked original operands or revalidation against the trusted extent. A helper pass is not a language-wide guarantee.
+- SC1-R: pure conserved-reservation transitions. No authentication, persistence, locking or concurrent-writer guarantee follows from a transition result.
+- SC1-L: static architectural leakage over-approximation for a bounded function-mode artifact using the existing owner's scanner from draft #752, pinned separately in evidence. It is not a general relational proof or a program-mode daemon scan. Binding to a daemon requires equality of the relevant emitted words plus the call/return/observation contract, otherwise BLOCKED.
+- SC1-E: paired fixed-public-envelope transitions. Actual admission/scheduler enforcement remains a separate obligation.
+- SC1-G: offline finite safety game, independently regenerated transitions and checked certificates. No runtime adoption or replacement verifier.
+- SC1-A: omnet's existing TKA whole-service snapshot and local socket operation. A logical append is an authenticated AUM addition, not a new append-log/store implementation. Signature authentication and remote-requester authentication are different obligations.
+
+SC1-A currently trusts the kernel, provisioned directory ancestors, same-UID/root actors, one network namespace for writer exclusion, and a same-UID adapter's asserted NodeID/admin fields. The pinned service has no SO_PEERCRED or Noise authentication evidence. Remote-principal authentication is NOT_RUN, owned by the existing adapter/Headscale integration; local fixtures prove only registry/key binding and admin enforcement. An arbitrary client's admin byte is never authentication.
+
+Untrusted remote request bytes, ordering, cancellations and connection loss are modeled only after the trusted adapter boundary. Malicious same-UID actors, kernel compromise, storage rollback, firmware/hardware attacks and power loss are outside the current hosted qualification. All fixtures use synthetic public test keys and secrets.
+
+## 2. Policy and effect contracts
+
+An admitted effect must bind principal/security domain and grant; legal protocol transition and dedup disposition; checked original quantities and object identity/version; complete reservation ownership/vector; permitted observations/disclosures; and intent, linearization, acknowledgement and recovery semantics.
+
+Correct enforcement of these rules does not prove the rules appropriate. Independent policy review must assess who may relay, sign, administer and observe; which disclosures are intended; and fairness/availability costs. Unsupported policy or environmental assumptions stay explicit.
+
+Object domains are distinct: an in-memory view uses a trusted owner identity/version/extent; the semantic snapshot uses its exact full authority hashes and Revision; a filesystem object uses the opened descriptor's validated device/inode/type/ownership plus trusted namespace assumptions. A descriptor number alone is not identity, and an fd does not freeze contents. Quantity object handles must not truncate hashes or reuse identity/version pairs.
+
+The new reservation profile uses nonwrapping policy epochs and nonreused operation IDs. The existing IPC v1 does NOT carry either. JSON Version is a protocol-capability version, not an epoch. Do not relabel Interactive Head as a generic policy epoch.
+
+## 3. Checked quantities (#756)
+
+Unsigned scalar words retain modulo arithmetic. `qty` contains value and cap. Statuses: 0 success; 1 malformed operand; 2 domain mismatch/negative signed ingress/widening through narrow; 3 capacity overflow or underflow; 4 object/version mismatch. Refusal leaves the complete output unchanged. Compare signed ingress against zero BEFORE unsigned conversion; conversion itself may trap.
+
+Add validates a,b and checks `b <= cap-a` before adding. Multiply checks `b <= cap/a` when a is nonzero. Subtract checks b<=a. Narrow checks target cap and value. Different caps refuse rather than guessing a result bound; equal caps do not distinguish physical units. Epoch increment refuses maximum. Slice formation validates exact identity/version/extent, then offset<=extent and count<=extent-offset before effects.
+
+A small wrapped value cannot establish a valid original length: `qword(add raw_a raw_b)` is not checked addition. Serialized slices require reconstruction of checked original offset/count and comparison to the trusted current object immediately before use. Distinct output/input structs follow the seed alias rule.
+
+| ID | Frozen outcome |
+|---|---|
+| Q1 | `(2^64-8)+16` modular baseline8; checked add3, output unchanged |
+| Q2 | Exhaustive widths1..8 against exact wider signed arithmetic AND external arbitrary-precision oracle over emitted actual outcomes; finite, not u64 proof |
+| Q3 | u64 extrema, malformed1, unequal caps2, zero/exact capacity0 |
+| Q4 | max*2, `(2^32)^2`, `(2^32+1)^2` refuse3; `(2^32-1)^2` and zero*max succeed0 |
+| Q5 | Negative signed ingress2 before conversion |
+| Q6 | Narrow256 to255 refuses3;255 succeeds; qnarrow with target cap above source cap refuses2 |
+| Q7 | Exact/empty slice0; extent violation3; stale object/version4 |
+| Q8 | Scalar/qty, object/qty and slice/qty mix compile refusal7; intentional crypto wrap accepted |
+| Q9 | Epoch maximum refuses3, no wrap/rotation |
+| Q10 | Actual omnet original frame length/cursor migration and authority/budget original-operand migration; inventory remaining consumers |
+| Q11 | Compiled removed guards and modular-instead-of-checked lowering must reach intended assertions; #623 native correspondence separately bound |
+
+## 4. Resource conservation and secrecy (#757/#759)
+
+Each stock dimension obeys nonnegative U,R,B and `U+R<=B`, checked by guarded subtraction. Stocks: processes/descendants, descriptors, resident memory, queued bytes, persistent bytes, temporary snapshot bytes, retained history/logs and cleanup reserve. Charge shared physical parents once. The pure helper has two fixed owners, one attributed slot each, no delegation API and no unlimited-demand availability claim. Sibling-sum enforcement/delegation remains the authority/scheduler owner's obligation; copying capacity never delegates it.
+
+The complete vector reserves atomically in ONE authoritative writer or does not change. The omnet writer is its descriptor-held abstract Unix lock plus single-threaded `dsrequest` dispatch. The old Omega PID-lock dispatcher is not this writer and remains BLOCKED on stale-reclaim ABA, generation timing, ignored release errors and missing directory-sync semantics.
+
+Bind reservation ID, exact request/principal/grant/object/version/epoch. Unknown cancellation, death, timeout, delayed completion or lost acknowledgement retains full charge. Commit actual<=reserved and refund slack only with authoritative quiescence and observation permission. Reclaim persistent stock only after actual reclamation and required durability. The pure helper spends fuel monotonically without refund; this is NOT durable fuel enforcement in the current daemon.
+
+Integration must classify every stock as durable or volatile. Volatile release at crash/rollover is permitted only for proved effect-free work, with that event declared a public boundary. Durable identity, envelope and fuel cannot be reconstructed as fresh zero after restart. A per-epoch replenishment policy is possible only as an explicit different policy, not an implicit reset.
+
+Snapshot creation needs a standing maximum temporary-snapshot reservation plus cleanup reserve BEFORE staging. The snapshot cannot bootstrap the durable reservation that pays for its own initial write. The current v1 snapshot has no resource frame; its reserved metadata words are checked zero. The owner must choose derived authoritative accounting plus standing envelopes or a versioned schema/migration, and prove the physical maximum from actual framing. No second ledger/store is introduced.
+
+Recovery reconciles retained committed and temporary physical state internally. Public capacity is computed only from public envelope maxima, never secret actual usage; internally check actual<=envelope. Each secret frame is charged its public bound (currently1024), or padded under a separately implemented policy. R4's40 ledger/60 retained committed/cap100 must refuse new60. If the extra20 is an effect-free stale temporary file, authoritative cleanup may allow later admission; that is a different fixture, not evidence for retained committed accounting.
+
+SC1-E reserves a fixed public partition before secret work. Completion, cancel, errors and supervisor work cannot change public admission, ordering or reclamation. Release requires an exact public release identity AND authoritative quiescence. Unknown retains; secret-dependent delay is not certified noninterference. Across restart, durable public envelope identities must be restored before public admission. The real tkad `dsbatch` serial dispatch loop is the candidate admission point, but is NOT integrated: elapsed readiness exposes service completion. Untimed accept/refuse and order are distinguished from timing; fixed release scheduling is a separate missing owner capability.
+
+| ID | Frozen outcome |
+|---|---|
+| R1 | Capacity6, two requests4: at most one atomic success |
+| R2 | Vector atomic rollback, binding/replay refusal, actual<=q, attributable reclaim, fuel not refunded |
+| R3 | State(u,r1,r2), cap3, idle reserves1..2, commits0..q, release1, whole-service effect-free crash clears both:18 states78 deduplicated edges; explicit edge corpus/hash required |
+| R4 | Ledger40, retained physical60, cap100: new60 refused; no smaller-ledger recovery |
+| R5 | Real concurrent writer schedule, crash/rollover accounting and standing temp reserve: BLOCKED until actual integration |
+| E1 | Capacity2, secret occupancy1/2 makes public request1 differ in baseline; fixed envelope observations equal |
+| E2-E5 | Completion/cancel/error/supervisor refund mutants must execute and fail paired observations |
+| E6 | Public release plus quiescence, recovered envelope identity; actual scheduler correspondence remains BLOCKED |
+
+R3 is effect-free only. Its crash release rule never applies to uncertain external or disk effects. Per-client crash and no crash each give70 edges; counts alone are insufficient.
+
+## 5. Real append, identity and recovery (#670/#659/omnet#3)
+
+The current TKA policy authenticates AUM signer keys against the AUM's retained parent state, then applies upstream fork choice. A registered NodeID is a relay, not necessarily a signing key. An AUM arriving after a head RemoveKey may validly refer to an older parent; pinned upstream oracle expectations decide this case. Do not replace it with a current-head-only rule. Current-state checks apply to node signing/registry/disable/finish according to their own contracts. Registry/key/admin checks occur in the same single-writer request interval; prepared permissions cannot escape that interval.
+
+Candidate preparation includes bounded response encoding before persistence. Store ordering is temp write, file fsync, framing/checksum validation, rename, directory fsync, staged-descriptor close, live-slot publication, acknowledgement. **Linearization is successful rename.** Acknowledgement requires successful directory fsync and close; close failure after fsync still causes exit74/UNKNOWN. The pre-rename validation is not a semantic reload. Restart's semantic validation may refuse a checksum-valid invalid candidate; that fail-closed refusal is the current outcome, not silent initialization.
+
+After rename with sync uncertainty, or failed cleanup, exit74 without further admission or rollback rename. The client outcome is UNKNOWN; a recovered validated snapshot may contain the effect even without an acknowledgement. Recovery is qualified only for process crashes. A later successful fsync does not prove power-loss durability after prior writeback EIO; Linux may report an error only once. Current stale-temp unlink lacks directory fsync. Neither is a power-loss receipt.
+
+| Route | Identity / retry contract at pinned base |
+|---|---|
+| sync/send | Full canonical AUMHash, including signatures; alternate wire encodings with same canonical identity are accepted no-ops. Interactive Head must equal resulting chosen head. Base rewrites Revision/snapshot even on no-op; proposed fix must suppress it and be qualified |
+| init/begin, init/finish, disable | State-dependent retry may return409 after a completed transition; no generic operation-id dedup exists |
+| sign | Current-authority verification; successful retry may return200 with snapshot rewrite |
+| registry/map | Trusted adapter policy, exact registered node binding; route-specific state outcomes |
+
+Disposition of omnet#3's generic replay-refusal row: upstream canonical AUM replay is accepted no-op; this is an explicit compatibility constraint, not a weakened test. Same operation ID with different bytes can be refused only after a new versioned IPC operation-ID contract exists. It is BLOCKED, not claimed for v1.
+
+| ID | Frozen consumer fixture / result class |
+|---|---|
+| A1 | Two real local socket clients append signed AUMs; signature authentication verified separately from adapter assertion trust |
+| A2 | Wrong registry NodeID/NodeKey/admin/action and invalid AUM signatures; outcomes from route policy/upstream oracle |
+| A3 | Interactive Head mismatch409; disable stale Head409; sign after key removal403. Generic epoch/version request fields unsupported |
+| A4 | Truncated/trailing/oversized/malformed/wrapped ingress; close or bounded error before effects as documented |
+| A5 | Deterministic serialized request/revocation order; not mid-dispatch concurrency in the serial daemon |
+| A6 | Final-component symlink, directory replacement after open, swapped resume descriptors; trusted same-UID interference assumptions retained |
+| A7 | Competing full reservations/cancel: real-service integration BLOCKED, helper results separate |
+| A8 | Supported short-write/ENOSPC/pre-rename cleanup, rename then directory-fsync EIO; syscall-wrapper variants bound as distinct executables |
+| A9 | Process restart/lost acknowledgement and independent persisted-state inspection; canonical no-op replay increments Revision at base, MUST leave Revision and snapshot unchanged after the proposed suppression fix |
+| A10 | Paired real-service secret inputs/output policy and matched workload measurements; not timing noninterference |
+
+Public outcome vocabulary includes400/403/404/409/413/500/503 with fixed bounded error bodies; malformed transport may close without reply. Store fail-stop74, loop failure75 and exec/resume failure76 are separate outcomes, not successful effect receipts. Fixtures must name the exact intended route/result, not accept arbitrary failure.
+
+A persisted intent does not atomically authorize a later process/network/device effect. Such effects require real provider fencing, idempotency and authoritative reconciliation. Post-effect generation checks cannot undo unauthorized execution.
+
+## 6. Secret/public contract (#758)
+
+For the public-signature path, AUMs, keys, signatures and validity are public; variable-time verification is permitted by this contract. For the secret path, disablement/support-secret contents and derived KDF values are secret before authorized disclosure. Request length and public state/candidate count/shape are public in this bounded profile; a length-hiding profile requires padding and new evidence.
+
+Observers are requester/public response status and body, Revision/Disabled, connection close, untimed admission/order, and the SC1-L architectural trace. Validity may be disclosed to the authorized requester at the caller's final decision. Successful disable intentionally discloses Disabled/Revision and the disablement secret via bootstrap, per upstream policy. Candidate index and mismatch-prefix length are NOT disclosures. REQUIRED owner change: comparison scans all32 bytes and candidate matching scans the complete public list. Both exit early at base1e075776; L2/A10 do not become verified until the actual proposal is independently checked. The scanner has no general declassification facility: the authorized output/caller decision sits outside the scanned function graph.
+
+SupportDisablement confidentiality means no route/error emits it and at-rest access relies on0600/private-directory same-UID trust. It is plaintext in the snapshot. There is no zeroization, remanence or crash-dump protection claim.
+
+The complete dependency closure includes raw JSON parse, base64/byte decoding, copies, Argon2i/BLAKE2b, hash/list comparisons, finish support checking, snapshot framing/BLAKE2s and variable-size writes, recovery rechecks, stack/16MiB pool lifetime, stale-temp unlink and crash dumps. A bounded comparison scan does not qualify that closure. Caches, speculation, instruction latency, OS timing and physical observations are outside SC1-L. Secret-dependent UDIV/SDIV MUST be refused in the stronger profile, but the current scanner only propagates their taint; constant-divisor secret dividends may pass. L4 division is BLOCKED pending the existing scanner owner's reviewed extension or explicit division-free artifact admission. A secret divisor's trap rejection does not establish this stronger property.
+
+| ID | Required fixture / obligation |
+|---|---|
+| L1 | Nondeterministic source output{0,1} refined to secret: ordinary inclusion holds, relational secrecy fails; paired native .om declared-output checker, not the static taint scanner |
+| L2 | Bounded compare static scan, fixed public shape and result-only disclosure |
+| L3 | Actual emitted branch/address mutants preserve ordinary outputs but trigger leakage refusal |
+| L4 | Secret division, helper-call and trap paths refused or explicitly unsupported |
+| L5 | Wrong target/bytes/model/policy/checker invalidates claim; scanner API gaps BLOCKED under #623/#624 |
+| L6 | Function-mode to real program-mode emitted-word correspondence; absent correspondence BLOCKED |
+| L7 | Actual omnet secret path paired outputs, complete closure classification, remaining unverified sites inventoried |
+
+## 7. Offline safety game (#760)
+
+Freeze finite state/action/disturbance encoding before implementation. Include protocol/current+expected epoch/object, both reservations, persistence/ack/recovery, concurrent request, revoke, substitute, partial write, crash, delay and lost ack. Unsupported disturbances/bounds remain explicit. Start with invariant states; iterate greatest fixed point `exists action, forall disturbance, successor in K`. Empty choices cannot imply safety; quiescence is explicit stutter. Independently regenerated transitions and losing-attractor enumeration check certificate exactness/maximality for this finite model only.
+
+Paired secrecy uses ONE action selected from the pair's common public state and intersection of enabled sets, the SAME public disturbance, equal permitted observations and related successors. Do not let the certificate select by hidden state. A fixed-envelope hidden-occupancy extension may establish finite equality by construction plus exhaustive checking; it is not runtime correspondence.
+
+G1 positive certificate; G2 swapped quantifiers; G3 omitted disturbance; G4 stale epoch; G5 uncertain refund; G6 cheapest unsafe proposal; G7 early iteration stop; G8 locally invariant losing state with witnesses; G9 legal serial schedule versus unsafe overlap; G10 no empty-set vacuity; G11 paired-product observations plus secret-admission mutant; G12 missing/stale cost refuses. Every mutant compiles and normally fails the intended assertion. Cost ranks only proven-safe actions. Synthetic costs are not #583 estimates. General #647 analysis integration and runtime adoption require independently checked correspondence, otherwise BLOCKED.
+
+## 8. Evidence and acceptance
+
+Independent reviewers assess fixture expectations, source and correspondence separately. A mutant counts only after successful compile and normal execution to its intended failed assertion; signal/build failure/timeout is INVALID unless testing that exact refusal. Retain bad attempts and no-win results.
+
+Preserve seed fixed point, nominal calls, cryptographic vectors and release gates. Reuse existing gate669 and owner OM-2 scanner rather than replacing them; gate669 is Omega-only. Existing external development oracles remain external. All new first-party implementation, fixtures and runner logic is .om.
+
+Report formal proof, finite models, differential tests, native/emulated execution, host measurements, process crashes and power-loss qualification separately. Bind fault variants to their own executable bytes. Clean-checkout replay and final independent review follow coherent changes. Measure matched throughput, p50/p95/p99, resources and verification overhead with raw samples; a two-sample append measurement cannot support tail quantiles. Timing is regression evidence, never a secrecy proof.
+
+The #673 acceptance matrix must include every Q/R/E/A/L/G obligation, status VERIFIED/FAILED/BLOCKED/NOT_RUN, assumptions, exact evidence and responsible owner/next step. Policy appropriateness has its own review row. No parent issue closes from helper/model results, and no merge/deployment gate is bypassed.
diff --git a/spec/semantic-codebook-v0.md b/spec/semantic-codebook-v0.md
new file mode 100644
index 000000000..29d5d5c2c
--- /dev/null
+++ b/spec/semantic-codebook-v0.md
@@ -0,0 +1,47 @@
+# Semantic atoms and compact local codebook v0
+
+**Status: PROPOSED / NOT QUALIFIED.** Finite component contract only, not a master plan. [SEM-1 Omega #721](https://github.com/aien-dev/omega-mv/issues/721), [cross-project #315](https://github.com/aien-dev/aien-architecture-mv/issues/315). The formal ABI is not frozen until source-aware IR #621, semantics #625, lowering/verification #623 and reuse #651 owners review it.
+
+## Meaning and local reference
+
+One bit selects between two **already known, agreed alternatives**. Eight bits select 256 alternatives. The receiver must already hold and independently authenticate the same complete dictionary definition, generation, effect/numeric contract and selected realization. The short code is **not** an identifier with global permanence, authorization or proof.
+
+A canonical semantic atom v0 points to the existing 32-byte program/body ID (spec/program-identity.md; spec/semantic-object.md), versioned typed inputs/outputs, explicit numeric/trap/effect semantics, constraints and proof/admission identity. An admitted realization is separately bound to the machine ISA/backend, exact compiled bytes and independent verification receipt. Local codebook installation fixes a table from u8 indices to **complete 32-byte IDs**, domain root, namespace, epoch and allowed capabilities. Changing any index, meaning, contract or generation invalidates stale refs. Unknown or ambiguous semantics and unsupported privilege are refusals.
+
+Canonical bytes and SHA algorithm are inherited from the existing Omega canonical object implementation; this proposal may **not** add another canonical encoder, separate library authority, unversioned hash reduction or model-supplied verifier. Protected effects still require existing World/AEGIS approval. Remote negotiation is [Protocols #54](https://github.com/aien-dev/aien-protocols-mv/issues/54); local reference alone is not a trusted network message.
+
+## Small native research example
+
+[dispatch-v0.om](../examples/semantic-codebook/dispatch-v0.om) is an isolated deterministic .om smoke using three pure wrapping u8 functions:
+- short ref 0: add one;
+- short ref 1: multiply by two;
+- short ref 2: two times input plus an 8-bit parameter.
+
+[codebook-v0.txt](../examples/semantic-codebook/codebook-v0.txt) has exact synthetic bytes hashed by SHA256. A provided 256-bit synthetic test root is compared as four little-endian u64 limbs, and an epoch (9) is required. Unknown index, stale epoch and changed test root must refuse. The status/result is a bounded tagged u16: 0x00vv valid u8 value; 0xff01 stale epoch; 0xff02 missing index; 0xff03 wrong root. No real canonical full-ID validation, authenticated origin or capability checks are present in this tiny program. It is **not a secure codebook** and cannot carry u64 results or effectful operations. It demonstrates the selection/refusal shape only.
+
+The caller can choose the supplied synthetic root; matching the root is not proof that the caller has authority. In later revisions a separate, typed status/result structure and **independently verified admitted** full ID are mandatory.
+
+Native .om compilation and execution have not run in this tool session. [README](../examples/semantic-codebook/README.md) contains the exact AArch64 reproduction commands and nine expected cases. A future smoke PASS would only prove the bounded example under the selected toolchain, not the full SEM-1 contract.
+
+## Truthful compression accounting
+
+For n uses of a semantic operation, original encoding/body length B, per-call index/parameter/lookup bytes C, and dictionary/install/proof setup D:
+
+    baseline = n * B
+    factored = B + n * C + D
+    total savings requires n * (B - C) > B + D
+
+Count all dictionary and parameter bits; do not assume an index by itself physically eliminated any model weights or memory traffic. Code size and **actual executed** instructions are distinct from descriptions of what a program means, task latency, semantic generalization and joules.
+
+[SEM-2 Omega #722](https://github.com/aien-dev/omega-mv/issues/722) owns true executable byte factoring (current M11 omega_refactor_program copies executable bytes unchanged while decreasing reported instruction cost). [SEM-3 Omega #723](https://github.com/aien-dev/omega-mv/issues/723) owns parameterized meaning mining, existing GEN-3 #478 owns verified abstraction records, reuse #651 and trace compilation #658 own durable skill procedures, and [Benchmarks #43](https://github.com/aien-dev/benchmarks-mv/issues/43) owns independent measurement.
+
+## Admission and qualification before production
+
+- Freeze canonical semantic bytes, effect/numerical state, ABI/refusal code, lookup namespace and codebook root under existing owners.
+- On every admission independently verify true semantic ID, external proof/signature chain, dictionary root and generation; no self-minted pass.
+- Test stale dictionary, id reuse, conflicting namespace, malformed lengths, unknown index, numeric-contract mutation, mismatched effect/capabilities, wrong tenant and expired/revoked entries.
+- Report actual original and factored *serialized* bytes including first-load and warm setup, compiled code bytes, dynamic instructions and full latency separately. A representation that stores exactly the same executable bytes must not claim binary compression.
+- Compare exact cache, whole-program library and learned parameterized knowledge on genuinely unseen tasks with preregistered independent benchmark.
+- No live 35B cutover, chip run, private trace export, driver restart or release promotion from this proposal. Keep source, test, independent reviewer, PR and final receipts in the owner issue.
+
+Status of all required qualification gates is **NOT_RUN** until actual source-pinned execution and independent review.
\ No newline at end of file
diff --git a/src/.crumb b/src/.crumb
index 7c4b83da7..c128adacb 100644
--- a/src/.crumb
+++ b/src/.crumb
@@ -145,8 +145,8 @@
           "purpose": "Ionic-droplet reservoir simulator (omega#440): binary32 fixed-step RK4 of the authors' droplet m"
         },
         {
-          "digest": "1e400d9b84494347892448fd576be7bf596ef810ed6e88bcd70f7e7d9a6b5746",
-          "last_commit": "97a960f5c",
+          "digest": "43126cdfbfc4a67b3ab8785a1358a861960954e0374b7118781d06f117f9de5c",
+          "last_commit": "b99ffb73f",
           "name": "runtime",
           "purpose": "Directory src/runtime. Purpose not yet described by a human."
         },
@@ -187,15 +187,15 @@
           "purpose": "Directory src/visor. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:2f729945214be989a74d7c2064ae4ba3c2deb52ebea3f334b459198a7bd032ed",
-      "compiled_at": "2026-10-30T02:49:13Z",
+      "children_root": "sha256:0af477389a15f0e4f2ad9101e55195d4d07c9650af7d8e617bd67b0dc96e0b37",
+      "compiled_at": "2026-10-30T17:38:28Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:aaf5acb82fd4c720cd60c85fd6087f636c72a98e2f3740c9295dcfa525dc64d7",
+      "digest": "sha256:d3aa18b62e2757c0b483948d6c80bcda08e2f63bd1d742d68f284a80dc50d73d",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 568,
-      "generated_at_commit": "2cb1ccb5d3c1a1ce1cb94a7a3dd3c221395c4e15",
-      "source_tree": "sha256:7f1fef46a27e8baf5cf567bb590d417ede3767c5f07e714d0f0812af0645bb4b"
+      "files": 570,
+      "generated_at_commit": "5c159484b40345f76ad15937305aac155a808bc8",
+      "source_tree": "sha256:7ba4eae27e2b1f1cff9e2dd74a59f5e9a0e708da55af061cff2f12fcc59b3b64"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/src/omega_bw_hazard.c b/src/omega_bw_hazard.c
new file mode 100644
index 000000000..026ae76bd
--- /dev/null
+++ b/src/omega_bw_hazard.c
@@ -0,0 +1,267 @@
+/* omega_bw_hazard.c: static scoreboard hazard checker over encoded sm_121 kernel bytes (omega-mv#554). See the header.
+ *
+ * Every form decoded below is a form src/omega_blackwell_codegen.c (encode_single_insn) or a post-encode patch
+ * (omega_tc_patch_code, omega_qmma_patch_code) writes. The operand positions are the encoder's: Rd = word 0 bits 16..23,
+ * Ra = word 0 bits 24..31, Rb = word 1 bits 0..7, Rc = word 2 bits 0..7. tests/bw_hazard_test.c checks the decoder
+ * against the encoder for every IR op and against nvdisasm on every kernel. */
+#include "omega_bw_hazard.h"
+
+#include 
+#include 
+
+static uint32_t rd32(const uint8_t *p) { return (uint32_t)p[0] | (uint32_t)p[1] << 8 | (uint32_t)p[2] << 16 | (uint32_t)p[3] << 24; }
+
+/* registers of a memory access of size field (word 2 bits 9..11): 0..4 one register, 5 a pair (.64), 6 a quad (.128) */
+static int size_regs(uint32_t w2) {
+    unsigned s = (w2 >> 9) & 7u;
+    return s <= 4 ? 1 : s == 5 ? 2 : s == 6 ? 4 : -1;
+}
+
+static void R(OmegaBwInsn *d, unsigned reg, int n, int uniform) {
+    if (reg == OMEGA_BW_RZ || n <= 0 || d->nr >= 5) return;
+    d->rd[d->nr].reg = (uint8_t)reg; d->rd[d->nr].n = (uint8_t)n; d->rd[d->nr].uniform = (uint8_t)uniform; d->nr++;
+}
+static void W(OmegaBwInsn *d, unsigned reg, int n, int uniform) {
+    if (reg == OMEGA_BW_RZ || n <= 0 || d->nw >= 1) return;
+    d->wr[0].reg = (uint8_t)reg; d->wr[0].n = (uint8_t)n; d->wr[0].uniform = (uint8_t)uniform; d->nw = 1;
+}
+
+int omega_bw_decode(const uint8_t b[16], OmegaBwInsn *d) {
+    if (!b || !d) return -1;
+    uint32_t w0 = rd32(b), w1 = rd32(b + 4), w2 = rd32(b + 8), w3 = rd32(b + 12);
+    memset(d, 0, sizeof *d);
+    d->op = (uint16_t)(w0 & 0xfffu);
+    d->guard = (uint8_t)((w0 >> 12) & 0xfu);
+    d->stall = (uint8_t)((w3 >> 9) & 0xfu);
+    d->yield = (uint8_t)((w3 >> 13) & 1u);
+    d->wbar = (uint8_t)((w3 >> 14) & 7u);
+    d->rbar = (uint8_t)((w3 >> 17) & 7u);
+    d->wait = (uint8_t)((w3 >> 20) & 0x3fu);
+    unsigned D = (w0 >> 16) & 0xffu, A = w0 >> 24, B = w1 & 0xffu, C = w2 & 0xffu;
+    int n;
+    switch (d->op) {
+    case 0x918: d->name = "NOP"; break;
+    case 0xb1d: d->name = "BAR"; break;
+    case 0x992: d->name = "MEMBAR"; break;
+    case 0x98f: d->name = "CCTL"; R(d, A, 1, 0); d->late = 1; break;
+    case 0x94d: d->name = "EXIT"; d->flow = OMEGA_BW_FLOW_EXIT; break;
+    case 0x947: {
+        d->name = "BRA"; d->flow = OMEGA_BW_FLOW_BRA;
+        int32_t rel = (int32_t)((uint32_t)((int32_t)w1 >> 2) << 6) | (int32_t)((w0 >> 18) & 0x3fu);
+        d->target = rel + 1;
+        break;
+    }
+    case 0x945: d->name = "BSSY"; break;
+    case 0x941: d->name = "BSYNC"; break;
+    case 0x202: d->name = "MOV"; W(d, D, 1, 0); R(d, B, 1, 0); break;
+    case 0x802: d->name = "MOV"; W(d, D, 1, 0); break;
+    case 0x919: d->name = "S2R"; W(d, D, 1, 0); d->var = 1; break;
+    case 0xb82:
+        d->name = "LDC"; if ((n = size_regs(w2)) < 0) return -1;
+        W(d, D, n, 0); R(d, A, 1, 0); d->var = 1; d->late = 1; break;
+    case 0x7ac:
+        d->name = "LDCU"; if ((n = size_regs(w2)) < 0) return -1;
+        W(d, D, n, 1); R(d, A, 1, 1); d->var = 1; d->late = 1; break;
+    case 0x224: d->name = "IMAD"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x824: d->name = "IMAD"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, C, 1, 0); break;
+    case 0xc24: d->name = "IMAD"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 1); R(d, C, 1, 0); break;
+    case 0x825: d->name = "IMAD.WIDE"; W(d, D, 2, 0); R(d, A, 1, 0); R(d, C, 2, 0); break;
+    case 0x227: d->name = "IMAD.HI"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x20c: d->name = "ISETP"; R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x80c: d->name = "ISETP"; R(d, A, 1, 0); break;
+    case 0xc0c: d->name = "ISETP"; R(d, A, 1, 0); R(d, B, 1, 1); break;
+    case 0x210: d->name = "IADD3"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x23c: d->name = "HMMA"; W(d, D, 4, 0); R(d, A, 4, 0); R(d, B, 2, 0); R(d, C, 4, 0); break;
+    case 0x27a: d->name = "QMMA"; W(d, D, 4, 0); R(d, A, 4, 0); R(d, B, 2, 0); R(d, C, 4, 0); break;
+    case 0x819: d->name = "SHF"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, C, 1, 0); break;
+    case 0x219: d->name = "SHF"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x812: d->name = "LOP3"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, C, 1, 0); break;
+    case 0x212: d->name = "LOP3"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x221: d->name = "FADD"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x220: d->name = "FMUL"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x223: d->name = "FFMA"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); R(d, C, 1, 0); break;
+    case 0x20b: d->name = "FSETP"; R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x208: d->name = "FSEL"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x209: d->name = "FMNMX"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x23e: d->name = "F2FP"; W(d, D, 1, 0); R(d, A, 1, 0); R(d, B, 1, 0); break;
+    case 0x245: d->name = "I2FP"; W(d, D, 1, 0); R(d, B, 1, 0); break;
+    case 0x305: d->name = "F2I"; W(d, D, 1, 0); R(d, B, 1, 0); d->var = 1; break;
+    case 0x308: d->name = "MUFU"; W(d, D, 1, 0); R(d, B, 1, 0); d->var = 1; break;
+    case 0xf89: d->name = "SHFL"; W(d, D, 1, 0); R(d, A, 1, 0); d->var = 1; break;
+    case 0x981: /* LDG Rd, desc[URb][Ra.64+imm]: word 2 bit 8 = 64-bit address, bit 27 = descriptor */
+        d->name = "LDG"; if ((n = size_regs(w2)) < 0) return -1;
+        W(d, D, n, 0); R(d, A, (w2 & 0x100u) ? 2 : 1, 0); if (w2 & 0x08000000u) R(d, B, 1, 1);
+        d->var = 1; d->late = 1; break;
+    case 0x986: /* STG desc[URc][Ra.64+imm], Rb */
+        d->name = "STG"; if ((n = size_regs(w2)) < 0) return -1;
+        R(d, A, (w2 & 0x100u) ? 2 : 1, 0); R(d, B, n, 0); if (w2 & 0x08000000u) R(d, C, 1, 1);
+        d->late = 1; break;
+    case 0x9a8: /* ATOMG desc[URc][Ra.64], Rb -> Rd */
+        d->name = "ATOMG"; W(d, D, 1, 0); R(d, A, (w2 & 0x100u) ? 2 : 1, 0); R(d, B, 1, 0);
+        if (w2 & 0x08000000u) R(d, C, 1, 1);
+        d->var = 1; d->late = 1; break;
+    case 0x984: /* LDS Rd, [Ra+URb+imm]: word 2 bit 27 = uniform offset */
+        d->name = "LDS"; if ((n = size_regs(w2)) < 0) return -1;
+        W(d, D, n, 0); R(d, A, 1, 0); if (w2 & 0x08000000u) R(d, B, 1, 1);
+        d->var = 1; d->late = 1; break;
+    case 0x388: case 0x988: /* STS [Ra+URc], Rb */
+        d->name = "STS"; if ((n = size_regs(w2)) < 0) return -1;
+        R(d, A, 1, 0); R(d, B, n, 0); if (w2 & 0x08000000u) R(d, C, 1, 1);
+        d->late = 1; break;
+    default:
+        return -1;
+    }
+    return 0;
+}
+
+const char *omega_bw_hazard_kind(uint8_t kind) {
+    return kind == OMEGA_BW_HZ_RAW ? "RAW" : kind == OMEGA_BW_HZ_WAR ? "WAR" : kind == OMEGA_BW_HZ_WAW ? "WAW" : "?";
+}
+
+/* ---- the walk ---------------------------------------------------------------------------------------------------
+ * State per register: two 64-bit sets of "release masks". An outstanding op is entered as the bit (1 << m), m the
+ * 6-bit set of barriers whose wait releases it (m = 0: the op declared none, nothing releases it). A wait mask W
+ * releases every entry m with m & W != 0, so it clears kill(W). Union over paths is OR. */
+#define NREG 512 /* 256 general + 256 uniform */
+
+typedef struct {
+    uint64_t w[NREG];   /* pending writes (RAW / WAW) */
+    uint64_t r[NREG];   /* pending late reads (WAR) */
+    uint32_t wpc[NREG]; /* last producer / queued reader seen (a hint for the report) */
+    uint32_t rpc[NREG];
+} State;
+
+static uint64_t kill_mask(unsigned wait) {
+    uint64_t k = 0;
+    for (unsigned m = 1; m < 64; m++)
+        if (m & wait) k |= 1ull << m;
+    return k;
+}
+
+static void note(OmegaBwHazardReport *r, uint32_t pc, uint32_t src, uint8_t kind, unsigned idx, uint64_t pending) {
+    unsigned rel = 0;
+    for (unsigned m = 0; m < 64; m++)
+        if (pending >> m & 1u) { rel = m; break; } /* the smallest mask: 0 when an op declared no barrier */
+    for (size_t i = 0; i < r->count && i < OMEGA_BW_HAZARD_MAX; i++)
+        if (r->f[i].pc == pc && r->f[i].kind == kind && r->f[i].reg == (uint8_t)idx && r->f[i].uniform == (idx >= 256))
+            return;
+    if (r->count < OMEGA_BW_HAZARD_MAX) {
+        OmegaBwHazard *h = &r->f[r->count];
+        h->pc = pc; h->src_pc = src; h->kind = kind; h->reg = (uint8_t)idx; h->uniform = (uint8_t)(idx >= 256); h->release = (uint8_t)rel;
+    }
+    r->count++;
+}
+
+/* one instruction: IN state s -> OUT state s (in place). rep != NULL records the findings. */
+static void step(const OmegaBwInsn *d, uint32_t pc, State *s, OmegaBwHazardReport *rep) {
+    if (d->wait) {
+        uint64_t k = ~kill_mask(d->wait);
+        for (unsigned i = 0; i < NREG; i++) { s->w[i] &= k; s->r[i] &= k; }
+    }
+    /* reads: RAW against pending writes; the first reader is reported and the entry dropped (no cascade) */
+    for (unsigned j = 0; j < d->nr; j++)
+        for (unsigned q = 0; q < d->rd[j].n; q++) {
+            unsigned i = (d->rd[j].uniform ? 256u : 0u) + ((d->rd[j].reg + q) & 0xffu);
+            if ((i & 0xffu) == OMEGA_BW_RZ) continue;
+            if (s->w[i]) { if (rep) note(rep, pc, s->wpc[i], OMEGA_BW_HZ_RAW, i, s->w[i]); s->w[i] = 0; }
+        }
+    /* writes: WAR against queued late readers, WAW against pending writes */
+    for (unsigned j = 0; j < d->nw; j++)
+        for (unsigned q = 0; q < d->wr[j].n; q++) {
+            unsigned i = (d->wr[j].uniform ? 256u : 0u) + ((d->wr[j].reg + q) & 0xffu);
+            if ((i & 0xffu) == OMEGA_BW_RZ) continue;
+            if (s->r[i]) { if (rep) note(rep, pc, s->rpc[i], OMEGA_BW_HZ_WAR, i, s->r[i]); s->r[i] = 0; }
+            if (s->w[i]) { if (rep) note(rep, pc, s->wpc[i], OMEGA_BW_HZ_WAW, i, s->w[i]); s->w[i] = 0; }
+            int has_w = d->wbar != OMEGA_BW_NOBAR;
+            if (has_w || d->var) { s->w[i] |= 1ull << (has_w ? (1u << d->wbar) : 0u); s->wpc[i] = pc; }
+        }
+    /* late source reads: held until a wait on the read barrier or on the write barrier (completion) */
+    if (d->late || d->rbar != OMEGA_BW_NOBAR) {
+        unsigned m = (d->rbar != OMEGA_BW_NOBAR ? 1u << d->rbar : 0u) | (d->wbar != OMEGA_BW_NOBAR ? 1u << d->wbar : 0u);
+        for (unsigned j = 0; j < d->nr; j++)
+            for (unsigned q = 0; q < d->rd[j].n; q++) {
+                unsigned i = (d->rd[j].uniform ? 256u : 0u) + ((d->rd[j].reg + q) & 0xffu);
+                if ((i & 0xffu) == OMEGA_BW_RZ) continue;
+                s->r[i] |= 1ull << m; s->rpc[i] = pc;
+            }
+    }
+}
+
+/* OR src into dst; 1 if dst changed */
+static int join(State *dst, const State *src) {
+    int ch = 0;
+    for (unsigned i = 0; i < NREG; i++) {
+        uint64_t w = dst->w[i] | src->w[i], r = dst->r[i] | src->r[i];
+        if (w != dst->w[i]) { dst->w[i] = w; dst->wpc[i] = src->wpc[i]; ch = 1; }
+        if (r != dst->r[i]) { dst->r[i] = r; dst->rpc[i] = src->rpc[i]; ch = 1; }
+    }
+    return ch;
+}
+
+int omega_bw_hazard_check(const uint8_t *code, size_t len, OmegaBwHazardReport *r) {
+    if (!r) return -1;
+    memset(r, 0, sizeof *r);
+    r->bad_pc = -1;
+    if (!code || len == 0 || len % 16u) return -1;
+    size_t n = len / 16u;
+    r->insns = n;
+    OmegaBwInsn *ins = calloc(n, sizeof *ins);
+    State *in = calloc(n, sizeof *in);
+    uint8_t *seen = calloc(n, 1), *queued = calloc(n, 1);
+    uint32_t *work = calloc(n, sizeof *work);
+    State *cur = malloc(sizeof *cur);
+    int rc = -1;
+    if (!ins || !in || !seen || !queued || !work || !cur) goto out;
+
+    /* decode what is reachable from 0 (padding after the final EXIT is never decoded) */
+    {
+        size_t top = 0;
+        work[top++] = 0; queued[0] = 1;
+        while (top) {
+            uint32_t pc = work[--top];
+            if (omega_bw_decode(code + (size_t)pc * 16u, &ins[pc]) != 0) { r->bad_pc = pc; goto out; }
+            seen[pc] = 1;
+            const OmegaBwInsn *d = &ins[pc];
+            int64_t succ[2]; int ns = 0;
+            if (d->flow == OMEGA_BW_FLOW_NEXT || d->guard != 7u) succ[ns++] = (int64_t)pc + 1;
+            if (d->flow == OMEGA_BW_FLOW_BRA) succ[ns++] = (int64_t)pc + d->target;
+            for (int k = 0; k < ns; k++) {
+                if (succ[k] < 0 || succ[k] >= (int64_t)n) { r->bad_pc = pc; goto out; }
+                if (!queued[succ[k]]) { queued[succ[k]] = 1; work[top++] = (uint32_t)succ[k]; }
+            }
+        }
+    }
+    for (size_t i = 0; i < n; i++) r->reachable += seen[i];
+
+    /* fixed point: IN states only grow (OR), the lattice is finite. Every reachable instruction is stepped at least
+     * once (seen is reused as "not yet stepped"), later only when its IN state grew. */
+    memset(queued, 0, n);
+    {
+        size_t top = 0;
+        work[top++] = 0; queued[0] = 1;
+        while (top) {
+            uint32_t pc = work[--top];
+            queued[pc] = 0; seen[pc] = 2;
+            *cur = in[pc];
+            step(&ins[pc], pc, cur, NULL);
+            const OmegaBwInsn *d = &ins[pc];
+            int64_t succ[2]; int ns = 0;
+            if (d->flow == OMEGA_BW_FLOW_NEXT || d->guard != 7u) succ[ns++] = (int64_t)pc + 1;
+            if (d->flow == OMEGA_BW_FLOW_BRA) succ[ns++] = (int64_t)pc + d->target;
+            for (int k = 0; k < ns; k++) {
+                uint32_t t = (uint32_t)succ[k];
+                if ((join(&in[t], cur) || seen[t] == 1) && !queued[t]) { queued[t] = 1; work[top++] = t; }
+            }
+        }
+    }
+    /* record: one pass over the reachable instructions with their fixed-point IN states */
+    for (size_t pc = 0; pc < n; pc++) {
+        if (!seen[pc]) continue;
+        *cur = in[pc];
+        step(&ins[pc], (uint32_t)pc, cur, r);
+    }
+    rc = 0;
+out:
+    free(ins); free(in); free(seen); free(queued); free(work); free(cur);
+    return rc;
+}
diff --git a/src/omega_bw_hazard.h b/src/omega_bw_hazard.h
new file mode 100644
index 000000000..cd80642c1
--- /dev/null
+++ b/src/omega_bw_hazard.h
@@ -0,0 +1,85 @@
+/* omega_bw_hazard.h: static scoreboard hazard checker over encoded sm_121 kernel bytes (omega-mv#554).
+ *
+ * The warp simulators run the IR and model no scoreboards, so a dropped wait mask passes every host test and only
+ * shows on the chip (omega-mv#545: the encoder wrote a fixed word 3 for IADD3, the wait on the Q loads' read barrier
+ * was lost and a MOV zeroed the address of 16 queued LDG.E.128; Xid 13). This checker reads the bytes the chip runs,
+ * after every encode and patch step, and walks the control flow with the scoreboard rules:
+ *
+ *   RAW  a reader of a register written by a variable-latency op must have waited on that op's write barrier;
+ *   WAR  a writer of a register still being read by a queued load or store must have waited on its read barrier
+ *        (or on its write barrier: an op that has completed has read its sources);
+ *   WAW  a writer of a register a variable-latency op has not yet written must have waited on that op's write
+ *        barrier (the late result would land over the new value).
+ *
+ * Control word (word 3 of each 16-byte instruction, the same layout as CW() in omega_bw_em.h): stall bits 9..12,
+ * yield 13, write barrier 14..16, read barrier 17..19 (7 = none), wait mask 20..25. A wait on barrier n releases every
+ * register any outstanding op on n holds (the barrier is a counter that reaches zero). The analysis is a may-analysis
+ * over all paths (branches, predicated EXIT/BRA, loops) to a fixed point; a predicated instruction may or may not
+ * write, and its wait mask is taken as applied (UNKNOWN whether the chip applies the wait of a predicated-off
+ * instruction; if it does not, this checker can miss a hazard behind such an instruction).
+ *
+ * Limits, said out loud: fixed-latency hazards (stall counts too short) are not checked; predicate registers are not
+ * tracked; HMMA/QMMA are tracked only through the barriers their bytes declare. NVIDIA documents none of the control
+ * field; the layout is our own decode, cross-checked against nvdisasm on every kernel (tests/bw_hazard_test.c). */
+#ifndef OMEGA_BW_HAZARD_H
+#define OMEGA_BW_HAZARD_H
+
+#include 
+#include 
+
+#define OMEGA_BW_RZ 0xffu            /* register 255 is RZ, uniform 255 is URZ: never tracked */
+#define OMEGA_BW_NOBAR 7u
+
+enum { OMEGA_BW_FLOW_NEXT = 0, OMEGA_BW_FLOW_EXIT, OMEGA_BW_FLOW_BRA };
+
+typedef struct {
+    uint8_t reg;     /* first register */
+    uint8_t n;       /* 1, 2 or 4 consecutive registers */
+    uint8_t uniform; /* 1 = uniform register file */
+} OmegaBwOperand;
+
+typedef struct {
+    uint16_t op;                         /* word 0 bits 0..11 */
+    uint8_t guard;                       /* word 0 bits 12..15: 7 = always (PT) */
+    uint8_t stall, yield, wbar, rbar, wait;
+    uint8_t var;                         /* variable-latency writer: its result needs a write barrier */
+    uint8_t late;                        /* reads its sources late (loads, stores, atomics, constant loads) */
+    uint8_t nr, nw;
+    OmegaBwOperand rd[5], wr[1];
+    uint8_t flow;                        /* OMEGA_BW_FLOW_* */
+    int32_t target;                      /* FLOW_BRA: target instruction index relative to this one */
+    const char *name;
+} OmegaBwInsn;
+
+/* Decodes one 16-byte instruction. 0 ok, -1 an opcode or form this decoder does not know (the kernel is then
+ * reported as not checked, never as clean). */
+int omega_bw_decode(const uint8_t b[16], OmegaBwInsn *d);
+
+enum { OMEGA_BW_HZ_RAW = 1, OMEGA_BW_HZ_WAR = 2, OMEGA_BW_HZ_WAW = 3 };
+
+typedef struct {
+    uint32_t pc;       /* instruction index of the offending reader / writer */
+    uint32_t src_pc;   /* the last producer / queued reader of the register seen on some path (a hint) */
+    uint8_t kind;      /* OMEGA_BW_HZ_* */
+    uint8_t reg;
+    uint8_t uniform;
+    uint8_t release;   /* barrier mask whose wait would have released it; 0 = the op declared no barrier at all */
+} OmegaBwHazard;
+
+#define OMEGA_BW_HAZARD_MAX 256
+
+typedef struct {
+    size_t insns;          /* instructions in the buffer */
+    size_t reachable;      /* reachable from instruction 0 */
+    size_t count;          /* findings (the first OMEGA_BW_HAZARD_MAX are kept) */
+    OmegaBwHazard f[OMEGA_BW_HAZARD_MAX];
+    int64_t bad_pc;        /* -1, or the first instruction that could not be decoded or branches out of range */
+} OmegaBwHazardReport;
+
+/* Checks code[0..len). 0 = decoded and walked (r->count findings, possibly 0); -1 = not checked (bad_pc set, or a
+ * NULL / misaligned argument, or out of memory). Host only; allocates its work state. */
+int omega_bw_hazard_check(const uint8_t *code, size_t len, OmegaBwHazardReport *r);
+
+const char *omega_bw_hazard_kind(uint8_t kind);
+
+#endif /* OMEGA_BW_HAZARD_H */
diff --git a/src/omega_gpu_decode_attn_api.h b/src/omega_gpu_decode_attn_api.h
index ba84b0439..c3e88b2eb 100644
--- a/src/omega_gpu_decode_attn_api.h
+++ b/src/omega_gpu_decode_attn_api.h
@@ -61,7 +61,7 @@ enum {
 #define OMEGA_GPU_DATTN_QKV_WORDS (32u * 128u + 2u * 4u * 128u)
 #define OMEGA_GPU_DATTN_PER_SPLIT 256u
 #define OMEGA_GPU_DATTN_MAX_LAYERS 64u
-#define OMEGA_GPU_DATTN_MAX_POS 65536u
+#define OMEGA_GPU_DATTN_MAX_POS 131072u
 
 typedef struct OmegaGpuDecodeAttnCache OmegaGpuDecodeAttnCache;
 
diff --git a/src/omega_gpu_decode_graph.c b/src/omega_gpu_decode_graph.c
index bba753564..43717c2a4 100644
--- a/src/omega_gpu_decode_graph.c
+++ b/src/omega_gpu_decode_graph.c
@@ -300,6 +300,14 @@ int omega_gpu_decode_graph_record_swiglu(OmegaGpuDecodeGraph *g, uint64_t gu_va,
     return add_glue(g, OMEGA_GPU_DGRAPH_K_SWIGLU, &g->k[g->mutant == 1 ? K_SW_M1 : K_SW], OMEGA_DEC_INTER / OMEGA_DEC_THREADS, OMEGA_DEC_TOPK, (size_t)OMEGA_DEC_TOPK * OMEGA_DEC_INTER, a, OMEGA_DEC_SW_WORDS);
 }
 
+/* A failed begin leaves no token behind: list emptied, out of the token, lock released (no end_token owed, omega #518). */
+static int begin_fail(OmegaGpuDecodeGraph *g) {
+    omega_gpu_cmdlist_reset(g->cl);
+    g->in_token = 0; g->failed = 1;
+    omega_gpu_session_unlock(); /* begin_fail releases */
+    return OMEGA_GPU_DGRAPH_CHIP_FAIL;
+}
+
 int omega_gpu_decode_graph_begin_token(OmegaGpuDecodeGraph *g, const float *x_embed) {
     if (!g || g->in_token) return OMEGA_GPU_DGRAPH_BAD_ARGS;
     omega_gpu_session_lock();
@@ -308,11 +316,11 @@ int omega_gpu_decode_graph_begin_token(OmegaGpuDecodeGraph *g, const float *x_em
     memset(&g->acc, 0, sizeof g->acc);
     g->n_kind = 0; g->tagged_in_list = 0; g->n_stamp = 0;
     omega_gpu_cmdlist_reset(g->cl);
-    if (!omega_gpu_session_open()) return fail(g, NULL, OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    if (!omega_gpu_session_open()) return begin_fail(g);
     uint32_t *tok = cpu_of(g, g->lo.token);
     tok[0] = TOKEN_POISON; tok[1] = TOKEN_POISON;
     if (x_embed) memcpy(cpu_of(g, g->lo.x), x_embed, OMEGA_GPU_DGRAPH_HIDDEN * 4u);
-    if (omega_gpu_session_sync_to_gpu(&g->buf) != 0) return fail(g, NULL, OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    if (omega_gpu_session_sync_to_gpu(&g->buf) != 0) return begin_fail(g);
     return OMEGA_GPU_DGRAPH_OK;
 }
 
@@ -389,9 +397,18 @@ int omega_gpu_decode_graph_end_token(OmegaGpuDecodeGraph *g, uint32_t *token, Om
     return rc;
 }
 
+int omega_gpu_decode_graph_abort_token(OmegaGpuDecodeGraph *g) {
+    if (!g || !g->in_token) return OMEGA_GPU_DGRAPH_BAD_ARGS;
+    omega_gpu_cmdlist_reset(g->cl);
+    g->in_token = 0; g->tagged_in_list = 0; g->n_stamp = 0; /* no timeline for an abandoned token */
+    omega_gpu_session_unlock();
+    return OMEGA_GPU_DGRAPH_OK;
+}
+
 int omega_gpu_decode_graph_token(OmegaGpuDecodeGraph *g, const float *x_embed, uint32_t pos, uint32_t *token, OmegaGpuDecodeGraphStats *st) {
     if (!g) return OMEGA_GPU_DGRAPH_BAD_ARGS;
-    if (omega_gpu_decode_graph_begin_token(g, x_embed) == OMEGA_GPU_DGRAPH_BAD_ARGS) return OMEGA_GPU_DGRAPH_BAD_ARGS;
+    const int brc = omega_gpu_decode_graph_begin_token(g, x_embed);
+    if (brc != OMEGA_GPU_DGRAPH_OK) { if (st) memset(st, 0, sizeof *st); return brc; } /* nothing begun, lock free */
     for (uint32_t l = 0; l < g->cfg.layers && !g->failed; l++) (void)omega_gpu_decode_graph_record_layer(g, l, pos);
     if (!g->failed) (void)omega_gpu_decode_graph_record_final(g);
     return omega_gpu_decode_graph_end_token(g, token, st);
diff --git a/src/omega_gpu_decode_graph.h b/src/omega_gpu_decode_graph.h
index c213585b2..bb8a78b32 100644
--- a/src/omega_gpu_decode_graph.h
+++ b/src/omega_gpu_decode_graph.h
@@ -46,8 +46,20 @@
  * Memory: every buffer is omega_gpu_session_alloc (GPU-uncached; nvos.h:1117 "For system memory this will not be
  * coherent with direct CPU mappings"): the host writes x before the submit and reads the token / logits after.
  *
- * Threading: begin_token takes omega_gpu_session_lock() and end_token releases it. Between them only record calls
- * (this file's and the four APIs' *_record) may run on this thread; a non-record API call would self-deadlock.
+ * Threading: begin_token takes omega_gpu_session_lock() and end_token (or abort_token) releases it. Between them only
+ * record calls (this file's and the four APIs' *_record) may run on this thread; a non-record API call would
+ * self-deadlock.
+ * Lock and token state after each call (omega #518; tests/test_omega_gpu_decode_graph_abort.c enforces it):
+ *   begin_token  OK: lock held, in the token; exactly one end_token or abort_token is owed.
+ *                BAD_ARGS (NULL graph, already in a token): nothing taken, nothing changed.
+ *                CHIP_FAIL (device open refused or latched, x / token visibility sync refused): lock RELEASED, out of
+ *                the token, list empty; nothing owed (end_token and abort_token answer BAD_ARGS). Nothing was
+ *                submitted, so nothing is uncertain; the next begin_token may simply be called again (a latched
+ *                process fails it again at once: the graph never retries on its own).
+ *   record_*     lock still held, still in the token, whatever they return; a failure sticks (later records refuse).
+ *   end_token    always releases the lock and leaves the token, success or failure.
+ *   abort_token  releases the lock and leaves the token without submitting what was recorded.
+ *   token        (one-shot) returns with the lock released in every case.
  * The four APIs refuse a record that would evict a cached kernel: run one plain call per shape (or one token with the
  * host path) first, or simply record the first token (an empty cache slot is filled, never evicted).
  *
@@ -63,6 +75,7 @@
  *   int  omega_gpu_decode_graph_record_layer(OmegaGpuDecodeGraph *g, uint32_t layer, uint32_t pos);
  *   int  omega_gpu_decode_graph_record_final(OmegaGpuDecodeGraph *g);
  *   int  omega_gpu_decode_graph_end_token(OmegaGpuDecodeGraph *g, uint32_t *token, OmegaGpuDecodeGraphStats *st);
+ *   int  omega_gpu_decode_graph_abort_token(OmegaGpuDecodeGraph *g);
  *   int  omega_gpu_decode_graph_record_res(OmegaGpuDecodeGraph *g, uint32_t mode, uint64_t x_va, uint64_t a_va, uint64_t w_va,
  *                                          uint64_t nw_va, uint64_t y_va, float eps, float scale);
  *   int  omega_gpu_decode_graph_record_swiglu(OmegaGpuDecodeGraph *g, uint64_t gu_va, uint64_t act_va, float scale);
@@ -142,7 +155,8 @@ int omega_gpu_decode_graph_set_final_norm(OmegaGpuDecodeGraph *g, const float *f
 /* One whole token: x_embed (f32 [2048], the token's embedding row) -> greedy token. pos: the token's position. */
 int omega_gpu_decode_graph_token(OmegaGpuDecodeGraph *g, const float *x_embed, uint32_t pos, uint32_t *token, OmegaGpuDecodeGraphStats *st);
 
-/* The same in steps. begin_token takes the session lock, empties the list and (x_embed non-NULL) writes x. */
+/* The same in steps. begin_token takes the session lock, empties the list and (x_embed non-NULL) writes x. On
+ * CHIP_FAIL it has already released the lock and left the token (see Threading above): do not call end_token. */
 int omega_gpu_decode_graph_begin_token(OmegaGpuDecodeGraph *g, const float *x_embed);
 int omega_gpu_decode_graph_record_layer(OmegaGpuDecodeGraph *g, uint32_t layer, uint32_t pos);
 int omega_gpu_decode_graph_record_final(OmegaGpuDecodeGraph *g);
@@ -150,6 +164,10 @@ int omega_gpu_decode_graph_record_final(OmegaGpuDecodeGraph *g);
  * submit), reads the token (may be NULL), releases the lock. Always releases the lock, also after an earlier failed
  * record (then returns that failure without submitting). */
 int omega_gpu_decode_graph_end_token(OmegaGpuDecodeGraph *g, uint32_t *token, OmegaGpuDecodeGraphStats *st);
+/* Abandons a begun token: drops the recorded launches WITHOUT submitting them, leaves the token, releases the lock.
+ * OK, or BAD_ARGS when no token is begun. Nothing reaches the device, so nothing is uncertain; launches flush_each
+ * already submitted stay done. The device x keeps what begin_token wrote; the timeline is cleared. */
+int omega_gpu_decode_graph_abort_token(OmegaGpuDecodeGraph *g);
 
 /* Glue records (between begin and end): RES (omega_blackwell_codegen_dec.h modes ADD / COMBINE / NORM) and SWIGLU. */
 int omega_gpu_decode_graph_record_res(OmegaGpuDecodeGraph *g, uint32_t mode, uint64_t x_va, uint64_t a_va, uint64_t w_va,
diff --git a/src/omega_gpu_hostmath.h b/src/omega_gpu_hostmath.h
index 48f1be7de..d5c4ce729 100644
--- a/src/omega_gpu_hostmath.h
+++ b/src/omega_gpu_hostmath.h
@@ -26,7 +26,7 @@
  *   log(x):      x > 0 finite; NaN otherwise. Error a few ulp.
  *   exp(y):      0 below -745, +inf above 709.8. Error a few ulp.
  *   pow(b, e):   b > 0 finite; exp(e * log(b)). Relative error about |e * log b| * 2^-52.
- *   sincos(a):   valid for |a| < 2^20 * pi/2 (about 1.6e6; the RoPE table needs pos < 65536). Three-part
+ *   sincos(a):   valid for |a| < 2^20 * pi/2 (about 1.6e6; the RoPE table needs pos < 131072). Three-part
  *                Cody-Waite reduction with the fdlibm pi/2 pieces, series to r^16. Absolute error about 1e-16.
  *   pow2f(e):    2^e as f32, exact (built from the bit pattern) for -149 <= e <= 127; 0 below, +inf above.
  *                Replaces ldexpf(1.0f, e) (omega-mv#471).
diff --git a/src/runtime/.crumb b/src/runtime/.crumb
index a82872991..bcd420c68 100644
--- a/src/runtime/.crumb
+++ b/src/runtime/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-25T19:38:33Z",
+      "compiled_at": "2026-10-30T11:21:25Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:1e400d9b84494347892448fd576be7bf596ef810ed6e88bcd70f7e7d9a6b5746",
+      "digest": "sha256:43126cdfbfc4a67b3ab8785a1358a861960954e0374b7118781d06f117f9de5c",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 65,
-      "generated_at_commit": "97a960f5c18fc09b506168c55c10031b3f0cffc3",
-      "source_tree": "sha256:fc3f521b52b9fddaf86ad8b95b05c8060b03b84dc5117e2655ec37ae03c5323b"
+      "generated_at_commit": "dd39bf71fb8eb14c45bf0abd20c74d5da69c807c",
+      "source_tree": "sha256:701918e639effadd136bf5e99dd06480103741211efce5e5232f7521aab82c87"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/src/runtime/rx_costmodel.c b/src/runtime/rx_costmodel.c
index d8ddf956d..2a5df36d9 100644
--- a/src/runtime/rx_costmodel.c
+++ b/src/runtime/rx_costmodel.c
@@ -27,6 +27,9 @@
 #include 
 #include 
 
+_Static_assert(RX_CM_CELL_NONE >= RX_CM_CELLS,
+               "unsupported-op sentinel must not be a cell index");
+
 #define PRIOR_A     1.0
 #define PRIOR_B     0.01     /* prior noise variance ~0.01 log2^2 (about 7%) */
 #define NOISE_FLOOR 0.0009   /* never claim better than ~2% sd per call */
@@ -53,9 +56,12 @@ void rx_cm_init(RxCostModel *m, uint32_t n_arms) {
 }
 
 uint32_t rx_cm_cell(const RxCmFeatures *f) {
-    uint32_t op = f->op < RX_CM_OPS ? f->op : RX_CM_OPS - 1;
+    /* An unknown semantic operation is not the last supported family.
+     * The restore-op-clamp mutant rewrites the next line. */
+    uint32_t op = f && f->op < RX_CM_OPS ? f->op : RX_CM_CELL_NONE; /* CM704:refuse-unsupported-op */
+    if (op >= RX_CM_OPS) return RX_CM_CELL_NONE;
     uint32_t core = f->core < RX_CM_CORES ? f->core : RX_CM_CORE_OTHER;
-    uint32_t pr = f->pressure < RX_CM_PRESSURE ? f->pressure : RX_CM_PRESSURE - 1;
+    uint32_t pr = f->pressure < RX_CM_PRESSURE ? f->pressure : RX_CM_PRESSURE - 1u;
     return (op * RX_CM_CORES + core) * RX_CM_PRESSURE + pr;
 }
 
@@ -168,7 +174,9 @@ static int quiet_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t a
                          double *sd, double *dof, uint64_t *n) {
     RxCmFeatures g = *f;
     g.pressure = 0;
-    const RxCmArmStats *b = &m->cell[rx_cm_cell(&g)][arm];
+    uint32_t cell = rx_cm_cell(&g);
+    if (cell >= RX_CM_CELLS) return 0;
+    const RxCmArmStats *b = &m->cell[cell][arm];
     double phi[RX_CM_D];
     rx_cm_basis(f, phi);
     if (b->n < RX_CM_MIN_OBS || !fit_predict(b, phi, mean, sd, dof)) return 0;
@@ -180,18 +188,24 @@ static uint32_t bucket(const RxCmFeatures *f) {
     return f->pressure < RX_CM_PRESSURE ? f->pressure : RX_CM_PRESSURE - 1;
 }
 
-void rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t arm,
-                   RxCmPrediction *out) {
+int rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t arm,
+                  RxCmPrediction *out) {
+    if (!out) return RX_CM_ERR_ARG;
     memset(out, 0, sizeof *out);
-    if (arm >= m->n_arms) return;
+    if (!m || !f || arm >= m->n_arms) return RX_CM_ERR_ARG;
+    uint32_t cell = rx_cm_cell(f);
+    if (cell >= RX_CM_CELLS) {
+        out->refused = 1;
+        return RX_CM_ERR_UNSUPPORTED;
+    }
     double mean = 0, sd = 0, dof = 0;
     uint64_t n = 0;
     out->fail_p = fail_p(m, arm);
-    if (!quiet_predict(m, f, arm, &mean, &sd, &dof, &n)) return;
+    if (!quiet_predict(m, f, arm, &mean, &sd, &dof, &n)) return RX_CM_OK;
     if (bucket(f) == 0) {
         out->known = 1;
     } else {
-        const RxCmArmStats *r = &m->cell[rx_cm_cell(f)][arm];
+        const RxCmArmStats *r = &m->cell[cell][arm];
         double phi[RX_CM_D], rm = 0, rsd = 0, rdof = 0;
         residual_basis(f, phi);
         if (r->n >= RX_CM_RES_MIN_OBS && fit_predict(r, phi, &rm, &rsd, &rdof)) {
@@ -214,11 +228,14 @@ void rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t arm,
     uint32_t core = f->core < RX_CM_CORES ? f->core : RX_CM_CORE_OTHER;
     double mw = m->power_mw[core][arm];
     if (mw > 0.0) out->energy_pj = exp2(mean) * mw * 1e-3;   /* ps * mW = 1e-3 pJ */
+    return RX_CM_OK;
 }
 
 int rx_cm_observe(RxCostModel *m, const RxCmFeatures *f, uint32_t arm, const RxCmObservation *o) {
     if (!m || !f || !o || arm >= m->n_arms) return RX_CM_ERR_ARG;
-    RxCmArmStats *s = &m->cell[rx_cm_cell(f)][arm];
+    uint32_t cell = rx_cm_cell(f);
+    if (cell >= RX_CM_CELLS) return RX_CM_ERR_UNSUPPORTED;
+    RxCmArmStats *s = &m->cell[cell][arm];
     s->trials++;
     if (o->failed) {
         s->failures++;
@@ -302,6 +319,16 @@ static double expected_improvement(double d, double s) {
 void rx_cm_decide(const RxCostModel *m, const RxCmPolicy *p, const RxCmFeatures *f,
                   int allow_measure, RxCmDecision *out) {
     memset(out, 0, sizeof *out);
+    if (m && f && rx_cm_cell(f) >= RX_CM_CELLS) {
+        uint32_t na = m->n_arms;
+        out->action = RX_CM_REFUSE;
+        out->why = RX_CM_WHY_UNSUPPORTED_OP;
+        out->arm = na;
+        out->measure[0] = na;
+        out->measure[1] = na;
+        for (uint32_t a = 0; a < RX_CM_ARMS; a++) out->pred[a].refused = 1;
+        return;
+    }
     uint32_t fb = p->fallback_arm < m->n_arms ? p->fallback_arm : 0;
     uint32_t elig = (f->eligible | (1u << fb)) & ((1u << m->n_arms) - 1u);
     int have[RX_CM_ARMS] = { 0 };
@@ -436,6 +463,10 @@ void rx_cm_charge(RxCostModel *m, uint64_t work_ps, uint64_t explore_ps) {
 /* ---- canonical bytes ---- */
 
 #define MAGIC   0x4d43474fu   /* "OGCM" little-endian */
+/* VERSION binds the feature basis and the cell layout. RX_CM_CELLS already
+ * includes RX_CM_OPS, so a new operation family changes the blob length and
+ * this header's cells field. Bump VERSION in that same change. Deserialize
+ * refuses a different version, basis size, cell count, arm cap or core count. */
 #define VERSION 1u
 
 typedef struct {
diff --git a/src/runtime/rx_costmodel.h b/src/runtime/rx_costmodel.h
index 6e2c0db52..162b5f053 100644
--- a/src/runtime/rx_costmodel.h
+++ b/src/runtime/rx_costmodel.h
@@ -50,7 +50,10 @@
 #include 
 
 #define RX_CM_ARMS       8u
-#define RX_CM_OPS        1u     /* matvec only today; widen with a second operation */
+#define RX_CM_OPS        1u     /* matvec only. A new family widens this, changes
+                                 * RX_CM_CELLS, and must bump the blob version.
+                                 * An id outside 0 .. RX_CM_OPS-1 is refused;
+                                 * it is not aliased onto the last family. */
 #define RX_CM_CORES      3u
 #define RX_CM_PRESSURE   3u
 #define RX_CM_CELLS      (RX_CM_OPS * RX_CM_CORES * RX_CM_PRESSURE)
@@ -64,14 +67,16 @@
 #define RX_CM_ERR_ARG    -1
 #define RX_CM_ERR_FORMAT -2
 #define RX_CM_ERR_DIGEST -3
+#define RX_CM_ERR_UNSUPPORTED -4  /* semantic operation id is not a modeled family */
 #define RX_CM_SKIPPED     1       /* observe: pressure data with no quiet model to correct */
+#define RX_CM_CELL_NONE  UINT32_MAX /* not an index into RxCostModel.cell */
 enum { RX_CM_OP_MATVEC = 0 };
 enum { RX_CM_CORE_X925 = 0, RX_CM_CORE_A725 = 1, RX_CM_CORE_OTHER = 2 };
 
 /* What the caller knows about one call. Fields the matvec workload cannot
  * vary are carried and recorded, never used to fit (see spec). */
 typedef struct {
-    uint32_t op;                /* semantic operation class */
+    uint32_t op;                /* semantic operation class; only ids below RX_CM_OPS */
     uint32_t M, N;              /* input shape; branch count is 0 for matvec */
     uint64_t state_bytes;       /* working set: (M*N + N + M) * 8 */
     uint64_t cache_bytes;       /* last private cache of this core class */
@@ -101,18 +106,20 @@ typedef struct {
     int borrowed;               /* unseen pressure: the quiet prediction, widened */
     double energy_pj;           /* predicted energy per call (0 if no power figure) */
     double fail_p;              /* posterior mean failure probability */
+    int refused;                /* 1: this operation id is not modeled */
 } RxCmPrediction;
 
-enum { RX_CM_SELECT = 1, RX_CM_MEASURE = 2, RX_CM_FALLBACK = 3 };
+enum { RX_CM_SELECT = 1, RX_CM_MEASURE = 2, RX_CM_FALLBACK = 3, RX_CM_REFUSE = 4 };
 
-/* Why a MEASURE or FALLBACK was returned. */
+/* Why a MEASURE, FALLBACK or REFUSE was returned. */
 enum {
     RX_CM_WHY_CONFIDENT = 0,
     RX_CM_WHY_UNKNOWN_ARM,       /* an eligible arm has too few observations here */
     RX_CM_WHY_WORTH_MEASURING,   /* expected improvement from measuring exceeds ei_min */
     RX_CM_WHY_BUDGET_SPENT,      /* would measure, but the exploration budget is spent */
     RX_CM_WHY_NO_ELIGIBLE,       /* nothing but the fallback may run */
-    RX_CM_WHY_OVER_BUDGET        /* no arm is predicted to meet the latency/energy budget */
+    RX_CM_WHY_OVER_BUDGET,       /* no arm is predicted to meet the latency/energy budget */
+    RX_CM_WHY_UNSUPPORTED_OP     /* semantic operation id is not a modeled family */
 };
 
 typedef struct {
@@ -165,19 +172,31 @@ typedef struct {
 void rx_cm_default_policy(RxCmPolicy *p);
 void rx_cm_init(RxCostModel *m, uint32_t n_arms);
 
-/* Fold one measurement in. 0 on success; RX_CM_SKIPPED for a pressure
- * measurement when there is no quiet model yet to correct. */
+/* Fold one measurement in. RX_CM_OK on success; RX_CM_SKIPPED for a pressure
+ * measurement when there is no quiet model yet to correct.
+ * RX_CM_ERR_UNSUPPORTED when `f->op` is not a modeled family: no sufficient
+ * statistic, trial, failure, exploration counter or other model field changes.
+ * RX_CM_ERR_ARG for a null argument, an arm this model does not have, or a
+ * successful observation with zero latency. */
 int rx_cm_observe(RxCostModel *m, const RxCmFeatures *f, uint32_t arm, const RxCmObservation *o);
 
-/* Predict one arm. Needs RX_CM_MIN_OBS quiet observations for the core class.
- * Under pressure, adds the learned correction once it has RX_CM_RES_MIN_OBS
- * observations; before that, widens by RX_CM_UNSEEN_SHIFT and marks it
- * borrowed. */
-void rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t arm, RxCmPrediction *out);
-
-/* Decide. `allow_measure` 0 freezes the model's behaviour: it never asks to
- * measure and picks the best prediction. The fallback arm is chosen when no
- * other eligible arm has any prediction at all. */
+/* Predict one arm. Returns RX_CM_ERR_UNSUPPORTED and sets out->refused when
+ * the semantic operation is not a modeled family. That output is zeros aside
+ * from `refused`: no mean, spread, failure rate or ranking is borrowed from
+ * another operation. Returns RX_CM_ERR_ARG for a null argument or an arm this
+ * model does not have. Otherwise returns RX_CM_OK.
+ * A supported operation needs RX_CM_MIN_OBS quiet observations for the core
+ * class before out->known is set. Under pressure, adds the learned correction
+ * once it has RX_CM_RES_MIN_OBS observations; before that, widens by
+ * RX_CM_UNSEEN_SHIFT and marks it borrowed. */
+int rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f, uint32_t arm, RxCmPrediction *out);
+
+/* Decide. An unsupported semantic operation sets RX_CM_REFUSE and
+ * RX_CM_WHY_UNSUPPORTED_OP, leaves every prediction refused, and does not
+ * rank arms (`arm` and `measure[]` are set to n_arms, not a selection).
+ * `allow_measure` 0 freezes the model's behaviour for a supported operation:
+ * it never asks to measure and picks the best prediction. The fallback arm is
+ * chosen when no other eligible arm has any prediction at all. */
 void rx_cm_decide(const RxCostModel *m, const RxCmPolicy *p, const RxCmFeatures *f,
                   int allow_measure, RxCmDecision *out);
 
@@ -199,6 +218,13 @@ void rx_cm_digest(const RxCostModel *m, uint8_t out[32]);
 
 /* Basis for these features, exposed so tests can see exactly what is fit. */
 void rx_cm_basis(const RxCmFeatures *f, double phi[RX_CM_D]);
+
+/* Cell index for these features. RX_CM_CELL_NONE if `f` is null or `f->op`
+ * is not one of the RX_CM_OPS modeled families. That sentinel is never a
+ * legal index of RxCostModel.cell. An unknown core class maps to
+ * RX_CM_CORE_OTHER. Pressure above the last bucket saturates into that
+ * bucket. Those two mappings are hardware and pressure buckets, not a
+ * catch-all operation family. */
 uint32_t rx_cm_cell(const RxCmFeatures *f);
 
 /* Two-sided central interval half-width multiplier for coverage q with
diff --git a/tests/.crumb b/tests/.crumb
index 5fbfcb29c..b7d0f9d6d 100644
--- a/tests/.crumb
+++ b/tests/.crumb
@@ -265,8 +265,8 @@
           "purpose": "Reservoir tests (omega#440): Gate 1 simulator and readout checks against an independent binary64"
         },
         {
-          "digest": "10d19641e4bb5b435ec6363d4ea7d3c1596af47d97b86f4de35d6ae57770241e",
-          "last_commit": "45f7d7691",
+          "digest": "6653865f3df7dcf70eb25bb3db3ca4a5ac5fd52c89bbf211c9f64d83b5c4c285",
+          "last_commit": "b99ffb73f",
           "name": "runtime",
           "purpose": "Directory tests/runtime. Purpose not yet described by a human."
         },
@@ -301,15 +301,15 @@
           "purpose": "Directory tests/visor. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:0c57282ff8cf1d34e5685e2729755f2978917e66debb5423961033be9d25c902",
-      "compiled_at": "2026-10-30T12:31:50Z",
+      "children_root": "sha256:545723dcb437ee41cde61be01da0fcd83d5e76363b747bef2a2f53e92cf3979c",
+      "compiled_at": "2026-10-30T17:38:28Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:5395ff8ff9afceebe8e453788f80a3064b831513cc4cb92fd55869115e06b874",
+      "digest": "sha256:8a74c1c8217abe18d640974791f6a7c5edab662607bf3aa529d71911b2f860fd",
       "evidence_files": 16,
       "evidence_root": "sha256:96d08097822ad95f4e562c19e0ba5df5a035774c48632f1832912c40a27bd27a",
-      "files": 1386,
-      "generated_at_commit": "52a82f392fa513ebbc2d9d719a0f14c385289b06",
-      "source_tree": "sha256:a3b853bb9c0edfc5f1413ccaa2698cc6ea920f2e8795756121667cc9d37f6679"
+      "files": 1406,
+      "generated_at_commit": "5c159484b40345f76ad15937305aac155a808bc8",
+      "source_tree": "sha256:064dc3700f2e6cdc1e489097ecd0fff308eb409f3a86e58b122d95cc6312b0e8"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/tests/bw_hazard_test.c b/tests/bw_hazard_test.c
new file mode 100644
index 000000000..c546f7699
--- /dev/null
+++ b/tests/bw_hazard_test.c
@@ -0,0 +1,649 @@
+/* bw_hazard_test.c: the static scoreboard hazard checker (src/omega_bw_hazard.c, omega-mv#554) run over every kernel
+ * Omega generates, plus its own proofs. Host only, no device.
+ *
+ *   1. decoder vs encoder: every IR op encoded with known registers decodes to exactly those registers;
+ *   2. red receipt: the pre-#553 head_dim 256 attend kernel (the bytes that faulted on the GB10) fails with WAR on
+ *      R22/R23 at IR 88/89; the same kernel after the encoder fix passes; the fixed kernel with the one lost wait
+ *      cleared fails again;
+ *   3. negative controls: small encoded programs with one hazard each are caught, the same programs with the wait
+ *      in place pass, and an undecodable word is "not checked", never clean;
+ *   4. sweep: every generator over its accepted shapes (production kernels, mutant 0), encoded and patched as the
+ *      launchers do; every finding is printed and must be on the triaged list below.
+ *
+ * --nvdisasm: additionally cross-checks the decoder against nvdisasm (offline oracle, CUDA 13 -b SM121) on every
+ * distinct kernel: the base registers each instruction names must be the ones the decoder found. */
+#include "omega_bw_hazard.h"
+#include "omega_blackwell_codegen.h"
+#include "omega_blackwell_codegen_moe.h"
+#include "omega_blackwell_codegen_moe2.h"
+#include "omega_blackwell_codegen_bf16.h"
+#include "omega_blackwell_codegen_router.h"
+#include "omega_blackwell_codegen_attn.h"
+#include "omega_blackwell_codegen_gemm.h"
+#include "omega_blackwell_codegen_tern.h"
+#include "omega_blackwell_codegen_tc.h"
+#include "omega_blackwell_codegen_tc2.h"
+#include "omega_blackwell_codegen_qg.h"
+#include "omega_blackwell_codegen_qmma.h"
+#include "omega_blackwell_codegen_pf.h"
+#include "omega_blackwell_codegen_pfhost.h"
+#include "omega_blackwell_codegen_dec.h"
+#include "omega_blackwell_codegen_pattn.h"
+#include "omega_gpu_attention_api.h"
+#include "omega_gpu_elementwise_api.h"
+#include "omega_gpu_prefill_attn_api.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int g_checks, g_failed, g_nvdisasm;
+static const char *g_dump_dir; /* --dump DIR: write each distinct kernel with findings as DIR/-.bin (triage) */
+#define CHECK(c, ...) do { g_checks++; if (!(c)) { g_failed++; printf("FAIL: "); printf(__VA_ARGS__); printf("\n"); } } while (0)
+
+static BlackwellIRProgram g_prog;
+static uint8_t g_code[OMEGA_BW_CODE_CAP_MAX + 4096];
+static OmegaBwHazardReport g_rep;
+
+#define CW(stall, wbar, rbar, wait) \
+    (((uint32_t)(stall) << 9) | ((uint32_t)(wbar) << 14) | ((uint32_t)(rbar) << 17) | ((uint32_t)(wait) << 20))
+
+/* ------------------------------------------------------------------------------------------- 1. decoder vs encoder */
+typedef struct { int w[3]; int r[6]; } Ops; /* entries: reg | n << 8 | uniform << 12, 0 terminates */
+#define G(reg, n) ((reg) | (n) << 8)
+#define U(reg, n) ((reg) | (n) << 8 | 1 << 12)
+
+static int has(const OmegaBwOperand *o, unsigned cnt, int want) {
+    for (unsigned i = 0; i < cnt; i++)
+        if (o[i].reg == (want & 0xff) && o[i].n == ((want >> 8) & 0xf) && o[i].uniform == ((want >> 12) & 1)) return 1;
+    return 0;
+}
+static int count(const int *a, int max) { int n = 0; while (n < max && a[n]) n++; return n; }
+
+static void test_decoder_vs_encoder(void) {
+    /* registers: dst 8, src1 12, src2 16, src3 20, uniform 6 (encode_one maps vreg n to Rn / URn) */
+    static const struct { BlackwellIROpcode op; int src2, src3, ureg; Ops e; } t[] = {
+        { BW_IR_NOP, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_MOV_RZ, -1, -1, -1, { {G(8,1)}, {0} } },
+        { BW_IR_MOV_IMM, -1, -1, -1, { {G(8,1)}, {0} } },
+        { BW_IR_S2R, -1, -1, -1, { {G(8,1)}, {0} } },
+        { BW_IR_LDC, -1, -1, -1, { {G(8,1)}, {0} } },
+        { BW_IR_LDC64, -1, -1, -1, { {G(8,2)}, {0} } },
+        { BW_IR_IMAD, 16, 20, -1, { {G(8,1)}, {G(12,1), G(16,1), G(20,1)} } },
+        { BW_IR_IMAD, -1, 20, 6, { {G(8,1)}, {G(12,1), U(6,1), G(20,1)} } },
+        { BW_IR_IMAD, -1, 20, -1, { {G(8,1)}, {G(12,1), G(20,1)} } },
+        { BW_IR_IMAD_WIDE, -1, 20, -1, { {G(8,2)}, {G(12,1), G(20,2)} } },
+        { BW_IR_ISETP_GE, -1, -1, -1, { {0}, {G(12,1)} } },
+        { BW_IR_ISETP_GE, -1, -1, 6, { {0}, {G(12,1), U(6,1)} } },
+        { BW_IR_LDG_E, -1, -1, 6, { {G(8,1)}, {G(12,2), U(6,1)} } },
+        { BW_IR_STG_E, 16, -1, 6, { {0}, {G(12,2), G(16,1), U(6,1)} } },
+        { BW_IR_STG_EF, 16, -1, 6, { {0}, {G(12,2), G(16,1), U(6,1)} } },
+        { BW_IR_IADD3, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_HMMA_F16, 16, 20, -1, { {G(8,4)}, {G(12,4), G(16,2), G(20,4)} } },
+        { BW_IR_HMMA_BF16, 16, 20, -1, { {G(8,4)}, {G(12,4), G(16,2), G(20,4)} } },
+        { BW_IR_SHF_R, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_LOP3_AND, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_LDG_E_U16, -1, -1, 6, { {G(8,1)}, {G(12,2), U(6,1)} } },
+        { BW_IR_LDG_STRONG_SYS, -1, -1, 6, { {G(8,1)}, {G(12,2), U(6,1)} } },
+        { BW_IR_LDG_MMIO, -1, -1, 6, { {G(8,1)}, {G(12,2), U(6,1)} } },
+        { BW_IR_STG_STRONG_SYS, 16, -1, 6, { {0}, {G(12,2), G(16,1), U(6,1)} } },
+        { BW_IR_MEMBAR_ALL_SYS, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_MEMBAR_SC_SYS, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_CCTL_IVALL, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_ATOMG_ADD_STRONG_SYS, 16, -1, 6, { {G(8,1)}, {G(12,2), G(16,1), U(6,1)} } },
+        { BW_IR_ATOMG_EXCH_STRONG_SYS, 16, -1, 6, { {G(8,1)}, {G(12,2), G(16,1), U(6,1)} } },
+        { BW_IR_ISETP_GE_U32, 16, -1, -1, { {0}, {G(12,1), G(16,1)} } },
+        { BW_IR_LOP3_XOR, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FADD, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FSUB, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FMUL, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FFMA, 16, 20, -1, { {G(8,1)}, {G(12,1), G(16,1), G(20,1)} } },
+        { BW_IR_FSETP, 16, -1, -1, { {0}, {G(12,1), G(16,1)} } },
+        { BW_IR_FSEL, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FMNMX_MIN, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_FMNMX_MAX, 16, -1, -1, { {G(8,1)}, {G(12,1), G(16,1)} } },
+        { BW_IR_I2FP, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_F2I, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_MUFU_RCP, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_MUFU_RSQ, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_SHFL_DOWN, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_LDS, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_STS, 16, -1, -1, { {0}, {G(12,1), G(16,1)} } },
+        { BW_IR_EXIT, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_MUFU_EX2, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_BAR_SYNC, -1, -1, -1, { {0}, {0} } },
+        { BW_IR_LDS32, -1, -1, -1, { {G(8,1)}, {G(12,1)} } },
+        { BW_IR_STS32, 16, -1, -1, { {0}, {G(12,1), G(16,1)} } },
+        { BW_IR_LOP3_LUT, 16, 20, -1, { {G(8,1)}, {G(12,1), G(16,1), G(20,1)} } },
+        { BW_IR_SHF_L_U32, 16, 20, -1, { {G(8,1)}, {G(12,1), G(16,1), G(20,1)} } },
+        { BW_IR_IMAD_HI_U32, 16, 20, -1, { {G(8,1)}, {G(12,1), G(16,1), G(20,1)} } },
+        { BW_IR_LDG_E_64, -1, -1, 6, { {G(8,2)}, {G(12,2), U(6,1)} } },
+        { BW_IR_LDG_E_128, -1, -1, 6, { {G(8,4)}, {G(12,2), U(6,1)} } },
+        { BW_IR_LDS128, -1, -1, -1, { {G(8,4)}, {G(12,1)} } },
+    };
+    int bad = 0;
+    for (unsigned i = 0; i < sizeof t / sizeof *t; i++) {
+        BlackwellIRInsn in; memset(&in, 0, sizeof in);
+        in.op = t[i].op; in.dst_vreg = 8; in.src1_vreg = 12; in.src2_vreg = t[i].src2; in.src3_vreg = t[i].src3; in.ureg = t[i].ureg;
+        in.control = CW(3, 2, 5, 0x29) | 0x2000u;
+        /* IMAD and ISETP_GE take the uniform-operand form only with is_uniform set */
+        if ((t[i].op == BW_IR_IMAD || t[i].op == BW_IR_ISETP_GE) && t[i].ureg >= 0) in.is_uniform = true;
+        uint32_t w[4]; uint8_t b[16]; OmegaBwInsn d;
+        if (omega_blackwell_encode_one(&in, w) != 0) { CHECK(0, "encode op %d", (int)t[i].op); bad++; continue; }
+        for (int k = 0; k < 4; k++) { b[4*k] = (uint8_t)w[k]; b[4*k+1] = (uint8_t)(w[k] >> 8); b[4*k+2] = (uint8_t)(w[k] >> 16); b[4*k+3] = (uint8_t)(w[k] >> 24); }
+        if (omega_bw_decode(b, &d) != 0) { CHECK(0, "decode of op %d (word0 %08x) refused", (int)t[i].op, w[0]); bad++; continue; }
+        int nw = count(t[i].e.w, 3), nr = count(t[i].e.r, 6), ok = d.nw == nw && d.nr == nr;
+        for (int k = 0; k < nw && ok; k++) ok = has(d.wr, d.nw, t[i].e.w[k]);
+        for (int k = 0; k < nr && ok; k++) ok = has(d.rd, d.nr, t[i].e.r[k]);
+        if (!ok) { bad++; CHECK(0, "op %d (%s): decoded %u writes %u reads, expected %d / %d", (int)t[i].op, d.name ? d.name : "?", d.nw, d.nr, nw, nr); }
+    }
+    { /* uniform loads write the uniform file */
+        BlackwellIROpcode u[2] = { BW_IR_LDCU, BW_IR_LDCU64 };
+        for (int i = 0; i < 2; i++) {
+            BlackwellIRInsn in; memset(&in, 0, sizeof in); in.op = u[i]; in.dst_vreg = 6; in.src1_vreg = in.src2_vreg = in.src3_vreg = in.ureg = -1; in.is_uniform = true;
+            uint32_t w[4]; uint8_t b[16]; OmegaBwInsn d;
+            CHECK(omega_blackwell_encode_one(&in, w) == 0, "encode LDCU");
+            memcpy(b, w, 16);
+            CHECK(omega_bw_decode(b, &d) == 0 && d.nw == 1 && d.wr[0].uniform && d.wr[0].reg == 6 && d.wr[0].n == (i ? 2 : 1) && d.nr == 0 && d.var,
+                  "LDCU%s decodes to a uniform write of UR6", i ? ".64" : "");
+        }
+    }
+    { /* the control word: every field at a distinct value (NOP keeps insn->control on every encoder version) */
+        BlackwellIRInsn in; memset(&in, 0, sizeof in); in.op = BW_IR_NOP; in.dst_vreg = in.src1_vreg = in.src2_vreg = in.src3_vreg = in.ureg = -1;
+        in.control = CW(3, 2, 5, 0x29) | 0x2000u;
+        uint32_t w[4]; OmegaBwInsn d; CHECK(omega_blackwell_encode_one(&in, w) == 0, "encode NOP");
+        CHECK(omega_bw_decode((const uint8_t *)w, &d) == 0 && d.stall == 3 && d.yield == 1 && d.wbar == 2 && d.rbar == 5 && d.wait == 0x29,
+              "control fields stall %u yield %u wbar %u rbar %u wait 0x%x", d.stall, d.yield, d.wbar, d.rbar, d.wait);
+    }
+    { /* branch targets, both signs, both predicate senses */
+        int32_t deltas[] = { -300, -64, -63, -5, -1, 0, 1, 2, 63, 64, 65, 1000 };
+        for (unsigned i = 0; i < sizeof deltas / sizeof *deltas; i++)
+            for (int p = 0; p < 3; p++) {
+                BlackwellIRInsn in; memset(&in, 0, sizeof in); in.op = BW_IR_BRA; in.imm = (uint32_t)deltas[i];
+                in.dst_vreg = in.src1_vreg = in.src2_vreg = in.src3_vreg = in.ureg = -1; in.predicate_p0 = p > 0; in.predicate_not = p == 2;
+                uint32_t w[4]; OmegaBwInsn d;
+                CHECK(omega_blackwell_encode_one(&in, w) == 0 && omega_bw_decode((const uint8_t *)w, &d) == 0 && d.flow == OMEGA_BW_FLOW_BRA &&
+                      d.target == deltas[i] && d.guard == (p == 0 ? 7u : p == 1 ? 0u : 8u), "BRA delta %d pred %d decodes to %d guard %u", deltas[i], p, d.target, d.guard);
+            }
+    }
+    printf("decoder vs encoder: %zu forms, %d mismatched\n", sizeof t / sizeof *t, bad);
+}
+
+/* -------------------------------------------------------------------------------------------- fixtures and helpers */
+static size_t load(const char *dir, const char *name, uint8_t *buf, size_t cap) {
+    char path[512]; snprintf(path, sizeof path, "%s/%s", dir, name);
+    FILE *f = fopen(path, "rb"); if (!f) return 0;
+    size_t n = fread(buf, 1, cap, f); fclose(f); return n;
+}
+static int finding(const OmegaBwHazardReport *r, uint32_t pc, uint8_t kind, uint8_t reg) {
+    for (size_t i = 0; i < r->count && i < OMEGA_BW_HAZARD_MAX; i++)
+        if (r->f[i].pc == pc && r->f[i].kind == kind && r->f[i].reg == reg && !r->f[i].uniform) return 1;
+    return 0;
+}
+static void print_findings(const char *tag, const OmegaBwHazardReport *r) {
+    for (size_t i = 0; i < r->count && i < OMEGA_BW_HAZARD_MAX; i++)
+        printf("  %s: IR %u %s %sR%u (release mask 0x%x, last producer/reader IR %u)\n", tag, r->f[i].pc, omega_bw_hazard_kind(r->f[i].kind),
+               r->f[i].uniform ? "U" : "", r->f[i].reg, r->f[i].release, r->f[i].src_pc);
+}
+static void set_wait(uint8_t *code, uint32_t pc, unsigned wait) {
+    uint8_t *p = code + (size_t)pc * 16u + 12u; uint32_t w3 = (uint32_t)p[0] | (uint32_t)p[1] << 8 | (uint32_t)p[2] << 16 | (uint32_t)p[3] << 24;
+    w3 = (w3 & ~(0x3fu << 20)) | (wait & 0x3fu) << 20;
+    p[0] = (uint8_t)w3; p[1] = (uint8_t)(w3 >> 8); p[2] = (uint8_t)(w3 >> 16); p[3] = (uint8_t)(w3 >> 24);
+}
+
+/* ---------------------------------------------------------------------------------------------- 2. red receipt */
+static void test_red_receipt(const char *dir) {
+    static uint8_t a[1 << 16];
+    size_t n = load(dir, "pattn256_attend_ad5d650b.bin", a, sizeof a);
+    CHECK(n == 10112, "fixture pattn256_attend_ad5d650b.bin (%zu bytes)", n);
+    if (n == 10112) {
+        int rc = omega_bw_hazard_check(a, n, &g_rep);
+        CHECK(rc == 0 && g_rep.count == 2 && finding(&g_rep, 88, OMEGA_BW_HZ_WAR, 22) && finding(&g_rep, 89, OMEGA_BW_HZ_WAR, 23) &&
+              g_rep.f[0].release == 0x3 && g_rep.f[1].release == 0x3,
+              "RED: pre-#553 attend must fail with WAR R22/R23 at IR 88/89 (rc %d, %zu findings)", rc, g_rep.count);
+        printf("red receipt, pre-#553 attend (the kernel that faulted on the GB10): %zu findings\n", g_rep.count);
+        print_findings("pre-#553 attend", &g_rep);
+    }
+    n = load(dir, "pattn256_attend_e3a26848.bin", a, sizeof a);
+    CHECK(n == 10112, "fixture pattn256_attend_e3a26848.bin (%zu bytes)", n);
+    if (n == 10112) {
+        int rc = omega_bw_hazard_check(a, n, &g_rep);
+        CHECK(rc == 0 && g_rep.count == 0, "GREEN: the fixed attend must pass (rc %d, %zu findings)", rc, g_rep.count);
+        printf("fixed attend (e3a26848): rc %d, %zu findings, %zu of %zu instructions reachable\n", rc, g_rep.count, g_rep.reachable, g_rep.insns);
+        /* the one wait the old encoder lost: the IADD3 at IR 55 waits on the Q loads' barriers 0x3 */
+        OmegaBwInsn d; CHECK(omega_bw_decode(a + 55 * 16, &d) == 0 && d.op == 0x210 && d.wait == 0x3, "IR 55 is the IADD3 waiting 0x3");
+        set_wait(a, 55, 0x10);
+        rc = omega_bw_hazard_check(a, n, &g_rep);
+        CHECK(rc == 0 && g_rep.count == 2 && finding(&g_rep, 88, OMEGA_BW_HZ_WAR, 22) && finding(&g_rep, 89, OMEGA_BW_HZ_WAR, 23),
+              "MUTANT: the fixed attend with IR 55 waiting 0x10 must fail again (%zu findings)", g_rep.count);
+    }
+    n = load(dir, "pattn256_prep_ad5d650b.bin", a, sizeof a);
+    CHECK(n == 5376, "fixture pattn256_prep_ad5d650b.bin");
+    if (n == 5376) {
+        int rc = omega_bw_hazard_check(a, n, &g_rep);
+        CHECK(rc == 0 && g_rep.count == 1 && finding(&g_rep, 35, OMEGA_BW_HZ_RAW, 20) && g_rep.f[0].release == 0x1,
+              "pre-#553 prep: RAW R20 at IR 35 (S2R at IR 14 on barrier 0; the IADD3 at IR 15 waited on 4 only), %zu findings", g_rep.count);
+        print_findings("pre-#553 prep", &g_rep);
+    }
+    n = load(dir, "pattn256_prep_e3a26848.bin", a, sizeof a);
+    CHECK(n == 5376 && omega_bw_hazard_check(a, n, &g_rep) == 0 && g_rep.count == 0, "fixed prep passes (%zu findings)", g_rep.count);
+}
+
+/* -------------------------------------------------------------------------------------------- 3. negative controls */
+static size_t enc(const BlackwellIRInsn *ins, size_t n, uint8_t *out) {
+    for (size_t i = 0; i < n; i++) { uint32_t w[4]; if (omega_blackwell_encode_one(&ins[i], w) != 0) return 0; memcpy(out + 16 * i, w, 16); }
+    return 16 * n;
+}
+static BlackwellIRInsn mk(BlackwellIROpcode op, int d, int a, int b, int c, int u, uint32_t control) {
+    BlackwellIRInsn in; memset(&in, 0, sizeof in);
+    in.op = op; in.dst_vreg = d; in.src1_vreg = a; in.src2_vreg = b; in.src3_vreg = c; in.ureg = u; in.control = control; return in;
+}
+static void test_controls(void) {
+    uint8_t c[16 * 16]; size_t n;
+    const uint32_t FIX = CW(6, 7, 7, 0), LD = CW(4, 0, 1, 0) | 0x2000u, ST = CW(4, 7, 1, 0) | 0x2000u, ENDW = CW(5, 7, 7, 0);
+    /* RAW: a load's result read with no wait / with the wait / with a wait on an unrelated barrier (the #545 pattern) */
+    BlackwellIRInsn raw[] = { mk(BW_IR_LDG_E, 4, 2, -1, -1, 4, LD), mk(BW_IR_FADD, 6, 4, 4, -1, -1, FIX), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    n = enc(raw, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_RAW, 4), "control RAW caught");
+    raw[1].control = CW(6, 7, 7, 0x1); n = enc(raw, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 0, "control RAW with the wait passes");
+    raw[1].control = CW(6, 7, 7, 0x10); n = enc(raw, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_RAW, 4), "control RAW behind a wait on barrier 4 caught");
+    raw[1].control = CW(6, 7, 7, 0x2); n = enc(raw, 3, c); /* waiting on the read barrier does not cover the result */
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_RAW, 4), "control RAW behind the read barrier only caught");
+    /* WAR: a store's data register overwritten before the store's read barrier */
+    BlackwellIRInsn war[] = { mk(BW_IR_STG_E, -1, 2, 4, -1, 4, ST), mk(BW_IR_MOV_RZ, 4, -1, -1, -1, -1, FIX), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    n = enc(war, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_WAR, 4), "control WAR (store data) caught");
+    war[1].dst_vreg = 3; n = enc(war, 3, c); /* the store's address pair is R2:R3 */
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_WAR, 3), "control WAR (address high half) caught");
+    war[1].control = CW(6, 7, 7, 0x2); n = enc(war, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 0, "control WAR with the wait passes");
+    war[1].dst_vreg = 5; war[1].control = FIX; n = enc(war, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 0, "control: a register the store does not read passes");
+    /* WAR released by the load's completion: waiting on the write barrier also frees the address */
+    BlackwellIRInsn warc[] = { mk(BW_IR_LDG_E, 4, 2, -1, -1, 4, LD), mk(BW_IR_MOV_RZ, 2, -1, -1, -1, -1, CW(6, 7, 7, 0x1)), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    n = enc(warc, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 0, "control: address overwrite after the load completed passes");
+    warc[1].control = FIX; n = enc(warc, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_WAR, 2), "control WAR (load address) caught");
+    /* WAW: a pending load's destination overwritten */
+    BlackwellIRInsn waw[] = { mk(BW_IR_LDG_E, 4, 2, -1, -1, 4, LD), mk(BW_IR_MOV_RZ, 4, -1, -1, -1, -1, CW(6, 7, 7, 0x2)), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    n = enc(waw, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_WAW, 4), "control WAW caught");
+    /* a variable-latency result with no write barrier at all: nothing can release it */
+    BlackwellIRInsn nob[] = { mk(BW_IR_S2R, 4, -1, -1, -1, -1, CW(4, 7, 7, 0)), mk(BW_IR_FADD, 6, 4, 4, -1, -1, CW(6, 7, 7, 0x3f)), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    nob[0].imm = BW_SR_TID_X; n = enc(nob, 3, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 1, OMEGA_BW_HZ_RAW, 4) && g_rep.f[0].release == 0,
+          "control: S2R with no write barrier caught even behind a wait on every barrier");
+    /* a hazard carried round a loop: the read at the top sees the load issued at the bottom of the previous trip */
+    BlackwellIRInsn loop[] = { mk(BW_IR_MOV_RZ, 4, -1, -1, -1, -1, FIX), mk(BW_IR_FADD, 6, 4, 4, -1, -1, FIX), mk(BW_IR_LDG_E, 4, 2, -1, -1, 4, LD),
+                               mk(BW_IR_BRA, -1, -1, -1, -1, -1, CW(5, 7, 7, 0)), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    loop[3].imm = (uint32_t)-2; loop[3].predicate_p0 = true;
+    n = enc(loop, 5, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && finding(&g_rep, 1, OMEGA_BW_HZ_RAW, 4) && finding(&g_rep, 0, OMEGA_BW_HZ_WAW, 4) == 0,
+          "control: RAW across the loop back edge caught (%zu findings)", g_rep.count);
+    loop[3].control = CW(5, 7, 7, 0x1); n = enc(loop, 5, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 0, "control: the loop with the wait on the branch passes (%zu findings)", g_rep.count);
+    /* the path the hazard is on is not the straight line: an unpredicated branch skips the wait */
+    BlackwellIRInsn skip[] = { mk(BW_IR_LDG_E, 4, 2, -1, -1, 4, LD), mk(BW_IR_BRA, -1, -1, -1, -1, -1, CW(5, 7, 7, 0)), mk(BW_IR_NOP, -1, -1, -1, -1, -1, CW(1, 7, 7, 0x1)),
+                               mk(BW_IR_FADD, 6, 4, 4, -1, -1, FIX), mk(BW_IR_EXIT, -1, -1, -1, -1, -1, ENDW) };
+    skip[1].imm = 2; skip[1].predicate_p0 = true; n = enc(skip, 5, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && finding(&g_rep, 3, OMEGA_BW_HZ_RAW, 4), "control: RAW on the branch-taken path caught");
+    skip[1].predicate_p0 = false; n = enc(skip, 5, c);
+    CHECK(n && omega_bw_hazard_check(c, n, &g_rep) == 0 && g_rep.count == 1 && g_rep.reachable == 4, "control: unreachable wait does not count (%zu reachable)", g_rep.reachable);
+    /* undecodable word: not checked, never clean */
+    n = enc(raw, 3, c); c[16] = 0x55; c[17] = 0x7f;
+    CHECK(omega_bw_hazard_check(c, n, &g_rep) == -1 && g_rep.bad_pc == 1, "control: an unknown opcode is refused (bad_pc %lld)", (long long)g_rep.bad_pc);
+    /* branch out of range */
+    BlackwellIRInsn far[] = { mk(BW_IR_BRA, -1, -1, -1, -1, -1, CW(5, 7, 7, 0)) }; far[0].imm = 5; n = enc(far, 1, c);
+    CHECK(omega_bw_hazard_check(c, n, &g_rep) == -1 && g_rep.bad_pc == 0, "control: a branch out of the buffer is refused");
+    CHECK(omega_bw_hazard_check(c, 15, &g_rep) == -1 && omega_bw_hazard_check(NULL, 16, &g_rep) == -1, "control: bad length / NULL refused");
+}
+
+/* ------------------------------------------------------------------------------------------------------- 4. sweep */
+typedef struct { const char *family; char variant[96]; uint64_t hash; size_t findings; } Seen;
+#define MAX_SEEN 8192
+static Seen g_seen[MAX_SEEN];
+static size_t g_nseen, g_variants, g_unchecked, g_findings_total;
+
+/* Triaged findings on main a8ffd2b9 (2026-10-19), each read in the bytes (instruction, barrier, every wait between).
+ * Every finding the sweep prints must be listed here; a listed entry no longer seen prints a NOTE (fixed: remove it).
+ * The rule behind A and B is the one ptxas follows (offline oracle, nvcc 13.0 -arch=sm_121: an LDG whose address
+ * register is overwritten while in flight gets a read barrier and the overwriting IADD.64 waits on it; the first
+ * reader of an LDCU.64 descriptor waits on the LDCU's write barrier) and the one the chip taught us twice (#545; the
+ * fp8 GEMV hang in omega_bw_em.h, evidence OWN30B-FP8-GEMV-c4006391). None of A..C is observed failing on the chip:
+ * they are contract violations that timing has hidden so far.
+ *   A  the LDCU.64 descriptor UR4 (write barrier 1) is read by the first LDG with no wait on barrier 1 in between
+ *      (matmul generators in omega_blackwell_codegen.c, default control words). Not caused by the #553 encoder bug.
+ *   B  matmul_tensor: the LDG / STG address pair R16:R17 is rewritten by the next IMAD.WIDE before the op read it:
+ *      the loads only have write barrier 2 and nothing waits on it; the STGs carry no barrier at all (release 0).
+ *   C  prime sieve kernels: a second LDG / LDS writes its destination into the first load's address register while
+ *      the first load (write barrier 0, no read barrier) is in flight; the pattern of the fp8 GEMV chip hang.
+ *   D  (gone) RMSNORM: round the loop the IMAD.WIDE / FMUL rewrite registers the STG (read barrier 1) still read; the
+ *      IADD3s scheduled to wait on barrier 1 carried the fixed word 3 (wait 0x10) of the #553 encoder bug. PR #553
+ *      (main b11bd1f6) fixed the encoder and the sweep no longer sees them, so their three entries are removed. */
+#define ANY_PC UINT32_MAX
+typedef struct { const char *family; uint32_t pc; uint8_t kind; uint8_t reg; uint8_t uniform; char cls; int seen; } Known;
+static Known g_known[] = {
+    { "matmul_i32", ANY_PC, OMEGA_BW_HZ_RAW, 4, 1, 'A', 0 },
+    { "matmul_tensor", ANY_PC, OMEGA_BW_HZ_RAW, 4, 1, 'A', 0 },
+    { "matmul_tensor_loop", ANY_PC, OMEGA_BW_HZ_RAW, 4, 1, 'A', 0 },
+    { "matmul_frag", ANY_PC, OMEGA_BW_HZ_RAW, 4, 1, 'A', 0 },
+    { "matmul_frag_block", ANY_PC, OMEGA_BW_HZ_RAW, 4, 1, 'A', 0 },
+    { "matmul_tensor", ANY_PC, OMEGA_BW_HZ_WAR, 16, 0, 'B', 0 },
+    { "matmul_tensor", ANY_PC, OMEGA_BW_HZ_WAR, 17, 0, 'B', 0 },
+    { "elementwise", 25, OMEGA_BW_HZ_WAR, 22, 0, 'C', 0 },   /* PRIME_SIEVE */
+    { "elementwise", 26, OMEGA_BW_HZ_WAR, 23, 0, 'C', 0 },
+    { "elementwise", 39, OMEGA_BW_HZ_WAR, 21, 0, 'C', 0 },   /* PRIME_SIEVE_SHARED */
+    { "elementwise", 25, OMEGA_BW_HZ_WAR, 20, 0, 'C', 0 },   /* PRIME_SIEVE_DIV1 */
+    { "elementwise", 26, OMEGA_BW_HZ_WAR, 21, 0, 'C', 0 },
+    { "elementwise", 41, OMEGA_BW_HZ_WAR, 19, 0, 'C', 0 },   /* PRIME_SIEVE_SHARED_DIV1 */
+    { "elementwise", 26, OMEGA_BW_HZ_WAR, 20, 0, 'C', 0 },   /* PRIME_SIEVE_DIV2 */
+    { "elementwise", 27, OMEGA_BW_HZ_WAR, 21, 0, 'C', 0 },
+    { "elementwise", 42, OMEGA_BW_HZ_WAR, 19, 0, 'C', 0 },   /* PRIME_SIEVE_SHARED_DIV2 */
+    { NULL, 0, 0, 0, 0, 0, 0 }
+};
+
+static uint64_t fnv(const uint8_t *p, size_t n) { uint64_t h = 1469598103934665603ull; for (size_t i = 0; i < n; i++) { h ^= p[i]; h *= 1099511628211ull; } return h; }
+
+static void nvdisasm_cross_check(const char *family, const char *variant, const uint8_t *code, size_t len);
+
+static void sweep_bytes(const char *family, const char *variant, const uint8_t *code, size_t len) {
+    g_variants++;
+    uint64_t h = fnv(code, len);
+    for (size_t i = 0; i < g_nseen; i++) if (g_seen[i].hash == h) return; /* identical bytes already checked */
+    int rc = omega_bw_hazard_check(code, len, &g_rep);
+    if (g_nseen < MAX_SEEN) { Seen *s = &g_seen[g_nseen++]; s->family = family; snprintf(s->variant, sizeof s->variant, "%s", variant); s->hash = h; s->findings = g_rep.count; }
+    if (rc != 0) {
+        g_unchecked++;
+        OmegaBwInsn d; long long pc = g_rep.bad_pc; uint32_t w0 = 0;
+        if (pc >= 0) memcpy(&w0, code + pc * 16, 4);
+        CHECK(0, "%s %s: not checked (instruction %lld, word 0 %08x, decode %d)", family, variant, pc, w0, pc >= 0 ? omega_bw_decode(code + pc * 16, &d) : -9);
+        return;
+    }
+    for (size_t i = 0; i < g_rep.count && i < OMEGA_BW_HAZARD_MAX; i++) {
+        const OmegaBwHazard *f = &g_rep.f[i]; int known = 0;
+        for (size_t k = 0; g_known[k].family; k++)
+            if (!strcmp(g_known[k].family, family) && (g_known[k].pc == ANY_PC || g_known[k].pc == f->pc) && g_known[k].kind == f->kind &&
+                g_known[k].reg == f->reg && g_known[k].uniform == f->uniform) { g_known[k].seen = 1; known = g_known[k].cls; }
+        printf("FINDING %s %s: IR %u %s %sR%u release 0x%x (last producer/reader IR %u) [%s %c]\n", family, variant, f->pc, omega_bw_hazard_kind(f->kind),
+               f->uniform ? "U" : "", f->reg, f->release, f->src_pc, known ? "triaged" : "UNTRIAGED", known ? known : '-');
+        CHECK(known, "%s %s: untriaged %s at IR %u", family, variant, omega_bw_hazard_kind(f->kind), f->pc);
+    }
+    g_findings_total += g_rep.count;
+    if (g_dump_dir && g_rep.count) {
+        char path[512]; snprintf(path, sizeof path, "%s/%s-%zu.bin", g_dump_dir, family, g_nseen - 1);
+        /* 0644, not fopen's 0666 & ~umask: a dump is never world-writable */
+        int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
+        FILE *f = fd >= 0 ? fdopen(fd, "wb") : NULL;
+        if (fd >= 0 && !f) close(fd);
+        if (f) { fwrite(code, 1, len, f); fclose(f); printf("DUMP %s = %s %s\n", path, family, variant); }
+    }
+    if (g_nvdisasm) nvdisasm_cross_check(family, variant, code, len);
+}
+
+/* encode + the launcher's patch steps */
+enum { P_NONE = 0, P_TC = 1, P_QMMA = 2 };
+static void sweep_prog(const char *family, const char *variant, int patch) {
+    size_t len = 0;
+    if (omega_bw_encode_program(&g_prog, g_code, sizeof g_code, &len) != 0) { CHECK(0, "%s %s: encode failed", family, variant); return; }
+    if ((patch & P_TC) && omega_tc_patch_code(&g_prog, g_code, len) < 0) { CHECK(0, "%s %s: tc patch failed", family, variant); return; }
+    if ((patch & P_QMMA) && omega_qmma_patch_code(&g_prog, g_code, len) < 0) { CHECK(0, "%s %s: qmma patch failed", family, variant); return; }
+    sweep_bytes(family, variant, g_code, len);
+}
+#define BUILD(call) (memset(&g_prog, 0, sizeof g_prog), (call) == 0)
+
+static void sweep(void) {
+    char v[96];
+    /* fp8 GEMV (MoE experts, attention projections): k values of the live models, every buildable lane / rows / warps / depth */
+    { unsigned ks[] = { 256, 768, 2048, 4096, 8192 };
+      for (unsigned a = 0; a < 5; a++) for (unsigned lb = 8; lb <= 16; lb += 8) for (unsigned rows = 1; rows <= 8; rows *= 2)
+      for (unsigned w = 1; w <= 32; w *= 2) for (unsigned dp = 0; dp <= 8; dp += dp ? dp : 1) {
+          OmegaFp8GemvSpec s = { .k = ks[a], .lane_bytes = lb, .rows = rows, .warps = w, .depth = dp };
+          snprintf(v, sizeof v, "k%u lane%u rows%u warps%u depth%u", ks[a], lb, rows, w, dp);
+          if (BUILD(omega_blackwell_codegen_fp8_gemv_prog(&s, &g_prog))) sweep_prog("fp8_gemv", v, P_NONE);
+          if (BUILD(omega_blackwell_codegen_fp8_gemv2_prog(&s, &g_prog))) sweep_prog("fp8_gemv2", v, P_NONE);
+      } }
+    /* bf16 GEMV (lm_head) */
+    { unsigned ks[] = { 256, 2048, 4096, 5120 };
+      for (unsigned a = 0; a < 4; a++) for (unsigned rows = 1; rows <= 4; rows *= 2) for (unsigned w = 1; w <= 32; w *= 2) for (unsigned dp = 1; dp <= 16; dp *= 2) {
+          OmegaBf16GemvSpec s = { .k = ks[a], .rows = rows, .warps = w, .depth = dp };
+          snprintf(v, sizeof v, "k%u rows%u warps%u depth%u", ks[a], rows, w, dp);
+          if (BUILD(omega_blackwell_codegen_bf16_gemv_prog(&s, &g_prog))) sweep_prog("bf16_gemv", v, P_NONE);
+      } }
+    /* fp8 grouped GEMM */
+    { unsigned ks[] = { 768, 2048, 4096 };
+      for (unsigned a = 0; a < 3; a++) for (unsigned lb = 8; lb <= 16; lb += 8) for (unsigned mt = 1; mt <= 16; mt *= 2) for (unsigned w = 1; w <= 32; w *= 2) {
+          OmegaFp8GemmSpec s = { .k = ks[a], .lane_bytes = lb, .mt = mt, .warps = w };
+          snprintf(v, sizeof v, "k%u lane%u mt%u warps%u", ks[a], lb, mt, w);
+          if (BUILD(omega_blackwell_codegen_fp8gemm_prog(&s, &g_prog))) sweep_prog("fp8gemm", v, P_NONE);
+      } }
+    /* ternary GEMV */
+    { unsigned ks[] = { 256, 2048, 4096, 8192, 16384 };
+      for (unsigned a = 0; a < 5; a++) for (unsigned lay = 0; lay <= 1; lay++) for (unsigned rows = 1; rows <= 4; rows *= 2) for (unsigned w = 1; w <= 32; w *= 2)
+      for (unsigned dp = 1; dp <= 16; dp *= 2) for (unsigned epi = 0; epi <= 1; epi++) {
+          OmegaTernGemvSpec s = { ks[a], lay, rows, w, dp, epi, 0 };
+          snprintf(v, sizeof v, "k%u layout%u rows%u warps%u depth%u epi%u", ks[a], lay, rows, w, dp, epi);
+          if (BUILD(omega_blackwell_codegen_tern_gemv_prog(&s, &g_prog))) sweep_prog("tern_gemv", v, P_NONE);
+      } }
+    /* router, decode attention */
+    for (unsigned w = 8; w <= 32; w *= 2) for (unsigned dp = 1; dp <= 8; dp *= 2) {
+        OmegaRouterSpec s = { .warps = w, .depth = dp }; snprintf(v, sizeof v, "warps%u depth%u", w, dp);
+        if (BUILD(omega_blackwell_codegen_router_prog(&s, &g_prog))) sweep_prog("router", v, P_NONE);
+    }
+    for (unsigned dp = 1; dp <= 4; dp++) {
+        OmegaDecodeAttnSpec s = { dp, 0 }; snprintf(v, sizeof v, "depth%u", dp);
+        if (BUILD(omega_blackwell_codegen_decode_attn_prog(&s, &g_prog))) sweep_prog("decode_attn", v, P_NONE);
+    }
+    /* decode glue kernels (command list / decode graph) */
+    { struct { OmegaDecKind k; uint32_t mode, stride; } d[] = {
+          { OMEGA_DEC_AXPY, 0, 256 }, { OMEGA_DEC_AXPY, 0, 512 }, { OMEGA_DEC_AXPY, 0, 2048 }, { OMEGA_DEC_AXPY, 0, 12288 },
+          { OMEGA_DEC_SWIGLU, 0, 0 }, { OMEGA_DEC_ARGMAX, 0, 0 }, { OMEGA_DEC_ARGMAX, 1, 0 } };
+      for (unsigned i = 0; i < sizeof d / sizeof *d; i++) {
+          OmegaDecSpec s; memset(&s, 0, sizeof s); s.kind = d[i].k; s.mode = d[i].mode; s.stride = d[i].stride;
+          snprintf(v, sizeof v, "kind%d mode%u stride%u", (int)d[i].k, d[i].mode, d[i].stride);
+          if (BUILD(omega_blackwell_codegen_dec_prog(&s, &g_prog))) sweep_prog("dec", v, P_NONE);
+      }
+      for (uint32_t mode = 0; mode < 8; mode++) {
+          OmegaDecSpec s; memset(&s, 0, sizeof s); s.kind = OMEGA_DEC_RES; s.mode = mode;
+          snprintf(v, sizeof v, "RES mode%u", mode);
+          if (BUILD(omega_blackwell_codegen_dec_prog(&s, &g_prog))) sweep_prog("dec", v, P_NONE);
+      } }
+    /* tensor-core GEMM and probes */
+    { unsigned ks[] = { 128, 768, 2048, 4096, 16384 };
+      for (unsigned a = 0; a < 5; a++) for (unsigned rt = 1; rt <= 4; rt *= 2) for (unsigned ct = 1; ct <= 4; ct *= 2) for (unsigned w = 1; w <= 8; w *= 2) {
+          OmegaTcGemmSpec s = { ks[a], rt, ct, w, 0 }; snprintf(v, sizeof v, "k%u rt%u ct%u warps%u", ks[a], rt, ct, w);
+          if (BUILD(omega_blackwell_codegen_tcgemm_prog(&s, &g_prog))) sweep_prog("tcgemm", v, P_NONE);
+      } }
+    if (BUILD(omega_blackwell_codegen_tc_probe_prog(0, &g_prog))) sweep_prog("tc_probe", "mutant0", P_TC);
+    for (unsigned ch = 1; ch <= 16; ch *= 2) for (unsigned st = 1; st <= 4; st++) {
+        snprintf(v, sizeof v, "iters5 chains%u stall%u threads64", ch, st);
+        if (BUILD(omega_blackwell_codegen_tc_peak_prog(5, ch, st, 64, &g_prog))) sweep_prog("tc_peak", v, P_TC);
+        snprintf(v, sizeof v, "iters64 chains%u stall%u threads128", ch, st);
+        if (BUILD(omega_blackwell_codegen_qmma_peak_prog(64, ch, st, 128, &g_prog))) sweep_prog("qmma_peak", v, P_QMMA);
+    }
+    for (unsigned g = 1; g <= 8; g *= 2) for (unsigned t = 32; t <= 512; t *= 2) {
+        snprintf(v, sizeof v, "iters16 groups%u threads%u", g, t);
+        if (BUILD(omega_blackwell_codegen_tc_bw_prog(16, g, t, &g_prog))) sweep_prog("tc_bw", v, P_NONE);
+    }
+    for (unsigned nops = 0; nops <= 8; nops += 4) {
+        snprintf(v, sizeof v, "nops%u", nops);
+        if (BUILD(omega_blackwell_codegen_qmma_probe_prog(0, nops, &g_prog))) sweep_prog("qmma_probe", v, P_QMMA);
+    }
+    if (BUILD(omega_blackwell_codegen_f2e4_probe_prog(&g_prog))) sweep_prog("f2e4_probe", "-", P_QMMA);
+    /* prefill module kernels (omega_gpu_prefill.c applies both patches to every one of them) */
+    { unsigned ks[] = { 128, 768, 2048, 4096, 16384 };
+      for (unsigned a = 0; a < 5; a++) for (unsigned rt = 2; rt <= 8; rt *= 2) for (unsigned w = 4; w <= 16; w *= 2) for (unsigned aq = 1; aq <= 2; aq++)
+      for (unsigned epi = 0; epi <= 1; epi++) for (unsigned dir = 0; dir <= 1; dir++) {
+          OmegaTc2Spec s = { ks[a], rt, 2, w, aq, epi, dir, 0, 0 };
+          s.n = 4u * w * 8u * 2u; if (epi) s.n *= 2u;
+          snprintf(v, sizeof v, "k%u rt%u warps%u aqn%u epi%u direct%u n%u", ks[a], rt, w, aq, epi, dir, s.n);
+          if (BUILD(omega_blackwell_codegen_tc2_prog(&s, &g_prog))) sweep_prog("tc2", v, P_TC | P_QMMA);
+      }
+      for (unsigned a = 0; a < 5; a++) for (unsigned w = 8; w <= 16; w *= 2) for (unsigned epi = 0; epi <= 1; epi++) for (unsigned dir = 0; dir <= 1; dir++)
+      for (unsigned wt = 0; wt <= 120; wt += 60) {
+          OmegaQgSpec s = { ks[a], 4, w, epi, dir, 512, wt, 0 };
+          snprintf(v, sizeof v, "k%u warps%u epi%u direct%u n512 wait%u", ks[a], w, epi, dir, wt);
+          if (BUILD(omega_blackwell_codegen_qgemm_prog(&s, &g_prog))) sweep_prog("qgemm", v, P_TC | P_QMMA);
+      }
+      for (unsigned a = 0; a < 4; a++) for (unsigned it = 0; it <= 2; it++) {
+          OmegaPqSpec s = { .k = ks[a], .in_type = it }; snprintf(v, sizeof v, "k%u in_type%u", ks[a], it);
+          if (BUILD(omega_blackwell_codegen_pq_prog(&s, &g_prog))) sweep_prog("pq", v, P_TC | P_QMMA);
+      } }
+    { unsigned ks[] = { 768, 2048, 4096 }, es[] = { 8, 64, 128 }, ts[] = { 1, 16, 128, 1024 };
+      for (unsigned a = 0; a < 3; a++) for (unsigned b = 0; b < 3; b++) for (unsigned c = 0; c < 4; c++) {
+          OmegaRlSpec s = { ks[a], es[b], ts[c], 0 }; snprintf(v, sizeof v, "k%u e%u t%u", ks[a], es[b], ts[c]);
+          if (BUILD(omega_blackwell_codegen_rl_prog(&s, &g_prog))) sweep_prog("rl", v, P_TC | P_QMMA);
+      }
+      unsigned hs[] = { 768, 2048, 4096 };
+      for (unsigned a = 0; a < 3; a++) for (unsigned tk = 1; tk <= 8; tk *= 2) {
+          OmegaMcSpec s = { hs[a], tk, 0 }; snprintf(v, sizeof v, "h%u top_k%u", hs[a], tk);
+          if (BUILD(omega_blackwell_codegen_mc_prog(&s, &g_prog))) sweep_prog("mc", v, P_TC | P_QMMA);
+      } }
+    if (BUILD(omega_blackwell_codegen_pf_copy_prog(&g_prog))) sweep_prog("pf_copy", "-", P_TC | P_QMMA);
+    /* prefill attention: the API's own host encode (build + encode + tc patch) */
+    for (unsigned w = 4; w <= 8; w *= 2) for (unsigned md = 0; md <= 2; md++) for (unsigned mir = 0; mir <= 1; mir++) {
+        OmegaPrefillAttnSpec s = { w, 0, md, mir };
+        static uint8_t pa[OMEGA_BW_CODE_CAP_MAX + 4096]; uint32_t gp = 0; int np = 0;
+        size_t len = omega_gpu_prefill_attn_encode(&s, pa, sizeof pa, &gp, &np);
+        snprintf(v, sizeof v, "warps%u mode%u mirror%u", w, md, mir);
+        if (len) sweep_bytes("prefill_attn", v, pa, len);
+    }
+    /* gqa / paged attention (FB-1 cut 5): the API's codegen */
+    for (int f32 = 0; f32 <= 1; f32++) for (uint32_t lb = 0; lb <= 8; lb++) for (uint32_t lg = 0; lg <= 4; lg++) for (uint32_t hd = 64; hd <= 128; hd *= 2) {
+        OmegaBlackwellKernel k; memset(&k, 0, sizeof k);
+        if (omega_gpu_attention_codegen_hd(f32 != 0, lb, lg, hd, &k) != 0 || !k.code) { free(k.code); continue; }
+        snprintf(v, sizeof v, "kv_f32 %d log2_block %u log2_gqa %u hd %u", f32, lb, lg, hd);
+        sweep_bytes("attention", v, k.code, k.code_size);
+        free(k.code);
+    }
+    /* elementwise kernels and the reconvergence probes */
+    for (int op = OMEGA_GPU_EW_EX2; op <= OMEGA_GPU_EW_RC_REFUSE_JOIN_ONLY; op++) {
+        OmegaBlackwellKernel k; memset(&k, 0, sizeof k);
+        if (omega_gpu_elementwise_codegen_ir((OmegaGpuEwOp)op, 0, &g_prog, &k) != 0 || !k.code) { free(k.code); continue; }
+        snprintf(v, sizeof v, "op%d", op);
+        sweep_bytes("elementwise", v, k.code, k.code_size);
+        free(k.code);
+    }
+    /* matmul: integer, single-tile tensor, looped tensor, fragment, blocked fragment */
+    { OmegaMatMulSpec s;
+      uint32_t i32[][3] = { {16,16,16}, {32,16,64}, {16,32,16}, {64,32,64} };
+      for (unsigned i = 0; i < 4; i++) if (omega_matmul_spec_init(&s, i32[i][0], i32[i][1], i32[i][2], OMEGA_MATMUL_PRECISION_INT32) == 0) {
+          snprintf(v, sizeof v, "m%u k%u n%u", i32[i][0], i32[i][1], i32[i][2]);
+          if (BUILD(omega_blackwell_codegen_matmul_i32_prog(&s, &g_prog))) sweep_prog("matmul_i32", v, P_NONE);
+      }
+      for (int pr = 0; pr < 2; pr++) {
+          OmegaMatMulPrecision p = pr ? OMEGA_MATMUL_PRECISION_FP16 : OMEGA_MATMUL_PRECISION_BF16;
+          if (omega_matmul_spec_init(&s, 16, 16, 8, p) == 0 && BUILD(omega_blackwell_codegen_matmul_tensor_prog(&s, &g_prog))) sweep_prog("matmul_tensor", pr ? "fp16" : "bf16", P_NONE);
+          uint32_t kk[] = { 16, 64, 2048 }, nn[] = { 8, 64, 2048 };
+          for (unsigned a = 0; a < 3; a++) for (unsigned b = 0; b < 3; b++) for (uint32_t gx = 1; gx <= 8; gx *= 2) {
+              if (omega_matmul_spec_init(&s, 16, kk[a], nn[b], p) != 0) continue;
+              snprintf(v, sizeof v, "%s k%u n%u grid_x%u", pr ? "fp16" : "bf16", kk[a], nn[b], gx);
+              if (BUILD(omega_blackwell_codegen_matmul_tensor_loop_prog(&s, gx, 0, &g_prog))) sweep_prog("matmul_tensor_loop", v, P_NONE);
+          }
+      }
+      unsigned kps[] = { 768, 2048, 4096 }, nps[] = { 8, 128, 2048 };
+      for (unsigned a = 0; a < 3; a++) for (unsigned b = 0; b < 3; b++) {
+          if (omega_matmul_spec_init(&s, 16, kps[a], nps[b], OMEGA_MATMUL_PRECISION_BF16) != 0) continue;
+          for (uint32_t un = 1; un <= 4; un *= 2) {
+              snprintf(v, sizeof v, "k%u n%u unroll%u", kps[a], nps[b], un);
+              if (BUILD(omega_blackwell_codegen_matmul_frag_prog(&s, 48, un, 0, &g_prog))) sweep_prog("matmul_frag", v, P_NONE);
+          }
+          for (unsigned rt = 1; rt <= 8; rt *= 2) for (unsigned ct = 1; ct <= 4; ct *= 2) for (uint32_t un = 1; un <= 2; un++) {
+              if (rt * ct < 2) continue;
+              snprintf(v, sizeof v, "k%u n%u rt%u ct%u unroll%u", kps[a], nps[b], rt, ct, un);
+              if (BUILD(omega_blackwell_codegen_matmul_frag_block_prog(&s, 1, un, rt, ct, 0, &g_prog))) sweep_prog("matmul_frag_block", v, P_NONE);
+          }
+      } }
+    /* the command list's no-op kernel: EXIT; BRA self */
+    { omega_bw_ir_init(&g_prog);
+      BlackwellIRInsn ex = mk(BW_IR_EXIT, -1, -1, -1, -1, -1, 0), self = mk(BW_IR_BRA, -1, -1, -1, -1, -1, 0x000fc000u);
+      if (omega_bw_ir_append(&g_prog, &ex) >= 0 && omega_bw_ir_append(&g_prog, &self) >= 0 && omega_bw_regalloc_solve(&g_prog) == 0) sweep_prog("cmdlist_nop", "-", P_NONE); }
+}
+
+/* ----------------------------------------------------------------------------------------- nvdisasm cross-check */
+static size_t g_nv_insns, g_nv_bad, g_nv_kernels;
+static int decoded_has(const OmegaBwInsn *d, int reg, int uniform) {
+    for (unsigned j = 0; j < d->nr; j++) if (d->rd[j].uniform == uniform && d->rd[j].reg == reg) return 1;
+    for (unsigned j = 0; j < d->nw; j++) if (d->wr[j].uniform == uniform && d->wr[j].reg == reg) return 1;
+    return 0;
+}
+static void nvdisasm_cross_check(const char *family, const char *variant, const uint8_t *code, size_t len) {
+    char path[] = "/tmp/bw_hazard_nvdisasm_XXXXXX";
+    int fd = mkstemp(path); if (fd < 0) { CHECK(0, "mkstemp"); return; }
+    FILE *f = fdopen(fd, "wb"); fwrite(code, 1, len, f); fclose(f);
+    char cmd[600]; snprintf(cmd, sizeof cmd, "/usr/local/cuda/bin/nvdisasm -b SM121 -raw '%s' 2>&1", path);
+    FILE *p = popen(cmd, "r");
+    if (!p) { remove(path); CHECK(0, "nvdisasm popen"); return; }
+    char line[1024]; size_t seen = 0; g_nv_kernels++;
+    while (fgets(line, sizeof line, p)) {
+        char *s = strstr(line, "/*"); if (!s || s[6] != '*' || s[7] != '/') continue; /* the address field, e.g. 0040 */
+        unsigned addr; if (sscanf(s + 2, "%4x", &addr) != 1) continue;
+        size_t pc = addr / 16u; if (pc * 16u >= len) continue;
+        char *t = s + 8; while (*t == ' ') t++;
+        char *end = strchr(t, ';'); if (end) *end = 0;
+        OmegaBwInsn d; if (omega_bw_decode(code + pc * 16u, &d) != 0) continue; /* unreachable padding words are not decoded either */
+        seen++; g_nv_insns++;
+        /* every register token nvdisasm prints must be a base register the decoder has, and vice versa */
+        int nvr[16], nvu[16], nn = 0, nu = 0;
+        for (char *q = t; *q; q++) {
+            int uni = 0; char *r = q;
+            if (r[0] == 'U' && r[1] == 'R') { uni = 1; r++; } else if (q > t && (q[-1] == 'U' || q[-1] == 'S' || q[-1] == '_')) continue;
+            if (r[0] != 'R' || r[1] < '0' || r[1] > '9') continue;
+            if (q > t && ((q[-1] >= 'A' && q[-1] <= 'Z') || (q[-1] >= 'a' && q[-1] <= 'z') || q[-1] == '_')) continue;
+            int reg = atoi(r + 1);
+            if (uni) { if (nu < 16) nvu[nu++] = reg; } else { if (nn < 16) nvr[nn++] = reg; }
+            q = r + 1;
+        }
+        int ok = 1;
+        for (int i = 0; i < nn && ok; i++) ok = decoded_has(&d, nvr[i], 0);
+        for (int i = 0; i < nu && ok; i++) ok = decoded_has(&d, nvu[i], 1);
+        for (unsigned j = 0; j < d.nr + d.nw && ok; j++) {
+            const OmegaBwOperand *o = j < d.nr ? &d.rd[j] : &d.wr[j - d.nr]; int f2 = 0;
+            for (int i = 0; i < (o->uniform ? nu : nn); i++) if ((o->uniform ? nvu[i] : nvr[i]) == o->reg) f2 = 1;
+            ok = f2;
+        }
+        if (!ok) { g_nv_bad++; if (g_nv_bad <= 20) printf("NVDISASM MISMATCH %s %s IR %zu: '%s' vs decoder %s (%u reads, %u writes)\n", family, variant, pc, t, d.name, d.nr, d.nw); }
+    }
+    int st = pclose(p); remove(path);
+    CHECK(st == 0 && seen > 0, "%s %s: nvdisasm ran (status %d, %zu instructions)", family, variant, st, seen);
+}
+
+int main(int argc, char **argv) {
+    const char *dir = "tests/fixtures/bw_hazard";
+    for (int i = 1; i < argc; i++) {
+        if (!strcmp(argv[i], "--nvdisasm")) g_nvdisasm = 1;
+        else if (!strcmp(argv[i], "--fixtures") && i + 1 < argc) dir = argv[++i];
+        else if (!strcmp(argv[i], "--dump") && i + 1 < argc) g_dump_dir = argv[++i];
+    }
+    test_decoder_vs_encoder();
+    test_red_receipt(dir);
+    test_controls();
+    sweep();
+    size_t clean = 0;
+    printf("sweep per generator (distinct kernels, clean, findings):\n");
+    for (size_t i = 0; i < g_nseen; i++) {
+        clean += g_seen[i].findings == 0;
+        int first = 1;
+        for (size_t j = 0; j < i && first; j++) if (!strcmp(g_seen[j].family, g_seen[i].family)) first = 0;
+        if (!first) continue;
+        size_t fk = 0, fc = 0, fv = 0;
+        for (size_t j = i; j < g_nseen; j++)
+            if (!strcmp(g_seen[j].family, g_seen[i].family)) { fk++; fc += g_seen[j].findings == 0; fv += g_seen[j].findings; }
+        printf("  %-20s %4zu distinct, %4zu clean, %4zu findings\n", g_seen[i].family, fk, fc, fv);
+    }
+    for (size_t k = 0; g_known[k].family; k++)
+        if (!g_known[k].seen) printf("NOTE: triaged finding %s IR %d %s %sR%u (class %c) no longer seen\n", g_known[k].family, g_known[k].pc == ANY_PC ? -1 : (int)g_known[k].pc,
+                                      omega_bw_hazard_kind(g_known[k].kind), g_known[k].uniform ? "U" : "", g_known[k].reg, g_known[k].cls);
+    printf("sweep: %zu variants built, %zu distinct kernels, %zu clean, %zu with findings, %zu findings, %zu not checked\n",
+           g_variants, g_nseen, clean, g_nseen - clean - g_unchecked, g_findings_total, g_unchecked);
+    CHECK(g_nseen >= 50, "the sweep built only %zu distinct kernels", g_nseen);
+    if (g_nvdisasm) {
+        printf("nvdisasm cross-check: %zu kernels, %zu instructions, %zu mismatched\n", g_nv_kernels, g_nv_insns, g_nv_bad);
+        CHECK(g_nv_bad == 0 && g_nv_insns > 0, "nvdisasm cross-check");
+    }
+    printf("bw_hazard_test: %d checks, %d failed: %s\n", g_checks, g_failed, g_failed ? "FAIL" : "PASS");
+    return g_failed ? 1 : 0;
+}
diff --git a/tests/bw_mufu_ftz.h b/tests/bw_mufu_ftz.h
new file mode 100644
index 000000000..e1263c4c6
--- /dev/null
+++ b/tests/bw_mufu_ftz.h
@@ -0,0 +1,34 @@
+/* bw_mufu_ftz.h: the GB10 MUFU unit's flush-to-zero rule, shared by every host model of it (omega #462).
+ *
+ * MUFU (the SASS EX2 / RCP / RSQ unit) flushes a subnormal result to a sign-preserving zero. Chip-observed on GB10: the
+ * SwiGLU reciprocal 1 / (2^t + 1) for t in (126, 128) came back as +-0 on all 101 of 101 differing elements (evidence
+ * OWN30B-L1G-PFGEMM-SWIGLU-FTZ-df9bd9c4, gpu_pfgemm_test host red test). Doc-inferred, not separately chip-observed: the
+ * input flush and the EX2 / RSQ cases follow the same rule, PTX ISA 9.7.3.13 (rcp) and 9.7.3.21 (ex2) "flushes subnormal
+ * inputs and results to sign-preserving zero" for the .ftz form, which is what the bare MUFU we emit is (the non-ftz PTX
+ * variants are ptxas sequences around MUFU; NVIDIA publishes no SASS semantics). Limit: the chip's MUFU is approximate
+ * (RCP 1 ulp, EX2 2 ulp), the model flushes a correctly rounded IEEE result, so right at the subnormal boundary the two
+ * can disagree 0 versus nonzero.
+ *
+ * Users: tests/bw_warp_sim.h, bw_warp_sim_k.h, bw_warp_sim_pa.h, bw_warp_sim_tc.h (MUFU cases), the attention test's own
+ * per-thread simulator (gpu_attention_test.c) and the pfgemm / qgemm SwiGLU host references. omega_numeric.c has its own
+ * ftz() on the library side. Self-contained (no simulator state) so any of them can include it, in any order. */
+#ifndef BW_MUFU_FTZ_H
+#define BW_MUFU_FTZ_H
+
+#include 
+#include 
+#include 
+
+/* A subnormal (exponent field 0, mantissa nonzero) becomes a zero of the same sign; zeros, normals, inf and NaN pass. */
+static inline float ws_mufu_ftz(float f) {
+    uint32_t u; memcpy(&u, &f, 4);
+    if ((u & 0x7f800000u) == 0u) u &= 0x80000000u;
+    memcpy(&f, &u, 4);
+    return f;
+}
+/* The three MUFU functions the codegen emits: input flushed, IEEE f32 function, result flushed. */
+static inline float ws_mufu_ex2(float x) { return ws_mufu_ftz(exp2f(ws_mufu_ftz(x))); }
+static inline float ws_mufu_rcp(float x) { return ws_mufu_ftz(1.0f / ws_mufu_ftz(x)); }
+static inline float ws_mufu_rsq(float x) { return ws_mufu_ftz(1.0f / sqrtf(ws_mufu_ftz(x))); }
+
+#endif
diff --git a/tests/bw_mufu_ftz_test.c b/tests/bw_mufu_ftz_test.c
new file mode 100644
index 000000000..573ce0732
--- /dev/null
+++ b/tests/bw_mufu_ftz_test.c
@@ -0,0 +1,96 @@
+/* bw_mufu_ftz_test.c: the MUFU flush rule (tests/bw_mufu_ftz.h, omega #462) and every warp simulator's MUFU cases.
+ *
+ * Built once per model (Makefile test-mufu-ftz):
+ *   no WS_SIM_HDR                    the helper itself: subnormal -> sign-preserving zero; zeros, normals, inf, NaN pass
+ *   -DWS_SIM_HDR='"bw_warp_sim.h"'   (and _k, _pa, _tc) one MUFU instruction through that simulator's ws_lane_exec
+ * The simulator cases expect the chip rule: a subnormal input or result is a zero of the same sign. Before #462 the
+ * first three simulators returned the IEEE subnormal (RCP of 1.5 * 2^127, EX2 of -130) and the IEEE finite value for a
+ * subnormal input (RCP / RSQ of 2^-127, 2^-140), and fail here. Unreachable: an RSQ result can never be subnormal
+ * (1 / sqrt(x) >= 2^-64 for every finite f32 x), so RSQ only exercises the input flush. */
+#ifdef WS_SIM_HDR
+#include WS_SIM_HDR /* the simulator under test; it must get its MUFU rule from bw_mufu_ftz.h */
+#else
+#include "bw_mufu_ftz.h"
+#endif
+#include 
+#include 
+#include 
+#include 
+
+static int g_checks, g_failed;
+__attribute__((unused)) static uint32_t f2u(float f) { uint32_t u; memcpy(&u, &f, 4); return u; }
+static float u2f(uint32_t u) { float f; memcpy(&f, &u, 4); return f; }
+/* expect bits exactly, or any NaN when want is a NaN */
+static void expect(const char *what, uint32_t in, uint32_t got, uint32_t want) {
+    int nan = (want & 0x7fffffffu) > 0x7f800000u, ok = nan ? (got & 0x7fffffffu) > 0x7f800000u : got == want;
+    g_checks++;
+    if (!ok) { g_failed++; printf("FAIL: %s(0x%08x) = 0x%08x (%g), want 0x%08x (%g)\n", what, in, got, u2f(got), want, u2f(want)); }
+}
+
+#ifndef WS_SIM_HDR
+#define MODEL "helper"
+static void run_model(void) {
+    /* every subnormal of both signs, sampled across the whole mantissa range, plus its extremes */
+    for (uint32_t m = 1; m < 0x800000u; m += (m < 64 || m > 0x7fffc0u) ? 1u : 4093u) {
+        expect("ftz", m, f2u(ws_mufu_ftz(u2f(m))), 0x00000000u);
+        expect("ftz", 0x80000000u | m, f2u(ws_mufu_ftz(u2f(0x80000000u | m))), 0x80000000u);
+    }
+    static const uint32_t pass[] = { 0x00000000u, 0x80000000u, 0x00800000u, 0x80800000u, 0x3f800000u, 0xbf800000u,
+        0x7f7fffffu, 0xff7fffffu, 0x7f800000u, 0xff800000u, 0x7fc00000u, 0xffc00000u, 0x7f800001u, 0x00ffffffu };
+    for (size_t i = 0; i < sizeof pass / sizeof pass[0]; i++) expect("ftz", pass[i], f2u(ws_mufu_ftz(u2f(pass[i]))), pass[i]);
+    /* the three functions, same table the simulators use below */
+    expect("ex2", f2u(-130.0f), f2u(ws_mufu_ex2(-130.0f)), 0x00000000u);
+    expect("rcp", 0xff400000u, f2u(ws_mufu_rcp(u2f(0xff400000u))), 0x80000000u);
+    expect("rsq", 0x00000200u, f2u(ws_mufu_rsq(u2f(0x00000200u))), 0x7f800000u);
+}
+#else
+#define MODEL WS_SIM_HDR
+static BlackwellIRProgram g_prog;
+static uint32_t sim_mufu(BlackwellIROpcode op, uint32_t x) {
+    static WsSim s; static WsLane l;
+    memset(&s, 0, sizeof s); memset(&l, 0, sizeof l);
+    BlackwellIRInsn in; memset(&in, 0, sizeof in);
+    in.op = op; in.dst_vreg = 0; in.src1_vreg = 1; in.src2_vreg = -1; in.src3_vreg = -1; in.ureg = -1;
+    s.p = &g_prog; l.r[1] = x; l.r[0] = 0xdeadbeefu;
+    ws_lane_exec(&s, &l, &in, 0, 0, 0, 0);
+    return l.r[0];
+}
+static void run_model(void) {
+    (void)ws_run; /* the warp scheduler is not under test here */
+    g_prog.regalloc.vreg_to_phys[0] = 0; g_prog.regalloc.vreg_to_phys[1] = 1;
+    static const struct { BlackwellIROpcode op; const char *name; uint32_t in, want; } c[] = {
+        /* subnormal result -> sign-preserving zero (IEEE: 0x00080000, 0x00155555 / 0x80155555) */
+        { BW_IR_MUFU_EX2, "EX2", 0xc3020000u /* -130 */, 0x00000000u },
+        { BW_IR_MUFU_EX2, "EX2", 0xc2fe0000u /* -127 */, 0x00000000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x7f400000u /* 1.5 * 2^127 */, 0x00000000u },
+        { BW_IR_MUFU_RCP, "RCP", 0xff400000u /* -1.5 * 2^127 */, 0x80000000u },
+        /* subnormal input -> treated as a zero of the same sign (IEEE: 2^127, -2^127, 2^70) */
+        { BW_IR_MUFU_RCP, "RCP", 0x00400000u /* 2^-127 */, 0x7f800000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x80400000u /* -2^-127 */, 0xff800000u },
+        { BW_IR_MUFU_RSQ, "RSQ", 0x00000200u /* 2^-140 */, 0x7f800000u },
+        { BW_IR_MUFU_EX2, "EX2", 0x80000200u /* -2^-140 */, 0x3f800000u },
+        /* controls: unchanged by the flush */
+        { BW_IR_MUFU_EX2, "EX2", 0xc2fc0000u /* -126 -> smallest normal */, 0x00800000u },
+        { BW_IR_MUFU_EX2, "EX2", 0x40400000u /* 3 */, 0x41000000u },
+        { BW_IR_MUFU_EX2, "EX2", 0xff800000u /* -inf */, 0x00000000u },
+        { BW_IR_MUFU_EX2, "EX2", 0x7f800000u /* +inf */, 0x7f800000u },
+        { BW_IR_MUFU_EX2, "EX2", 0x7fc00000u /* NaN */, 0x7fc00000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x7e800000u /* 2^126 -> smallest normal */, 0x00800000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x40000000u /* 2 */, 0x3f000000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x80000000u /* -0 */, 0xff800000u },
+        { BW_IR_MUFU_RCP, "RCP", 0xff800000u /* -inf */, 0x80000000u },
+        { BW_IR_MUFU_RCP, "RCP", 0x7fc00000u /* NaN */, 0x7fc00000u },
+        { BW_IR_MUFU_RSQ, "RSQ", 0x40800000u /* 4 */, 0x3f000000u },
+        { BW_IR_MUFU_RSQ, "RSQ", 0x00800000u /* 2^-126 */, 0x5f000000u },
+        { BW_IR_MUFU_RSQ, "RSQ", 0x7f800000u /* +inf */, 0x00000000u },
+        { BW_IR_MUFU_RSQ, "RSQ", 0x80000000u /* -0 */, 0xff800000u },
+    };
+    for (size_t i = 0; i < sizeof c / sizeof c[0]; i++) expect(c[i].name, c[i].in, sim_mufu(c[i].op, c[i].in), c[i].want);
+}
+#endif
+
+int main(void) {
+    run_model();
+    printf("%s: mufu-ftz %s: %d checks, %d failed\n", g_failed ? "FAIL" : "PASS", MODEL, g_checks, g_failed);
+    return g_failed ? 1 : 0;
+}
diff --git a/tests/bw_warp_sim.h b/tests/bw_warp_sim.h
index 6d93828f3..3ad56d3ab 100644
--- a/tests/bw_warp_sim.h
+++ b/tests/bw_warp_sim.h
@@ -51,12 +51,13 @@
  * nobody wrote shows up in the oracle comparison.
  *
  * Per-lane ALU semantics are those of the two earlier simulators (tests/gpu_attention_test.c,
- * bench/prime_race/tests/gb10_sieve_host_test.c). EX2 and RCP are exact here; the chip's
- * are approximate. LDCU64 (memory descriptor) is not modelled. */
+ * bench/prime_race/tests/gb10_sieve_host_test.c). MUFU EX2 / RCP / RSQ are the correctly
+ * rounded IEEE value with the chip's subnormal flush (bw_mufu_ftz.h); the chip's are approximate. LDCU64 (memory descriptor) is not modelled. */
 #ifndef BW_WARP_SIM_H
 #define BW_WARP_SIM_H
 
 #include "omega_blackwell_codegen.h"
+#include "bw_mufu_ftz.h" /* MUFU EX2 / RCP / RSQ: the chip's flush of subnormal inputs and results (omega #462) */
 #include 
 #include 
 #include 
@@ -182,9 +183,9 @@ static void ws_lane_exec(WsSim *s, WsLane *l, const BlackwellIRInsn *in, int pc,
     case BW_IR_FFMA: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fmaf(ws_u2f(a), ws_u2f(b), ws_u2f(c))), p); break;
     case BW_IR_FMNMX_MAX: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fmaxf(ws_u2f(a), ws_u2f(b))), p); break;
     case BW_IR_FMNMX_MIN: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fminf(ws_u2f(a), ws_u2f(b))), p); break;
-    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(exp2f(ws_u2f(a))), p); break;
-    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / ws_u2f(a)), p); break;
-    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / sqrtf(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ex2(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rcp(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rsq(ws_u2f(a))), p); break;
     default: ws_fail(s, WS_E_OP, pc, "opcode not modelled"); return;
     }
 }
diff --git a/tests/bw_warp_sim_k.h b/tests/bw_warp_sim_k.h
index 993875647..138a4b146 100644
--- a/tests/bw_warp_sim_k.h
+++ b/tests/bw_warp_sim_k.h
@@ -51,8 +51,8 @@
  * nobody wrote shows up in the oracle comparison.
  *
  * Per-lane ALU semantics are those of the two earlier simulators (tests/gpu_attention_test.c,
- * bench/prime_race/tests/gb10_sieve_host_test.c). EX2 and RCP are exact here; the chip's
- * are approximate. LDCU64 (memory descriptor) is not modelled. */
+ * bench/prime_race/tests/gb10_sieve_host_test.c). MUFU EX2 / RCP / RSQ are the correctly
+ * rounded IEEE value with the chip's subnormal flush (bw_mufu_ftz.h); the chip's are approximate. LDCU64 (memory descriptor) is not modelled. */
 #ifndef BW_WARP_SIM_K_H
 #define BW_WARP_SIM_K_H
 /* bw_warp_sim_k.h (OWN-30B cut 8, 2026-10-13): tests/bw_warp_sim.h plus the system-scope opcodes the decode attention
@@ -60,6 +60,7 @@
  * The simulator runs CTAs one after another, so an atomic counter sees every earlier CTA's add. */
 
 #include "omega_blackwell_codegen.h"
+#include "bw_mufu_ftz.h" /* MUFU EX2 / RCP / RSQ: the chip's flush of subnormal inputs and results (omega #462) */
 #include "omega_blackwell_codegen_tc.h"
 #include 
 #include 
@@ -193,9 +194,9 @@ static void ws_lane_exec(WsSim *s, WsLane *l, const BlackwellIRInsn *in, int pc,
         if (in->imm == OMEGA_TC_MARK_F2FP) { ws_wrs(l, in->dst_vreg, in->dst_subreg, (ws_k_bf16_rn(a) << 16) | ws_k_bf16_rn(b), p); break; } /* F2FP.BF16.F32.PACK_AB placeholder (L313 bf16 state) */
         ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fmaxf(ws_u2f(a), ws_u2f(b))), p); break;
     case BW_IR_FMNMX_MIN: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fminf(ws_u2f(a), ws_u2f(b))), p); break;
-    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(exp2f(ws_u2f(a))), p); break;
-    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / ws_u2f(a)), p); break;
-    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / sqrtf(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ex2(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rcp(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rsq(ws_u2f(a))), p); break;
     case BW_IR_MUFU_LG2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(log2f(ws_u2f(a))), p); break;
     case BW_IR_LDG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; uint32_t x; memcpy(&x, (const void *)(uintptr_t)ad, 4); ws_wrs(l, in->dst_vreg, in->dst_subreg, x, p); break; }
     case BW_IR_STG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; memcpy((void *)(uintptr_t)ad, &b, 4); break; }
diff --git a/tests/bw_warp_sim_pa.h b/tests/bw_warp_sim_pa.h
index 157e396cd..3239ca0b4 100644
--- a/tests/bw_warp_sim_pa.h
+++ b/tests/bw_warp_sim_pa.h
@@ -51,8 +51,8 @@
  * nobody wrote shows up in the oracle comparison.
  *
  * Per-lane ALU semantics are those of the two earlier simulators (tests/gpu_attention_test.c,
- * bench/prime_race/tests/gb10_sieve_host_test.c). EX2 and RCP are exact here; the chip's
- * are approximate. LDCU64 (memory descriptor) is not modelled. */
+ * bench/prime_race/tests/gb10_sieve_host_test.c). MUFU EX2 / RCP / RSQ are the correctly
+ * rounded IEEE value with the chip's subnormal flush (bw_mufu_ftz.h); the chip's are approximate. LDCU64 (memory descriptor) is not modelled. */
 #ifndef BW_WARP_SIM_PA_H
 /* bw_warp_sim_pa.h (OWN-30B L1 attention, 2026-10-13): bw_warp_sim_tc.h with the HMMA operands read at their sub-register
  * offsets (src1/src2/src3_subreg; the encoder adds them to the physical register, bw_warp_sim_tc.h ignored them). The
@@ -67,6 +67,7 @@
  * encoder emits and bw_warp_sim_k.h ignored. Timing (stall counts, scoreboards) is not modelled. */
 
 #include "omega_blackwell_codegen.h"
+#include "bw_mufu_ftz.h" /* MUFU EX2 / RCP / RSQ: the chip's flush of subnormal inputs and results (omega #462) */
 #include "bw_hmma_model.h"
 #include "omega_blackwell_codegen_tc.h"
 #include 
@@ -200,9 +201,9 @@ static void ws_lane_exec(WsSim *s, WsLane *l, const BlackwellIRInsn *in, int pc,
         if (in->imm == OMEGA_TC_MARK_F2FP) { ws_wrs(l, in->dst_vreg, in->dst_subreg, (ws_bf16_rn(a) << 16) | ws_bf16_rn(b), p); break; } /* F2FP.BF16.F32.PACK_AB placeholder */
         ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fmaxf(ws_u2f(a), ws_u2f(b))), p); break;
     case BW_IR_FMNMX_MIN: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fminf(ws_u2f(a), ws_u2f(b))), p); break;
-    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(exp2f(ws_u2f(a))), p); break;
-    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / ws_u2f(a)), p); break;
-    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(1.0f / sqrtf(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ex2(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rcp(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rsq(ws_u2f(a))), p); break;
     case BW_IR_LDG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; uint32_t x; memcpy(&x, (const void *)(uintptr_t)ad, 4); ws_wrs(l, in->dst_vreg, in->dst_subreg, x, p); break; }
     case BW_IR_STG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; memcpy((void *)(uintptr_t)ad, &b, 4); break; }
     case BW_IR_ATOMG_ADD_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; uint32_t old; memcpy(&old, (const void *)(uintptr_t)ad, 4); uint32_t nw = old + b; memcpy((void *)(uintptr_t)ad, &nw, 4); ws_wrs(l, in->dst_vreg, in->dst_subreg, old, p); break; }
diff --git a/tests/bw_warp_sim_tc.h b/tests/bw_warp_sim_tc.h
index a08e38b6a..3169b0ef9 100644
--- a/tests/bw_warp_sim_tc.h
+++ b/tests/bw_warp_sim_tc.h
@@ -51,8 +51,8 @@
  * nobody wrote shows up in the oracle comparison.
  *
  * Per-lane ALU semantics are those of the two earlier simulators (tests/gpu_attention_test.c,
- * bench/prime_race/tests/gb10_sieve_host_test.c). EX2 and RCP are exact here; the chip's
- * are approximate. LDCU64 (memory descriptor) is not modelled. */
+ * bench/prime_race/tests/gb10_sieve_host_test.c). MUFU EX2 / RCP / RSQ are the correctly
+ * rounded IEEE value with the chip's subnormal flush (bw_mufu_ftz.h); the chip's are approximate. LDCU64 (memory descriptor) is not modelled. */
 #ifndef BW_WARP_SIM_TC_H
 #define BW_WARP_SIM_TC_H
 /* bw_warp_sim_k.h (OWN-30B cut 8, 2026-10-13): tests/bw_warp_sim.h plus the system-scope opcodes the decode attention
@@ -64,6 +64,7 @@
  * encoder emits and bw_warp_sim_k.h ignored. Timing (stall counts, scoreboards) is not modelled. */
 
 #include "omega_blackwell_codegen.h"
+#include "bw_mufu_ftz.h" /* MUFU EX2 / RCP / RSQ: the chip's flush of subnormal inputs and results (omega #462) */
 #include "bw_hmma_model.h"
 #include "omega_blackwell_codegen_tc.h"
 #include "omega_blackwell_codegen_qmma.h"
@@ -143,16 +144,7 @@ static void ws_wrs(WsLane *l, int v, unsigned sub, uint32_t x, const BlackwellIR
 static float ws_u2f(uint32_t u) { float f; memcpy(&f, &u, 4); return f; }
 static uint32_t ws_f2u(float f) { uint32_t u; memcpy(&u, &f, 4); return u; }
 static uint32_t ws_bf16_rn(uint32_t u) { if ((u & 0x7fffffffu) > 0x7f800000u) return 0x7fc0u; return (u + 0x7fffu + ((u >> 16) & 1u)) >> 16; } /* f32 bits -> bf16 bits, round to nearest even */
-/* MUFU (the SASS EX2 / RCP / RSQ unit) flushes a subnormal result to a sign-preserving zero. Chip-observed on GB10: the SwiGLU
- * reciprocal 1 / (2^t + 1) for t in (126, 128) came back as +-0 on all 101 of 101 differing elements (evidence
- * OWN30B-L1G-PFGEMM-SWIGLU-FTZ-df9bd9c4, gpu_pfgemm_test host red test). Doc-inferred, not separately chip-observed: the input flush
- * and the EX2 / RSQ cases follow the same rule, PTX ISA 9.7.3.13 (rcp) and 9.7.3.21 (ex2) "flushes subnormal inputs and results to
- * sign-preserving zero" for the .ftz form, which is what the bare MUFU we emit is (the non-ftz PTX variants are ptxas sequences around
- * MUFU; NVIDIA publishes no SASS semantics). Limit: the chip's MUFU is approximate (RCP 1 ulp, EX2 2 ulp), the model flushes a correctly
- * rounded IEEE result, so right at the subnormal boundary the two can disagree 0 versus nonzero. This simulator and the pfgemm reference
- * go through this helper; bw_warp_sim.h, bw_warp_sim_k.h, bw_warp_sim_pa.h and gpu_attention_test.c still model MUFU as IEEE (issue filed
- * with PR #461). omega_numeric.c has its own ftz() on the library side. */
-static float ws_mufu_ftz(float f) { uint32_t u = ws_f2u(f); if ((u & 0x7f800000u) == 0u) u &= 0x80000000u; return ws_u2f(u); }
+/* MUFU EX2 / RCP / RSQ: the flush rule and its evidence live in bw_mufu_ftz.h (shared by every simulator, omega #462). */
 static uint32_t ws_lut3(uint32_t lut, uint32_t a, uint32_t b, uint32_t c) {
     uint32_t r = 0;
     for (int i = 0; i < 8; i++) if (lut >> i & 1) r |= ((i & 4) ? a : ~a) & ((i & 2) ? b : ~b) & ((i & 1) ? c : ~c);
@@ -210,9 +202,9 @@ static void ws_lane_exec(WsSim *s, WsLane *l, const BlackwellIRInsn *in, int pc,
         if (in->imm == OMEGA_QMMA_MARK_F2E4) { ws_wrs(l, in->dst_vreg, in->dst_subreg, (uint32_t)qm_e4m3_rne_sat(ws_u2f(a)) << 8 | qm_e4m3_rne_sat(ws_u2f(b)), p); break; } /* F2FP.SATFINITE.E4M3 placeholder (NaN not modelled) */
         ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fmaxf(ws_u2f(a), ws_u2f(b))), p); break;
     case BW_IR_FMNMX_MIN: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(fminf(ws_u2f(a), ws_u2f(b))), p); break;
-    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ftz(exp2f(ws_mufu_ftz(ws_u2f(a))))), p); break;
-    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ftz(1.0f / ws_mufu_ftz(ws_u2f(a)))), p); break;
-    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ftz(1.0f / sqrtf(ws_mufu_ftz(ws_u2f(a))))), p); break;
+    case BW_IR_MUFU_EX2: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_ex2(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RCP: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rcp(ws_u2f(a))), p); break;
+    case BW_IR_MUFU_RSQ: ws_wrs(l, in->dst_vreg, in->dst_subreg, ws_f2u(ws_mufu_rsq(ws_u2f(a))), p); break;
     case BW_IR_LDG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; uint32_t x; memcpy(&x, (const void *)(uintptr_t)ad, 4); ws_wrs(l, in->dst_vreg, in->dst_subreg, x, p); break; }
     case BW_IR_STG_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; memcpy((void *)(uintptr_t)ad, &b, 4); break; }
     case BW_IR_ATOMG_ADD_STRONG_SYS: { uint64_t ad = ws_rd64(l, in->src1_vreg, p); if (!ws_mem_ok(s, ad, 4, pc)) return; uint32_t old; memcpy(&old, (const void *)(uintptr_t)ad, 4); uint32_t nw = old + b; memcpy((void *)(uintptr_t)ad, &nw, 4); ws_wrs(l, in->dst_vreg, in->dst_subreg, old, p); break; }
diff --git a/tests/dagsim/dagsim_unit.c b/tests/dagsim/dagsim_unit.c
index f9c6c089e..71b936399 100644
--- a/tests/dagsim/dagsim_unit.c
+++ b/tests/dagsim/dagsim_unit.c
@@ -26,6 +26,29 @@ static int g_checks, g_fail;
     } while (0)
 #define NEAR(a, b, tol) (fabs((a) - (b)) <= (tol))
 
+/* The real predict never sets known on a refusal. These cases do, so a caller
+ * that only looks at p.known will certify a time. 0 calls the real function.
+ * 1: RX_CM_ERR_UNSUPPORTED with known set and refused clear.
+ * 2: RX_CM_OK with refused set and known set. */
+static int g_predict_fault;
+
+extern int __real_rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f,
+                                uint32_t arm, RxCmPrediction *out);
+
+int __wrap_rx_cm_predict(const RxCostModel *m, const RxCmFeatures *f,
+                         uint32_t arm, RxCmPrediction *out) {
+    if (g_predict_fault == 0) return __real_rx_cm_predict(m, f, arm, out);
+    memset(out, 0, sizeof *out);
+    out->known = 1;
+    out->n = 32;
+    out->mean_log2_ps = 20.0;
+    out->sd_log2 = 0.0;
+    out->dof = 1.0;
+    if (g_predict_fault == 1) return RX_CM_ERR_UNSUPPORTED;
+    out->refused = 1;
+    return RX_CM_OK;
+}
+
 static const char *HDR =
     "oev version=1\n"
     "machine id=t soc=t cores=4 mem_bytes=1000 prov=specified src=test\n"
@@ -405,6 +428,42 @@ static void test_costmodel_reuse(void) {
     CHECK(rc == DS_REFUSED_UNKNOWN, "unobserved arm refuses, got %s", ds_status_name(rc));
 }
 
+/* #934: an unsupported id is refused, and that refusal is not a known cell.
+ * The two fault cases set known anyway. They must still refuse. */
+static void test_predict_refusal(void) {
+    RxCostModel cm; rx_cm_init(&cm, 1);
+    RxCmFeatures f; memset(&f, 0, sizeof f);
+    f.op = RX_CM_OPS; f.M = 64; f.N = 16; f.core = 0;
+    RxCmPrediction p;
+    int st = rx_cm_predict(&cm, &f, 0, &p);
+    CHECK(st == RX_CM_ERR_UNSUPPORTED && p.refused && !p.known && p.n == 0,
+          "real predict refuses an unsupported op, st=%d refused=%d known=%d n=%u",
+          st, p.refused, p.known, p.n);
+
+    ds_model m; ds_result r; char text[4096], err[256];
+    snprintf(text, sizeof text, "%s%s", HDR,
+        "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+        "op id=mv kind=matvec engine=cpu M=64 N=16 core=0 arm=0 prov=fitted src=rx_costmodel\n");
+    CHECK(ds_parse_text(text, &m, err, sizeof err) == DS_OK, "parse: %s", err);
+    ds_opts o; memset(&o, 0, sizeof o);
+    o.asof_day = ds_day_from_date("2026-10-20"); o.interval_q = 0.9;
+    o.costmodel = &cm;
+
+    g_predict_fault = 1;
+    int rc = ds_eval(&m, &o, &r);
+    g_predict_fault = 0;
+    CHECK(rc == DS_REFUSED_UNKNOWN && r.makespan_ns == 0.0,
+          "predict_unsupported_despite_known: got %s makespan %.3f (%s)",
+          ds_status_name(rc), r.makespan_ns, r.reason);
+
+    g_predict_fault = 2;
+    rc = ds_eval(&m, &o, &r);
+    g_predict_fault = 0;
+    CHECK(rc == DS_REFUSED_UNKNOWN && r.makespan_ns == 0.0,
+          "predict_refused_despite_known: got %s makespan %.3f (%s)",
+          ds_status_name(rc), r.makespan_ns, r.reason);
+}
+
 static void test_counterfactual(void) {
     ds_model m; ds_result r;
     int rc = eval_text(
@@ -482,6 +541,116 @@ static void test_minimum_work_diff(void) {
     CHECK(rc != DS_OK && d.double_counted, "double-counted shared work detected");
 }
 
+static int eval_file(const char *path, ds_model *m, ds_result *r) {
+    char err[256];
+    int rc = ds_parse_file(path, m, err, sizeof err);
+    if (rc != DS_OK) {
+        memset(r, 0, sizeof *r);
+        r->status = rc;
+        snprintf(r->reason, sizeof r->reason, "%s", err);
+        return rc;
+    }
+    ds_opts def; memset(&def, 0, sizeof def);
+    def.asof_day = ds_day_from_date("2026-10-24");
+    def.interval_q = 0.9;
+    return ds_eval(m, &def, r);
+}
+
+static double peak_of(const ds_model *m, const ds_result *r, const char *cap) {
+    int i = ds_find_res(m, cap);
+    return i < 0 ? -1.0 : r->peak_live_bytes[i];
+}
+
+/* Issue #705. An inverted lifetime must not contribute negative live bytes. */
+static void test_inverted_lifetimes(void) {
+    ds_model m; ds_result r, r2;
+    int rc = eval_file("tests/dagsim/fixtures/inverted_masks_overflow.oev", &m, &r);
+    CHECK(rc == DS_REFUSED_LIFETIME
+          && strstr(r.reason, "inverted lifetime for buffer inverted:")
+          && strstr(r.reason, "first=C") && strstr(r.reason, "start_ns=20")
+          && strstr(r.reason, "last=A") && strstr(r.reason, "end_ns=10")
+          && !strstr(r.reason, "went negative"),
+          "inverted_lifetime_masks_overflow: got %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(r.makespan_ns == 0 && r.peak_live_bytes[0] == 0, "refusal carries no capacity certificate");
+    rc = eval_file("tests/dagsim/fixtures/inverted_masks_overflow.oev", &m, &r2);
+    CHECK(rc == r2.status && strcmp(r.reason, r2.reason) == 0, "rejection text is deterministic");
+
+    rc = eval_file("tests/dagsim/fixtures/inverted_lone.oev", &m, &r);
+    CHECK(rc == DS_REFUSED_LIFETIME && strstr(r.reason, "first=C") && strstr(r.reason, "last=A"),
+          "lone inverted lifetime refused, got %s (%s)", ds_status_name(rc), r.reason);
+
+    rc = eval_file("tests/dagsim/fixtures/capacity_two_80.oev", &m, &r);
+    CHECK(rc == DS_REFUSED_CAPACITY && strstr(r.reason, "real1") && strstr(r.reason, "real2"),
+          "two valid 80 B buffers refuse capacity, got %s (%s)", ds_status_name(rc), r.reason);
+
+    rc = eval_file("tests/dagsim/fixtures/valid_disjoint_80.oev", &m, &r);
+    CHECK(rc == DS_OK, "disjoint 80 B pair fits, got %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(NEAR(peak_of(&m, &r, "mem"), 80, 1e-9), "disjoint peak 80, got %.1f", peak_of(&m, &r, "mem"));
+    CHECK(NEAR(r.makespan_ns, 30, 1e-9), "disjoint makespan 30, got %.1f", r.makespan_ns);
+
+    rc = eval_file("tests/dagsim/fixtures/valid_tie_80.oev", &m, &r);
+    CHECK(rc == DS_OK, "completion/allocation tie fits, got %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(NEAR(peak_of(&m, &r, "mem"), 80, 1e-9), "tie peak 80 (not 160), got %.1f", peak_of(&m, &r, "mem"));
+
+    /* zero-duration: empty [start, end), peak 0, and it cannot hide an overlap */
+    rc = eval_text(
+        "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+        "op id=Z kind=compute engine=cpu t_ns=0 prov=measured src=t\n"
+        "buffer id=z bytes=80 cap=mem first=Z last=Z\n", &m, &r, NULL);
+    CHECK(rc == DS_OK, "zero-duration buffer status %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(NEAR(r.peak_live_bytes[0], 0, 1e-9), "zero-duration peak 0, got %.1f", r.peak_live_bytes[0]);
+    rc = eval_text(
+        "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+        "op id=Z kind=compute engine=cpu t_ns=0 prov=measured src=t\n"
+        "op id=B kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+        "buffer id=z bytes=400 cap=mem first=Z last=Z\n"
+        "buffer id=real1 bytes=600 cap=mem first=B last=B\n"
+        "buffer id=real2 bytes=600 cap=mem first=B last=B\n", &m, &r, NULL);
+    CHECK(rc == DS_REFUSED_CAPACITY, "zero-duration must not hide 1200 B, got %s (%s)", ds_status_name(rc), r.reason);
+
+    /* omitted endpoints stay valid: resident from 0, open end, and both omitted */
+    rc = eval_text(
+        "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+        "op id=A kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+        "buffer id=no_first bytes=100 cap=mem last=A\n"
+        "buffer id=no_last bytes=50 cap=mem first=A\n"
+        "buffer id=resident bytes=25 cap=mem\n", &m, &r, NULL);
+    CHECK(rc == DS_OK, "omitted endpoints status %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(NEAR(r.peak_live_bytes[0], 175, 1e-9), "omitted endpoints peak 175, got %.1f", r.peak_live_bytes[0]);
+
+    /* The went-negative refusal is reachable without an inverted window: the
+     * ledger sums doubles, and 1e20 + 1 rounds to 1e20 (ulp 16384). Events
+     * +1e20@0, +1@10, -1e20@20, -1@30 end the sweep at -1. A certificate
+     * built on that ledger would be wrong, so it is refused. */
+    rc = eval_text(
+        "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+        "resource id=hbm kind=capacity cap=1e30 prov=specified src=test\n"
+        "op id=A kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+        "op id=B kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+        "op id=C kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+        "dep A B\ndep B C\n"
+        "buffer id=huge bytes=1e20 cap=hbm first=A last=B\n"
+        "buffer id=tiny bytes=1 cap=hbm first=B last=C\n", &m, &r, NULL);
+    CHECK(rc == DS_REFUSED_LIFETIME && strstr(r.reason, "went negative"),
+          "rounding_drives_live_negative: got %s (%s)", ds_status_name(rc), r.reason);
+    CHECK(peak_of(&m, &r, "hbm") == 0 && r.makespan_ns == 0,
+          "negative-ledger refusal carries no capacity certificate");
+
+    char text[2048], err[256];
+    snprintf(text, sizeof text, "%s%s", HDR, "buffer id=neg bytes=-5 cap=mem\n");
+    CHECK(ds_parse_text(text, &m, err, sizeof err) == DS_PARSE_ERROR && strstr(err, "finite number >= 0"),
+          "negative bytes refused at parse: %s", err);
+    snprintf(text, sizeof text, "%s%s", HDR, "buffer id=inf bytes=inf cap=mem\n");
+    CHECK(ds_parse_text(text, &m, err, sizeof err) == DS_PARSE_ERROR && strstr(err, "finite number >= 0"),
+          "non-finite bytes refused at parse: %s", err);
+    snprintf(text, sizeof text, "%s%s", HDR,
+             "resource id=cpu kind=compute slots=1 prov=specified src=test\n"
+             "op id=A kind=compute engine=cpu t_ns=10 prov=measured src=t\n"
+             "buffer id=ghost bytes=10 cap=mem first=nope last=A\n");
+    CHECK(ds_parse_text(text, &m, err, sizeof err) == DS_PARSE_ERROR && strstr(err, "not an op"),
+          "unknown endpoint refused at parse: %s", err);
+}
+
 int main(void) {
     test_serial_chain();
     test_perfect_overlap();
@@ -495,8 +664,10 @@ int main(void) {
     test_energy();
     test_parse_and_cycles();
     test_costmodel_reuse();
+    test_predict_refusal();
     test_counterfactual();
     test_minimum_work_diff();
+    test_inverted_lifetimes();
     printf("dagsim_unit: %d checks, %d failed\n", g_checks, g_fail);
     return g_fail ? 1 : 0;
 }
diff --git a/tests/dagsim/fixtures/capacity_two_80.oev b/tests/dagsim/fixtures/capacity_two_80.oev
new file mode 100644
index 000000000..c4c18c4a6
--- /dev/null
+++ b/tests/dagsim/fixtures/capacity_two_80.oev
@@ -0,0 +1,11 @@
+oev version=1
+machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
+build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
+resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
+resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
+op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=C kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+buffer id=real1 bytes=80 cap=mem first=B last=B
+buffer id=real2 bytes=80 cap=mem first=B last=B
+energy instrument=none
diff --git a/tests/dagsim/fixtures/inverted_lone.oev b/tests/dagsim/fixtures/inverted_lone.oev
new file mode 100644
index 000000000..f85cc1f97
--- /dev/null
+++ b/tests/dagsim/fixtures/inverted_lone.oev
@@ -0,0 +1,10 @@
+oev version=1
+machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
+build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
+resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
+resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
+op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=C kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+buffer id=inverted bytes=80 cap=mem first=C last=A
+energy instrument=none
diff --git a/tests/dagsim/fixtures/inverted_masks_overflow.oev b/tests/dagsim/fixtures/inverted_masks_overflow.oev
new file mode 100644
index 000000000..724b447cd
--- /dev/null
+++ b/tests/dagsim/fixtures/inverted_masks_overflow.oev
@@ -0,0 +1,12 @@
+oev version=1
+machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
+build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
+resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
+resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
+op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=C kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+buffer id=inverted bytes=80 cap=mem first=C last=A
+buffer id=real1 bytes=80 cap=mem first=B last=B
+buffer id=real2 bytes=80 cap=mem first=B last=B
+energy instrument=none
diff --git a/tests/dagsim/fixtures/valid_disjoint_80.oev b/tests/dagsim/fixtures/valid_disjoint_80.oev
new file mode 100644
index 000000000..1bf831d40
--- /dev/null
+++ b/tests/dagsim/fixtures/valid_disjoint_80.oev
@@ -0,0 +1,11 @@
+oev version=1
+machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
+build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
+resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
+resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
+op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=C kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+buffer id=real1 bytes=80 cap=mem first=A last=A
+buffer id=real2 bytes=80 cap=mem first=C last=C
+energy instrument=none
diff --git a/tests/dagsim/fixtures/valid_tie_80.oev b/tests/dagsim/fixtures/valid_tie_80.oev
new file mode 100644
index 000000000..a39a0a784
--- /dev/null
+++ b/tests/dagsim/fixtures/valid_tie_80.oev
@@ -0,0 +1,11 @@
+oev version=1
+machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
+build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
+resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
+resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
+op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
+dep A B
+buffer id=x bytes=80 cap=mem first=A last=A
+buffer id=y bytes=80 cap=mem first=B last=B
+energy instrument=none
diff --git a/tests/dagsim/mutant_lifetime.sh b/tests/dagsim/mutant_lifetime.sh
new file mode 100755
index 000000000..b36412254
--- /dev/null
+++ b/tests/dagsim/mutant_lifetime.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Drop the inverted-lifetime check and require the named assertion to fail.
+# A mutant that still prints a passing inverted_lifetime_masks_overflow is a miss.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+cd "$ROOT"
+src=tools/dagsim/dagsim.c
+grep -q 'LIFETIME_ORDER_CHECK' "$src"
+tmp=$(mktemp -d)
+trap 'rm -rf "$tmp"' EXIT
+sed '/LIFETIME_ORDER_CHECK/d' "$src" > "$tmp/dagsim.c"
+grep -q 'LIFETIME_ORDER_CHECK' "$tmp/dagsim.c" && { echo "mutant: check still present"; exit 1; }
+grep -q 'reject_inverted_lifetimes' "$tmp/dagsim.c" || { echo "mutant: deleted more than the call"; exit 1; }
+
+CC=${CC:-cc}
+# -Wno-unused-function: deleting the call leaves reject_inverted_lifetimes unreferenced.
+# The mutant has to run. The kill is the named assertion, not a compile error.
+cflags="-std=gnu11 -Wall -Wextra -Werror -Wno-unused-function -D_GNU_SOURCE -O2 -Isrc -Itools/dagsim"
+$CC $cflags -c -o "$tmp/dagsim.o" "$tmp/dagsim.c"
+$CC $cflags -c -o "$tmp/rx_costmodel.o" src/runtime/rx_costmodel.c
+if [ "$(uname -m)" = aarch64 ]; then
+  sha=src/omega_om_units.c
+else
+  sha=tests/dagsim/sha256_host.c
+fi
+$CC $cflags -o "$tmp/unit" tests/dagsim/dagsim_unit.c "$tmp/dagsim.o" "$tmp/rx_costmodel.o" "$sha" -Wl,--wrap=rx_cm_predict -lm
+set +e
+"$tmp/unit" > "$tmp/out" 2>&1
+rc=$?
+set -e
+if [ "$rc" -eq 0 ]; then
+  echo "mutant survived: unit suite passed after dropping LIFETIME_ORDER_CHECK"
+  exit 1
+fi
+if ! grep -q 'inverted_lifetime_masks_overflow' "$tmp/out"; then
+  echo "mutant did not fail named assertion inverted_lifetime_masks_overflow"
+  cat "$tmp/out"
+  exit 1
+fi
+echo "mutant killed: inverted_lifetime_masks_overflow"
diff --git a/tests/dagsim/mutant_predict.sh b/tests/dagsim/mutant_predict.sh
new file mode 100644
index 000000000..89df5266d
--- /dev/null
+++ b/tests/dagsim/mutant_predict.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+# Drop the unsupported-return and refused checks. Leave the p.known test in
+# place. The named assertions must fail: a prediction can be marked known and
+# still be a refusal.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+cd "$ROOT"
+src=tools/dagsim/dagsim.c
+grep -q 'PREDICT_REFUSAL_CHECK' "$src"
+tmp=$(mktemp -d)
+trap 'rm -rf "$tmp"' EXIT
+sed '/PREDICT_REFUSAL_CHECK/s/st == RX_CM_ERR_UNSUPPORTED || p->refused || //' "$src" > "$tmp/dagsim.c"
+grep -q 'PREDICT_REFUSAL_CHECK' "$tmp/dagsim.c" || { echo "mutant: deleted the check tag"; exit 1; }
+grep -q 'RX_CM_ERR_UNSUPPORTED' "$tmp/dagsim.c" && { echo "mutant: unsupported check still present"; exit 1; }
+grep -q 'predict_unusable' "$tmp/dagsim.c" || { echo "mutant: deleted the call"; exit 1; }
+
+CC=${CC:-cc}
+# -Wno-unused-parameter: dropping the use of st must not die at compile time.
+# The kill is the named assertion, not a warning.
+cflags="-std=gnu11 -Wall -Wextra -Werror -Wno-unused-parameter -D_GNU_SOURCE -O2 -Isrc -Itools/dagsim"
+$CC $cflags -c -o "$tmp/dagsim.o" "$tmp/dagsim.c"
+$CC $cflags -c -o "$tmp/rx_costmodel.o" src/runtime/rx_costmodel.c
+if [ "$(uname -m)" = aarch64 ]; then
+  sha=src/omega_om_units.c
+else
+  sha=tests/dagsim/sha256_host.c
+fi
+$CC $cflags -o "$tmp/unit" tests/dagsim/dagsim_unit.c "$tmp/dagsim.o" "$tmp/rx_costmodel.o" "$sha" -Wl,--wrap=rx_cm_predict -lm
+set +e
+"$tmp/unit" > "$tmp/out" 2>&1
+rc=$?
+set -e
+if [ "$rc" -eq 0 ]; then
+  echo "mutant survived: unit suite passed after dropping the predict refusal check"
+  exit 1
+fi
+if ! grep -q 'predict_unsupported_despite_known' "$tmp/out"; then
+  echo "mutant did not fail named assertion predict_unsupported_despite_known"
+  cat "$tmp/out"
+  exit 1
+fi
+if ! grep -q 'predict_refused_despite_known' "$tmp/out"; then
+  echo "mutant did not fail named assertion predict_refused_despite_known"
+  cat "$tmp/out"
+  exit 1
+fi
+echo "mutant killed: predict_unsupported_despite_known predict_refused_despite_known"
diff --git a/tests/dagsim/run_cli.sh b/tests/dagsim/run_cli.sh
index 5b22297de..0c5d7b364 100644
--- a/tests/dagsim/run_cli.sh
+++ b/tests/dagsim/run_cli.sh
@@ -57,5 +57,31 @@ grep -q '"status": "REFUSED_REMOVED_REQUIRED"' "$OUT/diff_bad.json"; check $? "u
 "$BIN" diff $F/mw_baseline.oev $F/mw_baseline.oev --asof $ASOF > "$OUT/diff_same.json"
 grep -q '"kept": 4, "added": 0, "removed": 0' "$OUT/diff_same.json"; check $? "no-change fixture adds no nodes"
 
+# omega-mv#705: inverted lifetime must not come back as an OK capacity certificate.
+"$BIN" eval $F/inverted_masks_overflow.oev --asof 2026-10-24 > "$OUT/inverted.json"; rc=$?
+[ $rc -eq 1 ]; check $? "inverted lifetime exits 1"
+grep -q '"status": "REFUSED_LIFETIME"' "$OUT/inverted.json"; check $? "inverted lifetime status"
+grep -q 'first=C' "$OUT/inverted.json"; check $? "inverted reason names first=C"
+grep -q 'last=A' "$OUT/inverted.json"; check $? "inverted reason names last=A"
+grep -q 'makespan' "$OUT/inverted.json"; [ $? -ne 0 ]; check $? "no makespan on inverted refusal"
+"$BIN" eval $F/inverted_lone.oev --asof 2026-10-24 > "$OUT/inverted_lone.json"; rc=$?
+[ $rc -eq 1 ]; check $? "lone inverted lifetime exits 1"
+grep -q '"status": "REFUSED_LIFETIME"' "$OUT/inverted_lone.json"; check $? "lone inverted is not peak 0"
+"$BIN" eval $F/capacity_two_80.oev --asof 2026-10-24 > "$OUT/cap80.json"; rc=$?
+[ $rc -eq 1 ]; check $? "two overlapping 80 B buffers exit 1"
+grep -q '"status": "REFUSED_CAPACITY"' "$OUT/cap80.json"; check $? "overlap is REFUSED_CAPACITY"
+"$BIN" eval $F/valid_disjoint_80.oev --asof 2026-10-24 > "$OUT/disjoint80.json"; rc=$?
+check $rc "disjoint 80 B pair exits 0"
+grep -q '"status": "OK"' "$OUT/disjoint80.json"; check $? "disjoint pair OK"
+grep -q '"bytes": 80' "$OUT/disjoint80.json"; check $? "disjoint peak 80"
+"$BIN" eval $F/valid_tie_80.oev --asof 2026-10-24 > "$OUT/tie80.json"; rc=$?
+check $rc "completion/allocation tie exits 0"
+grep -q '"status": "OK"' "$OUT/tie80.json"; check $? "tie OK"
+grep -q '"bytes": 80' "$OUT/tie80.json"; check $? "tie peak 80"
+"$BIN" pareto $F/inverted_masks_overflow.oev $F/valid_disjoint_80.oev --asof 2026-10-24 > "$OUT/pareto_life.txt"; rc=$?
+check $rc "pareto with a refused lifetime exits 0"
+grep -q 'inverted_masks_overflow.oev *REFUSED_LIFETIME' "$OUT/pareto_life.txt"; check $? "inverted row is refused, not ranked OK"
+grep -q 'valid_disjoint_80.oev *OK' "$OUT/pareto_life.txt"; check $? "valid row still ranked"
+
 say "outputs in $OUT"
 exit $fail
diff --git a/tests/fixtures/bw_hazard/README.md b/tests/fixtures/bw_hazard/README.md
new file mode 100644
index 000000000..c14fdcfee
--- /dev/null
+++ b/tests/fixtures/bw_hazard/README.md
@@ -0,0 +1,35 @@
+# Hazard checker fixtures (omega-mv#554)
+
+Encoded sm_121 bytes of the head_dim 256 prefill attention kernels from branch `feat/pattn256` (omega-mv#545), used by
+`tests/bw_hazard_test.c` as the red receipt and its control.
+
+| File | Commit | Encoder |
+|---|---|---|
+| `pattn256_attend_ad5d650b.bin` | ad5d650b | before the fix: IADD3, ISETP_GE and EXIT got a fixed word 3 |
+| `pattn256_attend_e3a26848.bin` | e3a26848 | after the fix (PR #553): the scheduled control word is kept |
+| `pattn256_prep_ad5d650b.bin` | ad5d650b | before the fix |
+| `pattn256_prep_e3a26848.bin` | e3a26848 | after the fix |
+
+`pattn256_attend_ad5d650b.bin` is byte-identical (sha256 2e3f9d41...) to `attend.bin` in the investigation folder
+`2026-10-18-pattn256-hang`, the kernel that faulted on the GB10 (Xid 13). How the files were made: build
+`libomega_gpu.a` at each commit (PHYSICS_DIR at the pinned physics commit), then write the bytes returned by
+`omega_gpu_prefill_attn256_encode(kind, ...)` (kind 1 attend, kind 0 prep; built, encoded and patched, no device).
+Checksums in `SHA256SUMS`.
+
+## The rule, checked against ptxas (offline oracle only)
+
+`nvcc 13.0.88 -arch=sm_121 -cubin -O3` on a loop that reloads through a pointer and then advances it (source and
+listing sealed in the investigation folder `2026-10-19-omega-554-hazard`, war.cu sha256 50386e2f...):
+
+```
+/*0050*/ LDCU.64 UR12, c[0x0][0x358] ;               control 0x000ea200: write barrier 2
+/*0080*/ BRA.U !UP0, 0x1e0 ;                         control 0x004fea00: waits on barrier 2 before UR12 is used
+/*0140*/ LDG.E.STRONG.GPU R0, desc[UR12][R2.64] ;    control 0x0000a200: write barrier 2, READ barrier 0
+/*0160*/ LDG.E.STRONG.GPU R4, desc[UR12][R4.64] ;    control 0x000ea200: write barrier 2, no read barrier
+/*01b0*/ IADD.64 R2, R2, UR4 ;                       control 0x001fe400: waits on barrier 0 before rewriting R2
+```
+
+ptxas gives the first load a read barrier because its address pair R2:R3 is rewritten while the load may be in flight,
+and the rewriting instruction waits on it; the second load, whose address is only replaced by its own result, gets
+none. That is the WAR rule the checker applies (and the RAW rule on the descriptor). The chip taught the same rule
+twice: omega-mv#545 (this fixture) and the fp8 GEMV hang recorded in `src/omega_bw_em.h`.
diff --git a/tests/fixtures/bw_hazard/SHA256SUMS b/tests/fixtures/bw_hazard/SHA256SUMS
new file mode 100644
index 000000000..e3dafb825
--- /dev/null
+++ b/tests/fixtures/bw_hazard/SHA256SUMS
@@ -0,0 +1,4 @@
+2e3f9d41edacc6f9fe9c87c93abd3d57eab2ac9d044c8b1168d756e72c636036  pattn256_attend_ad5d650b.bin
+bc238908cb71ac57dbf1733527abe9b8482841d970b413cd28b1b95733e9cdfb  pattn256_attend_e3a26848.bin
+81189cd9c3dbd40e6098adcced7da4626e90b2a0fd7b2b4c00999964c4b94805  pattn256_prep_ad5d650b.bin
+2abdba2799a2f644cf1b86a42603560a72e16e52de038b383cfa383dc7e0c9ee  pattn256_prep_e3a26848.bin
diff --git a/tests/fixtures/bw_hazard/pattn256_attend_ad5d650b.bin b/tests/fixtures/bw_hazard/pattn256_attend_ad5d650b.bin
new file mode 100644
index 000000000..ab7e96b74
Binary files /dev/null and b/tests/fixtures/bw_hazard/pattn256_attend_ad5d650b.bin differ
diff --git a/tests/fixtures/bw_hazard/pattn256_attend_e3a26848.bin b/tests/fixtures/bw_hazard/pattn256_attend_e3a26848.bin
new file mode 100644
index 000000000..6ec83322d
Binary files /dev/null and b/tests/fixtures/bw_hazard/pattn256_attend_e3a26848.bin differ
diff --git a/tests/fixtures/bw_hazard/pattn256_prep_ad5d650b.bin b/tests/fixtures/bw_hazard/pattn256_prep_ad5d650b.bin
new file mode 100644
index 000000000..62beb80f9
Binary files /dev/null and b/tests/fixtures/bw_hazard/pattn256_prep_ad5d650b.bin differ
diff --git a/tests/fixtures/bw_hazard/pattn256_prep_e3a26848.bin b/tests/fixtures/bw_hazard/pattn256_prep_e3a26848.bin
new file mode 100644
index 000000000..1b4643184
Binary files /dev/null and b/tests/fixtures/bw_hazard/pattn256_prep_e3a26848.bin differ
diff --git a/tests/gates/omega-bw-hazard.gate b/tests/gates/omega-bw-hazard.gate
new file mode 100644
index 000000000..9b225944b
--- /dev/null
+++ b/tests/gates/omega-bw-hazard.gate
@@ -0,0 +1,24 @@
+# tests/gates/omega-bw-hazard.gate
+# Host-only static scoreboard hazard checker (omega-mv#554): make test-bw-hazard (decoder vs encoder, red receipt, negative controls, sweep). No device.
+gate: OMEGA-BW-HAZARD
+manifest_version: 2
+owner: omega
+requires:
+  - host
+inputs:
+  - Makefile
+  - mk/
+  - src/
+  - tests/
+  - tools/
+  - physics.lock
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["bw-hazard"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 20m
+exactness: EXACT
+cache_scope: machine
diff --git a/tests/gates/omega-gpu-decode-graph.gate b/tests/gates/omega-gpu-decode-graph.gate
new file mode 100644
index 000000000..2eed6c402
--- /dev/null
+++ b/tests/gates/omega-gpu-decode-graph.gate
@@ -0,0 +1,24 @@
+# tests/gates/omega-gpu-decode-graph.gate
+# Host-only decode-graph suite (omega #518): make test-gpu-decode-graph (decode graph test, abort/lock-recovery test, 5 mutants). No device.
+gate: OMEGA-GPU-DECODE-GRAPH
+manifest_version: 2
+owner: omega
+requires:
+  - host
+inputs:
+  - Makefile
+  - mk/
+  - src/
+  - tests/
+  - tools/
+  - physics.lock
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["gpu-decode-graph"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 20m
+exactness: EXACT
+cache_scope: machine
diff --git a/tests/gates/omega-numeric-cpu.gate b/tests/gates/omega-numeric-cpu.gate
index 5d1ea7294..c79198dc6 100644
--- a/tests/gates/omega-numeric-cpu.gate
+++ b/tests/gates/omega-numeric-cpu.gate
@@ -1,5 +1,6 @@
 # tests/gates/omega-numeric-cpu.gate
-# Mirrors hosted: host-suites.yml numeric-cpu: test-numeric-cpu test-numeric-qualify test-e1-combine test-chipwait-campaign test-gpu-wait test-gpu-wait-mutants test-gpu-code-alloc (hosted 63 s)
+# Mirrors hosted: host-suites.yml numeric-cpu: test-numeric-cpu test-numeric-qualify test-e1-combine test-chipwait-campaign test-gpu-wait test-gpu-wait-mutants test-gpu-code-alloc test-mufu-ftz (hosted 63 s before test-mufu-ftz)
+# test-mufu-ftz (omega #462) is host-only: the MUFU flush helper and the four warp simulators; no chip runs
 gate: OMEGA-NUMERIC-CPU
 manifest_version: 2
 owner: omega
@@ -12,6 +13,14 @@ inputs:
   - tests/test_omega_numeric.c
   - tests/numeric_oracle.h
   - tests/run_numeric_gates.sh
+  - tests/bw_mufu_ftz.h
+  - tests/bw_mufu_ftz_test.c
+  - tests/bw_warp_sim.h
+  - tests/bw_warp_sim_k.h
+  - tests/bw_warp_sim_pa.h
+  - tests/bw_warp_sim_tc.h
+  - tests/bw_hmma_model.h
+  - tests/bw_qmma_model.h
   - tools/
   - tests/gates/
 run:
diff --git a/tests/gates/run.sh b/tests/gates/run.sh
index 66da8e1a9..226280966 100755
--- a/tests/gates/run.sh
+++ b/tests/gates/run.sh
@@ -123,7 +123,7 @@ case "$step" in
   searchtrace)        make $NOPHYS test-searchtrace ;;
   estimation)         for t in test-estimation test-est-tools test-estimation-v3 test-est3c-tools; do make $NOPHYS $t; done ;;
   ans)                make $NOPHYS test-inertial-alignment ;;
-  numeric-cpu)        for t in test-numeric-cpu test-numeric-qualify test-e1-combine test-chipwait-campaign test-gpu-wait test-gpu-wait-mutants test-gpu-code-alloc; do make $NOPHYS $t; done ;;
+  numeric-cpu)        for t in test-numeric-cpu test-numeric-qualify test-e1-combine test-chipwait-campaign test-gpu-wait test-gpu-wait-mutants test-gpu-code-alloc test-mufu-ftz; do make $NOPHYS $t; done ;;
   train)              make $NOPHYS test-train ;;
   compiler)           make $NOPHYS test-compiler-quick; make $NOPHYS test-compiler-full ;;
   one-layer-acceptance) make $NOPHYS test-one-layer-acceptance ;;
@@ -167,8 +167,10 @@ case "$step" in
     ARGUS_STREAMS="$(mktemp -d /tmp/argus-streams.XXXXXX)"; export ARGUS_STREAMS
     make test-argus-runtime test-machine-identity-argus
     ;;
+  bw-hazard)          physics_pin; make test-bw-hazard ;;
   numeric2)           make $NOPHYS test-numeric-reduce-cpu test-divsqrt-host ;;
   tensor)             make $NOPHYS test-tensor; make $NOPHYS test-tensor-store; make $NOPHYS test-m20-receipt; make $NOPHYS test-tensor-mutations ;;
+  gpu-decode-graph)   physics_pin; make test-gpu-decode-graph ;;
   # host-suites-3.yml
   numeric-lifecycle)  make $NOPHYS test-numeric-lifecycle ;;
   numeric-transc-digest)
@@ -313,6 +315,7 @@ case "$step" in
   om-units)           # The C entry points whose algorithm is Omega (om/units.sh): omc born from the seed here,
                       # the generator pinned by om/omega-bridge.lock; regenerated binding, SHA-256 and BLAKE3
                       # byte parity against the C they replaced, and the BLAKE3 mutants. NOT_RUN (3) without tools.
+                      # Then the program-mode om/blake3/blake3.om output contract (#726): digest, /dev/full, closed stdout.
     pin omega-bridge omega-bridge "$(lock om/omega-bridge.lock)"
     sh seed/omega-from-seed.sh > build/om-units-seed.log 2>&1 || { tail -3 build/om-units-seed.log; exit 1; }
     export OMEGA_OMC="$ROOT/seed/out/omc" OMEGA_BRIDGE="$PINS/omega-bridge"
@@ -320,6 +323,8 @@ case "$step" in
     sh om/units.sh --check
     sh om/sha256/parity/run.sh
     sh om/blake3/parity/run.sh
+    "$OMEGA_OMC" < om/blake3/blake3.om > build/om-units-blake3 && chmod 700 build/om-units-blake3
+    sh om/blake3/test-output.sh build/om-units-blake3
     ;;
   tilelab)            # omega#906: native .om tile planner and streaming (m,s,p) softmax. omc born from the seed
                       # here, then seed/tilelab/gate.sh (expected output, mutants failing for their own reason).
diff --git a/tests/gpu_attention_test.c b/tests/gpu_attention_test.c
index b42cd14dc..8ba96c81c 100644
--- a/tests/gpu_attention_test.c
+++ b/tests/gpu_attention_test.c
@@ -769,8 +769,8 @@ static int sim_step(SimThr *t, const BlackwellIRProgram *p, uint32_t tid, uint32
         case BW_IR_FMUL: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(u2f(a) * u2f(b)), p); break;
         case BW_IR_FFMA: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(fmaf(u2f(a), u2f(b), u2f(c))), p); break;
         case BW_IR_FMNMX_MAX: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(fmaxf(u2f(a), u2f(b))), p); break;
-        case BW_IR_MUFU_EX2: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(exp2f(u2f(a))), p); break;
-        case BW_IR_MUFU_RCP: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(1.0f / u2f(a)), p); break;
+        case BW_IR_MUFU_EX2: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(ws_mufu_ex2(u2f(a))), p); break; /* bw_mufu_ftz.h (#462) */
+        case BW_IR_MUFU_RCP: wrs(t, in->dst_vreg, in->dst_subreg, f2u_(ws_mufu_rcp(u2f(a))), p); break;
         default: g_sim_err = 100 + (int)in->op; t->done = 1; return 0;
         }
         if (g_trace && tid == 0 && cx == g_trace_cx && cy == 0 && g_trace_launch == 1) { uint32_t dv = rd(t, in->dst_vreg, p); printf("T pc=%d op=%d dst=v%d(r%d)=%08x f=%g p0=%d a=%08x b=%08x c=%08x\n", t->pc, (int)in->op, in->dst_vreg, in->dst_vreg >= 0 ? p->regalloc.vreg_to_phys[in->dst_vreg] : -1, dv, u2f(dv), t->p0, a, b, c); }
@@ -778,6 +778,30 @@ static int sim_step(SimThr *t, const BlackwellIRProgram *p, uint32_t tid, uint32
     }
     g_sim_err = 4; t->done = 1; return 0;
 }
+/* omega #462: this per-thread simulator's MUFU cases follow the chip's flush rule (tests/bw_mufu_ftz.h). One MUFU then
+ * EXIT through sim_step: a subnormal EX2 / RCP result is a zero of the same sign, a subnormal RCP input is a zero (so the
+ * result is an infinity), normals unchanged. Reachable in the kernel: softmax EX2 of a score more than 126 below the
+ * running max (log2 units) is subnormal in IEEE and 0 on the chip. */
+static void mufu_ftz_sim_check(void) {
+    static BlackwellIRProgram p;
+    static const struct { BlackwellIROpcode op; uint32_t in, want; } c[] = {
+        { BW_IR_MUFU_EX2, 0xc3020000u /* -130 */, 0x00000000u }, { BW_IR_MUFU_EX2, 0xc2fc0000u /* -126 */, 0x00800000u },
+        { BW_IR_MUFU_RCP, 0x7f400000u /* 1.5 * 2^127 */, 0x00000000u }, { BW_IR_MUFU_RCP, 0xff400000u, 0x80000000u },
+        { BW_IR_MUFU_RCP, 0x00400000u /* 2^-127 */, 0x7f800000u }, { BW_IR_MUFU_RCP, 0x7e800000u /* 2^126 */, 0x00800000u },
+    };
+    memset(&p, 0, sizeof p);
+    p.count = 2; p.regalloc.vreg_to_phys[0] = 0; p.regalloc.vreg_to_phys[1] = 1;
+    for (int i = 0; i < 2; i++) { p.insns[i].dst_vreg = p.insns[i].src1_vreg = p.insns[i].src2_vreg = p.insns[i].src3_vreg = p.insns[i].ureg = -1; }
+    p.insns[1].op = BW_IR_EXIT;
+    for (size_t i = 0; i < sizeof c / sizeof c[0]; i++) {
+        SimThr t; memset(&t, 0, sizeof t);
+        p.insns[0].op = c[i].op; p.insns[0].dst_vreg = 0; p.insns[0].src1_vreg = 1;
+        t.r[1] = c[i].in; t.r[0] = 0xdeadbeefu; g_sim_err = 0;
+        sim_step(&t, &p, 0, 0, 0);
+        CHECK(g_sim_err == 0 && t.r[0] == c[i].want, "attention sim MUFU %s(0x%08x) = 0x%08x, chip rule 0x%08x (omega #462)",
+              c[i].op == BW_IR_MUFU_EX2 ? "EX2" : "RCP", c[i].in, t.r[0], c[i].want);
+    }
+}
 static int sim_launch(const void *progv, const OmegaGpuAttnLaunch *L, OmegaGpuAttnInfo *info) {
     const BlackwellIRProgram *p = progv;
     memset(sim_cbank, 0, sizeof sim_cbank);
@@ -1207,7 +1231,7 @@ int main(int argc, char **argv) {
     if (g_divergent) omega_gpu_attention_test_set_divergent(1);
     if (sim) { g_sim_mode = 1; omega_gpu_attention_test_set_simulator(g_divergent ? ws_attn_launch : sim_launch); }
     if (sim && g_divergent && !host) divergent_negative_control();
-    if (host) { host_only(); hd_codegen_checks(); }
+    if (host) { host_only(); hd_codegen_checks(); mufu_ftz_sim_check(); }
     else if (split_timing_mode) { if (split_timing(out_path) != 0) return 2; }
     else if (timing_mode) { if (timing(out_path) != 0) return 2; }
     else if (sweep_mode) { if (sweep(out_path) != 0) return 2; }
diff --git a/tests/gpu_decode_attn_test.c b/tests/gpu_decode_attn_test.c
index ea27f3e20..ff35e2a03 100644
--- a/tests/gpu_decode_attn_test.c
+++ b/tests/gpu_decode_attn_test.c
@@ -20,7 +20,7 @@
  *                 key wins), codegen budget per depth and mutant, refusals. No device.
  *   --sim         the kernel through tests/bw_warp_sim_k.h (no chip): contexts 1, 7, 256, 257, 301, 701 (1..3
  *                 splits, the cross-split combine), both fragment orders, every mutant caught at context 301.
- *   (default)     the chip: parity against the double reference at contexts 1, 7, 256, 1024, 4096, 8192, 32768
+ *   (default)     the chip: parity against the double reference at contexts 1, 7, 256, 1024, 4096, 8192, 32768, 65536, 100000, 131072
  *                 (the appended K/V row read back and compared), second call identical, timing medians with
  *                 the host caches evicted, every mutant caught at context 301, JSON receipt with --out.
  * Tolerance: |out - ref| <= 3e-3 * max|v| + 1e-6 per element (MUFU.EX2 / RSQ are 2^-22-ish, bf16 rounding of the
@@ -123,9 +123,9 @@ static void omega_decode_attn_reference(const float *qkv, const uint16_t *kc, co
 /* the library's libm-free host math against libm: RoPE rows bit-equal or within one f32 ulp, double values close */
 static void host_math_vs_libm(void) {
     uint32_t s = 77; unsigned flips = 0, worse = 0; double maxd = 0;
-    static const uint32_t fixed[] = { 0, 1, 2, 3, 100, 255, 256, 4095, 4096, 8191, 32767, 32768, 65535 };
+    static const uint32_t fixed[] = { 0, 1, 2, 3, 100, 255, 256, 4095, 4096, 8191, 32767, 32768, 65535, 65536, 99999, 131071 };
     for (unsigned n = 0; n < 1000 + sizeof fixed / sizeof fixed[0]; n++) {
-        uint32_t pos = n < sizeof fixed / sizeof fixed[0] ? fixed[n] : lcg(&s) % 65536u;
+        uint32_t pos = n < sizeof fixed / sizeof fixed[0] ? fixed[n] : lcg(&s) % OMEGA_GPU_DATTN_MAX_POS;
         float row[128]; omega_dattn_rope_row(pos, THETA, row);
         for (unsigned i = 0; i < 64; i++) {
             double ang = (double)pos * pow(THETA, -(double)(2 * i) / 128.0);
@@ -225,7 +225,9 @@ static void host_only(void) {
       s.depth = 1; s.mutant = 5; CHECK(omega_decode_attn_prog_stats(&s, NULL, NULL) != 0, "mutant 5 refused"); }
     CHECK(omega_gpu_decode_attn_cache_alloc(0, 256, THETA, NULL) == OMEGA_GPU_DATTN_BAD_ARGS, "NULL out refused");
     { OmegaGpuDecodeAttnCache *c = (OmegaGpuDecodeAttnCache *)1;
-      CHECK(omega_gpu_decode_attn_cache_alloc(1, 100, THETA, &c) == OMEGA_GPU_DATTN_BAD_ARGS && c == NULL, "max_pos not a multiple of 256 refused before any device work"); }
+      CHECK(omega_gpu_decode_attn_cache_alloc(1, 100, THETA, &c) == OMEGA_GPU_DATTN_BAD_ARGS && c == NULL, "max_pos not a multiple of 256 refused before any device work");
+      c = (OmegaGpuDecodeAttnCache *)1;
+      CHECK(omega_gpu_decode_attn_cache_alloc(1, OMEGA_GPU_DATTN_MAX_POS + 256u, THETA, &c) == OMEGA_GPU_DATTN_BAD_ARGS && c == NULL, "max_pos above OMEGA_GPU_DATTN_MAX_POS refused before any device work"); }
     CHECK(OMEGA_DATTN_SHARED_BYTES <= 16384u, "shared memory within the QMD cap (%u)", OMEGA_DATTN_SHARED_BYTES);
 }
 
@@ -335,7 +337,7 @@ static int chip_run(const char *out_path, uint32_t reps) {
     FILE *out = out_path ? fopen(out_path, "w") : NULL;
     if (out_path && !out) { printf("cannot write %s\n", out_path); return 1; }
     if (out) fprintf(out, "{\"receipt\":\"OMEGA_GPU_DECODE_ATTN_V1\",\"reps\":%u,\"evict\":%d,\"points\":[", reps, g_evict);
-    const uint32_t MAXP = 32768;
+    const uint32_t MAXP = OMEGA_GPU_DATTN_MAX_POS;
     OmegaGpuDecodeAttnCache *cache = NULL;
     double t0 = now_ms();
     int rc = omega_gpu_decode_attn_cache_alloc(1, MAXP, THETA, &cache);
@@ -345,6 +347,7 @@ static int chip_run(const char *out_path, uint32_t reps) {
     struct { uint32_t pos; float qscale; const char *name; } pts[] = {
         { 0, 1.0f, "context 1" }, { 6, 1.0f, "context 7" }, { 255, 1.0f, "context 256" }, { 300, 4.0f, "context 301 sharp q" },
         { 1023, 1.0f, "context 1024" }, { 4095, 1.0f, "context 4096" }, { 8191, 1.0f, "context 8192" }, { 32767, 1.0f, "context 32768" },
+        { 65535, 1.0f, "context 65536 (old cap)" }, { 99999, 1.0f, "context 100000" }, { 131071, 1.0f, "context 131072 (cap)" },
     };
     int first = 1;
     for (size_t i = 0; i < sizeof pts / sizeof pts[0]; i++) {
diff --git a/tests/gpu_pfgemm_test.c b/tests/gpu_pfgemm_test.c
index 56bf974f5..900878f59 100644
--- a/tests/gpu_pfgemm_test.c
+++ b/tests/gpu_pfgemm_test.c
@@ -95,11 +95,11 @@ static float emu_phys(const Prob *p, uint32_t i, uint32_t c) {
     return acc * R(KB);
 #undef R
 }
-/* the kernel's epilogue arithmetic: MUFU.EX2, FADD, MUFU.RCP, FMUL x 3, F2FP. The two MUFU results pass through ws_mufu_ftz
- * (bw_warp_sim_tc.h): the chip's MUFU flushes a subnormal result to a sign-preserving zero, so for t = -g log2 e in (126, 128)
+/* the kernel's epilogue arithmetic: MUFU.EX2, FADD, MUFU.RCP, FMUL x 3, F2FP. The two MUFU ops go through ws_mufu_ex2 / ws_mufu_rcp
+ * (bw_mufu_ftz.h, omega #462): the chip's MUFU flushes a subnormal result to a sign-preserving zero, so for t = -g log2 e in (126, 128)
  * (g in (-88.72, -87.34)) the reciprocal is +-0 and the activation is +-0, not the 2^-56-ish product an IEEE 1/d would give. */
 static uint16_t swiglu_bits(float g, float u) {
-    float t = g * u2f(0xbfb8aa3bu), ex = ws_mufu_ftz(exp2f(ws_mufu_ftz(t))), d = ex + 1.0f, r = ws_mufu_ftz(1.0f / ws_mufu_ftz(d)), o = g * r;
+    float t = g * u2f(0xbfb8aa3bu), ex = ws_mufu_ex2(t), d = ex + 1.0f, r = ws_mufu_rcp(d), o = g * r;
     o = o * u; o = o * u2f(0x5f800000u);
     return bf16_rn(o);
 }
diff --git a/tests/gpu_prefill_attn_test.c b/tests/gpu_prefill_attn_test.c
index a17362ae7..5a20ae554 100644
--- a/tests/gpu_prefill_attn_test.c
+++ b/tests/gpu_prefill_attn_test.c
@@ -94,7 +94,7 @@ static void emu_rows(const float *qkv_row, const float *kn, float eps, uint32_t
         for (unsigned i = 0; i < 128; i++) x[i] = qkv_row[4096 + gk * 128 + i];
         for (unsigned L = 0; L < 32; L++) { float a = x[4 * L] * x[4 * L]; for (unsigned i = 1; i < 4; i++) a = fmaf(x[4 * L + i], x[4 * L + i], a); sq[L] = a; }
         for (unsigned o = 16; o >= 1; o /= 2) { float nx[32]; for (unsigned L = 0; L < 32; L++) nx[L] = sq[L] + (L + o < 32 ? sq[L + o] : sq[L]); memcpy(sq, nx, sizeof sq); }
-        float rs = 1.0f / sqrtf(fmaf(sq[0], u2f(0x3c000000u), eps));
+        float rs = ws_mufu_rsq(fmaf(sq[0], u2f(0x3c000000u), eps)); /* MUFU.RSQ, bw_mufu_ftz.h (#462); eps > 0 keeps it normal */
         for (unsigned i = 0; i < 128; i++) { x[i] = x[i] * rs; x[i] = x[i] * kn[i]; }
         float y[128];
         for (unsigned i = 0; i < 128; i++) {
diff --git a/tests/gpu_qgemm_test.c b/tests/gpu_qgemm_test.c
index 3c33dc3c8..15dd5cb87 100644
--- a/tests/gpu_qgemm_test.c
+++ b/tests/gpu_qgemm_test.c
@@ -229,8 +229,12 @@ static float qemu_phys(const QProb *p, uint32_t i, uint32_t c) {
     }
     return acc;
 }
+/* the kernel's SwiGLU epilogue (omega_blackwell_codegen_qg.c: FMNMX t-cap, MUFU.EX2, MUFU.RCP). Both MUFU results go
+ * through the chip's flush rule (tests/bw_mufu_ftz.h, omega #462). Not observable with the t-cap: t <= 125 keeps
+ * 1 / (2^t + 1) >= 2^-125 normal, and an EX2 result below 2^-126 (t < -126) rounds to the same d = 1.0 after the +1 as
+ * its flushed zero; qg_host checks this bit for bit. Removing the cap (issue #462) is a separate chip-gated change. */
 static uint16_t qswiglu_bits(float g, float u) {
-    float t = fminf(g * u2f(0xbfb8aa3bu), 125.0f), ex = exp2f(t), d = ex + 1.0f, r = 1.0f / d, o = g * r;
+    float t = fminf(g * u2f(0xbfb8aa3bu), 125.0f), ex = ws_mufu_ex2(t), d = ex + 1.0f, r = ws_mufu_rcp(d), o = g * r;
     o = o * u;
     return bf16_rn(o);
 }
@@ -271,8 +275,26 @@ static size_t qcompare(const QProb *p, const void *y, const uint32_t *rows, uint
     return bad;
 }
 
+/* omega #462: with the t-cap the MUFU flush never changes a SwiGLU output bit. Compare qswiglu_bits against the IEEE
+ * form over every g in [80, 110] and [-110, -80] (the EX2-subnormal window t in (-150, -126] and the cap t = 125, both
+ * signs) plus a stride-65537 sample of all f32. Not a red test: there is no input for which the two differ. */
+static int qg_mufu_ftz_unobservable(void) {
+    uint64_t n = 0, diff = 0;
+    const float us[2] = { 1.0f, -3.0f };
+    for (int pass = 0; pass < 3; pass++) {
+        uint64_t lo = pass == 0 ? f2u(80.0f) : pass == 1 ? f2u(-80.0f) : 0, hi = pass == 0 ? f2u(110.0f) : pass == 1 ? f2u(-110.0f) : 0xffffffffull, step = pass == 2 ? 65537 : 1;
+        for (uint64_t b = lo; b <= hi; b += step) {
+            float g = u2f((uint32_t)b);
+            if (isnan(g)) continue;
+            float t = fminf(g * u2f(0xbfb8aa3bu), 125.0f), r = 1.0f / (exp2f(t) + 1.0f);
+            for (int k = 0; k < 2; k++) { n++; if (bf16_rn((g * r) * us[k]) != qswiglu_bits(g, us[k])) diff++; }
+        }
+    }
+    printf("%s qgemm SwiGLU: MUFU flush vs IEEE, %llu inputs, %llu differ (t-cap keeps it unobservable, #462)\n", diff ? "FAIL" : "PASS", (unsigned long long)n, (unsigned long long)diff);
+    return diff ? 1 : 0;
+}
 static int qg_host(void) {
-    int fail = 0;
+    int fail = qg_mufu_ftz_unobservable();
     for (uint32_t layout = 0; layout < 3; layout += 2) {
         QProb p; qprob_make(&p, 3, 256, 384, 40, 17, layout, 0, 0);
         double worst = 0;
diff --git a/tests/runtime/.crumb b/tests/runtime/.crumb
index 9dce17c38..1af500bb4 100644
--- a/tests/runtime/.crumb
+++ b/tests/runtime/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-26T08:13:25Z",
+      "compiled_at": "2026-10-30T11:23:02Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:10d19641e4bb5b435ec6363d4ea7d3c1596af47d97b86f4de35d6ae57770241e",
+      "digest": "sha256:6653865f3df7dcf70eb25bb3db3ca4a5ac5fd52c89bbf211c9f64d83b5c4c285",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 70,
-      "generated_at_commit": "45f7d76919042ef821cca9ccc75c2bbf7183f712",
-      "source_tree": "sha256:6d63521e1c1f8eea1bf172d18bde2e6f4fc7c084e9506bc1cc088f8b9ff339d6"
+      "generated_at_commit": "dd39bf71fb8eb14c45bf0abd20c74d5da69c807c",
+      "source_tree": "sha256:4869fe8767f35e77b054054425264fe343b2b5ed679fbef28087c527e64a7bd2"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/tests/runtime/rx_costmodel_unit.c b/tests/runtime/rx_costmodel_unit.c
index 36907aae2..aa7bbf361 100644
--- a/tests/runtime/rx_costmodel_unit.c
+++ b/tests/runtime/rx_costmodel_unit.c
@@ -20,7 +20,10 @@
  * Any host. Checks fit, calibration of the predictive intervals on held-out
  * points, the decision rules (select, measure when unsure, frozen, budget,
  * eligibility, failures, fallback, latency/energy budgets) and the canonical
- * blob (round trip, tamper, truncation, version).
+ * blob (round trip, tamper, truncation, version, cell count). An unsupported
+ * semantic operation is refused. `make test-costmodel` restores the old
+ * matvec clamp in a mutant; that binary must fail
+ * unsupported-op-not-aliased-to-matvec.
  */
 #include "runtime/rx_costmodel.h"
 #include "sha256.h"
@@ -108,8 +111,19 @@ static void t_basis(void) {
     CHECK(phi[5] == 1.0 && phi[6] == 1.0 && fabs(phi[7] - 2.0) < 1e-12, "basis indicators");
     CHECK(rx_cm_cell(&f) == 1u * RX_CM_PRESSURE + 1u, "cell index");
     f.core = 99;
+    f.pressure = 0;
+    CHECK(rx_cm_cell(&f) == (RX_CM_OP_MATVEC * RX_CM_CORES + RX_CM_CORE_OTHER) * RX_CM_PRESSURE,
+          "out-of-range core is the OTHER class");
+    f.core = RX_CM_CORE_A725;
     f.pressure = 99;
-    CHECK(rx_cm_cell(&f) < RX_CM_CELLS, "out-of-range features clamp into a cell");
+    CHECK(rx_cm_cell(&f) == (RX_CM_OP_MATVEC * RX_CM_CORES + RX_CM_CORE_A725) * RX_CM_PRESSURE +
+                                (RX_CM_PRESSURE - 1u),
+          "out-of-range pressure saturates to the last bucket");
+    f.op = RX_CM_OPS;
+    CHECK(rx_cm_cell(&f) == RX_CM_CELL_NONE && RX_CM_CELL_NONE >= RX_CM_CELLS,
+          "first unsupported op is not a cell index");
+    f.op = UINT32_MAX;
+    CHECK(rx_cm_cell(&f) == RX_CM_CELL_NONE, "UINT32_MAX op is not a cell index");
 }
 
 static void t_fit_and_calibration(int exact, double *cov80, double *cov95, double *rmse) {
@@ -312,7 +326,8 @@ static void t_eligibility_property(void) {
     for (int i = 0; i < 400; i++) rx_cm_observe(&m, &f, 0, &bad);
     f.eligible = 0x1;
     rx_cm_decide(&m, &pol, &f, 1, &d);
-    CHECK(d.action == RX_CM_FALLBACK && d.arm == 0, "the fallback stays available");
+    CHECK(d.action == RX_CM_FALLBACK && d.arm == 0 && d.why == RX_CM_WHY_NO_ELIGIBLE,
+          "the fallback stays available");
 }
 
 static void t_budgets(void) {
@@ -433,20 +448,262 @@ static void t_blob(void) {
     b[4] = 9;   /* version */
     sha256_hash(b, n - 32, b + n - 32);
     CHECK(rx_cm_deserialize(&r, b, n) == RX_CM_ERR_FORMAT, "unknown version refused");
+    memcpy(b, a, n);
+    /* Header.cells is the fifth uint32. A wider operation family changes it. */
+    uint32_t cells = 0;
+    memcpy(&cells, b + 16, sizeof cells);
+    cells += 1u;
+    memcpy(b + 16, &cells, sizeof cells);
+    sha256_hash(b, n - 32, b + n - 32);
+    CHECK(rx_cm_deserialize(&r, b, n) == RX_CM_ERR_FORMAT, "cell-count mismatch refused");
     free(a);
     free(b);
 }
 
-int main(void) {
-    double c80, c95, rmse;
-    t_basis();
-    t_fit_and_calibration(1, &c80, &c95, &rmse);
-    t_fit_and_calibration(0, &c80, &c95, &rmse);
-    t_decide();
-    t_eligibility_property();
-    t_budgets();
-    t_calibrate();
-    t_blob();
+/* Issue 704: an unsupported semantic operation used to clamp onto matvec, so a
+ * learned matvec prediction was reported for it and its observations trained
+ * that cell. `make test-costmodel` rebuilds rx_costmodel.c with that clamp
+ * restored; the named assertion unsupported-op-not-aliased-to-matvec must fail.
+ * Decision modes for a supported operation are asserted here without the shared
+ * rng. t_decide, t_budgets and t_eligibility cover the same modes on the
+ * synthetic fit. */
+static RxCmFeatures repro_features(uint32_t op) {
+    RxCmFeatures f;
+    memset(&f, 0, sizeof f);
+    f.op = op;
+    f.M = 64;
+    f.N = 64;
+    f.state_bytes = (64ull * 64ull + 64ull + 64ull) * 8ull;
+    f.cache_bytes = 1048576ull;
+    f.core = RX_CM_CORE_X925;
+    f.eligible = 1;
+    f.need_evidence = 1;
+    return f;
+}
+
+static void t_refuse_unsupported_op(void) {
+    RxCostModel m;
+    rx_cm_init(&m, 1);
+    RxCmFeatures good = repro_features(RX_CM_OP_MATVEC);
+    RxCmObservation seen = { 1000000ull, 0 };
+    for (int i = 0; i < 20; i++)
+        CHECK(rx_cm_observe(&m, &good, 0, &seen) == RX_CM_OK, "matvec observation accepted");
+    m.explore_ps = 42;
+    m.work_ps = 99;
+
+    RxCmPrediction learned;
+    int lr = rx_cm_predict(&m, &good, 0, &learned);
+    CHECK(lr == RX_CM_OK && learned.known && !learned.refused && learned.n == 20 &&
+              learned.mean_log2_ps > 19.0 && learned.mean_log2_ps < 21.0,
+          "valid matvec prediction is learned (rc %d known %d n %u mean %.6f)", lr, learned.known,
+          learned.n, learned.mean_log2_ps);
+
+    RxCmFeatures bad = good;
+    bad.op = UINT32_MAX;
+    RxCmPrediction aliased;
+    int ur = rx_cm_predict(&m, &bad, 0, &aliased);
+    RxCostModel snap = m;
+    RxCmObservation failed = { 1000000ull, 1 };
+    RxCmObservation zero_fail = { 0, 1 };
+    int orc = rx_cm_observe(&m, &bad, 0, &seen);
+    int frc = rx_cm_observe(&m, &bad, 0, &failed);
+    int zrc = rx_cm_observe(&m, &bad, 0, &zero_fail);
+    CHECK(ur == RX_CM_ERR_UNSUPPORTED && aliased.refused && !aliased.known && !aliased.borrowed &&
+              aliased.mean_log2_ps == 0.0 && aliased.n == 0 && aliased.fail_p == 0.0 &&
+              rx_cm_cell(&bad) == RX_CM_CELL_NONE &&
+              orc == RX_CM_ERR_UNSUPPORTED && frc == RX_CM_ERR_UNSUPPORTED &&
+              zrc == RX_CM_ERR_UNSUPPORTED && memcmp(&m, &snap, sizeof m) == 0 &&
+              m.cell[0][0].n == 20 && m.cell[0][0].trials == 20 && m.cell[0][0].failures == 0,
+          "unsupported-op-not-aliased-to-matvec");
+
+    size_t blob_n = rx_cm_blob_size(), got = 0;
+    uint8_t *blob0 = malloc(blob_n), *blob1 = malloc(blob_n);
+    CHECK(blob0 && blob1 && rx_cm_serialize(&snap, blob0, blob_n, &got) == RX_CM_OK && got == blob_n,
+          "serialize before rejected observations");
+    CHECK(blob0 && blob1 && rx_cm_serialize(&m, blob1, blob_n, &got) == RX_CM_OK &&
+              memcmp(blob0, blob1, blob_n) == 0,
+          "frozen model serialization identical after rejected observations");
+    free(blob0);
+    free(blob1);
+
+    bad.op = RX_CM_OPS;
+    RxCmPrediction first;
+    int fr = rx_cm_predict(&m, &bad, 0, &first);
+    snap = m;
+    orc = rx_cm_observe(&m, &bad, 0, &seen);
+    frc = rx_cm_observe(&m, &bad, 0, &failed);
+    CHECK(fr == RX_CM_ERR_UNSUPPORTED && first.refused && !first.known &&
+              rx_cm_cell(&bad) == RX_CM_CELL_NONE && orc == RX_CM_ERR_UNSUPPORTED &&
+              frc == RX_CM_ERR_UNSUPPORTED && memcmp(&m, &snap, sizeof m) == 0,
+          "first unsupported id RX_CM_OPS is refused");
+
+    /* A supported observation still trains matvec after the refusals. */
+    CHECK(rx_cm_observe(&m, &good, 0, &seen) == RX_CM_OK && m.cell[0][0].n == 21,
+          "supported matvec observation still trains");
+
+    RxCmPolicy pol;
+    rx_cm_default_policy(&pol);
+    RxCmDecision d;
+    bad.op = UINT32_MAX;
+    rx_cm_decide(&m, &pol, &bad, 1, &d);
+    CHECK(d.action == RX_CM_REFUSE && d.why == RX_CM_WHY_UNSUPPORTED_OP && d.arm == m.n_arms &&
+              d.measure[0] == m.n_arms && d.measure[1] == m.n_arms && d.expected_improvement == 0.0 &&
+              d.pred[0].refused && !d.pred[0].known && !d.pred[0].borrowed &&
+              d.pred[0].mean_log2_ps == 0.0,
+          "decide refuses UINT32_MAX without ranking");
+    rx_cm_decide(&m, &pol, &bad, 0, &d);
+    CHECK(d.action == RX_CM_REFUSE && d.why == RX_CM_WHY_UNSUPPORTED_OP,
+          "frozen decide refuses UINT32_MAX");
+    bad.op = RX_CM_OPS;
+    rx_cm_decide(&m, &pol, &bad, 1, &d);
+    CHECK(d.action == RX_CM_REFUSE && d.why == RX_CM_WHY_UNSUPPORTED_OP && d.pred[0].refused,
+          "decide refuses RX_CM_OPS");
+
+    /* Pressure on a real matvec is still a residual. Unsupported pressure is not. */
+    RxCostModel quiet;
+    rx_cm_init(&quiet, 1);
+    RxCmFeatures qf = repro_features(RX_CM_OP_MATVEC);
+    RxCmObservation exact = { (uint64_t)exp2(20.0), 0 };
+    for (int i = 0; i < 16; i++) rx_cm_observe(&quiet, &qf, 0, &exact);
+    RxCmFeatures unseen = qf;
+    unseen.pressure = 2;
+    RxCmPrediction pq, p0;
+    rx_cm_predict(&quiet, &qf, 0, &p0);
+    rx_cm_predict(&quiet, &unseen, 0, &pq);
+    CHECK(pq.borrowed && !pq.refused && pq.mean_log2_ps == p0.mean_log2_ps,
+          "unseen matvec pressure borrows the quiet prediction");
+    RxCmFeatures pressed = qf;
+    pressed.pressure = 1;
+    RxCostModel bare;
+    rx_cm_init(&bare, 1);
+    CHECK(rx_cm_observe(&bare, &pressed, 0, &exact) == RX_CM_SKIPPED &&
+              bare.cell[rx_cm_cell(&pressed)][0].trials == 1 &&
+              bare.cell[rx_cm_cell(&pressed)][0].n == 0,
+          "valid matvec pressure without a quiet model is skipped");
+    pressed.op = RX_CM_OPS;
+    RxCostModel bare_snap = bare;
+    CHECK(rx_cm_observe(&bare, &pressed, 0, &exact) == RX_CM_ERR_UNSUPPORTED &&
+              memcmp(&bare, &bare_snap, sizeof bare) == 0,
+          "unsupported op under pressure is refused, not skipped into a bucket");
+    pressed = qf;
+    pressed.pressure = 1;
+    RxCmObservation slow = { (uint64_t)exp2(21.0), 0 };
+    for (int i = 0; i < 6; i++)
+        CHECK(rx_cm_observe(&quiet, &pressed, 0, &slow) == RX_CM_OK, "pressure residual accepted");
+    uint64_t residual_n = quiet.cell[rx_cm_cell(&pressed)][0].n;
+    CHECK(residual_n == 6, "pressure residual has its own samples");
+    rx_cm_predict(&quiet, &pressed, 0, &pq);
+    CHECK(pq.known && !pq.borrowed && !pq.refused && fabs(pq.mean_log2_ps - (p0.mean_log2_ps + 1.0)) < 0.25,
+          "pressure correction learned (%.3f vs %.3f)", pq.mean_log2_ps, p0.mean_log2_ps + 1.0);
+    pressed.op = UINT32_MAX;
+    snap = quiet;
+    CHECK(rx_cm_observe(&quiet, &pressed, 0, &slow) == RX_CM_ERR_UNSUPPORTED &&
+              memcmp(&quiet, &snap, sizeof quiet) == 0,
+          "unsupported op does not train the pressure residual");
+
+    /* OTHER core and a saturated pressure bucket stay real cells. */
+    RxCostModel other_m;
+    rx_cm_init(&other_m, 1);
+    RxCmFeatures other = qf;
+    other.core = 99;
+    other.pressure = 0;
+    uint32_t oc = rx_cm_cell(&other);
+    CHECK(oc < RX_CM_CELLS && oc != rx_cm_cell(&qf), "OTHER core is a real cell");
+    CHECK(rx_cm_observe(&other_m, &other, 0, &exact) == RX_CM_OK && other_m.cell[oc][0].n == 1 &&
+              other_m.cell[0][0].n == 0,
+          "OTHER core observation stays out of the matvec X925 cell");
+    other.pressure = 99;
+    uint32_t pc = rx_cm_cell(&other);
+    CHECK(pc < RX_CM_CELLS && pc != oc && pc != RX_CM_CELL_NONE,
+          "saturated pressure on OTHER is its own bucket");
+
+    /* Each decision mode on a supported matvec, then refusal beside them. */
+    RxCostModel empty;
+    rx_cm_init(&empty, 2);
+    RxCmFeatures g = feat(16, 16, RX_CM_CORE_X925, 0);
+    g.eligible = 0x3;
+    rx_cm_decide(&empty, &pol, &g, 1, &d);
+    CHECK(d.action == RX_CM_MEASURE && d.why == RX_CM_WHY_UNKNOWN_ARM, "empty model measures");
+    rx_cm_decide(&empty, &pol, &g, 0, &d);
+    CHECK(d.action == RX_CM_FALLBACK && d.arm == 0 && d.why == RX_CM_WHY_UNKNOWN_ARM,
+          "empty frozen model falls back");
+    RxCostModel one;
+    rx_cm_init(&one, 1);
+    rx_cm_decide(&one, &pol, &g, 1, &d);
+    CHECK(d.action == RX_CM_FALLBACK && d.why == RX_CM_WHY_NO_ELIGIBLE, "only the fallback is eligible");
+
+    RxCostModel tight;
+    rx_cm_init(&tight, 2);
+    RxCmObservation hi = { (uint64_t)exp2(22.0), 0 };
+    for (int i = 0; i < 40; i++) {
+        rx_cm_observe(&tight, &g, 0, &exact);
+        rx_cm_observe(&tight, &g, 1, &hi);
+    }
+    rx_cm_decide(&tight, &pol, &g, 1, &d);
+    CHECK(d.action == RX_CM_SELECT && d.arm == 0 && d.why == RX_CM_WHY_CONFIDENT,
+          "separated arms select confidently (action %d arm %u why %u)", d.action, d.arm, d.why);
+    g.latency_budget_ps = 1000;
+    rx_cm_decide(&tight, &pol, &g, 0, &d);
+    CHECK(d.action == RX_CM_SELECT && d.why == RX_CM_WHY_OVER_BUDGET, "no arm fits the latency budget");
+    g.latency_budget_ps = 0;
+
+    RxCostModel equal;
+    rx_cm_init(&equal, 2);
+    for (int i = 0; i < 40; i++) {
+        rx_cm_observe(&equal, &g, 0, &exact);
+        rx_cm_observe(&equal, &g, 1, &exact);
+    }
+    rx_cm_decide(&equal, &pol, &g, 1, &d);
+    CHECK(d.action == RX_CM_SELECT && d.why == RX_CM_WHY_CONFIDENT,
+          "equal and tight: not worth a run (action %d ei %.3f)", d.action, d.expected_improvement);
+    RxCmFeatures gp = g;
+    gp.pressure = 1;
+    rx_cm_decide(&equal, &pol, &gp, 1, &d);
+    CHECK(d.action == RX_CM_MEASURE && d.why == RX_CM_WHY_WORTH_MEASURING,
+          "unseen pressure is worth measuring (action %d why %u ei %.3f)", d.action, d.why,
+          d.expected_improvement);
+    rx_cm_charge(&equal, 0, pol.explore_allow_ps + 1);
+    rx_cm_decide(&equal, &pol, &gp, 1, &d);
+    CHECK(d.action == RX_CM_SELECT && d.why == RX_CM_WHY_BUDGET_SPENT,
+          "spent exploration budget selects (action %d why %u)", d.action, d.why);
+    rx_cm_charge(&equal, (uint64_t)((double)(pol.explore_allow_ps + 1) / pol.explore_frac) * 2, 0);
+    rx_cm_decide(&equal, &pol, &gp, 1, &d);
+    CHECK(d.action == RX_CM_MEASURE && d.why == RX_CM_WHY_WORTH_MEASURING,
+          "budget refills as chosen work accrues");
+    gp.op = RX_CM_OPS;
+    rx_cm_decide(&equal, &pol, &gp, 1, &d);
+    CHECK(d.action == RX_CM_REFUSE && d.why == RX_CM_WHY_UNSUPPORTED_OP && d.pred[0].refused &&
+              d.pred[1].refused && !d.pred[0].known && !d.pred[1].borrowed,
+          "unsupported op is not ranked in any decision mode");
+
+    RxCmFeatures cal[16];
+    uint32_t carm[16];
+    uint64_t cps[16];
+    for (int i = 0; i < 16; i++) {
+        cal[i] = repro_features(i & 1 ? UINT32_MAX : RX_CM_OPS);
+        carm[i] = 0;
+        cps[i] = (uint64_t)exp2(30.0);
+    }
+    double scale_before = equal.sd_scale;
+    double scale = rx_cm_calibrate(&equal, cal, carm, cps, 16, 0.80);
+    CHECK(scale == 0.0 && equal.sd_scale == scale_before,
+          "unsupported calibration points do not change the scale");
+}
+
+int main(int argc, char **argv) {
+    int only_refuse = argc > 1 && strcmp(argv[1], "refuse") == 0;
+    if (!only_refuse) {
+        double c80, c95, rmse;
+        t_basis();
+        t_fit_and_calibration(1, &c80, &c95, &rmse);
+        t_fit_and_calibration(0, &c80, &c95, &rmse);
+        t_decide();
+        t_eligibility_property();
+        t_budgets();
+        t_calibrate();
+        t_blob();
+    }
+    t_refuse_unsupported_op();
     printf("checks %d failures %d\n", g_checks, g_fail);
     return g_fail ? 1 : 0;
 }
diff --git a/tests/test_omega_gpu_decode_attn_maxpos.c b/tests/test_omega_gpu_decode_attn_maxpos.c
new file mode 100644
index 000000000..dedcd9c96
--- /dev/null
+++ b/tests/test_omega_gpu_decode_attn_maxpos.c
@@ -0,0 +1,375 @@
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright 2026 Drake Stapleton (AIEN / aien-dev)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* test_omega_gpu_decode_attn_maxpos: the decode attention position bound (omega #535: OMEGA_GPU_DATTN_MAX_POS 131072,
+ * the 128k context) on a FAKE OmegaGpuPlatform. Host program; opens no device, touches no GPU. The Makefile links a
+ * sanitized copy of src/omega_gpu_decode_attn_api.c ahead of libomega_gpu.a, so every cache write, RoPE fill and
+ * launch staging of the file under test is ASan/UBSan checked against the fake's exact-size buffers.
+ *
+ * The fake device completes every submission: completion-marker releases write their payload, and the launch "writes"
+ * the attention output buffer (the one DATA buffer of 32 * 128 f32), so the API's poison check passes. It computes
+ * nothing: this is a bound and sizing test, not a kernel result (the kernel's numbers are the chip battery's,
+ * tools/run_gpu_decode_attn_chip.sh).
+ *
+ * Contract under test, at the cap C = OMEGA_GPU_DATTN_MAX_POS = 131072:
+ *   - a cache of C positions allocates; C + 256 (the next legal multiple) is refused before any device work;
+ *   - every buffer the cache owns is sized from max_pos: K|V planes 2 * (4 * C * 256 + slack), RoPE C * 512,
+ *     split partials 4 * (C / 256) * 1040 * 4;
+ *   - KV rows at 65535, 65536, 131071 round-trip; 131072 and 131073 are refused, as is a count crossing the cap;
+ *   - RoPE rows 0, 65535, 65536, 99999, 131071 equal cos/sin of pos * theta^(-2i/128) from libm;
+ *   - a decode step at pos 131071 launches with 512 splits (the whole partial buffer); 131072, 131073 are refused
+ *     before any submission;
+ *   - a cache of the old cap 65536 refuses pos 65536: the bound is the cache's own max_pos.
+ * Each case runs in its own child process.
+ */
+#include "omega_gpu_decode_attn_api.h"
+#include "omega_blackwell_codegen_attn.h"
+#include "omega_gpu_session.h"
+#include "omega_gpu_platform.h"
+#include "omega_blackwell_submit.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int case_ok;
+#define EXPECT(c) do { if (!(c)) { case_ok = 0; printf("  expect failed at line %d: %s\n", __LINE__, #c); } } while (0)
+
+#define CAP OMEGA_GPU_DATTN_MAX_POS
+#define THETA 1000000.0
+
+/* ---- the fake platform ---- */
+#define NB OMEGA_GPU_HANDLE_SLOTS
+#define VA_BASE 0x100000000ull
+#define VA_STRIDE (1ull << 31) /* one slot per 2 GiB of VA: the largest buffer here (256 MiB + slack) never overlaps the next */
+#define OUT_BYTES ((uint64_t)OMEGA_GPU_DATTN_Q_HEADS * 128u * 4u)
+static struct {
+    OmegaGpuHandleTable t;
+    void *mem[NB];
+    OmegaGpuBufferDesc desc[NB];
+    OmegaGpuDeviceHandle dev;
+    OmegaGpuQueueHandle q;
+    OmegaGpuBufferHandle ring;
+    uint64_t ns;
+    unsigned locks_held, double_locks, bad_unlocks, submits, allocs;
+    uint64_t data_bytes[64]; /* sizes of the DATA buffers, in allocation order */
+    unsigned n_data;
+} fk;
+
+static uint64_t f_now_ns(void *c) { (void)c; fk.ns += 1000u; return fk.ns; }
+static uint64_t f_now_ms(void *c) { return f_now_ns(c) / 1000000u; }
+static int f_wait(void *c, uint64_t ms) { (void)c; fk.ns += ms * 1000000u; return 0; }
+static int f_lock(void *c, uint32_t id) {
+    (void)c;
+    if (id != OMEGA_GPU_SESSION_LOCK_ID) return OMEGA_GPU_PLAT_REFUSED_ARGS;
+    if (fk.locks_held) { fk.double_locks++; return OMEGA_GPU_PLAT_REFUSED_BUSY; }
+    fk.locks_held = 1;
+    return 0;
+}
+static int f_unlock(void *c, uint32_t id) {
+    (void)c;
+    if (id != OMEGA_GPU_SESSION_LOCK_ID || !fk.locks_held) { fk.bad_unlocks++; return OMEGA_GPU_PLAT_REFUSED_ARGS; }
+    fk.locks_held = 0;
+    return 0;
+}
+static const char *f_diag(void *c) { (void)c; return ""; }
+static int f_dev_open(void *c, uint32_t ord, OmegaGpuDeviceHandle *out) {
+    (void)c;
+    if (ord != 0 || fk.dev.generation) return OMEGA_GPU_PLAT_REFUSED_LIMIT;
+    int rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_DEVICE, 0, 1, 0, &out->index, &out->generation);
+    if (rc == 0) fk.dev = *out;
+    return rc;
+}
+static int f_dev_close(void *c, OmegaGpuDeviceHandle d) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (rc) return rc;
+    (void)omega_gpu_handles_close(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    memset(&fk.dev, 0, sizeof fk.dev);
+    return 0;
+}
+static OmegaGpuPlatformCaps g_caps = {
+    .abi_major = OMEGA_GPU_PLATFORM_ABI_MAJOR, .abi_minor = OMEGA_GPU_PLATFORM_ABI_MINOR,
+    .services = OMEGA_GPU_SVC_REQUIRED_SESSION, .max_devices = 1, .max_buffers = 1000, .max_queues = 1, .max_inflight = 1,
+    .max_buffer_bytes = 1ull << 30, .max_total_bytes = 1ull << 32,
+};
+static int f_alloc(void *c, OmegaGpuDeviceHandle d, const OmegaGpuBufferDesc *desc, OmegaGpuBufferHandle *o,
+                   OmegaCpuView *cpu, OmegaGpuVa *g, OmegaGpuBusAddr *b) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (!rc) rc = omega_gpu_platform_check_buffer(desc, &g_caps);
+    if (!rc) rc = omega_gpu_handles_open(&fk.t, desc->kind, desc->bytes, 1000, 1ull << 32, &o->index, &o->generation);
+    if (rc) return rc;
+    void *m = calloc(1, desc->bytes); /* exact size: ASan sees any write past the end */
+    if (!m) { (void)omega_gpu_handles_close(&fk.t, o->index, o->generation, desc->kind); return OMEGA_GPU_PLAT_REFUSED_LIMIT; }
+    fk.mem[o->index] = m; fk.desc[o->index] = *desc;
+    if (desc->kind == OMEGA_GPU_HANDLE_BUF_DATA && fk.n_data < 64) fk.data_bytes[fk.n_data++] = desc->bytes;
+    fk.allocs++;
+    cpu->ptr = m; cpu->len = desc->bytes; g->va = VA_BASE + (uint64_t)o->index * VA_STRIDE; b->iova = 0;
+    return 0;
+}
+static int f_free(void *c, OmegaGpuBufferHandle h) {
+    (void)c;
+    if (h.index >= NB) return OMEGA_GPU_PLAT_REFUSED_BAD_HANDLE;
+    int rc = omega_gpu_handles_close(&fk.t, h.index, h.generation, fk.t.kind[h.index]);
+    if (rc) return rc;
+    free(fk.mem[h.index]); fk.mem[h.index] = NULL;
+    return 0;
+}
+static int buf_live(OmegaGpuBufferHandle h) { return h.index < NB && fk.t.live[h.index] && fk.t.generation[h.index] == h.generation; }
+/* the host view of [va, va + len): NULL unless the whole range lies inside one live buffer */
+static void *va_to_cpu(uint64_t va, uint64_t len) {
+    for (uint32_t i = 0; i < NB; i++) {
+        if (!fk.mem[i] || !fk.t.live[i]) continue;
+        const uint64_t base = VA_BASE + (uint64_t)i * VA_STRIDE;
+        if (va >= base && va - base <= fk.desc[i].bytes && len <= fk.desc[i].bytes - (va - base)) return (uint8_t *)fk.mem[i] + (va - base);
+    }
+    return NULL;
+}
+static int sync_check(OmegaGpuBufferHandle h, uint64_t off, uint64_t len) {
+    if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE;
+    if (len == 0 || off > fk.desc[h.index].bytes || len > fk.desc[h.index].bytes - off) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH;
+    return 0;
+}
+static int f_c2g(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) { (void)c; return sync_check(h, off, len); }
+/* A read-back of the split-counter / intermediate-semaphore words finds them DONE, as the device leaves them. */
+static int f_g2c(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) {
+    (void)c;
+    int rc = sync_check(h, off, len);
+    if (rc) return rc;
+    uint32_t *w = (uint32_t *)((uint8_t *)fk.mem[h.index] + off);
+    if (len == 4u) {                       /* the launch's QMD release semaphore: the kernel finished */
+        w[0] = OMEGA_BW_SEMAPHORE_INTERMEDIATE_DONE;
+    } else if (len % 16u == 0) {           /* a row of four-word semaphores */
+        uint64_t i = 0, n = len / 16u;
+        while (i < n && w[4 * i] == OMEGA_BW_SEMAPHORE_INTERMEDIATE_INIT) i++;
+        if (i == n) for (i = 0; i < n; i++) w[4 * i] = OMEGA_BW_SEMAPHORE_INTERMEDIATE_DONE;
+    }
+    return 0;
+}
+static int f_poll(void *c, OmegaGpuBufferHandle h, uint64_t off, uint32_t want, uint64_t ms, uint32_t *seen) {
+    (void)c;
+    if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE;
+    if (!(fk.desc[h.index].rights & OMEGA_GPU_RIGHT_HOST_POLLED)) return OMEGA_GPU_PLAT_REFUSED_BAD_RIGHTS;
+    const volatile uint32_t *w = (const volatile uint32_t *)((uint8_t *)fk.mem[h.index] + off);
+    *seen = *w;
+    if ((int32_t)(*w - want) >= 0) return 0;
+    fk.ns += ms * 1000000u;
+    return OMEGA_GPU_POLL_TIMED_OUT;
+}
+static int f_qopen(void *c, OmegaGpuDeviceHandle d, OmegaGpuBufferHandle ring, OmegaGpuQueueHandle *o) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (!rc && (!buf_live(ring) || fk.t.kind[ring.index] != OMEGA_GPU_HANDLE_BUF_QUEUE)) rc = OMEGA_GPU_PLAT_REFUSED_BAD_KIND;
+    if (!rc) rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_QUEUE, 0, 1, 0, &o->index, &o->generation);
+    if (!rc) { fk.q = *o; fk.ring = ring; }
+    return rc;
+}
+static int f_qclose(void *c, OmegaGpuQueueHandle q) {
+    (void)c;
+    int rc = omega_gpu_handles_close(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE);
+    if (!rc) memset(&fk.q, 0, sizeof fk.q);
+    return rc;
+}
+static uint32_t mthd(uint32_t subc, uint32_t m, uint32_t count) { return (2u << 28) | (count << 16) | (subc << 13) | (m >> 2); }
+/* The fake device runs the stream: completion-marker releases (0x005c) write their payload, and the attention output
+ * (the DATA buffer of 32 * 128 f32) is overwritten with zeros, the "kernel ran" the API's poison check looks for. */
+static int f_submit(void *c, OmegaGpuQueueHandle q, const uint32_t *w, uint32_t n) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE);
+    if (rc) return rc;
+    if ((uint64_t)n * 4u > fk.desc[fk.ring.index].bytes) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH;
+    fk.submits++;
+    for (uint32_t i = 0; i < NB; i++)
+        if (fk.mem[i] && fk.t.live[i] && fk.desc[i].kind == OMEGA_GPU_HANDLE_BUF_DATA && fk.desc[i].bytes == OUT_BYTES) memset(fk.mem[i], 0, OUT_BYTES);
+    for (uint32_t i = 0; i + 5 < n; i++)
+        if (w[i] == mthd(0, 0x005c, 5)) {
+            uint32_t *m = va_to_cpu((uint64_t)w[i + 1] | ((uint64_t)w[i + 2] << 32), 4);
+            if (m) *m = w[i + 3];
+            i += 5;
+        }
+    return 0;
+}
+static int f_retire(void *c, OmegaGpuQueueHandle q) { (void)c; (void)q; return 0; }
+static void *f_halloc(void *c, size_t b) { (void)c; return malloc(b); }
+static void f_hfree(void *c, void *p) { (void)c; free(p); }
+
+static OmegaGpuPlatform g_plat = {
+    .ctx = &fk, .time_now_ms = f_now_ms, .wait_ms = f_wait, .lock = f_lock, .unlock = f_unlock,
+    .dma_alloc = f_alloc, .dma_free = f_free, .sync_cpu_to_gpu = f_c2g, .sync_gpu_to_cpu = f_g2c, .poll_word = f_poll,
+    .device_open = f_dev_open, .device_close = f_dev_close, .diag_text = f_diag,
+    .queue_open = f_qopen, .queue_close = f_qclose, .queue_submit = f_submit, .queue_retire = f_retire,
+    .time_now_ns = f_now_ns, .host_alloc = f_halloc, .host_free = f_hfree,
+};
+static int install(void) {
+    memset(&fk, 0, sizeof fk); omega_gpu_handles_init(&fk.t);
+    return omega_gpu_session_set_platform(&g_plat, &g_caps);
+}
+#define EXPECT_LOCK_FREE() do { EXPECT(fk.locks_held == 0); EXPECT(fk.double_locks == 0); EXPECT(fk.bad_unlocks == 0); } while (0)
+
+/* the session rounds every buffer up to a 4 KiB page */
+static int has_data(uint64_t bytes) {
+    bytes = (bytes + 0xfffu) & ~0xfffull;
+    for (unsigned i = 0; i < fk.n_data; i++) if (fk.data_bytes[i] == bytes) return 1;
+    return 0;
+}
+static OmegaGpuDecodeAttnCache *alloc_at(uint32_t max_pos) {
+    OmegaGpuDecodeAttnCache *c = NULL;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return NULL; } /* never fall back to the real driver */
+    int rc = omega_gpu_decode_attn_cache_alloc(1, max_pos, THETA, &c);
+    if (rc != OMEGA_GPU_DATTN_OK) printf("  cache_alloc(1, %u): %s (%s)\n", max_pos, omega_gpu_decode_attn_rc_name(rc), omega_gpu_decode_attn_last_error());
+    EXPECT(rc == OMEGA_GPU_DATTN_OK && c != NULL);
+    return rc == OMEGA_GPU_DATTN_OK ? c : NULL;
+}
+
+/* ---- cases ---- */
+
+static void c_alloc_cap(void) {
+    EXPECT(CAP == 131072u);
+    OmegaGpuDecodeAttnCache *c = alloc_at(CAP);
+    if (!c) return;
+    const uint64_t plane = 4ull * CAP * OMEGA_DATTN_ROW_BYTES + OMEGA_DATTN_PLANE_SLACK;
+    EXPECT(has_data(2 * plane));                                                         /* K | V planes */
+    EXPECT(has_data((uint64_t)CAP * OMEGA_DATTN_ROPE_ROW_BYTES));                        /* RoPE table */
+    EXPECT(has_data(4ull * (CAP / OMEGA_DATTN_CHUNK) * OMEGA_DATTN_PARTIAL_WORDS * 4u)); /* split partials, 512 splits */
+    OmegaGpuDecodeAttnCacheView v;
+    EXPECT(omega_gpu_decode_attn_cache_view(c, 0, &v) == OMEGA_GPU_DATTN_OK && v.max_pos == CAP && v.v_va - v.k_va == plane);
+    omega_gpu_decode_attn_cache_free(c);
+    EXPECT_LOCK_FREE();
+    const unsigned allocs = fk.allocs;
+    c = (OmegaGpuDecodeAttnCache *)1;
+    EXPECT(omega_gpu_decode_attn_cache_alloc(1, CAP + OMEGA_DATTN_CHUNK, THETA, &c) == OMEGA_GPU_DATTN_BAD_ARGS && c == NULL);
+    EXPECT(fk.allocs == allocs); /* refused before any device work */
+    EXPECT_LOCK_FREE();
+}
+
+static void c_kv_rows(void) {
+    OmegaGpuDecodeAttnCache *c = alloc_at(CAP);
+    if (!c) return;
+    static const uint32_t ok_pos[] = { 0, 65535, 65536, 131071 };
+    uint16_t k[128], v[128], kr[128], vr[128];
+    for (unsigned n = 0; n < sizeof ok_pos / sizeof ok_pos[0]; n++)
+        for (uint32_t h = 0; h < OMEGA_GPU_DATTN_KV_HEADS; h++) {
+            for (unsigned i = 0; i < 128; i++) { k[i] = (uint16_t)(ok_pos[n] * 7u + h * 131u + i); v[i] = (uint16_t)~k[i]; }
+            EXPECT(omega_gpu_decode_attn_cache_write(c, 0, h, ok_pos[n], 1, k, v) == OMEGA_GPU_DATTN_OK);
+            EXPECT(omega_gpu_decode_attn_cache_read(c, 0, h, ok_pos[n], kr, vr) == OMEGA_GPU_DATTN_OK);
+            EXPECT(memcmp(k, kr, sizeof k) == 0 && memcmp(v, vr, sizeof v) == 0);
+        }
+    /* the rows really are where the view says: (kv_head * max_pos + pos) * 256 from the plane base */
+    OmegaGpuDecodeAttnCacheView view;
+    EXPECT(omega_gpu_decode_attn_cache_view(c, 0, &view) == OMEGA_GPU_DATTN_OK);
+    const uint16_t *last = va_to_cpu(view.v_va + ((uint64_t)3 * CAP + 131071u) * 256u, 256);
+    EXPECT(last && omega_gpu_decode_attn_cache_read(c, 0, 3, 131071, kr, vr) == OMEGA_GPU_DATTN_OK && memcmp(last, vr, 256) == 0);
+    EXPECT(omega_gpu_decode_attn_cache_write(c, 0, 0, 131072, 1, k, v) == OMEGA_GPU_DATTN_BAD_ARGS);
+    EXPECT(omega_gpu_decode_attn_cache_write(c, 0, 0, 131073, 1, k, v) == OMEGA_GPU_DATTN_BAD_ARGS);
+    EXPECT(omega_gpu_decode_attn_cache_read(c, 0, 0, 131072, kr, vr) == OMEGA_GPU_DATTN_BAD_ARGS);
+    EXPECT(omega_gpu_decode_attn_cache_read(c, 0, 0, 131073, kr, vr) == OMEGA_GPU_DATTN_BAD_ARGS);
+    uint16_t k2[256] = {0}, v2[256] = {0};
+    EXPECT(omega_gpu_decode_attn_cache_write(c, 0, 3, 131071, 2, k2, v2) == OMEGA_GPU_DATTN_BAD_ARGS); /* crosses the cap */
+    omega_gpu_decode_attn_cache_free(c);
+    EXPECT_LOCK_FREE();
+}
+
+static void c_rope_rows(void) {
+    OmegaGpuDecodeAttnCache *c = alloc_at(CAP);
+    if (!c) return;
+    OmegaGpuDecodeAttnCacheView view;
+    EXPECT(omega_gpu_decode_attn_cache_view(c, 0, &view) == OMEGA_GPU_DATTN_OK);
+    EXPECT(va_to_cpu(view.rope_va, (uint64_t)CAP * OMEGA_DATTN_ROPE_ROW_BYTES) != NULL);         /* C rows ... */
+    EXPECT(va_to_cpu(view.rope_va, (uint64_t)CAP * OMEGA_DATTN_ROPE_ROW_BYTES + 1u) == NULL);    /* ... and no more */
+    static const uint32_t rows[] = { 0, 65535, 65536, 99999, 131071 };
+    double worst = 0;
+    for (unsigned n = 0; n < sizeof rows / sizeof rows[0]; n++) {
+        const float *r = va_to_cpu(view.rope_va + (uint64_t)rows[n] * OMEGA_DATTN_ROPE_ROW_BYTES, OMEGA_DATTN_ROPE_ROW_BYTES);
+        if (!r) { EXPECT(!"rope row inside the table"); continue; }
+        for (unsigned i = 0; i < 64; i++) {
+            const double a = (double)rows[n] * pow(THETA, -(double)(2 * i) / 128.0);
+            const double dc = fabs((double)r[i] - cos(a)), ds = fabs((double)r[64 + i] - sin(a));
+            if (dc > worst) worst = dc;
+            if (ds > worst) worst = ds;
+        }
+    }
+    printf("  rope rows 0..131071: worst |table - libm| %.3g\n", worst);
+    EXPECT(worst <= 1e-6); /* f32 rounding of an exact value is <= 6e-8; 1e-6 leaves room for the pow ulps at pos 131071 */
+    omega_gpu_decode_attn_cache_free(c);
+    EXPECT_LOCK_FREE();
+}
+
+static float g_qkv[OMEGA_GPU_DATTN_QKV_WORDS], g_out[OMEGA_GPU_DATTN_Q_HEADS * 128];
+static void c_decode_at_cap(void) {
+    OmegaGpuDecodeAttnCache *c = alloc_at(CAP);
+    if (!c) return;
+    OmegaGpuDecodeAttnInfo info;
+    int rc = omega_gpu_decode_attn(c, 0, 131071, g_qkv, 1e-6f, 1.0f, g_out, &info);
+    if (rc) printf("  decode_attn(pos 131071): %s (%s)\n", omega_gpu_decode_attn_rc_name(rc), omega_gpu_decode_attn_last_error());
+    EXPECT(rc == OMEGA_GPU_DATTN_OK);
+    EXPECT(info.splits == CAP / OMEGA_DATTN_CHUNK && info.grid_x == 512u && info.grid_y == 4u);
+    EXPECT(info.kv_bytes == 2ull * 4u * CAP * 256u);
+    EXPECT_LOCK_FREE();
+    const unsigned submits = fk.submits;
+    EXPECT(omega_gpu_decode_attn(c, 0, 131072, g_qkv, 1e-6f, 1.0f, g_out, &info) == OMEGA_GPU_DATTN_BAD_ARGS);
+    EXPECT(omega_gpu_decode_attn(c, 0, 131073, g_qkv, 1e-6f, 1.0f, g_out, &info) == OMEGA_GPU_DATTN_BAD_ARGS);
+    EXPECT(fk.submits == submits); /* refused before any submission */
+    EXPECT_LOCK_FREE();
+    omega_gpu_decode_attn_cache_free(c);
+}
+
+static void c_old_cap_cache(void) {
+    OmegaGpuDecodeAttnCache *c = alloc_at(65536u);
+    if (!c) return;
+    uint16_t k[128] = {0}, v[128] = {0};
+    EXPECT(omega_gpu_decode_attn_cache_write(c, 0, 3, 65535, 1, k, v) == OMEGA_GPU_DATTN_OK);
+    EXPECT(omega_gpu_decode_attn_cache_write(c, 0, 3, 65536, 1, k, v) == OMEGA_GPU_DATTN_BAD_ARGS);
+    OmegaGpuDecodeAttnInfo info;
+    EXPECT(omega_gpu_decode_attn(c, 0, 65535, g_qkv, 1e-6f, 1.0f, g_out, &info) == OMEGA_GPU_DATTN_OK && info.splits == 256u);
+    EXPECT(omega_gpu_decode_attn(c, 0, 65536, g_qkv, 1e-6f, 1.0f, g_out, &info) == OMEGA_GPU_DATTN_BAD_ARGS);
+    omega_gpu_decode_attn_cache_free(c);
+    EXPECT_LOCK_FREE();
+}
+
+static const struct { const char *name; void (*fn)(void); } CASES[] = {
+    { "cache of 131072 positions allocates, buffers sized for it; 131328 refused", c_alloc_cap },
+    { "KV rows 65535/65536/131071 round-trip; 131072/131073 refused", c_kv_rows },
+    { "RoPE rows up to 131071 match libm; table holds exactly 131072 rows", c_rope_rows },
+    { "decode step at pos 131071 launches 512 splits; 131072/131073 refused", c_decode_at_cap },
+    { "a 65536-position cache refuses pos 65536", c_old_cap_cache },
+};
+
+int main(int argc, char **argv) {
+    const unsigned n = sizeof CASES / sizeof CASES[0];
+    if (argc == 2) { /* one case in this process (debugging): its index */
+        const unsigned i = (unsigned)atoi(argv[1]);
+        if (i >= n) return 2;
+        case_ok = 1; CASES[i].fn();
+        printf("%s %s\n", case_ok ? "ok  " : "FAIL", CASES[i].name);
+        return case_ok ? 0 : 1;
+    }
+    unsigned failed = 0;
+    for (unsigned i = 0; i < n; i++) {
+        fflush(stdout);
+        pid_t pid = fork();
+        if (pid == 0) { case_ok = 1; CASES[i].fn(); fflush(stdout); _exit(case_ok ? 0 : 1); }
+        int status = 0;
+        int ok = pid > 0 && waitpid(pid, &status, 0) == pid && WIFEXITED(status) && WEXITSTATUS(status) == 0;
+        printf("%s %s\n", ok ? "ok  " : "FAIL", CASES[i].name);
+        if (!ok) failed++;
+    }
+    printf("test_omega_gpu_decode_attn_maxpos: %u of %u cases passed: %s\n", n - failed, n, failed ? "FAIL" : "PASS");
+    return failed ? 1 : 0;
+}
diff --git a/tests/test_omega_gpu_decode_graph_abort.c b/tests/test_omega_gpu_decode_graph_abort.c
new file mode 100644
index 000000000..4fc8f07fd
--- /dev/null
+++ b/tests/test_omega_gpu_decode_graph_abort.c
@@ -0,0 +1,440 @@
+/* test_omega_gpu_decode_graph_abort: lock and token-state recovery of the decode graph's split API (omega #518) on a
+ * FAKE OmegaGpuPlatform. Host program, links libomega_gpu.a with the fake installed first; opens no device, touches
+ * no GPU.
+ *
+ * The fake's session lock REFUSES a second acquisition while held (counted in fk.double_locks) instead of blocking,
+ * so a lock left held by a failed call shows up as a count, not a hung test. The fake device never runs a kernel: a
+ * submitted list's markers never land (the cmdlist times out on the fake clock), and the graph's token slot is written
+ * by the "device" at the gpu->cpu sync only when a case arms fk.dev_token (a token the device produced).
+ *
+ * Contract under test (omega_gpu_decode_graph.h): a failed begin_token returns with the session lock released and the
+ * graph out of the token (no end_token owed); abort_token drops a begun token without submitting anything; end_token
+ * after a failed record submits nothing and releases the lock; an uncertain completion latches the process and every
+ * later begin fails without a retry or a submission. After each failure: set_final_norm, read, free and the next
+ * valid token neither deadlock nor see a stale token state.
+ *
+ * Each case runs in its own child process (a latch lasts for the life of the process).
+ */
+#include "omega_gpu_decode_graph.h"
+#include "omega_gpu_session.h"
+#include "omega_gpu_platform.h"
+#include "omega_blackwell_codegen_dec.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int case_ok;
+#define EXPECT(c) do { if (!(c)) { case_ok = 0; printf("  expect failed at line %d: %s\n", __LINE__, #c); } } while (0)
+
+/* ---- the fake platform ---- */
+#define NB OMEGA_GPU_HANDLE_SLOTS
+#define VA_BASE 0x100000000ull
+#define VA_STRIDE 0x1000000ull
+static struct {
+    OmegaGpuHandleTable t;
+    void *mem[NB];
+    OmegaGpuBufferDesc desc[NB];
+    OmegaGpuDeviceHandle dev;
+    OmegaGpuQueueHandle q;
+    OmegaGpuBufferHandle ring;
+    uint64_t ns;
+    unsigned locks_held, double_locks, bad_unlocks;
+    unsigned submits, dev_opens;
+    int fail_open, fail_c2g;  /* refuse device open / every cpu->gpu visibility sync */
+    uint64_t dev_token_va;    /* nonzero: the device wrote dev_token there (seen at the gpu->cpu sync) */
+    uint32_t dev_token;
+} fk;
+
+static uint64_t f_now_ns(void *c) { (void)c; fk.ns += 1000u; return fk.ns; }
+static uint64_t f_now_ms(void *c) { return f_now_ns(c) / 1000000u; }
+static int f_wait(void *c, uint64_t ms) { (void)c; fk.ns += ms * 1000000u; return 0; }
+static int f_lock(void *c, uint32_t id) {
+    (void)c;
+    if (id != OMEGA_GPU_SESSION_LOCK_ID) return OMEGA_GPU_PLAT_REFUSED_ARGS;
+    if (fk.locks_held) { fk.double_locks++; return OMEGA_GPU_PLAT_REFUSED_BUSY; } /* a real lock would block here forever */
+    fk.locks_held = 1;
+    return 0;
+}
+static int f_unlock(void *c, uint32_t id) {
+    (void)c;
+    if (id != OMEGA_GPU_SESSION_LOCK_ID || !fk.locks_held) { fk.bad_unlocks++; return OMEGA_GPU_PLAT_REFUSED_ARGS; }
+    fk.locks_held = 0;
+    return 0;
+}
+static const char *f_diag(void *c) { (void)c; return fk.fail_open ? "fake device: open refused" : ""; }
+
+static int f_dev_open(void *c, uint32_t ord, OmegaGpuDeviceHandle *out) {
+    (void)c;
+    if (fk.fail_open) return OMEGA_GPU_PLAT_REFUSED_DEVICE;
+    if (ord != 0 || fk.dev.generation) return OMEGA_GPU_PLAT_REFUSED_LIMIT;
+    int rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_DEVICE, 0, 1, 0, &out->index, &out->generation);
+    if (rc == 0) { fk.dev = *out; fk.dev_opens++; }
+    return rc;
+}
+static int f_dev_close(void *c, OmegaGpuDeviceHandle d) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (rc) return rc;
+    /* every handle of the device goes stale; the host memory stays mapped (leaked) so a graph that outlives the device
+     * writes into its own stale buffer, not freed memory: this test checks the lock, not use after close */
+    for (uint32_t i = 0; i < NB; i++)
+        if (fk.t.live[i] && i != d.index) { (void)omega_gpu_handles_close(&fk.t, i, fk.t.generation[i], fk.t.kind[i]); fk.mem[i] = NULL; }
+    (void)omega_gpu_handles_close(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    memset(&fk.dev, 0, sizeof fk.dev); memset(&fk.q, 0, sizeof fk.q);
+    return 0;
+}
+
+static OmegaGpuPlatformCaps g_caps = {
+    .abi_major = OMEGA_GPU_PLATFORM_ABI_MAJOR, .abi_minor = OMEGA_GPU_PLATFORM_ABI_MINOR,
+    .services = OMEGA_GPU_SVC_REQUIRED_SESSION, .max_devices = 1, .max_buffers = 1000, .max_queues = 1, .max_inflight = 1,
+    .max_buffer_bytes = 1ull << 30, .max_total_bytes = 1ull << 32,
+};
+
+static int f_alloc(void *c, OmegaGpuDeviceHandle d, const OmegaGpuBufferDesc *desc, OmegaGpuBufferHandle *o,
+                   OmegaCpuView *cpu, OmegaGpuVa *g, OmegaGpuBusAddr *b) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (!rc) rc = omega_gpu_platform_check_buffer(desc, &g_caps);
+    if (!rc) rc = omega_gpu_handles_open(&fk.t, desc->kind, desc->bytes, 1000, 1ull << 32, &o->index, &o->generation);
+    if (rc) return rc;
+    void *m = calloc(1, desc->bytes);
+    if (!m) { (void)omega_gpu_handles_close(&fk.t, o->index, o->generation, desc->kind); return OMEGA_GPU_PLAT_REFUSED_LIMIT; }
+    fk.mem[o->index] = m; fk.desc[o->index] = *desc;
+    cpu->ptr = m; cpu->len = desc->bytes; g->va = VA_BASE + (uint64_t)o->index * VA_STRIDE; b->iova = 0;
+    return 0;
+}
+static int f_free(void *c, OmegaGpuBufferHandle h) {
+    (void)c;
+    if (h.index >= NB) return OMEGA_GPU_PLAT_REFUSED_BAD_HANDLE;
+    int rc = omega_gpu_handles_close(&fk.t, h.index, h.generation, fk.t.kind[h.index]);
+    if (rc) return rc;
+    free(fk.mem[h.index]); fk.mem[h.index] = NULL;
+    return 0;
+}
+static int buf_live(OmegaGpuBufferHandle h) { return h.index < NB && fk.t.live[h.index] && fk.t.generation[h.index] == h.generation; }
+static void *va_to_cpu(uint64_t va) {
+    for (uint32_t i = 0; i < NB; i++) {
+        if (!fk.mem[i] || !fk.t.live[i]) continue;
+        const uint64_t base = VA_BASE + (uint64_t)i * VA_STRIDE;
+        if (va >= base && va < base + fk.desc[i].bytes) return (uint8_t *)fk.mem[i] + (va - base);
+    }
+    return NULL;
+}
+static int sync_check(OmegaGpuBufferHandle h, uint64_t off, uint64_t len) {
+    if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE;
+    if (len == 0 || off > fk.desc[h.index].bytes || len > fk.desc[h.index].bytes - off) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH;
+    return 0;
+}
+static int f_c2g(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) {
+    (void)c;
+    if (fk.fail_c2g) return OMEGA_GPU_PLAT_REFUSED_DEVICE;
+    return sync_check(h, off, len);
+}
+static int f_g2c(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) {
+    (void)c;
+    int rc = sync_check(h, off, len);
+    if (rc == 0 && fk.dev_token_va) { uint32_t *t = va_to_cpu(fk.dev_token_va); if (t) t[0] = fk.dev_token; }
+    return rc;
+}
+static int f_poll(void *c, OmegaGpuBufferHandle h, uint64_t off, uint32_t want, uint64_t ms, uint32_t *seen) {
+    (void)c;
+    if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE;
+    if (!(fk.desc[h.index].rights & OMEGA_GPU_RIGHT_HOST_POLLED)) return OMEGA_GPU_PLAT_REFUSED_BAD_RIGHTS;
+    const volatile uint32_t *w = (const volatile uint32_t *)((uint8_t *)fk.mem[h.index] + off);
+    *seen = *w;
+    if ((int32_t)(*w - want) >= 0) return 0;
+    fk.ns += ms * 1000000u;
+    return OMEGA_GPU_POLL_TIMED_OUT;
+}
+static int f_qopen(void *c, OmegaGpuDeviceHandle d, OmegaGpuBufferHandle ring, OmegaGpuQueueHandle *o) {
+    (void)c;
+    int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE);
+    if (!rc && (!buf_live(ring) || fk.t.kind[ring.index] != OMEGA_GPU_HANDLE_BUF_QUEUE)) rc = OMEGA_GPU_PLAT_REFUSED_BAD_KIND;
+    if (!rc) rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_QUEUE, 0, 1, 0, &o->index, &o->generation);
+    if (!rc) { fk.q = *o; fk.ring = ring; }
+    return rc;
+}
+static int f_qclose(void *c, OmegaGpuQueueHandle q) {
+    (void)c;
+    int rc = omega_gpu_handles_close(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE);
+    if (!rc) memset(&fk.q, 0, sizeof fk.q);
+    return rc;
+}
+/* The fake device accepts the words and runs nothing: no marker, semaphore or output ever lands. */
+static int f_submit(void *c, OmegaGpuQueueHandle q, const uint32_t *w, uint32_t n) {
+    (void)c; (void)w;
+    int rc = omega_gpu_handles_check(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE);
+    if (rc) return rc;
+    if ((uint64_t)n * 4u > fk.desc[fk.ring.index].bytes) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH;
+    fk.submits++;
+    return 0;
+}
+static int f_retire(void *c, OmegaGpuQueueHandle q) { (void)c; (void)q; return 0; }
+static void *f_halloc(void *c, size_t b) { (void)c; return malloc(b); }
+static void f_hfree(void *c, void *p) { (void)c; free(p); }
+
+static OmegaGpuPlatform g_plat = {
+    .ctx = &fk, .time_now_ms = f_now_ms, .wait_ms = f_wait, .lock = f_lock, .unlock = f_unlock,
+    .dma_alloc = f_alloc, .dma_free = f_free, .sync_cpu_to_gpu = f_c2g, .sync_gpu_to_cpu = f_g2c, .poll_word = f_poll,
+    .device_open = f_dev_open, .device_close = f_dev_close, .diag_text = f_diag,
+    .queue_open = f_qopen, .queue_close = f_qclose, .queue_submit = f_submit, .queue_retire = f_retire,
+    .time_now_ns = f_now_ns, .host_alloc = f_halloc, .host_free = f_hfree,
+};
+
+/* ---- a one-layer graph on the fake ---- */
+#define LAYERS 1u
+#define VOCAB 256u
+#define MAX_POS 256u
+typedef struct {
+    OmegaGpuDecodeAttnCache *attn;
+    OmegaGpuRouter *router;
+    OmegaGpuBf16Tensor *lm;
+    OmegaGpuDecodeGraph *g;
+} World;
+
+static int world_build(World *w) {
+    memset(w, 0, sizeof *w);
+    static uint16_t lm_w[VOCAB * OMEGA_GPU_DGRAPH_HIDDEN]; /* zeros: finite bf16 */
+    if (omega_gpu_decode_attn_cache_alloc(LAYERS, MAX_POS, 1e6, &w->attn) != 0) return -1;
+    if (omega_gpu_router_alloc(LAYERS, &w->router) != 0) return -1;
+    if (omega_gpu_bf16_tensor_upload(VOCAB, OMEGA_GPU_DGRAPH_HIDDEN, lm_w, &w->lm) != 0) return -1;
+    OmegaGpuDecodeGraphConfig cfg; memset(&cfg, 0, sizeof cfg);
+    cfg.layers = LAYERS; cfg.vocab = VOCAB; cfg.eps = 1e-6f; cfg.norm_topk = 1;
+    cfg.router = w->router; cfg.attn = w->attn; cfg.lm_head = w->lm;
+    return omega_gpu_decode_graph_create(&cfg, &w->g) == OMEGA_GPU_DGRAPH_OK ? 0 : -1;
+}
+static void world_free(World *w) {
+    omega_gpu_decode_graph_free(w->g);
+    omega_gpu_bf16_tensor_free(w->lm);
+    omega_gpu_router_free(w->router);
+    omega_gpu_decode_attn_cache_free(w->attn);
+    memset(w, 0, sizeof *w);
+}
+
+static float g_x[OMEGA_GPU_DGRAPH_HIDDEN], g_norm[OMEGA_GPU_DGRAPH_HIDDEN];
+
+/* The postcondition of every failed or finished call: lock free, never taken twice, never released twice. */
+#define EXPECT_LOCK_FREE() do { EXPECT(fk.locks_held == 0); EXPECT(fk.double_locks == 0); EXPECT(fk.bad_unlocks == 0); } while (0)
+
+/* Not in a token any more: the between-token calls run (BAD_ARGS here would mean in_token stuck). */
+static void expect_between_tokens(World *w) {
+    EXPECT(omega_gpu_decode_graph_set_final_norm(w->g, g_norm) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT_LOCK_FREE();
+    float x[OMEGA_GPU_DGRAPH_HIDDEN];
+    EXPECT(omega_gpu_decode_graph_read(w->g, x, NULL, NULL) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT_LOCK_FREE();
+}
+
+/* A valid split-API token: begin, nothing recorded, end; the fake device "wrote" the token. */
+static void expect_valid_token(World *w, uint32_t want) {
+    OmegaGpuDecodeGraphVas v; omega_gpu_decode_graph_vas(w->g, &v);
+    fk.dev_token_va = v.token; fk.dev_token = want;
+    const unsigned submits = fk.submits;
+    EXPECT(omega_gpu_decode_graph_begin_token(w->g, g_x) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(fk.locks_held == 1);
+    uint32_t tok = 0xdeadu;
+    OmegaGpuDecodeGraphStats st; memset(&st, 0xff, sizeof st);
+    EXPECT(omega_gpu_decode_graph_end_token(w->g, &tok, &st) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(tok == want && st.launches == 0 && st.submits == 0);
+    EXPECT(fk.submits == submits); /* an empty list submits nothing */
+    EXPECT_LOCK_FREE();
+    fk.dev_token_va = 0;
+}
+
+static int install(void) {
+    memset(&fk, 0, sizeof fk); omega_gpu_handles_init(&fk.t);
+    for (unsigned i = 0; i < OMEGA_GPU_DGRAPH_HIDDEN; i++) { g_x[i] = (float)(i % 7) - 3.0f; g_norm[i] = 1.0f; }
+    return omega_gpu_session_set_platform(&g_plat, &g_caps);
+}
+
+/* Visibility sync (cpu->gpu of x and the poisoned token) refused: split and one-shot paths, repeated, then recovery. */
+static void c_sync_fails(void) {
+    World w;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */
+    if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; }
+    EXPECT_LOCK_FREE();
+    const unsigned submits = fk.submits;
+    fk.fail_c2g = 1;
+    for (int rep = 0; rep < 3; rep++) { /* same outcome every time */
+        EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+        EXPECT_LOCK_FREE();
+    }
+    /* nothing owed after a failed begin: end and abort see no token */
+    uint32_t tok = 7;
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, &tok, NULL) == OMEGA_GPU_DGRAPH_BAD_ARGS && tok == 7);
+    EXPECT(omega_gpu_decode_graph_abort_token(w.g) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT(omega_gpu_decode_graph_record_final(w.g) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT_LOCK_FREE();
+    /* one-shot: the begin failure comes back as CHIP_FAIL with zeroed stats, lock free */
+    OmegaGpuDecodeGraphStats st; memset(&st, 0xff, sizeof st);
+    tok = 7;
+    EXPECT(omega_gpu_decode_graph_token(w.g, g_x, 0, &tok, &st) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    EXPECT(tok == 7 && st.launches == 0 && st.submits == 0 && st.total_ns == 0);
+    EXPECT_LOCK_FREE();
+    EXPECT(fk.submits == submits); /* nothing reached the device, nothing retried */
+    EXPECT(!omega_gpu_session_is_blocked());
+    fk.fail_c2g = 0;
+    expect_between_tokens(&w);
+    expect_valid_token(&w, 42u);
+    expect_valid_token(&w, 43u); /* and again */
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+}
+
+/* Device open refused: the session was closed (every handle stale), the reopen in begin_token fails. */
+static void c_open_fails(void) {
+    World w;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */
+    if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; }
+    omega_gpu_session_close();
+    EXPECT_LOCK_FREE();
+    fk.fail_open = 1;
+    for (int rep = 0; rep < 3; rep++) {
+        EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+        EXPECT_LOCK_FREE();
+    }
+    EXPECT(omega_gpu_decode_graph_token(w.g, g_x, 0, NULL, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    EXPECT_LOCK_FREE();
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, NULL, NULL) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    /* the graph's buffers belong to the closed device: set_final_norm and read reach the stale sync and refuse (not
+     * BAD_ARGS: the graph is out of the token), nothing hangs */
+    EXPECT(omega_gpu_decode_graph_set_final_norm(w.g, g_norm) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    EXPECT(omega_gpu_decode_graph_read(w.g, NULL, NULL, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    EXPECT_LOCK_FREE();
+    fk.fail_open = 0;
+    /* reopen succeeds; the old graph's buffer is stale, so its begin fails at the visibility sync, lock free */
+    EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+    EXPECT_LOCK_FREE();
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+    /* a fresh graph on the reopened device runs a valid token */
+    if (world_build(&w) != 0) { EXPECT(!"world rebuilds after the reopen"); return; }
+    expect_valid_token(&w, 5u);
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+}
+
+/* The caller abandons a begun token (cancellation): nothing submitted, lock released, the next token runs. */
+static void c_abort(void) {
+    World w;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */
+    if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; }
+    OmegaGpuDecodeGraphVas v; omega_gpu_decode_graph_vas(w.g, &v);
+    const unsigned submits = fk.submits;
+    /* abort after a recorded launch */
+    EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_record_res(w.g, OMEGA_DEC_RES_NORM, v.x, 0, 0, v.x, v.xq, 1e-6f, 1.0f) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_abort_token(w.g) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT_LOCK_FREE();
+    EXPECT(fk.submits == submits);
+    EXPECT(omega_gpu_decode_graph_abort_token(w.g) == OMEGA_GPU_DGRAPH_BAD_ARGS); /* only once */
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, NULL, NULL) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT_LOCK_FREE();
+    /* abort after a failed record */
+    EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_record_res(w.g, 0xffu, v.x, 0, 0, 0, v.xq, 1e-6f, 1.0f) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT(omega_gpu_decode_graph_abort_token(w.g) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT_LOCK_FREE();
+    EXPECT(fk.submits == submits);
+    /* abort with nothing begun */
+    EXPECT(omega_gpu_decode_graph_abort_token(NULL) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    expect_between_tokens(&w);
+    expect_valid_token(&w, 9u);
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+}
+
+/* end_token after a failed record: no submit, the failure returned, lock released, the next token runs. */
+static void c_end_after_record_fail(void) {
+    World w;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */
+    if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; }
+    OmegaGpuDecodeGraphVas v; omega_gpu_decode_graph_vas(w.g, &v);
+    const unsigned submits = fk.submits;
+    EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_record_res(w.g, OMEGA_DEC_RES_NORM, v.x, 0, 0, v.x, v.xq, 1e-6f, 1.0f) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_record_layer(w.g, 0, 0) == OMEGA_GPU_DGRAPH_BAD_ARGS); /* layer 0 never set */
+    EXPECT(omega_gpu_decode_graph_record_final(w.g) == OMEGA_GPU_DGRAPH_CHIP_FAIL);     /* failed sticks */
+    uint32_t tok = 7;
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, &tok, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL && tok == 7);
+    EXPECT(fk.submits == submits);
+    EXPECT_LOCK_FREE();
+    /* one-shot with an unset layer: the same, deterministically */
+    for (int rep = 0; rep < 2; rep++) {
+        EXPECT(omega_gpu_decode_graph_token(w.g, g_x, 0, &tok, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL && tok == 7);
+        EXPECT(fk.submits == submits);
+        EXPECT_LOCK_FREE();
+    }
+    expect_between_tokens(&w);
+    expect_valid_token(&w, 11u);
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+}
+
+/* An uncertain completion: the submitted list never completes, the process latches. end_token reports the failure (never
+ * a token); every later begin fails at once with the lock released, submits nothing and retries nothing. */
+static void c_latched(void) {
+    World w;
+    if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */
+    if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; }
+    OmegaGpuDecodeGraphVas v; omega_gpu_decode_graph_vas(w.g, &v);
+    fk.dev_token_va = v.token; fk.dev_token = 3u; /* even a token in the slot must not be claimed after a timeout */
+    EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_OK);
+    EXPECT(omega_gpu_decode_graph_record_res(w.g, OMEGA_DEC_RES_NORM, v.x, 0, 0, v.x, v.xq, 1e-6f, 1.0f) == OMEGA_GPU_DGRAPH_OK);
+    uint32_t tok = 7;
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, &tok, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL && tok == 7);
+    EXPECT(fk.submits >= 1);
+    EXPECT(omega_gpu_session_is_blocked());
+    EXPECT_LOCK_FREE();
+    const unsigned submits = fk.submits, opens = fk.dev_opens;
+    for (int rep = 0; rep < 3; rep++) {
+        EXPECT(omega_gpu_decode_graph_begin_token(w.g, g_x) == OMEGA_GPU_DGRAPH_CHIP_FAIL);
+        EXPECT_LOCK_FREE();
+        EXPECT(omega_gpu_decode_graph_token(w.g, g_x, 0, &tok, NULL) == OMEGA_GPU_DGRAPH_CHIP_FAIL && tok == 7);
+        EXPECT_LOCK_FREE();
+    }
+    EXPECT(fk.submits == submits && fk.dev_opens == opens); /* no retry, no reopen */
+    EXPECT(omega_gpu_decode_graph_end_token(w.g, NULL, NULL) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT(omega_gpu_decode_graph_abort_token(w.g) == OMEGA_GPU_DGRAPH_BAD_ARGS);
+    EXPECT(omega_gpu_decode_graph_set_final_norm(w.g, g_norm) == OMEGA_GPU_DGRAPH_OK);
+    (void)omega_gpu_decode_graph_read(w.g, NULL, NULL, NULL); /* latched: refused or parked, but it returns */
+    EXPECT_LOCK_FREE();
+    world_free(&w);
+    EXPECT_LOCK_FREE();
+    EXPECT(omega_gpu_session_is_blocked());
+}
+
+typedef struct { const char *name; void (*fn)(void); } Case;
+static const Case CASES[] = {
+    { "visibility sync refused at begin: split + one-shot recover", c_sync_fails },
+    { "device open refused at begin: lock free, reopen recovers", c_open_fails },
+    { "abort_token: cancel a begun token, nothing submitted", c_abort },
+    { "end_token after a failed record: no submit, lock free", c_end_after_record_fail },
+    { "latched session: begin fails at once, no retry", c_latched },
+};
+
+int main(int argc, char **argv) {
+    const unsigned n = sizeof CASES / sizeof CASES[0];
+    if (argc == 2) { /* one case in this process (debugging): its index */
+        const unsigned i = (unsigned)atoi(argv[1]);
+        if (i >= n) return 2;
+        case_ok = 1; CASES[i].fn();
+        printf("%s %s\n", case_ok ? "ok  " : "FAIL", CASES[i].name);
+        return case_ok ? 0 : 1;
+    }
+    unsigned failed = 0;
+    for (unsigned i = 0; i < n; i++) {
+        fflush(stdout);
+        pid_t pid = fork();
+        if (pid == 0) { case_ok = 1; CASES[i].fn(); fflush(stdout); _exit(case_ok ? 0 : 1); }
+        int status = 0;
+        int ok = pid > 0 && waitpid(pid, &status, 0) == pid && WIFEXITED(status) && WEXITSTATUS(status) == 0;
+        printf("%s %s\n", ok ? "ok  " : "FAIL", CASES[i].name);
+        if (!ok) failed++;
+    }
+    printf("test_omega_gpu_decode_graph_abort: %u of %u cases passed: %s\n", n - failed, n, failed ? "FAIL" : "PASS");
+    return failed ? 1 : 0;
+}
diff --git a/tools/.crumb b/tools/.crumb
index e9e4932b5..64cd2aaed 100644
--- a/tools/.crumb
+++ b/tools/.crumb
@@ -62,14 +62,14 @@
         }
       ],
       "children_root": "sha256:8d3d3b952374b3b72e667521f07bf028c4c02bcefff772ad1a71cfff3e5266f2",
-      "compiled_at": "2026-10-30T11:28:28Z",
+      "compiled_at": "2026-10-30T16:31:15Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:308db0e6cf45c0a48f01f5f5f228450f191389de68006915b9ecf9c65b9a2e29",
+      "digest": "sha256:7a6ed3e1a9a2d14bbdd5d7fdd7080ef681db1f39a3ef306572c1a929a8913c54",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 298,
-      "generated_at_commit": "a8a6a3d3c47ce797430f045edc5eae11594ba36d",
-      "source_tree": "sha256:acd1f1b0080968db950791b4eb2dce39bb0289dc0c2e8794bfc7449023446105"
+      "generated_at_commit": "7521b2739cd72f42423f92d26879988080765d11",
+      "source_tree": "sha256:b1e02406c13951a779b4e39fa8f697d1bef9c2494216ef7ba51f6acbeb144aff"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/tools/dagsim/dagsim.c b/tools/dagsim/dagsim.c
index b7187d445..359a02437 100644
--- a/tools/dagsim/dagsim.c
+++ b/tools/dagsim/dagsim.c
@@ -31,6 +31,7 @@ const char *ds_status_name(int s) {
     case DS_REFUSED_CYCLE: return "REFUSED_CYCLE";
     case DS_REFUSED_UNSUPPORTED: return "REFUSED_UNSUPPORTED";
     case DS_REFUSED_REMOVED_REQUIRED: return "REFUSED_REMOVED_REQUIRED";
+    case DS_REFUSED_LIFETIME: return "REFUSED_LIFETIME";
     case DS_PARSE_ERROR: return "PARSE_ERROR";
     default: return "?";
     }
@@ -279,7 +280,8 @@ int ds_parse_text(const char *text, ds_model *m, char *err, size_t errcap) {
             const char *v;
             if (!(v = get(kvs, n, "id"))) PERR("buffer needs id=");
             sset(b->id, sizeof b->id, v);
-            if (!parse_real(get(kvs, n, "bytes"), &b->bytes)) PERR("buffer needs bytes=");
+            if (!parse_real(get(kvs, n, "bytes"), &b->bytes) || !isfinite(b->bytes))
+                PERR("buffer bytes must be a finite number >= 0");
             if (!(v = get(kvs, n, "cap")) || (b->cap = ds_find_res(m, v)) < 0 || m->res[b->cap].kind != DS_RES_CAPACITY) PERR("buffer needs cap=");
             if ((v = get(kvs, n, "first")) && (b->first = ds_find_op(m, v)) < 0) PERR("first=%s not an op", v);
             if ((v = get(kvs, n, "last")) && (b->last = ds_find_op(m, v)) < 0) PERR("last=%s not an op", v);
@@ -387,6 +389,19 @@ static int refuse(ds_result *r, int status, const char *fmt, const char *a, cons
     return status;
 }
 
+static int refuse_msg(ds_result *r, int status, const char *msg) {
+    memset(r, 0, sizeof *r);
+    r->status = status;
+    snprintf(r->reason, sizeof r->reason, "%s", msg ? msg : "");
+    return status;
+}
+
+/* An unsupported operation and a refused prediction are the same as an
+ * unknown cell: no certificate. known alone is not enough. */
+static int predict_unusable(int st, const RxCmPrediction *p) {
+    return st == RX_CM_ERR_UNSUPPORTED || p->refused || !p->known || p->n == 0; /* PREDICT_REFUSAL_CHECK */
+}
+
 static int resolve(const ds_model *m, const ds_opts *o, ds_num *num, ds_result *r) {
     int any_cal = 0;
     for (int i = 0; i < m->n_res; i++) {
@@ -408,8 +423,9 @@ static int resolve(const ds_model *m, const ds_opts *o, ds_num *num, ds_result *
             f.op = RX_CM_OP_MATVEC; f.M = op->M; f.N = op->N;
             f.state_bytes = ((uint64_t)op->M * op->N + op->M + op->N) * 8u;
             f.cache_bytes = 1u << 20; f.core = op->core; f.eligible = 1u << op->arm; f.current_arm = op->arm;
-            RxCmPrediction p; rx_cm_predict(cm, &f, op->arm, &p);
-            if (!p.known || p.n == 0) return refuse(r, DS_REFUSED_UNKNOWN, "op %s: rx_costmodel has no known cell for this (op, core, pressure) and arm; measure it first%s", op->id, "");
+            RxCmPrediction p;
+            int st = rx_cm_predict(cm, &f, op->arm, &p);
+            if (predict_unusable(st, &p)) return refuse(r, DS_REFUSED_UNKNOWN, "op %s: rx_costmodel has no known cell for this (op, core, pressure) and arm; measure it first%s", op->id, "");
             double q = o->interval_q > 0 && o->interval_q < 1 ? o->interval_q : 0.9;
             double k = rx_cm_t_quantile(q, p.dof);
             double l2 = p.mean_log2_ps + (o->mode < 0 ? k * p.sd_log2 : o->mode > 0 ? -k * p.sd_log2 : 0);
@@ -452,6 +468,33 @@ static int topo(const ds_model *m, int *order) {
 enum { ST_WAIT = 0, ST_READY, ST_LAUNCH, ST_RUN, ST_DONE };
 enum { BLK_NONE = 0, BLK_SLOT, BLK_LAUNCHER };
 
+/* Half-open [start, end). Missing first -> 0; missing last -> makespan. */
+static void buffer_window(const ds_model *m, const ds_result *r, int b, double *s, double *e) {
+    *s = m->buf[b].first >= 0 ? r->start_ns[m->buf[b].first] : 0.0;
+    *e = m->buf[b].last >= 0 ? r->end_ns[m->buf[b].last] : r->makespan_ns;
+}
+
+static const char *endpoint_name(const ds_model *m, int op) {
+    return op >= 0 ? m->ops[op].id : "omitted";
+}
+
+/* Resolved end earlier than start is not an interval. Refuse before the ledger. */
+static int reject_inverted_lifetimes(const ds_model *m, ds_result *r) {
+    for (int b = 0; b < m->n_buf; b++) {
+        double s, e;
+        buffer_window(m, r, b, &s, &e);
+        if (e + 1e-9 < s) {
+            char msg[256];
+            snprintf(msg, sizeof msg,
+                     "inverted lifetime for buffer %s: first=%s start_ns=%.9g last=%s end_ns=%.9g",
+                     m->buf[b].id, endpoint_name(m, m->buf[b].first), s,
+                     endpoint_name(m, m->buf[b].last), e);
+            return refuse_msg(r, DS_REFUSED_LIFETIME, msg);
+        }
+    }
+    return DS_OK;
+}
+
 int ds_eval(const ds_model *m, const ds_opts *o, ds_result *r) {
     memset(r, 0, sizeof *r);
     if (m->n_ops == 0) return refuse(r, DS_REFUSED_UNSUPPORTED, "empty DAG%s%s", "", "");
@@ -578,7 +621,14 @@ int ds_eval(const ds_model *m, const ds_opts *o, ds_result *r) {
         if (w > r->bound_ns) r->bound_ns = w;
     }
 
-    /* ---- capacity ledger: frees before allocations at the same instant ---- */
+    /* Inverted lifetimes never enter the ledger (and never rank). */
+    if ((rc = reject_inverted_lifetimes(m, r)) != DS_OK) return rc; /* LIFETIME_ORDER_CHECK */
+
+    /* ---- capacity ledger: frees before allocations at the same instant ----
+     * Positive intervals only. A zero-duration [s, e) is empty and emits no
+     * event, so a same-time free cannot pull the ledger negative or offset
+     * another buffer. Frees of earlier intervals still precede allocs, which
+     * is the completion/allocation tie. */
     for (int c = 0; c < m->n_res; c++) {
         if (m->res[c].kind != DS_RES_CAPACITY) continue;
         double live = 0, peak = 0, peak_at = 0;
@@ -586,8 +636,9 @@ int ds_eval(const ds_model *m, const ds_opts *o, ds_result *r) {
         double et[2 * DS_MAX_BUF]; double ev[2 * DS_MAX_BUF]; int en = 0;
         for (int b = 0; b < m->n_buf; b++) {
             if (m->buf[b].cap != c) continue;
-            double s = m->buf[b].first >= 0 ? r->start_ns[m->buf[b].first] : 0;
-            double e = m->buf[b].last >= 0 ? r->end_ns[m->buf[b].last] : r->makespan_ns;
+            double s, e;
+            buffer_window(m, r, b, &s, &e);
+            if (!(s + 1e-9 < e)) continue;
             et[en] = s; ev[en] = m->buf[b].bytes; en++;
             et[en] = e; ev[en] = -m->buf[b].bytes; en++;
         }
@@ -597,14 +648,26 @@ int ds_eval(const ds_model *m, const ds_opts *o, ds_result *r) {
             while (j >= 0 && (et[j] > kt || (et[j] == kt && ev[j] > 0 && kv_ < 0))) { et[j + 1] = et[j]; ev[j + 1] = ev[j]; j--; }
             et[j + 1] = kt; ev[j + 1] = kv_;
         }
-        for (int i = 0; i < en; i++) { live += ev[i]; if (live > peak) { peak = live; peak_at = et[i]; } }
+        for (int i = 0; i < en; i++) {
+            live += ev[i];
+            /* Reachable by rounding: 1e20 + 1 sums to 1e20, so the later
+             * frees overshoot (dagsim_unit rounding_drives_live_negative). */
+            if (live < -1e-6) {
+                char msg[256];
+                snprintf(msg, sizeof msg,
+                         "capacity %s live bytes went negative (%.9g at t=%.9g); refusing the certificate",
+                         m->res[c].id, live, et[i]);
+                return refuse_msg(r, DS_REFUSED_LIFETIME, msg);
+            }
+            if (live > peak) { peak = live; peak_at = et[i]; }
+        }
         r->peak_live_bytes[c] = peak; r->peak_live_at_ns[c] = peak_at;
         if (peak > m->res[c].cap + 1e-9) {
             char names[160] = ""; size_t L = 0;
             for (int b = 0; b < m->n_buf && L < sizeof names - 8; b++) {
                 if (m->buf[b].cap != c) continue;
-                double s = m->buf[b].first >= 0 ? r->start_ns[m->buf[b].first] : 0;
-                double e = m->buf[b].last >= 0 ? r->end_ns[m->buf[b].last] : r->makespan_ns;
+                double s, e;
+                buffer_window(m, r, b, &s, &e);
                 if (s <= peak_at && e > peak_at) { snprintf(names + L, sizeof names - L, "%s%s", L ? "," : "", m->buf[b].id); L = strlen(names); }
             }
             char what[200]; snprintf(what, sizeof what, "%.0f B live at t=%.0f ns (%s) exceeds", peak, peak_at, names);
diff --git a/tools/dagsim/dagsim.h b/tools/dagsim/dagsim.h
index a409b588b..8ab62e55d 100644
--- a/tools/dagsim/dagsim.h
+++ b/tools/dagsim/dagsim.h
@@ -7,7 +7,8 @@
  * bandwidth (processor sharing), serialized launches, one capacity ledger,
  * dependencies and barriers. It never executes anything. It refuses rather
  * than guess: unknown provenance, stale calibration, capacity overflow,
- * unsupported constructs and cycles are all refusals with a reason.
+ * an inverted buffer lifetime (resolved end before start), unsupported
+ * constructs and cycles are all refusals with a reason.
  *
  * Host only. No GPU, no authority, no generation store.
  */
@@ -39,6 +40,7 @@ enum ds_status {
     DS_REFUSED_CYCLE,
     DS_REFUSED_UNSUPPORTED,      /* construct the evaluator does not model */
     DS_REFUSED_REMOVED_REQUIRED, /* a remaining op depends on removed work without a valid derivation */
+    DS_REFUSED_LIFETIME,         /* resolved buffer end is earlier than its start */
     DS_PARSE_ERROR
 };