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 / tests / run_m7_gates.sh

138 lines · 5425 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# tests/run_m7_gates.sh -- Master Qualification Gate Runner for Milestone 7 (OMEGA_VERIFY)
18set -eu
19
20OMEGA_ROOT=$(cd "$(dirname "$0")/.." && pwd -P)
21TOOL="$OMEGA_ROOT/${OUT_DIR:-build}/omegatool"
22EVIDENCE_DIR="$OMEGA_ROOT/evidence"
23RECEIPT="$EVIDENCE_DIR/omega_verify_qualification_receipt.json"
24
25echo "================================================================================"
26echo " AIEN OMEGA SUBSTRATE — MILESTONE 7: OMEGA_VERIFY QUALIFICATION"
27echo "================================================================================"
28echo "Timestamp: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
29echo "Host: $(uname -s) $(uname -m)"
30echo ""
31
32# Step 1: Clean build
33echo "[*] Step 1: Rebuilding OMEGA substrate and omegatool from source..."
34make -C "$OMEGA_ROOT" clean
35make -C "$OMEGA_ROOT"
36echo " Build OK."
37echo ""
38
39# Step 2: Run all 10 M7 qualification gates
40echo "[*] Step 2: Evaluating 10 canonical M7 qualification gates..."
41"$TOOL" --run-m7-gates
42echo ""
43
44# Step 3: Run Demonstration (Trusted Verification Ladder V0 -> V1 -> V2)
45echo "[*] Step 3: Running Demonstration (Trusted Verification Ladder V0 -> V1 -> V2)..."
46"$TOOL" --reference-demonstrate-verify
47echo ""
48
49# Step 4: Regression checks (M4, M5, M6)
50echo "[*] Step 4: Running regression checks across M4, M5, and M6..."
51"$TOOL" --run-gates
52"$TOOL" --run-m5-gates
53"$TOOL" --run-m6-gates
54echo " Regression checks OK: all M4, M5, and M6 gates passed."
55echo ""
56
57# Step 5: Dump and hash test vectors and binaries
58echo "[*] Step 5: Computing artifact digests..."
59mkdir -p "$EVIDENCE_DIR"
60sha256sum "$OMEGA_ROOT/src/omega_verify."* \
61 "$OMEGA_ROOT/src/aarch64_decoder."* \
62 "$OMEGA_ROOT/src/omega_validate."* \
63 "$TOOL" > "$EVIDENCE_DIR/m7_corpus_digests.txt"
64
65DIGEST_VERIFY=$(sha256sum "$OMEGA_ROOT/src/omega_verify.c" | awk '{print $1}')
66DIGEST_DECODER=$(sha256sum "$OMEGA_ROOT/src/aarch64_decoder.c" | awk '{print $1}')
67DIGEST_VALIDATE=$(sha256sum "$OMEGA_ROOT/src/omega_validate.c" | awk '{print $1}')
68DIGEST_TOOL=$(sha256sum "$TOOL" | awk '{print $1}')
69GIT_COMMIT=$(git -C "$OMEGA_ROOT" rev-parse --verify HEAD 2>/dev/null || echo "m7-genesis")
70
71echo "[*] Step 6: Generating formal qualification receipt: $RECEIPT..."
72cat <<EOF > "$RECEIPT"
73{
74 "milestone": "MILESTONE 7 — OMEGA_VERIFY",
75 "status": "QUALIFIED / PASS",
76 "contract_id": "CONTRACT-OMEGA-VERIFY-M7",
77 "generated_at": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
78 "git_commit": "$GIT_COMMIT",
79 "host": {
80 "os": "$(uname -s)",
81 "arch": "$(uname -m)",
82 "compiler": "$(${CC:-gcc} --version | head -n 1)"
83 },
84 "artifacts": {
85 "src/omega_verify.c": { "sha256": "$DIGEST_VERIFY" },
86 "src/aarch64_decoder.c": { "sha256": "$DIGEST_DECODER" },
87 "src/omega_validate.c": { "sha256": "$DIGEST_VALIDATE" },
88 "build/omegatool": { "sha256": "$DIGEST_TOOL" }
89 },
90 "verification_ladder": {
91 "tier_v0_structural": {
92 "status": "PASS",
93 "scope": "Graph types, DAG integrity, target profile, buffer bounds, instruction stream decoding, terminal RET"
94 },
95 "tier_v1_differential": {
96 "status": "PASS",
97 "scope": "Bit-for-bit output parity between semantic reference evaluation and native execution across test corpus",
98 "divergence_detection": "Refused fail-closed on mutated realization"
99 },
100 "tier_v2_property_invariants": {
101 "status": "PASS",
102 "scope": "Algebraic commutativity, identity elements, modular overflow wrapping, range preservation"
103 },
104 "tier_v3_to_v5_framework": {
105 "status": "STUB_INITIALIZED",
106 "scope": "Adversarial fuzzing, symbolic equivalence, proof-carrying code contracts"
107 }
108 },
109 "qualification_gates": {
110 "total": 10,
111 "passed": 10,
112 "gates": {
113 "OMEGA_VERIFY_V0_TYPE_PASS": "PASS",
114 "OMEGA_VERIFY_V0_DAG_PASS": "PASS",
115 "OMEGA_VERIFY_V0_CODE_BOUNDS_PASS": "PASS",
116 "OMEGA_VERIFY_V0_INSN_DECODE_PASS": "PASS",
117 "OMEGA_VERIFY_V0_TERMINAL_RET_PASS": "PASS",
118 "OMEGA_VERIFY_V1_DIFFERENTIAL_PASS": "PASS",
119 "OMEGA_VERIFY_V1_DIVERGENCE_REFUSAL_PASS": "PASS",
120 "OMEGA_VERIFY_V2_COMMUTATIVITY_PASS": "PASS",
121 "OMEGA_VERIFY_V2_IDENTITY_PASS": "PASS",
122 "OMEGA_VERIFY_V2_OVERFLOW_PASS": "PASS"
123 }
124 },
125 "sovereignty_accounting": {
126 "generator_trust": "UNTRUSTED",
127 "verifier_trust": "TRUSTED",
128 "python_dependency": false,
129 "formal_verifier_lineage": "Direct sovereign C99 verification engine executing deterministic proof obligations"
130 }
131}
132EOF
133
134echo ""
135echo "================================================================================"
136echo " MILESTONE 7 (OMEGA_VERIFY) QUALIFICATION COMPLETE: 10/10 GATES PASS"
137echo " Receipt generated at: $RECEIPT"
138echo "================================================================================"