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_m10_gates.sh

134 lines · 5367 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_m10_gates.sh -- Master Qualification Gate Runner for Milestone 10 (OMEGA_LIBRARY_V1)
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_library_v1_qualification_receipt.json"
24
25echo "================================================================================"
26echo " AIEN OMEGA SUBSTRATE — MILESTONE 10: OMEGA_LIBRARY_V1 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 M10 qualification gates
40echo "[*] Step 2: Evaluating 10 canonical M10 qualification gates..."
41"$TOOL" --run-m10-gates
42echo ""
43
44# Step 3: Run Demonstration (Library Catalog & Synthesis Reuse)
45echo "[*] Step 3: Running Demonstration (Library Catalog & Synthesis Reuse)..."
46"$TOOL" --reference-demonstrate-library
47echo ""
48
49# Step 4: Regression checks (M4 through M9)
50echo "[*] Step 4: Running regression checks across M4 through M9..."
51"$TOOL" --run-gates
52"$TOOL" --run-m5-gates
53"$TOOL" --run-m6-gates
54"$TOOL" --run-m7-gates
55"$TOOL" --run-m8-gates
56"$TOOL" --run-m9-gates
57echo " Regression checks OK: all M4 through M9 gates passed (61 gates)."
58echo ""
59
60# Step 5: Dump and hash test vectors and binaries
61echo "[*] Step 5: Computing artifact digests..."
62mkdir -p "$EVIDENCE_DIR"
63sha256sum "$OMEGA_ROOT/src/omega_library."* \
64 "$TOOL" > "$EVIDENCE_DIR/m10_corpus_digests.txt"
65
66DIGEST_LIBRARY=$(sha256sum "$OMEGA_ROOT/src/omega_library.c" | awk '{print $1}')
67DIGEST_LIBRARY_H=$(sha256sum "$OMEGA_ROOT/src/omega_library.h" | awk '{print $1}')
68DIGEST_TOOL=$(sha256sum "$TOOL" | awk '{print $1}')
69PARENT_COMMIT="469f53c9b4e7fe6dcfe3287ae27161b997c11874"
70SOURCE_PARENT_COMMIT="$PARENT_COMMIT"
71QUALIFIED_COMMIT="${QUALIFIED_IMPLEMENTATION_COMMIT:-$(git -C "$OMEGA_ROOT" rev-parse HEAD)}"
72RECEIPT_COMMIT="${RECEIPT_COMMIT:-pending-receipt-commit}"
73
74echo "[*] Step 6: Generating formal qualification receipt: $RECEIPT..."
75cat <<EOF > "$RECEIPT"
76{
77 "milestone": "MILESTONE 10 — OMEGA_LIBRARY_V1",
78 "status": "QUALIFIED / PASS",
79 "contract_id": "CONTRACT-OMEGA-LIBRARY-V1-M10",
80 "generated_at": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
81 "source_parent_commit": "$SOURCE_PARENT_COMMIT",
82 "qualified_implementation_commit": "$QUALIFIED_COMMIT",
83 "receipt_commit": "$RECEIPT_COMMIT",
84 "git_commit": "$QUALIFIED_COMMIT",
85 "host": {
86 "os": "$(uname -s)",
87 "arch": "$(uname -m)",
88 "compiler": "$(${CC:-gcc} --version | head -n 1)"
89 },
90 "artifacts": {
91 "src/omega_library.c": { "sha256": "$DIGEST_LIBRARY" },
92 "src/omega_library.h": { "sha256": "$DIGEST_LIBRARY_H" },
93 "build/omegatool": { "sha256": "$DIGEST_TOOL" }
94 },
95 "library_properties": {
96 "content_addressing": "Lookup by SEMANTIC_ID, REALIZATION_ID, and human symbol name",
97 "immutability": "Monotonic versioning with cryptographic SHA-256 state digest",
98 "dependency_tracking": "Explicit DAG tracking with DFS cycle detection refusing circular dependencies",
99 "verification_admission": "Fail-closed admission: unverified programs strictly rejected",
100 "synthesis_integration": "Direct export to SynthPrimitiveBank for composition reuse"
101 },
102 "qualification_gates": {
103 "total": 10,
104 "passed": 10,
105 "gates": {
106 "OMEGA_LIBRARY_INIT_PASS": "PASS",
107 "OMEGA_LIBRARY_INSERT_PASS": "PASS",
108 "OMEGA_LIBRARY_INDEXING_PASS": "PASS",
109 "OMEGA_LIBRARY_QUERY_PASS": "PASS",
110 "OMEGA_LIBRARY_DEP_DAG_PASS": "PASS",
111 "OMEGA_LIBRARY_IMMUTABILITY_PASS": "PASS",
112 "OMEGA_LIBRARY_UNVERIFIED_REFUSAL_PASS": "PASS",
113 "OMEGA_LIBRARY_DUPLICATE_REFUSAL_PASS": "PASS",
114 "OMEGA_LIBRARY_SYNTHESIS_REUSE_PASS": "PASS",
115 "OMEGA_LIBRARY_RECEIPT_PASS": "PASS"
116 }
117 },
118 "sovereignty_accounting": {
119 "llvm_dependency": false,
120 "gnu_as_dependency": false,
121 "gcc_asm_dependency": false,
122 "jit_compiler_dependency": false,
123 "python_dependency": false,
124 "realizer_lineage": "Direct sovereign C99 library catalog, indexing, and synthesis reuse engine"
125 }
126}
127EOF
128
129echo ""
130echo "================================================================================"
131echo " MILESTONE 10 (OMEGA_LIBRARY_V1) QUALIFICATION COMPLETE: 10/10 GATES PASS"
132echo " Cumulative Sovereign Gates Passed: 71/71"
133echo " Receipt generated at: $RECEIPT"
134echo "================================================================================"