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 / om / sha256 / om2-evidence / CUTOVER-PLAN.txt

53 lines · 4359 bytes Raw Blame History
1L838 cutover plan: om/sha256/sha256-om2.om replaces src/sha256.c (#747/#748)
2==========================================================================
3Status: PLAN. Nothing below is applied. src/sha256.c stays until L836 qualifies the OM-2 unit.
4
5Inputs (pins to fill when they exist)
6 omc OM-2 compiler born by seed/omega-from-seed.sh from the merged compiler-s1..s4. Current head
7 compiler-s4 @ f6a6492fd, sha256 49923639…803ec (born here); final pin after merge.
8 bridge omega-bridge commit whose generator emits ABI v2, omega_api.h and omega2_ident (L837).
9 Candidate: feat/slice-abi @ 3bb8b8a (draft PR #15, stacked on #14; qualified by AbiLane on
10 S4 code; generated the unit's binding here, s4/README.txt). tools/native takes OMEGA_NATIVE_OMC2=<S4 omc>; unit name sha256_om2, so the
11 identity is omega2_ident_sha256_om2(). Layout param = one uint8_t pointer, out = one
12 pointer, view = (ptr, element count); an edit range overlapping another argument is
13 status 32 (audit: no update passes data inside its own ctx).
14 unit om/sha256/sha256-om2.om (sha256 of its exact bytes, recorded by the generator)
15
16Preconditions (each is a NOT_RUN item until done)
17 P1 The unit compiles under the OM-2 omc; om2 diag lists the kept checks (section 4, 8). DONE under
18 S4 f6a6492fd (author's run, s4/README.txt).
19 P2 L836 qualifies it: FIPS vectors, boundary lengths and splits, mutants, trace equivalence.
20 P3 (author's run PASS under S4, s4/receipts.out; L836 to re-run) Receipts (spec section 7, erratum E3): init/update/final after a final equals a fresh context;
21 hash(n) equals init/update(n)/final; hash(d,32,d); copy of a live context after k updates,
22 both continued, equal digests; update of length 0; one update of >= 2^32 bytes.
23 P4 C2: om/blake3/b3unit.om (OM-1) gives a byte-identical v1 binding under the new omc.
24 P5 Paired interleaved measurement against the baseline in baseline-acb3f15c/ (same core, same
25 flags). Slower but correct is reported, not hidden.
26
27Cutover commit (one commit, after P1-P5)
28 1. om/units.sh: the OMC_PIN= line is CompilerLane's (L834): each compiler-slice commit sets it,
29 and this branch takes that line unchanged when it rebases onto a slice. L838 sets NATIVE_PIN to
30 the new generator; UNITS becomes
31 "om/sha256/sha256-om2.om om/blake3/b3unit.om"; --check also refuses a stale unit, compiler or
32 profile: for the OM-2 unit it compares omega2_ident_sha256_om2() fields (src sha256, omc pin,
33 profile OM-2) with the recomputed ones; for the OM-1 unit the harness-side record (erratum E1).
34 2. Regenerate src/omega_om_units.inc with om/units.sh; install the generated omega_api.h (L837)
35 which declares sha256_ctx (layout shactx, `note bridge c-type`), SHA256_DIGEST_SIZE/BLOCK_SIZE
36 and static inline sha256_init/update/final/hash calling omega2_sha256_* (abort on status != 0).
37 3. src/sha256.h becomes the include of the generated header only (or is replaced by it); it holds
38 no handwritten logic. The 104-byte layout is checked by the generator's _Static_asserts and by an
39 offsetof oracle outside the closure (section 5).
40 4. Delete src/sha256.c. The generated bindings move to a generated src/omega_om_units.c
41 (erratum E5 (2)), because today src/sha256.c is the only file that includes
42 omega_om_units.inc and src/omega_blake3.c links against omega_omb3 from it. Every build line
43 naming src/sha256.c (Makefile 61, mk/*.mk 37 files, shell recipes in tests/, tools/, seed/rung3,
44 seed/rung4, research/atemporal, om/*/parity) is changed to src/omega_om_units.c. L838 is the
45 single writer of those lines, in the cutover commit only (E5 (2)).
46 5. Makefile:657 RX_CX_FS_ALLOWED: sha256_* -> omega2_sha256_* (erratum E3 (3)).
47 6. om/sha256/sha256.om (OM-1, entry omsha) and its v1 binding are removed; om/sha256/parity/run.sh
48 and README are rewritten for the v2 path; the ARM64 workflow path filter
49 (.github/workflows/om-units-arm64.yml, other owner) follows.
50 7. Gates: tests/gates/run.sh om-units (om/units.sh --check), parity against the historical C
51 retrieved by git show a647b6a9 (outside the closure), make all, make test, freestanding rule.
52
53Rollback: revert the cutover commit; src/sha256.c and the v1 unit return from history.