Physically move the pure-code subtrees out of .specify into the package, leaving compat symlinks at the old .specify/<dir> paths so every existing reference (internal CASAN_HARNESS_ROOT + external CI/docker/mjs) keeps resolving. Runtime state stays put. Moved (git mv): scripts/ tests/ security/ templates/ config/ governance/ memory/ .specify/<dir> -> packages/casan-harness/<dir> (+ .specify/<dir> symlink) Stays in .specify (state/governance/domain, handled later): logs/ agentops/ level5/ init-options.json traceability-map.json Python `.resolve()` self-location followed the compat symlink into packages and lost the app root; generate-casan-demo-context.py, generate-agentops-dashboard.py and dashboard-server.py now walk UP for the `.specify` state marker instead of a fixed parent depth (fixes "missing trace files" in run-casan4). Full gate: PASS=64 FAIL=0 SKIP=3 (CASAN_CI_STEP_TIMEOUT_SEC=1200 — track-a ~450s runs close to the 600s default and can tip over under load; this is timing variance, not a regression — it passed cleanly with headroom). Runtime log/audit artifacts kept unstaged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -uo pipefail
|
|
|
|
# CASAN Tier-2 local production-like infra lab tests.
|
|
# Starts Docker Compose if needed, verifies Vault/IdP/MinIO/dashboard/alert/billing.
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "$SCRIPT_DIR/../scripts/bash/casan-paths.sh"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
S="$CASAN_HARNESS_ROOT/scripts/bash"
|
|
|
|
PASS=0; FAIL=0; SKIP=0
|
|
pass() { echo "PASS: $1"; PASS=$((PASS + 1)); }
|
|
fail() { echo "FAIL: $1"; FAIL=$((FAIL + 1)); }
|
|
skip() { echo "SKIP: $1"; SKIP=$((SKIP + 1)); }
|
|
|
|
if ! command -v docker >/dev/null 2>&1 || ! docker compose version >/dev/null 2>&1; then
|
|
skip "Docker Compose unavailable"
|
|
echo "===== PROD INFRA LAB SUMMARY: PASS=$PASS FAIL=$FAIL SKIP=$SKIP ====="
|
|
exit 0
|
|
fi
|
|
|
|
if bash "$S/infra-lab.sh" start >/dev/null 2>&1; then
|
|
pass "local-prod Docker Compose stack starts"
|
|
else
|
|
fail "local-prod Docker Compose stack failed to start"
|
|
fi
|
|
|
|
if bash "$S/infra-lab.sh" verify > /tmp/casan-infra-lab-verify.out 2>&1; then
|
|
pass "local-prod infra lab verification passes"
|
|
else
|
|
cat /tmp/casan-infra-lab-verify.out
|
|
fail "local-prod infra lab verification failed"
|
|
fi
|
|
|
|
echo ""
|
|
echo "===== PROD INFRA LAB SUMMARY: PASS=$PASS FAIL=$FAIL SKIP=$SKIP ====="
|
|
[[ "$FAIL" -eq 0 ]] || exit 1
|