interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / docs / turing / TURING_W0_PROPOSAL.md

266 lines · 24410 bytes Raw Blame History Source

TURING Wave 0: proposal (A-K), revision 2 (+ K.7 verdict and reframe, 2026-09-29)

Update 2026-09-30: R16 is CLOSED (omega#112, 3dd5eaa, all gates G1 to G8 PASS) and the src/runtime/ edit freeze is LIFTED (aien-architecture #70, e89ba94). Statements below that the runtime is frozen "until R16" describe the state when this was written.

Inputs: TURING_CURRENT_STATE.md (live audit, omega 4b217aa, aienos 603c91d), TURING_PRIOR_ART_MATRIX.md (30 sources opened), polyglot review def197d (fixes in progress on feat/polyglot-0), Fable review of revision 1 (9 REQUIRED items, adopted in full; they override revision 1 wherever the two differ). Standing rules applied: C (+asm), no Rust, no Python, no outside deps; OSC-0B identity freeze (omega#76) open; src/runtime/ frozen until R16 closes (R16 at W5, omega#68 draft).

Revision log (revision 1 -> 2)

Fable itemWhere it landed
1. Name the one contract digestK.1: no existing digest names the Omega-X contract; V0 defines a PROVISIONAL contract_digest (not an Omega semantic id) and shows all 10 algebra realizations carry it
2. spec_id stable across rebuildF: build_digest, git_commit and toolchain moved from the spec to the evidence record
3. Canonical encoding + supersedesK.5: every record uses the OMG0 layout and the repo SHA-256 with a domain prefix; decisions carry supersedes
4. No dependency on feat/polyglot-0F, I, J: Wave 1 adapts oma_rz_impl only (10 candidates); the omx_candidate adapter follows that branch's merge (28 later)
5. Post hoc, outside the runtimeD, F: Wave 1 records are built from existing receipts by new code under src/turing/; no selector in src/runtime writes records yet
6. Pre-register the kill testK.4 (thresholds, justification, verdict rule); K.2 (Field selection rule in one paragraph)
7. Exact control armK.3
8. Split HH1 (selectors, observation off, runnable now) and H2 (observation levels, blocked on the runtime freeze); budgets absolute vs ARGUS-off
9. Tiers are PROPOSEDF: tier stored as text plus the ADR revision it came from
Optional: retire the plane nameThe earlier name for the observation plane is gone from code and from this doc; it is "observation levels on ARGUS"
Optional: cpu frequency + quiet flagF: both are evidence fields; receipts that did not record them say "not recorded"
Optional: seeded shuffleH1: interleaving order comes from a seeded shuffle whose seed is written into the run receipt

A. Live implementation audit (summary; detail in TURING_CURRENT_STATE.md)

B. Duplication / conflict report

ProposedWould duplicateDecision
Observation planeARGUS + causal crumbsNew ARGUS event class, not a new plane. Name in code and docs: "observation levels on ARGUS"
Field selectorrx_costmodel, oma_select, polyglot_explainOne decision-record format all three will write (after the runtime freeze lifts for rx_costmodel). The Wave 1 kill-test arm (tie rule) FAILED K.4 and is retired (K.7); the Field keeps no ranking rule of its own, it records choices made by the control arm's rule
Turing Fabricrx_semcomm, rx_capq "Fabric", aienos Personal FabricDeferred to Wave 5; built as rx_semcomm dialects; code name "dialect", never "fabric"
Content-addressed storereceipts, Cortex, plan cache, J-Space chains, Store v1None. Field records are digest-named, beside existing receipts
ExplanationVisor why, polyglot_explainExtend Visor to read decision records (Wave 8)
BuildIdentityTRUST-1 BuildIdentityV1, OSC-0B II.9Reference whatever lands; V0 stores git commit + build digest as plain evidence fields

Conflicts with brief: Rust and Python experiments (rejected by standing rule); models as Fabric participants imply outside runtimes (deferred); new semantic ids (blocked by OSC-0B; V0 uses a PROVISIONAL contract digest, K.1).

C. Prior-art kill test

Every individual mechanism exists: content addressing (Git, Unison), provenance (SLSA, Atomic), multi-implementation + autotuning (PetaBricks, SPIRAL, StarPU, Ansor/MetaSchedule), accuracy-aware selection (ApproxHPVM), heterogeneous dispatch (HPVM, IREE, IRIS-ORNL, TVM), analog compilers (Arco, Legno, DIANA/HTVM), ternary kernels (BitNet, T-MAC), tracing (Dapper, LTTng, eBPF), sub-text model communication (CIPHER, Cache-to-Cache, LatentMAS). Selection itself is NOT novel: the Wave 1 kill test (K.4, K.6) FAILED on selection quality, and the Field now ranks with the control arm's rule (K.7). Survives only as candidate novelty: (1) every selection wrapped in an immutable decision record citing receipts that anyone can re-hash and replay; (2) number system as a contract-verified axis next to language and hardware; (3) compact dialects gated by round-trip (later). Kill criterion: pre-registered in K.4; verdict K.7.

D. Responsibility boundaries

Omega = meaning + contract. Field = records linking contract -> realization specs -> evidence -> decisions (data, not a subsystem). Selection = existing selectors, all writing Field decision records once they can (rx_costmodel only after the runtime freeze lifts). Wave 1 records are produced outside the runtime, post hoc, from existing receipts, by new code under src/turing/; nothing in src/runtime, src/algebra or src/polyglot changes. ARGUS = observation. Visor = explanation from records. J-Space = exploring candidates. Cortex = learned summaries only, never the store. Compute Fabric = placement (unchanged). Dialects (later) = rx_semcomm. AEGIS/Effect Broker untouched.

E. First semantic operation

Omega-X exact ternary GEMV (spec/mixed-algebra-ma2.md; spec/polyglot-0.md on the branch). Exact contract. Wave 1: the 10 algebra candidates. Later: +18 language candidates. Known workload-dependent winner (int8 when W fits L2, 2-bit ternary DRAM-bound), which turing-field must reproduce from stored evidence alone.

F. Field V0 data model (C, new dir src/turing/, no runtime edits)

G. Observation levels on ARGUS (needs a src/runtime edit: NOT in Wave 1)

Levels map onto ARGUS: HOT = existing counters; OBSERVED = new ARGUS class REALIZATION (one event per selection or promotion, never per kernel call: carries decision_id + spec_id + 3 counters); FORENSIC = existing full events + decision record dump. Required (never drop): promotions, effects, commits (already ARGUS critical). Reader: ARGUS ring -> Field evidence file (async, off hot path). Budgets are absolute against ARGUS off, not stacked on today's ARGUS cost (which is already +3.9% against a 2% target): HOT <= 0.5% median vs ARGUS off on Omega-X; OBSERVED <= 2% vs ARGUS off. If ARGUS itself already exceeds a budget, the level fails; that is reported, not waived.

H. Experiments

I. Agent wave 1 (non-overlapping); manifest in TURING_AGENT_WAVE_1.md

J. Gates

K. Wave 1 specification

K.1 Contract digest (Fable item 1)

Searched on omega main 4b217aa: src/algebra (oma_rz_impl registry, realize_common.h), spec/mixed-algebra-ma2.md, spec/mixed-algebra-reference.md, evidence/MIXED_ALGEBRA/*.json. No digest names the Omega-X contract. The contract exists only as C comments plus oma_rz_oracle; receipts carry an operation text string whose wording differs between the bench receipts and the select receipt, so it cannot serve as identity. Program id v2 cannot express a GEMV, and OSC-0B (omega PR #76) freezes new Omega semantic ids.

Decision: V0 defines contract_digest = SHA-256("turing.contract.v0.provisional" 0x00 || OMG0 bytes of the contract record: name, statement, exactness, overflow bound, oracle, source, max_n, and a status attribute saying PROVISIONAL). Value: 75772afe8a98f73064f2933d76bc58f7bfe5b9353eb40b703e173b4cd3f22b5f. It is **PROVISIONAL and not an Omega semantic id**: the domain prefix makes it differ from any SHA-256 over OMG0 bytes, it is never written into an Omega object, and it is replaced by whatever id OSC-0B assigns to Omega-X. All 10 oma_rz_impl entries are registered against the single contract in realize_common.h (each exact = 1); test-turing checks that all 10 spec records carry this digest.

K.2 Field selection rule (Fable item 6)

Superseded 2026-09-29 by K.7. This paragraph describes the retired v0 rule that the kill test failed; it is kept unchanged as the pre-registered text. The live rule is in K.7.

The Field selector considers every spec in the store and records a reason code for each: CONTRACT_MISMATCH if the spec names another contract digest, NOT_EXACT, MAX_N if the query's n exceeds the spec's limit; it then keeps only evidence rows whose receipt file still hashes to the recorded digest (re-hashed at decision time; otherwise RECEIPT_UNVERIFIED), picks the measured cell nearest the query (|log2 n ratio| + |log2 m ratio| + 4 x sparsity difference, so sparsity counts), drops candidates with an unverified run (UNVERIFIED_RUN), a forced contention block (CONTENTION_FORCED) or a tier outside {E2, E3, E4} (TIER), ranks the rest by mean per-call cost over receipts, computes a noise band (the larger of within-run and across-run spread of the cheapest and the runner-up), and when more than one candidate lies inside the band resolves the TIE by ADR 0019 section 9.1 (incumbent, else the reference R1_plain, else the cheapest). The decision cites every evidence digest it used. How it differs from the control arm: it filters on contract, exactness, receipt integrity, verification and tier with reason codes; it is sparsity-aware through the nearest-cell metric; it refuses to separate candidates inside the noise band and prefers the reference there; it cites evidence. Plainly: on the stored MA-3 data the ranking step is the same "cheapest measured mean" that the control arm uses. Every filter passes every candidate on the stored grid, so apart from the tie rule the Field selector's extra content is the audit trail. The only place the rules can choose differently on this data is the tie rule, and K.6 shows it choosing worse there.

K.3 Control arm (Fable item 7)

StarPU-style history-based model, in C (src/turing/history_selector.c). State: per (spec_id, footprint bucket) a count and running mean of observed per-call cost. Footprint = the data sizes (n, m) plus the pack mode, as StarPU hashes a codelet's buffer sizes; sparsity changes values, not sizes, so it is not in the footprint. Eligible = specs that can execute the query (n <= max_n). Cold start: while any eligible spec has zero observations in the bucket, choose the next one in a round-robin order that is a seeded Fisher-Yates shuffle of the spec indices (splitmix64, seed recorded). After that: the minimum running mean (lowest index on an exact tie). No noise band, no tie rule, no receipt citations. Warm mode (the K.4 comparison) loads every stored evidence row as an observation, so both arms see the same information.

K.4 Kill test, pre-registered (Fable item 6)

Shapes (sparsity 0.30): S1 4096 x 64 (256 KiB int8 W, L2-fit), S2 16384 x 64 (1 MiB, L2 edge), S3 4096 x 4096 (16 MiB, L3/DRAM), S4 16384 x 4096 (64 MiB, DRAM-bound); both pack modes (once amortized, per call): 8 decisions per run.

K.5 Canonical bytes and ordering (Fable item 3)

Every record (contract, spec, evidence, decision) is laid out as an OMG0 object by the existing omega_canonical_encode (src/omega_canonical.c: magic OMG0, version, kind, attributes sorted by key with u16 big-endian lengths, relations sorted by kind then target, constraints, payload). Values are text; integers in decimal; fractions as parts per million. Decision candidates are relations DEPENDS_ON(spec_id). Cited evidence (since K.7): attribute cite_count plus one DERIVED_FROM relation to the cite-set digest = SHA-256("turing.citeset.v0" 0x00 || the cited evidence digests sorted bytewise), so a record can cite a whole footprint (80 rows on the stored grid) within the OMG0 limit of 64 relations; decision domain turing.decision.v1. (Wave 1 v0 used one DERIVED_FROM per evidence digest.) Digest = SHA-256(domain || 0x00 || OMG0 bytes) using the repo's own src/sha256.c; domains turing.contract.v0.provisional, turing.spec.v0, turing.evidence.v0, turing.decision.v1, turing.citeset.v0. The prefix separates Field digests from Omega semantic ids (plain SHA-256 of OMG0 bytes). Ordering: a decision names the one decision it replaces in supersedes; the current decision for a (contract, query) is the one nothing supersedes. Two decisions superseding the same parent is a recorded fork, resolved only by a later decision that supersedes one of them.

K.6 Wave 1 result on stored data (dry run of K.4; H1 is the binding run)

Recorded FAIL, kept permanently. The retired v0 selector (src/turing/field_select_v0_retired.c) still reproduces every number below in make test-turing and turing-field. Verdict and decision: K.7.

Built post hoc from evidence/MIXED_ALGEBRA/ma3_bench_run{1,2}.json (10 specs, 720 evidence rows, 36 cells). Winners from stored evidence alone (pack once): S1 R1_smmla, S2 R1_sdot_il (TIE, cheapest), S3 R2c_crumb, S4 R2c_crumb. The int8 to 2-bit flip between L2-fit and DRAM-bound shapes is reproduced.

ScoringField mean / max regretControl mean / max regretField receipts verifyControl
S1-S4 x 2 pack, in-sample3.58% / 25.51%0.01% / 0.07%8/80/8 (cites none)
S1-S4 x 2 pack, leave-one-cell-out3.65% / 25.51%0.01% / 0.07%8/80/8
pack once only (S1-S4)0.00% / 0.00%0.00% / 0.00%4/40/4
per call only (S1-S4)7.16% / 25.51%0.02% / 0.07%4/40/4
all 36 cells x 2 pack, in-sample2.15% / 25.81%0.03% / 1.04%72/720/72
all 36 cells x 2 pack, leave-one-cell-out2.18% / 25.81%0.03% / 1.04%72/720/72
cold online, 720 queries (control learns)2.15% / 25.81%104.50% / 9398.91%n/an/a

Dry-run verdict: Q1 FAIL, Q2 PASS -> FAIL. All Field regret comes from the per-call mode, where pack-cost noise widens the band (32 of 36 per-call cells are TIEs, bands 1.0% to 27.5%, matching MA-2's 32 per-call ties) and the ADR 0019 tie rule picks the reference R1_plain inside it. With packing amortized the two selectors are identical in quality (35 of 36 cells same pick, both at the oracle). The cold online row compares different information (stored evidence vs learning from scratch) and is not part of the verdict. Before H1, either the rule stays and the kill test is expected to fail, or a rule change is registered here first; thresholds do not move.

K.7 Verdict and reframe (2026-09-29)

Verdict: FAIL, kept permanently. The pre-registered kill test (K.4) failed on selection quality and passed on replayability. Q1: the Field v0 selector's regret was 3.58% mean and 25.51% max on S1-S4 x 2 pack modes (in-sample; 3.65% / 25.51% leave-one-cell-out) against the control arm's 0.01% / 0.07%, far outside the pre-registered limits (mean within 2 points of control, max at most 10%). Q2: 72 of 72 Field decisions cited receipts that re-hash and verify. Thresholds are unchanged and the K.6 table stands. The v0 rule stays in the tree only as src/turing/field_select_v0_retired.c, and make test-turing asserts that it still reproduces these numbers and the FAIL.

Cause. All of the v0 regret came from the per-call pack mode. There the packing cost is noisy, so the noise band was wide (1.0% to 27.5%; 32 of 36 per-call cells were TIEs), and the ADR 0019 section 9.1 tie rule then preferred the reference R1_plain inside that band even when a measurably cheaper candidate existed. With packing amortized, v0 and the control arm were equally good.

Decision (Option 1; Drake delegated the call to the orchestrator, 2026-09-29). Turing is the record-keeping layer, not a new selector:

Evidence for the reframe (test-turing). On all 36 stored cells x 2 pack modes, in-sample and leave-one-cell-out (144 decisions), Field v1 and the control arm pick the same realization every time, Field v1 regret equals the control arm's exactly (0.03% mean / 1.04% max over the 72 cells), and every Field v1 decision verifies against its receipts. This is not a new kill-test verdict and not a quality claim: v1 cannot beat the control arm because it is the control arm's rule.

Claims after the reframe. Selection is not novel. Candidate novelty is limited to: (1) receipt-cited, replayable, immutable decision records around an ordinary selector; (2) the number system as a contract-verified axis next to language and hardware; (3) compact round-trip dialects (later, Wave 5). H1 still runs, now to measure the control rule live and to check that every live decision record verifies; it does not re-score Q1 with the v1 rule.