1010# Step 1 OPA policy tests -> release gate, credit gate, attestation gate
1111# Step 2 TLA+ containment ratchet -> con-04/con-07 invariants
1212# Step 3 TLA+ attested admission -> env-01 (no run without attestation)
13- # Step 4 GC-IR cross-target -> Rego <=> circuit witness <=> expectation
14- # Step 5 SRC-1 Groth16 proof -> cry-05 systemic-risk concentration bound
15- # Step 6 SARA/ACR MoE routing -> rte-01 routing stability invariants
16- # Step 7 PQC WORM (ML-DSA-65) -> cry-02 signed, hash-chained audit log
17- # Step 8 Schema validation -> existing governance artifact validator
13+ # Step 4 TLA+ SentinelContainmentProtocol -> dead-man's switch one-way ratchet
14+ # Step 5 GC-IR cross-target -> Rego <=> circuit witness <=> expectation
15+ # Step 6 SRC-1 Groth16 proof -> cry-05 systemic-risk concentration bound
16+ # Step 7 zk-SNARK relayer pipeline -> Solidity Groth16 verifier + calldata
17+ # Step 8 SARA/ACR MoE routing -> rte-01 routing stability invariants
18+ # Step 9 PQC WORM (ML-DSA-65) -> cry-02 signed, hash-chained audit log
19+ # Step 10 Solidity + contract logic -> OmegaActual hardening (SEC-01..06)
20+ # Step 11 Schema validation -> existing governance artifact validator
1821#
1922# Usage: bash governance_artifacts/run_runnable_assurance.sh
2023# =============================================================================
@@ -31,14 +34,14 @@ echo "=============================================================="
3134echo " Sentinel v2.4 — Runnable Assurance Suite"
3235echo " =============================================================="
3336
34- echo " [1/8 ] OPA policy tests (release gate + credit + attestation/PCR_MATCH)"
37+ echo " [1/11 ] OPA policy tests (release gate + credit + attestation/PCR_MATCH)"
3538if opa test " $GA /rego/" > /tmp/opa_out 2>&1 ; then
3639 pass " $( grep -E ' PASS:' /tmp/opa_out | tail -1) "
3740else
3841 cat /tmp/opa_out; fail " OPA policy tests"
3942fi
4043
41- echo " [2/8 ] TLA+ TLC model check (KillSwitchAbstract — con-04/con-07)"
44+ echo " [2/11 ] TLA+ TLC model check (KillSwitchAbstract — con-04/con-07)"
4245if java -cp " $GA /tla/tools/tla2tools.jar" tlc2.TLC \
4346 -config " $GA /tla/KillSwitchAbstract.cfg" \
4447 " $GA /tla/KillSwitchAbstract.tla" > /tmp/tlc_out 2>&1 \
4851 cat /tmp/tlc_out; fail " TLA+ model check"
4952fi
5053
51- echo " [3/8 ] TLA+ TLC model check (AdmissionWithAttestation — env-01)"
54+ echo " [3/11 ] TLA+ TLC model check (AdmissionWithAttestation — env-01)"
5255if java -cp " $GA /tla/tools/tla2tools.jar" tlc2.TLC \
5356 -config " $GA /tla/AdmissionWithAttestation.cfg" \
5457 " $GA /tla/AdmissionWithAttestation.tla" > /tmp/tlc_att 2>&1 \
5861 cat /tmp/tlc_att; fail " TLA+ attested-admission model check"
5962fi
6063
61- echo " [4/8] GC-IR cross-target conformance (Rego <=> circuit <=> expectation)"
64+ echo " [4/11] TLA+ TLC model check (SentinelContainmentProtocol — dead-man's switch)"
65+ if java -cp " $GA /tla/tools/tla2tools.jar" tlc2.TLC \
66+ -config " $GA /tla/SentinelContainmentProtocol.cfg" \
67+ " $GA /tla/SentinelContainmentProtocol.tla" > /tmp/tlc_scp 2>&1 \
68+ && grep -q " No error has been found" /tmp/tlc_scp; then
69+ pass " TrippedStaysTripped + KillSwitchIntegrity hold ($( grep -oE ' [0-9]+ distinct states' /tmp/tlc_scp | head -1) )"
70+ else
71+ cat /tmp/tlc_scp; fail " TLA+ SentinelContainmentProtocol model check"
72+ fi
73+
74+ echo " [5/11] GC-IR cross-target conformance (Rego <=> circuit <=> expectation)"
6275if ( cd " $GA /zk" && python3 gcir_harness.py ) > /tmp/gcir_out 2>&1 ; then
6376 pass " $( grep -E ' PASS:' /tmp/gcir_out | tail -1 | sed ' s/\[harness\] //' ) "
6477else
6578 cat /tmp/gcir_out; fail " GC-IR cross-target harness"
6679fi
6780
68- echo " [5/8 ] SRC-1 Groth16 proof flow (cry-05 concentration bound)"
81+ echo " [6/11 ] SRC-1 Groth16 proof flow (cry-05 concentration bound)"
6982if ( cd " $GA /zk" && bash run_src1_proof.sh ) > /tmp/src1_out 2>&1 \
7083 && grep -q " violation fixture rejected" /tmp/src1_out; then
7184 pass " compliant proof verified; violation fixture rejected (soundness)"
7285else
7386 tail -20 /tmp/src1_out; fail " SRC-1 proof flow"
7487fi
7588
76- echo " [6/8] SARA/ACR MoE routing stabilization (rte-01)"
89+ echo " [7/11] zk-SNARK relayer pipeline (Solidity Groth16 verifier + calldata)"
90+ if ( cd " $GA /zk" && bash run_relayer_pipeline.sh ) > /tmp/relayer_out 2>&1 \
91+ && grep -q " relayer pipeline complete" /tmp/relayer_out; then
92+ pass " $( grep -E ' OK .* compiles' /tmp/relayer_out | sed ' s/^[[:space:]]*//' ) "
93+ else
94+ tail -20 /tmp/relayer_out; fail " zk-SNARK relayer pipeline"
95+ fi
96+
97+ echo " [8/11] SARA/ACR MoE routing stabilization (rte-01)"
7798if python3 " $GA /routing/sara_acr_router.py" > /tmp/rte_out 2>&1 \
7899 && grep -q " satisfies all rte-01 invariants" /tmp/rte_out; then
79100 pass " $( grep -E ' STABILIZED' /tmp/rte_out | sed ' s/^[[:space:]]*//' ) "
80101else
81102 cat /tmp/rte_out; fail " SARA/ACR routing stability"
82103fi
83104
84- echo " [7/8 ] PQC WORM audit log (ML-DSA-65 / CRYSTALS-Dilithium — cry-02)"
105+ echo " [9/11 ] PQC WORM audit log (ML-DSA-65 / CRYSTALS-Dilithium — cry-02)"
85106if python3 " $GA /kafka/pqc_worm_logger_v2.py" > /tmp/worm_out 2>&1 \
86107 && grep -q " tampering detected" /tmp/worm_out; then
87108 pass " ML-DSA-65 signatures + hash chain verify; tampering detected"
88109else
89110 cat /tmp/worm_out; fail " PQC WORM logger"
90111fi
91112
92- echo " [8/8] Governance artifact schema validation"
113+ echo " [10/11] Solidity compile + OmegaActual hardening logic (SEC-01..06)"
114+ if ( cd " $ROOT /governance_blueprint/contracts" && node compile.js ) > /tmp/solc_out 2>&1 \
115+ && python3 -m pytest " $ROOT /governance_blueprint/contracts/test_contract_logic.py" -q > /tmp/clogic_out 2>&1 ; then
116+ pass " both contracts compile (0 warnings); $( grep -oE ' [0-9]+ passed' /tmp/clogic_out | head -1) contract-logic tests"
117+ else
118+ cat /tmp/solc_out; tail -20 /tmp/clogic_out; fail " Solidity compile / contract logic"
119+ fi
120+
121+ echo " [11/11] Governance artifact schema validation"
93122if python3 " $GA /validate_artifacts.py" > /tmp/val_out 2>&1 ; then
94123 pass " $( tail -1 /tmp/val_out) "
95124else
0 commit comments