interplane.Get Omega
Read in your language

aegis-runtime-mv

Native Rust agent runtime: Axum WebSocket/SSE/REST gateway, heartbeat scheduler, dependency-aware task workflow, SQLite storage. Attachment of AienOS. Pre-alpha.

Brought by drakestapleton

branch main Branches Tags History

aegis-runtime-mv / scripts / agent-preflight.sh

35 lines · 1252 bytes Raw Blame History
1#!/usr/bin/env bash
2set -euo pipefail
3
4echo "=== AEGIS Preflight Verification ==="
5
6# 1. Branch Isolation
7BRANCH=$(git rev-parse --abbrev-ref HEAD)
8if [ "$BRANCH" = "main" ]; then
9 echo "[-] FAILED: Direct commits to 'main' branch are strictly prohibited."
10 echo " Create a feature branch (e.g. feat/..., fix/..., perf/...) first."
11 exit 1
12fi
13echo "[+] PASSED: Branch isolation confirmed ($BRANCH)."
14
15# 2. Zero Disk Secrets Check
16if find . -maxdepth 3 -name ".env*" -not -path "./.git/*" | grep -q .; then
17 echo "[-] FAILED: Found plaintext .env file on disk. Hardware TPM vault required."
18 exit 1
19fi
20echo "[+] PASSED: Zero disk secrets confirmed (Hardware TPM vault active)."
21
22# 3. Unslop Standard (Zero em dashes or en dashes)
23DASH_VIOLATIONS=$(git diff HEAD | grep -E '^\+[^+]' | grep -v 'assert!' | grep -v 'replace' | grep -v 'contains' | grep -P '[\x{2014}\x{2013}]' || true)
24if [ -n "$DASH_VIOLATIONS" ]; then
25 echo "[-] FAILED: Found prohibited em dash or en dash in git diff:"
26 echo "$DASH_VIOLATIONS"
27 exit 1
28fi
29echo "[+] PASSED: Unslop standard verified (zero em dashes and zero en dashes)."
30
31# 4. Cargo Tests
32echo "[*] Running cargo test..."
33cargo test --verbose
34
35echo "=== ALL AEGIS PREFLIGHT CHECKS PASSED ==="