From 5daef7fd09edee95a72a1865d058372e38f5d6a8 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Mon, 26 Oct 2026 16:31:44 -0500 Subject: [PATCH 1/4] docs(omega): omq hole oracle usage (pending omega-mv #838) omega-encoding section 1b: build and run seed/query/omq, hole syntax, JSON keys, the four statuses, prefix mode and limits, from seed/query/README.md at #838 head 8cb5d2de. Examples are verbatim host runs at omc 2c824805 / omq 6d5db676. omega-harness section 3 points to it. Pending: #838 is a draft, not merged. --- skills/omega-encoding/SKILL.md | 98 ++++++++++++++++++++++++++++++++++ skills/omega-harness/SKILL.md | 1 + 2 files changed, 99 insertions(+) diff --git a/skills/omega-encoding/SKILL.md b/skills/omega-encoding/SKILL.md index 4df9171..059f290 100644 --- a/skills/omega-encoding/SKILL.md +++ b/skills/omega-encoding/SKILL.md @@ -240,6 +240,104 @@ and compare the new hash with the pin yourself ([omega-from-seed.sh#L52-L60](htt Full host qualification is `sh seed/host/check.sh` (author-verified on 2026-10-23 per `seed/host/README.md`); a host pass is never hardware qualification. +## 1b. Ask `omq` what fits at a hole (PENDING: draft omega-mv #838) + +Status: EXERCISED on host only (Linux AArch64, 2026-10-26) at +[omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838) head +`8cb5d2de821acd251387e359e782f3ee319d5ae6`, compiler `seed/out/omc` +`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, `omq` sha256 +`6d5db676adb0ee3776097b9430f703e0f94d20246e37b810df44c7b2756e1ce8`: `sh seed/query/check.sh` printed +`SEED QUERY PASS 36 checks`. The PR is a draft and not merged, so `seed/query/` is absent from +main until it lands. Source of every rule below: `seed/query/README.md` at that head. + +`omq` (`seed/query/omq.om`, seeded Omega) reads a program with one hole `??` and prints one JSON +line: what `omc` accepts at the hole. It runs the given `omc` on witness programs and reports only +forms that compiled, so it follows the compiler instead of restating its rules. It still does not +replace compiling and running the finished program (section 1a). + +```sh +seed/out/omc < seed/query/omq.om > omq && chmod +x omq +./omq seed/out/omc < prog.om # one JSON line on stdout +./omq seed/out/omc prefix < reqs.bin # prefix-viability server +``` + +- Hole: a line that is only `??` is a statement hole; `??` inside a line is a value hole. With no + hole `omq` only checks the program. +- Exit: 0 answer printed; 1 more than one hole or a hole outside a function; 2 usage, or a compiler + that fails `omq`'s selftest (`/bin/true` or a wrong path never yields an answer). +- `hole`: 1-based `line`, `kind` (`statement`/`value`), the enclosing function's `fn_line`, block `depth`. +- `check`: `code` 0 when the text before the hole, closed off by a trap and the missing `end`s, + compiles; otherwise the `omc` error `code` and `line`, plus `sev`, `col`, `expect`, `found`, + `obligation`, `span` for an OM-2 diagnostic, a `why` sentence, and possibly a recompiled repair + (`fix_rename`, `fix_move_up` or `fix_append_end`, with `rc_after_fix`). +- `check.status`, one of four values, never a plain VALID: + `INVALID` (`omc` rejects the text and the error lies before the hole: nothing at the hole repairs + it); `INCOMPLETE` (with a hole, the closed-off witness compiles, so a valid completion exists); + `VALID-UNPROVEN` (no hole and `omc` accepts: well formed only, contracts become run-time traps, + no behaviour proven); `UNKNOWN` (the error lies after the hole, in the witness's added closing + lines, and may depend on what the hole holds). +- `scope`: names visible at the hole, typed by probing `omc` (`T[]` for an array; `writable` when + `put` into it compiles). Names from closed blocks are absent. +- `fns`: function signatures. `next`: forms that compiled at the hole; `` is a slot for a value + of type T. At a value hole `expect` lists the expected types. A user-function call appears with a + concrete argument list. +- `obligations`: `function`, `open` blocks innermost first, `regs_free` (more `ulong` names that + fit before error 12), `contracts` (`requires`/`ensures`, invariants of open loops), `effects` + (host-word effects already used, e.g. `read:fs`, `write:io`, `net`). +- `compiles`: how many times `omc` ran. + +Observed at the pin above (transcript and script retained as host evidence by the author, not in this +repository), from the omega-mv root, with `stmt.om` = `fn main to int` / `n = uint 3` / `??` / `end`: + +```text +$ ./omq seed/out/omc < stmt.om; echo "rc=$?" +{"hole":{"line":3,"kind":"statement","fn_line":1,"depth":1},"check":{"code":0,"status":"INCOMPLETE"},"scope":[{"name":"n","type":"uint"}],"fns":["fn main to int"],"next":["ret ","n = ","NEW = ","if ","while ","for NAME T COUNT","trap <1..255>","exit "],"obligations":{"function":"fn main to int","open":["fn"],"regs_free":15,"contracts":[],"effects":[]},"compiles":36} +rc=0 +``` + +Value hole, `value.om` = `fn main to int` / `n = uint 3` / `x = add n ??`: + +```text +{"hole":{"line":3,"kind":"value","fn_line":1,"depth":1},"check":{"code":0,"status":"INCOMPLETE"},"scope":[{"name":"n","type":"uint"}],"fns":["fn main to int"],"expect":["uint"],"next":["n","add ","sub ","mul ","div ","rem ","and ","or ","xor ","shl ","shr ","uint "],"obligations":{"function":"fn main to int","open":["fn"],"regs_free":15,"contracts":[],"effects":[]},"compiles":37} +``` + +Error before the hole, `bad.om` = `fn main to int` / `n = uint 3` / `ret int m` / `??` / `end` +(status `INVALID`, exit 0 because an answer was printed): + +```text +{"hole":{"line":4,"kind":"statement","fn_line":1,"depth":1},"check":{"code":3,"line":3,"sev":"unknown","col":9,"expect":"name","found":"m","obligation":"-","span":[34,35],"why":"unknown name: define it before this line (globals, consts and texts above their first use; locals in an enclosing block that is still open)","status":"INVALID"},"scope":[],"fns":["fn main to int"],"next":[],"obligations":{"function":"fn main to int","open":["fn"],"regs_free":0,"contracts":[],"effects":[]},"compiles":34} +``` + +No hole (`ret int n` in place of `??`), two holes, and a fake compiler: + +```text +{"check":{"code":0,"status":"VALID-UNPROVEN"},"compiles":3} +rc=0 +{"error":"more than one ?? hole","compiles":2} +rc=1 +$ ./omq /bin/true < stmt.om +omq: cannot run the compiler +rc=2 +``` + +Prefix mode: `omq OMC prefix` reads requests on fd 0, each a 4-byte little-endian length then that +many bytes of program prefix, and writes one line `V CODE` per request: whether the prefix can still +be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2390-2392: +0 whole unit accepted, 1 prefix still completable, 2 dead, 3 compiler did not run. Requests +`fn main to int` + `x = add`; the same with `x = add int 1 2` / `ret x` / `end`; and +`fn main to int` + `abcdefghij = 1` gave: + +```text +1 4 +0 0 +2 13 +``` + +Limits: one hole per request; a call with several array parameters gives every array parameter the +same candidate rank, so a call needing two different arrays of one element type may be missing from +`next`; struct-typed parameters are not filled; the text after the hole is not checked (it is the +part still to be written). Each answer costs tens to a few hundred compiles. + ## 2. Program shape ``` diff --git a/skills/omega-harness/SKILL.md b/skills/omega-harness/SKILL.md index 316d30b..e0c03af 100644 --- a/skills/omega-harness/SKILL.md +++ b/skills/omega-harness/SKILL.md @@ -72,6 +72,7 @@ fi - Rebuilding with `sh seed/omega-from-seed.sh` rewrites tracked files, including `seed/out/omc.sha256`. Record the expected digest independently beforehand; the rewritten sidecar is not a trust anchor. A self-rebuild fixpoint proves consistency, not correctness and not diverse compilation. At source `ec07d25d5506d33567adbd4d9b518177b7933bad` on 2026-10-26, the seed gate reproduced `499236398aabc652e2dae27fe4bdc4c5db3d3726314356e0dbef23e3345803ec`. Main later used `befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d`. Main `91b3c9326919faf1491e29ae9276929e8349b8c7` now carries batch compiler `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54` (contracts, capacity and f32 returns); its host qualification is `evidence/BATCH-189ada82/README.md`. - Gate5 bookkeeping for any compiler change: since main `91b3c932`, `seed/omc/gate5.sh` writes current outputs to `build/seed/r5/evidence/`, never to immutable `evidence/SEED-0/omc/`. The living ledger `seed/omc/size-history.tsv` keeps the old history byte for byte, then one tab-separated row per compiler change (`rewrite change source_lines functions words sha256`). At `91b3c932` the last row is `RM2-capacity-f32` (`189ada82…`). Gate5 checks that the last row's sha256 equals the freshly built `omc`, and it never appends a row itself. So a compiler change adds exactly one row by hand, with values measured from the new build, in the same commit as the change. Never edit an older row to make the check pass, and never point the check back at `evidence/SEED-0`. - Run the changed path and compare exact expected bytes, status and state; a successful compile proves nothing about behavior. Also exercise the failure or refusal boundary most likely to regress. If that is impractical, say exactly what was not run. +- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at compiler `2c824805…`, `SEED QUERY PASS 36 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. - Run a negative control: change an expected value or feed invalid input, and confirm the check fails. A verifier that also accepts its negative control has not established anything. - Qualification case files (`.cases` in omega-mv) are executed by a conductor, not run directly. More than one conductor exists under `seed/qualification/`, and picking the wrong one looks like a failing gate. Read the conductor's `main` for its argument count first. Observed 2026-10-25 with compiler `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`: `seed/qualification/om2/gate.om` takes four arguments (`omc pinhash casesfile scratchdir`) and summarises as `OM2GATE PASS cases=N pass=N fail=N invalid=N not_run=N`; `seed/qualification/security673/gate669.om` accepts at most one argument and exits 90 under a four-argument call. A usage status such as 90 from a conductor is INVALID setup, never a qualified refusal. - Executable contracts reuse that conductor. `seed/omc/contracts/contracts.cases` (44 rows) must end `OM2GATE PASS`. `seed/omc/contracts/mutant.cases` builds two broken compilers, one with enforcement disabled and one whose prover accepts any constant predicate, and must exit 1 with `OM2GATE FAIL cases=2 pass=0 fail=2 invalid=0 not_run=0` plus a `VERDICT … FAIL run exit=0 expected=109` line for each. For that suite, exit 1 with the exact verdict lines is the expected outcome; a pass means the negative control failed. `seed/host/check.sh` runs both. From 1581b339e955d3ca8ff18310c4944edbe9cabb32 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Mon, 26 Oct 2026 16:34:28 -0500 Subject: [PATCH 2/4] docs(omega): refresh omq pin to #838 head df23dc7b (omq 4cca33bc, 39 checks) Reran every section 1b example at df23dc7b: outputs byte-identical to the previous run; omq.om prefix V lines moved to 2394-2396. --- skills/omega-encoding/SKILL.md | 8 ++++---- skills/omega-harness/SKILL.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/skills/omega-encoding/SKILL.md b/skills/omega-encoding/SKILL.md index 059f290..d0a5bfa 100644 --- a/skills/omega-encoding/SKILL.md +++ b/skills/omega-encoding/SKILL.md @@ -244,10 +244,10 @@ Full host qualification is `sh seed/host/check.sh` (author-verified on 2026-10-2 Status: EXERCISED on host only (Linux AArch64, 2026-10-26) at [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838) head -`8cb5d2de821acd251387e359e782f3ee319d5ae6`, compiler `seed/out/omc` +`df23dc7b12ed6a26f8e0e84eb62c309ec4a02f17`, compiler `seed/out/omc` `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, `omq` sha256 -`6d5db676adb0ee3776097b9430f703e0f94d20246e37b810df44c7b2756e1ce8`: `sh seed/query/check.sh` printed -`SEED QUERY PASS 36 checks`. The PR is a draft and not merged, so `seed/query/` is absent from +`4cca33bce462d83354975ad8dcb0f6b7c18fb5edf72b4a6442aedc1cce3f0a4d`: `sh seed/query/check.sh` printed +`SEED QUERY PASS 39 checks`. The PR is a draft and not merged, so `seed/query/` is absent from main until it lands. Source of every rule below: `seed/query/README.md` at that head. `omq` (`seed/query/omq.om`, seeded Omega) reads a program with one hole `??` and prints one JSON @@ -322,7 +322,7 @@ rc=2 Prefix mode: `omq OMC prefix` reads requests on fd 0, each a 4-byte little-endian length then that many bytes of program prefix, and writes one line `V CODE` per request: whether the prefix can still -be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2390-2392: +be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2394-2396: 0 whole unit accepted, 1 prefix still completable, 2 dead, 3 compiler did not run. Requests `fn main to int` + `x = add`; the same with `x = add int 1 2` / `ret x` / `end`; and `fn main to int` + `abcdefghij = 1` gave: diff --git a/skills/omega-harness/SKILL.md b/skills/omega-harness/SKILL.md index e0c03af..ac0e18e 100644 --- a/skills/omega-harness/SKILL.md +++ b/skills/omega-harness/SKILL.md @@ -72,7 +72,7 @@ fi - Rebuilding with `sh seed/omega-from-seed.sh` rewrites tracked files, including `seed/out/omc.sha256`. Record the expected digest independently beforehand; the rewritten sidecar is not a trust anchor. A self-rebuild fixpoint proves consistency, not correctness and not diverse compilation. At source `ec07d25d5506d33567adbd4d9b518177b7933bad` on 2026-10-26, the seed gate reproduced `499236398aabc652e2dae27fe4bdc4c5db3d3726314356e0dbef23e3345803ec`. Main later used `befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d`. Main `91b3c9326919faf1491e29ae9276929e8349b8c7` now carries batch compiler `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54` (contracts, capacity and f32 returns); its host qualification is `evidence/BATCH-189ada82/README.md`. - Gate5 bookkeeping for any compiler change: since main `91b3c932`, `seed/omc/gate5.sh` writes current outputs to `build/seed/r5/evidence/`, never to immutable `evidence/SEED-0/omc/`. The living ledger `seed/omc/size-history.tsv` keeps the old history byte for byte, then one tab-separated row per compiler change (`rewrite change source_lines functions words sha256`). At `91b3c932` the last row is `RM2-capacity-f32` (`189ada82…`). Gate5 checks that the last row's sha256 equals the freshly built `omc`, and it never appends a row itself. So a compiler change adds exactly one row by hand, with values measured from the new build, in the same commit as the change. Never edit an older row to make the check pass, and never point the check back at `evidence/SEED-0`. - Run the changed path and compare exact expected bytes, status and state; a successful compile proves nothing about behavior. Also exercise the failure or refusal boundary most likely to regress. If that is impractical, say exactly what was not run. -- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at compiler `2c824805…`, `SEED QUERY PASS 36 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. +- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at head `df23dc7b`, compiler `2c824805…`, `SEED QUERY PASS 39 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. - Run a negative control: change an expected value or feed invalid input, and confirm the check fails. A verifier that also accepts its negative control has not established anything. - Qualification case files (`.cases` in omega-mv) are executed by a conductor, not run directly. More than one conductor exists under `seed/qualification/`, and picking the wrong one looks like a failing gate. Read the conductor's `main` for its argument count first. Observed 2026-10-25 with compiler `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`: `seed/qualification/om2/gate.om` takes four arguments (`omc pinhash casesfile scratchdir`) and summarises as `OM2GATE PASS cases=N pass=N fail=N invalid=N not_run=N`; `seed/qualification/security673/gate669.om` accepts at most one argument and exits 90 under a four-argument call. A usage status such as 90 from a conductor is INVALID setup, never a qualified refusal. - Executable contracts reuse that conductor. `seed/omc/contracts/contracts.cases` (44 rows) must end `OM2GATE PASS`. `seed/omc/contracts/mutant.cases` builds two broken compilers, one with enforcement disabled and one whose prover accepts any constant predicate, and must exit 1 with `OM2GATE FAIL cases=2 pass=0 fail=2 invalid=0 not_run=0` plus a `VERDICT … FAIL run exit=0 expected=109` line for each. For that suite, exit 1 with the exact verdict lines is the expected outcome; a pass means the negative control failed. `seed/host/check.sh` runs both. From a420ff3b8142ff2641903a3cefdb3986538e9699 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Mon, 26 Oct 2026 17:12:09 -0500 Subject: [PATCH 3/4] docs(omega): refresh omq to #838 head f1e4c617 (omq b7fcd8a4, 45 checks); note om2 query (pending #843) Reran every section 1b example at f1e4c617: outputs byte-identical. Scope typing and new limits from seed/query/README.md at that head; prefix V lines now omq.om 2518-2520. om2 query bullet from OMEGESE 9.13 at #843 head 3f6579b4; not run (pinned omc lacks it). Closes #51 --- skills/omega-encoding/SKILL.md | 30 +++++++++++++++++++++++------- skills/omega-harness/SKILL.md | 2 +- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/skills/omega-encoding/SKILL.md b/skills/omega-encoding/SKILL.md index d0a5bfa..891dd9a 100644 --- a/skills/omega-encoding/SKILL.md +++ b/skills/omega-encoding/SKILL.md @@ -244,10 +244,10 @@ Full host qualification is `sh seed/host/check.sh` (author-verified on 2026-10-2 Status: EXERCISED on host only (Linux AArch64, 2026-10-26) at [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838) head -`df23dc7b12ed6a26f8e0e84eb62c309ec4a02f17`, compiler `seed/out/omc` +`f1e4c6170d6bdae804c99a7e709b0857b5da7c91`, compiler `seed/out/omc` `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, `omq` sha256 -`4cca33bce462d83354975ad8dcb0f6b7c18fb5edf72b4a6442aedc1cce3f0a4d`: `sh seed/query/check.sh` printed -`SEED QUERY PASS 39 checks`. The PR is a draft and not merged, so `seed/query/` is absent from +`b7fcd8a43ef6c1dc5db2d5e3b2172635a4c567c19f0f2b122985e186ab88489b`: `sh seed/query/check.sh` printed +`SEED QUERY PASS 45 checks`. The PR is a draft and not merged, so `seed/query/` is absent from main until it lands. Source of every rule below: `seed/query/README.md` at that head. `omq` (`seed/query/omq.om`, seeded Omega) reads a program with one hole `??` and prints one JSON @@ -276,8 +276,10 @@ seed/out/omc < seed/query/omq.om > omq && chmod +x omq `VALID-UNPROVEN` (no hole and `omc` accepts: well formed only, contracts become run-time traps, no behaviour proven); `UNKNOWN` (the error lies after the hole, in the witness's added closing lines, and may depend on what the hole holds). -- `scope`: names visible at the hole, typed by probing `omc` (`T[]` for an array; `writable` when - `put` into it compiles). Names from closed blocks are absent. +- `scope`: names visible at the hole, typed by probing `omc` (`T[]` for an array; `struct` when + `get NAME F` compiles for a declared struct's first field; `writable` when `put` into it + compiles). Candidates are parameters, `=` bindings, `for` variables and bare `NAME VALUE` + bindings. Names from closed blocks are absent. - `fns`: function signatures. `next`: forms that compiled at the hole; `` is a slot for a value of type T. At a value hole `expect` lists the expected types. A user-function call appears with a concrete argument list. @@ -322,7 +324,7 @@ rc=2 Prefix mode: `omq OMC prefix` reads requests on fd 0, each a 4-byte little-endian length then that many bytes of program prefix, and writes one line `V CODE` per request: whether the prefix can still -be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2394-2396: +be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2518-2520: 0 whole unit accepted, 1 prefix still completable, 2 dead, 3 compiler did not run. Requests `fn main to int` + `x = add`; the same with `x = add int 1 2` / `ret x` / `end`; and `fn main to int` + `abcdefghij = 1` gave: @@ -336,7 +338,21 @@ be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.o Limits: one hole per request; a call with several array parameters gives every array parameter the same candidate rank, so a call needing two different arrays of one element type may be missing from `next`; struct-typed parameters are not filled; the text after the hole is not checked (it is the -part still to be written). Each answer costs tens to a few hundred compiles. +part still to be written); an abstract value appears in `scope` with an empty type; scope order is +first mention, so a loop variable reused after a closed loop of the same name can precede names +declared between the loops; a hole inside an `inline` function whose caller passes a `fresh` array +gives `check` code 27. Each answer costs tens to a few hundred compiles. + +- PENDING [omega-mv #843](https://github.com/aien-dev/omega-mv/pull/843) (draft, not merged, + `seed/out/omc` not reseeded; source OMEGESE 9.13 at head `3f6579b449a5a3a4458dc2bc443bd2a9e51773ff`): + stage 2 is `om2 query`, a lead line at byte 0 of the input to `omc` itself. Under it `omc` prints + one JSON line and never writes a program. No hole and the rest compiles: + `{"check":{"code":0,"status":"VALID-UNPROVEN"}}`, exit 0. Any `omc` error: + `{"check":{"code":C,"line":L,"status":"INVALID"}}`, exit 1 (code, line and status only, no + repairs). A statement `??` hole: `hole`, `scope`, `fns`, `obligations` in `omq`'s key shape, exit 0. + A value hole read as an unknown name: `"status":"UNKNOWN","why":"value holes: use omq (stage 1)"`, + exit 1. Without the lead line `??` keeps its old refusal. NOT_RUN here: the pinned `omc` above has + no `om2 query`, so no output is shown. ## 2. Program shape diff --git a/skills/omega-harness/SKILL.md b/skills/omega-harness/SKILL.md index ac0e18e..d3b3d7c 100644 --- a/skills/omega-harness/SKILL.md +++ b/skills/omega-harness/SKILL.md @@ -72,7 +72,7 @@ fi - Rebuilding with `sh seed/omega-from-seed.sh` rewrites tracked files, including `seed/out/omc.sha256`. Record the expected digest independently beforehand; the rewritten sidecar is not a trust anchor. A self-rebuild fixpoint proves consistency, not correctness and not diverse compilation. At source `ec07d25d5506d33567adbd4d9b518177b7933bad` on 2026-10-26, the seed gate reproduced `499236398aabc652e2dae27fe4bdc4c5db3d3726314356e0dbef23e3345803ec`. Main later used `befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d`. Main `91b3c9326919faf1491e29ae9276929e8349b8c7` now carries batch compiler `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54` (contracts, capacity and f32 returns); its host qualification is `evidence/BATCH-189ada82/README.md`. - Gate5 bookkeeping for any compiler change: since main `91b3c932`, `seed/omc/gate5.sh` writes current outputs to `build/seed/r5/evidence/`, never to immutable `evidence/SEED-0/omc/`. The living ledger `seed/omc/size-history.tsv` keeps the old history byte for byte, then one tab-separated row per compiler change (`rewrite change source_lines functions words sha256`). At `91b3c932` the last row is `RM2-capacity-f32` (`189ada82…`). Gate5 checks that the last row's sha256 equals the freshly built `omc`, and it never appends a row itself. So a compiler change adds exactly one row by hand, with values measured from the new build, in the same commit as the change. Never edit an older row to make the check pass, and never point the check back at `evidence/SEED-0`. - Run the changed path and compare exact expected bytes, status and state; a successful compile proves nothing about behavior. Also exercise the failure or refusal boundary most likely to regress. If that is impractical, say exactly what was not run. -- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at head `df23dc7b`, compiler `2c824805…`, `SEED QUERY PASS 39 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. +- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at head `f1e4c617`, compiler `2c824805…`, `SEED QUERY PASS 45 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. The compiler-side `om2 query` lead line (PENDING draft [omega-mv #843](https://github.com/aien-dev/omega-mv/pull/843)) is described in the same section. - Run a negative control: change an expected value or feed invalid input, and confirm the check fails. A verifier that also accepts its negative control has not established anything. - Qualification case files (`.cases` in omega-mv) are executed by a conductor, not run directly. More than one conductor exists under `seed/qualification/`, and picking the wrong one looks like a failing gate. Read the conductor's `main` for its argument count first. Observed 2026-10-25 with compiler `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`: `seed/qualification/om2/gate.om` takes four arguments (`omc pinhash casesfile scratchdir`) and summarises as `OM2GATE PASS cases=N pass=N fail=N invalid=N not_run=N`; `seed/qualification/security673/gate669.om` accepts at most one argument and exits 90 under a four-argument call. A usage status such as 90 from a conductor is INVALID setup, never a qualified refusal. - Executable contracts reuse that conductor. `seed/omc/contracts/contracts.cases` (44 rows) must end `OM2GATE PASS`. `seed/omc/contracts/mutant.cases` builds two broken compilers, one with enforcement disabled and one whose prover accepts any constant predicate, and must exit 1 with `OM2GATE FAIL cases=2 pass=0 fail=2 invalid=0 not_run=0` plus a `VERDICT … FAIL run exit=0 expected=109` line for each. For that suite, exit 1 with the exact verdict lines is the expected outcome; a pass means the negative control failed. `seed/host/check.sh` runs both. From a9994e9a87f840c91fc9a96d58d94c80211189af Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Mon, 26 Oct 2026 17:34:41 -0500 Subject: [PATCH 4/4] docs(omega): refresh omq to #838 head 3d8619e5 (omq 62a21f44, 45 checks); prefix dead open word rule Reran every section 1b example at 3d8619e5: outputs byte-identical. Prefix V lines now omq.om 2522-2524; dead-open-word rule from seed/query/README.md lines 94-99 at that head. --- skills/omega-encoding/SKILL.md | 11 +++++++---- skills/omega-harness/SKILL.md | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/skills/omega-encoding/SKILL.md b/skills/omega-encoding/SKILL.md index 891dd9a..2a0b5c4 100644 --- a/skills/omega-encoding/SKILL.md +++ b/skills/omega-encoding/SKILL.md @@ -244,9 +244,9 @@ Full host qualification is `sh seed/host/check.sh` (author-verified on 2026-10-2 Status: EXERCISED on host only (Linux AArch64, 2026-10-26) at [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838) head -`f1e4c6170d6bdae804c99a7e709b0857b5da7c91`, compiler `seed/out/omc` +`3d8619e58ecb4ef26b92fa9cf8fd12340617aae4`, compiler `seed/out/omc` `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, `omq` sha256 -`b7fcd8a43ef6c1dc5db2d5e3b2172635a4c567c19f0f2b122985e186ab88489b`: `sh seed/query/check.sh` printed +`62a21f4462e217f4efcc3eaf1495ca65a0b51a7d47cb1dac25e54a92e1877f9c`: `sh seed/query/check.sh` printed `SEED QUERY PASS 45 checks`. The PR is a draft and not merged, so `seed/query/` is absent from main until it lands. Source of every rule below: `seed/query/README.md` at that head. @@ -324,8 +324,11 @@ rc=2 Prefix mode: `omq OMC prefix` reads requests on fd 0, each a 4-byte little-endian length then that many bytes of program prefix, and writes one line `V CODE` per request: whether the prefix can still -be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2518-2520: -0 whole unit accepted, 1 prefix still completable, 2 dead, 3 compiler did not run. Requests +be completed to a program `omc` accepts, and the `omc` exit code. `V` per `omq.om` lines 2522-2524: +0 whole unit accepted, 1 prefix still completable, 2 dead, 3 compiler did not run. An open word at +the prefix end longer than any word `omc` accepts (a name over 8 bytes, 63 after omega-mv #837; a +number over 20 bytes) is answered `2`; note lines, text literals and prefixes of `invariant` are +exempt (README lines 94-99 at that head). Requests `fn main to int` + `x = add`; the same with `x = add int 1 2` / `ret x` / `end`; and `fn main to int` + `abcdefghij = 1` gave: diff --git a/skills/omega-harness/SKILL.md b/skills/omega-harness/SKILL.md index d3b3d7c..f42148a 100644 --- a/skills/omega-harness/SKILL.md +++ b/skills/omega-harness/SKILL.md @@ -72,7 +72,7 @@ fi - Rebuilding with `sh seed/omega-from-seed.sh` rewrites tracked files, including `seed/out/omc.sha256`. Record the expected digest independently beforehand; the rewritten sidecar is not a trust anchor. A self-rebuild fixpoint proves consistency, not correctness and not diverse compilation. At source `ec07d25d5506d33567adbd4d9b518177b7933bad` on 2026-10-26, the seed gate reproduced `499236398aabc652e2dae27fe4bdc4c5db3d3726314356e0dbef23e3345803ec`. Main later used `befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d`. Main `91b3c9326919faf1491e29ae9276929e8349b8c7` now carries batch compiler `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54` (contracts, capacity and f32 returns); its host qualification is `evidence/BATCH-189ada82/README.md`. - Gate5 bookkeeping for any compiler change: since main `91b3c932`, `seed/omc/gate5.sh` writes current outputs to `build/seed/r5/evidence/`, never to immutable `evidence/SEED-0/omc/`. The living ledger `seed/omc/size-history.tsv` keeps the old history byte for byte, then one tab-separated row per compiler change (`rewrite change source_lines functions words sha256`). At `91b3c932` the last row is `RM2-capacity-f32` (`189ada82…`). Gate5 checks that the last row's sha256 equals the freshly built `omc`, and it never appends a row itself. So a compiler change adds exactly one row by hand, with values measured from the new build, in the same commit as the change. Never edit an older row to make the check pass, and never point the check back at `evidence/SEED-0`. - Run the changed path and compare exact expected bytes, status and state; a successful compile proves nothing about behavior. Also exercise the failure or refusal boundary most likely to regress. If that is impractical, say exactly what was not run. -- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at head `f1e4c617`, compiler `2c824805…`, `SEED QUERY PASS 45 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. The compiler-side `om2 query` lead line (PENDING draft [omega-mv #843](https://github.com/aien-dev/omega-mv/pull/843)) is described in the same section. +- While writing `.om`, ask the compiler what fits instead of guessing: `omq` (`omega-encoding` section 1b; PENDING in draft [omega-mv #838](https://github.com/aien-dev/omega-mv/pull/838), host-EXERCISED at head `3d8619e5`, compiler `2c824805…`, `SEED QUERY PASS 45 checks`) takes a program with one `??` hole and prints the names in scope, the forms `omc` accepted there and the open obligations. Its `INCOMPLETE` or `VALID-UNPROVEN` is a compile-level answer, never behaviour evidence: still compile, run and control the finished program. The compiler-side `om2 query` lead line (PENDING draft [omega-mv #843](https://github.com/aien-dev/omega-mv/pull/843)) is described in the same section. - Run a negative control: change an expected value or feed invalid input, and confirm the check fails. A verifier that also accepts its negative control has not established anything. - Qualification case files (`.cases` in omega-mv) are executed by a conductor, not run directly. More than one conductor exists under `seed/qualification/`, and picking the wrong one looks like a failing gate. Read the conductor's `main` for its argument count first. Observed 2026-10-25 with compiler `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`: `seed/qualification/om2/gate.om` takes four arguments (`omc pinhash casesfile scratchdir`) and summarises as `OM2GATE PASS cases=N pass=N fail=N invalid=N not_run=N`; `seed/qualification/security673/gate669.om` accepts at most one argument and exits 90 under a four-argument call. A usage status such as 90 from a conductor is INVALID setup, never a qualified refusal. - Executable contracts reuse that conductor. `seed/omc/contracts/contracts.cases` (44 rows) must end `OM2GATE PASS`. `seed/omc/contracts/mutant.cases` builds two broken compilers, one with enforcement disabled and one whose prover accepts any constant predicate, and must exit 1 with `OM2GATE FAIL cases=2 pass=0 fail=2 invalid=0 not_run=0` plus a `VERDICT … FAIL run exit=0 expected=109` line for each. For that suite, exit 1 with the exact verdict lines is the expected outcome; a pass means the negative control failed. `seed/host/check.sh` runs both.