SNAPKITTYWEST's picture
push from SNAPKITTYWEST/sovereign-agi-kernel
1cdfc83 verified
Raw
History Blame Contribute Delete
1.97 kB
# Erdos-Straus DSS Verified Kernel — Build System
# Supports air-gapped builds via Docker and local dev builds.
.PHONY: all clean idris lean runtime docker verify
all: idris lean runtime
# --- Idris 2 Build ---
idris:
@echo "=== Building Idris 2 kernel ==="
cd Idris && idris2 --check ErdosStraus.idr
cd Idris && idris2 --check SovereignKernel.idr
@echo "=== Idris 2: PASS (zero sorry, total) ==="
idris-js:
@echo "=== Compiling Idris 2 to JavaScript ==="
cd Idris && idris2 --codegen node --build erdos-straus.ipkg
@echo "=== JS target built ==="
# --- Lean 4 Build ---
lean:
@echo "=== Building Lean 4 formalization ==="
lake build
@echo "=== Lean 4: BUILD COMPLETE ==="
# --- Runtime Simulation ---
runtime:
@echo "=== Running DSS runtime demonstration ==="
cd runtime && node main.mjs
@echo "=== Runtime: PASS ==="
# --- Python AGI Gate ---
gate:
@echo "=== Running AGI Trust Gate demo ==="
cd scaffold && python3 agi_gate.py
@echo "=== Gate: PASS ==="
# --- Docker (air-gapped) ---
docker:
@echo "=== Building air-gapped Docker artifact ==="
docker build -t erdos-straus-verified:latest .
docker run --rm erdos-straus-verified:latest
@echo "=== Docker: COMPLETE ==="
# --- Full verification pipeline ---
verify: idris runtime gate
@echo ""
@echo "========================================"
@echo " ALL VERIFICATION CHECKS PASSED"
@echo " - Idris 2: total, zero sorry"
@echo " - Runtime: DSS oracle verified"
@echo " - AGI Gate: entropy bounded"
@echo "========================================"
# --- Hash the build artifacts ---
seal:
@echo "=== Sealing build artifacts ==="
find . -name "*.idr" -o -name "*.lean" -o -name "*.mjs" -o -name "*.py" | \
sort | xargs sha256sum > BUILD_SEAL.txt
@echo "=== Seal written to BUILD_SEAL.txt ==="
clean:
rm -rf build/ .lake/ Idris/build/ runtime/node_modules/
rm -f BUILD_SEAL.txt scaffold/audit_trail.jsonl