#!/usr/bin/env bash # scripts/verify_phase06.sh - Phase 06 archive regression + layout check. # Lives at TOP-LEVEL scripts/ (v1.1 verify scripts), NOT demo/scripts/. set -u ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT" fail() { echo "FAIL: $*" >&2; exit 1; } ok() { echo "ok: $*"; } # --- Check 1: demo/ contains the full v1.0 demo tree --- for d in demo/modules demo/scripts demo/evidence-ui demo/contracts \ demo/contracts-repo demo/.gitea/workflows; do [ -d "$d" ] || fail "missing $d" done [ -f demo/ACDL_DEMO.md ] || fail "missing demo/ACDL_DEMO.md" [ -f demo/scripts/run_demo.sh ] || fail "missing demo/scripts/run_demo.sh" ok "demo/ contains the full v1.0 demo" # --- Check 2: regression - the archived demo still runs from demo/ --- out=$(ACDL_GITEA_TOKEN= bash demo/scripts/run_demo.sh --no-upload 2>&1); rc=$? [ "$rc" -eq 0 ] || { echo "$out" >&2; fail "demo/scripts/run_demo.sh --no-upload exited $rc"; } ok "demo/scripts/run_demo.sh --no-upload exits 0" # --- Check 3: new top-level dirs exist and are scaffolded --- # Note: platform/ was renamed to acdl_platform/ in Phase 08 (stdlib shadow fix). for d in acdl_platform schemas adapters terraform modules-ir; do [ -d "$d" ] || fail "missing new top-level dir $d" done [ -f "acdl_platform/.gitkeep" ] || [ -f "acdl_platform/__init__.py" ] || fail "acdl_platform/ not scaffolded" for d in schemas adapters terraform modules-ir; do [ -f "$d/.gitkeep" ] || fail "missing $d/.gitkeep" done ok "new top-level dirs exist: acdl_platform/ schemas/ adapters/ terraform/ modules-ir/" # --- Check 4: no stray v1.0 dirs left at repo root --- for stray in modules evidence-ui contracts contracts-repo ACDL_DEMO.md; do [ -e "$stray" ] && fail "stray $stray left at repo root (should be under demo/)" done [ -e ".gitea" ] && fail "stray .gitea/ left at repo root (moved to demo/.gitea/)" ok "no stray v1.0 dirs at repo root" # --- Check 5: README reflects the real platform --- grep -q "Agentic Cloud Delivery Platform" README.md || fail "README missing platform name" grep -q "demo/" README.md || fail "README does not reference the archived demo/" grep -qi "vision\|architecture" README.md || fail "README missing vision/architecture links" ok "README reflects the real platform (name + demo/ ref + vision/arch links)" echo "Phase 06: ALL CHECKS PASS"