Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/patches/82107a1bc7b56d7c # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers ## research(SEM-1): proposed semantic-codebook contract and seeded .om dispatch smoke closed `82107a1bc7b56d7c` #724 · opened 2026-10-25 01:54 UTC · closed 2026-10-30 18:06 UTC Imported from GitHub aien-dev/omega-mv#724, by drakestapleton Base `62d1d0d668f897386a0e311374f8dbcc5c32dde8` · Head `f906de859828d215715737c20e09b115faf1040e` drakestapleton wrote on 2026-10-25 01:54 UTC Refs #721 and aien-dev/aien-architecture-mv#315. This is the first bounded implementation start, not complete canonical meaning, code-size compression, trusted dictionary admission, or performance improvement. ## Added - `spec/semantic-codebook-v0.md`: PROPOSED contract defining full 256-bit canonical meaning vs short local index, true dictionary/handshake charges, independent admissibility, effect/precision/generation refusals and distinct program-vs-model compression. - `examples/semantic-codebook/codebook-v0.txt`: immutable synthetic 3-entry byte fixture. External SHA256: `a4d36c23819c865d1d3ae271508fee7e38c1919f62852821ac19f80c3714b0f3`. - `examples/semantic-codebook/dispatch-v0.om`: tiny seeded native .om program with three pure u8 operations, parameter binding, four-limb synthetic root/epoch check, named u16 refusals and nine selftest branches. This source does not independently authenticate its caller-provided digest and is not safe for remote/effectful dispatch. - `examples/semantic-codebook/README.md`: frozen nine known-answer/refusal vectors, exact source-pinned AArch64 native build/run instructions and explicit not-run status. ## Verification so far - GitHub contents API readback: all four files present on exactly this branch (4/4), with source visible. - Synthetic fixture SHA256 and 4 little-endian 64-bit limb constants separately calculated by standard Python hashlib during preparation; no credential or model data. - NOT_RUN: actual seed-omc compilation, AArch64 native execution, independent verifier, mutation gate, security, full semantic canonicalization, release/GB10 benchmark. Author environment has no Spark access, qemu-aarch64, or network to clone the repo; no successful code execution is claimed. The .om source may need a compiler-owner syntax fix when run. - There are no changes to main, compiler, model server, runtime, AEGIS, GPU device, production setup or repository visibility. ## Review/next steps - Code/contract review by Omega #621/#625/#623/#651 owners. Resolve who freezes the canonical full-ID and type/effect result ABI. This smoke uses u8-typed outputs with a u16 tagged refusal, not a general result ABI. - From isolated source-pinned AArch64 worktree, execute `sh seed/omega-from-seed.sh`, compile `examples/semantic-codebook/dispatch-v0.om` with `seed/out/omc`, then execute and record actual exit, stdout/stderr plus binary/seed/source SHA256. Do not bypass a compiler bug with a foreign runtime. - Add independent full-ID, authenticated dictionary, stale index/capability and cross-version negative gates with exact source/receipt. Do not merge a user-provided digest check as a security boundary. - Actual executable factoring belongs to new Omega #722 ; parameterized discovery to #723 ; runtime reuse to existing #651; model/GB10 work separate. Renda/merge desk controls merge and release. No `Closes` reference: this PR is an intentionally incomplete, research-only first slice. drakestapleton wrote on 2026-10-25 02:23 UTC SEM-0 extension from operator, 2026-10-24: Architecture #315 now requires complete retirement of first-party legacy C and handwritten hex in addition to functionality. Architecture #300 controls full inventory and deletion; #316 zero-legacy release check; Omega #725 seed hex, #726 compiler/runtime C cutover. This draft PR is only an additive seeded .om smoke and is not itself source-retirement evidence, an independently authenticated semantic dictionary, or a native AArch64 PASS. Old implementations are removed only after verified .om replacements, consumer tests and rollback. Its current independent native gate remains NOT_RUN. ### Fetch it A git bundle of the pull request's head, 14619 bytes. ``` curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/82107a1bc7b56d7c.bundle -o 82107a1bc7b56d7c.bundle git fetch 82107a1bc7b56d7c.bundle refs/pull/724/head ``` Raw bundle · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/omega-mv 724 f906de859828d215715737c20e09b115faf1040e ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":724,"url":"https://github.com/aien-dev/omega-mv/pull/724","export_sha256":"7319147b350ad908bf0b731068ec3be7b8dee848041dc862f71455e8e4680140","imported_utc":"2026-11-18T16:35:45Z"} ``` ### Changes ``` diff --git a/.crumb b/.crumb index f3e51fe46..4971adb23 100644 --- a/.crumb +++ b/.crumb @@ -71,8 +71,8 @@ "purpose": "Directory research. Purpose not yet described by a human." }, { - "digest": "f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986", - "last_commit": "a8a6a3d3c", + "digest": "ead1bc5e1585ada2d761709ead0c4e7ec8dae28e3832fc9ec9690001e81a5831", + "last_commit": "f2b6458bf", "name": "spec", "purpose": "Directory spec. Purpose not yet described by a human." }, @@ -84,26 +84,26 @@ }, { "digest": "5395ff8ff9afceebe8e453788f80a3064b831513cc4cb92fd55869115e06b874", - "last_commit": "a8a6a3d3c", + "last_commit": "dcccc0211", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, { "digest": "308db0e6cf45c0a48f01f5f5f228450f191389de68006915b9ecf9c65b9a2e29", - "last_commit": "a8a6a3d3c", + "last_commit": "a50c3bd41", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:07bf1706dcffbad66c0353871ff67a6749055da03cee8d8ebdf9a4c91e36bddc", - "compiled_at": "2026-10-30T12:31:50Z", + "children_root": "sha256:c8049ec676479e217a7aa5601e27eb5f304dd236ca25720692655fb2f2508485", + "compiled_at": "2026-10-30T16:29:00Z", "compiler": "crumb-compile/1", - "digest": "sha256:904fca8c0e0cf3e3a5e5adb73393e01c7018b920bb542d289904240f70e400d6", + "digest": "sha256:44b402cfa7000c9d4b1d501c408cf4bfd56a090e578b732be51294fed699556a", "evidence_files": 12622, "evidence_root": "sha256:b1a08e2ce56e6feada0d8a31f06fbd7adee57adc1c1ad8dec220293ee5d439f9", - "files": 17849, - "generated_at_commit": "52a82f392fa513ebbc2d9d719a0f14c385289b06", - "source_tree": "sha256:75458da6553a0ee5ea2af95f46afb658e8a3f6e53cca6e3b4b9874035f78c2ed" + "files": 17853, + "generated_at_commit": "6169cef1ee22682419589cb923b3afb36dc13d75", + "source_tree": "sha256:4449e156fa91c847a3e5b8f38be3dd88ab473ba151424715c2efb285c4cb0b90" }, "owner_lane": "", "provenance": { 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/spec/.crumb b/spec/.crumb index a226ce192..d5b17c4b6 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-30T16:29:00Z", "compiler": "crumb-compile/1", - "digest": "sha256:f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986", + "digest": "sha256:ead1bc5e1585ada2d761709ead0c4e7ec8dae28e3832fc9ec9690001e81a5831", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 63, - "generated_at_commit": "a8a6a3d3c47ce797430f045edc5eae11594ba36d", - "source_tree": "sha256:4cb3bb1977c84caacc34366f814d6fe403a2eda7b89b916948d29541675c59bb" + "files": 64, + "generated_at_commit": "6169cef1ee22682419589cb923b3afb36dc13d75", + "source_tree": "sha256:4e11046a582698ce5745405eaacab3777a73e1eb743873c94c8906664f068f6c" }, "owner_lane": "", "provenance": { 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 ```