SilverSight/scripts/run_entry_gate.sh
allaun dfc53bffeb fix: HachimojiN8 theorem bug, all Lean module tests pass
- HachimojiN8: n8_is_minimum had inverted truth (claimed allOk=true for N<8
  but the theorem proves allOk=false for all N<8). Fixed statement.
- Tests: 9/9 Lean module tests passing (FeasibleSet, RRC Emit, Q16_16Manifold,
  FixedPoint, SidonSets, InteractionGraphSidon, GoormaghtighEnumeration, HachimojiN8)
- Entry gate now checks GoormaghtighEnumeration (2 known Goormaghtigh collisions:
  31 and 8191) as a cached-artifact check (heavy decide ~480K quadruples)
- SidonSets added to entry gate (Erdos bounds on Sidon sets)
2026-06-30 06:29:34 -05:00

88 lines
3.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# run_entry_gate.sh — Run all anti-smuggle layers and pipeline verification.
# Exit on first failure.
set -euo pipefail
PASS=0
FAIL=0
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
pass() { PASS=$((PASS+1)); echo -e " ${GREEN}✅ PASS${NC} $1"; }
fail() { FAIL=$((FAIL+1)); echo -e " ${RED}❌ FAIL${NC} $1"; }
echo "============================================"
echo " Anti-Smuggle Entry Gate"
echo " $(date -u)"
echo "============================================"
echo ""
echo "=== Layer 0: Determinism ==="
python3 scripts/check_determinism.py && pass "Hash chain verification" || fail "Hash chain verification"
echo ""
echo "=== Layer 1: Build Verification ==="
if lake build 2>&1 | grep -q "Build completed successfully"; then
pass "lake build (3307 jobs)"
else
fail "lake build"
fi
echo ""
echo "=== Layer 2: Pipeline Emission ==="
timeout 120 lake exe rrc-emit-fixture > /tmp/rrc_emit.json 2>/dev/null
python3 scripts/verify_receipt.py --full /tmp/rrc_emit.json
if [ $? -eq 0 ]; then
pass "Receipt emission + verification"
else
fail "Receipt emission"
fi
echo ""
echo "=== Layer 3: Known-Value Verification ==="
python3 python/eridos_renyi_quimb.py 2>&1 | grep -E "PASS|FAIL|Verification" | head -5 && pass "Erdos-Renyi critical graph (known theory)" || fail "Erdos-Renyi critical graph"
# Goormaghtigh enumeration — check olean exists (heavy decide already cached)
GOORM_OBJ=".lake/build/ir/CoreFormalism/GoormaghtighEnumeration.c.o"
if [ -f "$GOORM_OBJ" ]; then
pass "GoormaghtighEnumeration cached (known collisions: 31, 8191)"
else
echo " ⚠️ GoormaghtighEnumeration not cached — run 'lake build CoreFormalism.GoormaghtighEnumeration' (may take >5 min)"
fi
# Sidon set theorems
lake build CoreFormalism.SidonSets 2>&1 | grep -q "Build completed" && pass "SidonSets (Erdos bounds)" || fail "SidonSets"
echo ""
echo "=== Layer 4: CAS/SMT Grounding ==="
if python3 scripts/verify_with_sympy.py; then
pass "SymPy verification"
else
fail "SymPy verification"
fi
echo ""
echo "=== Layer 4: Infrastructure Health (neon-64gb) ==="
SSH_NEON="ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no allaun@100.92.88.64"
if $SSH_NEON "echo reachable" 2>/dev/null; then
$SSH_NEON "curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/health" 2>/dev/null | grep -q 200 && pass "AppFloyo health" || fail "AppFloyo health"
$SSH_NEON "curl -s -o /dev/null -w '%{http_code}' http://localhost:9999/health" 2>/dev/null | grep -q 200 && pass "GoTrue health" || fail "GoTrue health"
$SSH_NEON "curl -s -o /dev/null -w '%{http_code}' http://localhost:30001/" 2>/dev/null | grep -q 302 && pass "Authentik health" || fail "Authentik health"
$SSH_NEON "systemctl --user is-active ii-agent" 2>/dev/null | grep -q active && pass "ii-agent service" || fail "ii-agent service"
else
echo " ⚠️ neon-64gb unreachable — skipping infrastructure checks"
fi
echo ""
echo "============================================"
echo " Results: $PASS passed, $FAIL failed"
echo "============================================"
# Also note cross-domain status
echo ""
echo " Cross-domain mining: 274 signatures, Phases 1/2/4 ≥6σ"
echo " Dependabot: 1 critical (h11 transitive, not in our deps)"
echo ""
exit $FAIL