|
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# contractile.just — VeriSimDB contractile runner |
| 3 | +# Auto-generated from contractiles/ directory. |
| 4 | +# Re-generate with: contractile gen-just --dir contractiles |
| 5 | + |
| 6 | +# === MUST (Mandatory Invariants) === |
| 7 | +# Source: contractiles/must/Mustfile |
| 8 | + |
| 9 | +# Run all mandatory invariant checks |
| 10 | +must-check: |
| 11 | + @echo '=== Running VeriSimDB mandatory checks ===' |
| 12 | + @just lint || (echo 'FAIL: lint' && exit 1) |
| 13 | + @just test || (echo 'FAIL: tests' && exit 1) |
| 14 | + @just fmt-check || (echo 'FAIL: format' && exit 1) |
| 15 | + @echo '=== All mandatory checks passed ===' |
| 16 | + |
| 17 | +# Check SPDX headers present in source files |
| 18 | +must-spdx: |
| 19 | + @echo 'Checking SPDX headers...' |
| 20 | + find . -name '*.rs' -o -name '*.ex' -o -name '*.exs' -o -name '*.idr' -o -name '*.zig' | \ |
| 21 | + grep -v target/ | grep -v _build/ | grep -v .git/ | \ |
| 22 | + xargs grep -L 'SPDX-License-Identifier' | head -10 | \ |
| 23 | + (read -r line; if [ -n "$$line" ]; then echo "FAIL: missing SPDX: $$line"; exit 1; fi) |
| 24 | + @echo 'PASS: SPDX headers present' |
| 25 | + |
| 26 | +# Check no banned languages present |
| 27 | +must-no-banned: |
| 28 | + @echo 'Checking for banned files...' |
| 29 | + @test ! -f Dockerfile && echo 'PASS: no Dockerfile' || (echo 'FAIL: Dockerfile found' && exit 1) |
| 30 | + @test ! -f Makefile && echo 'PASS: no Makefile' || (echo 'FAIL: Makefile found' && exit 1) |
| 31 | + @find . -name '*.py' -not -path './.git/*' | head -1 | (read -r f; if [ -n "$$f" ]; then echo "FAIL: Python file found: $$f"; exit 1; fi) |
| 32 | + @find . -name '*.ts' -not -path './.git/*' -not -name '*.d.ts' | head -1 | (read -r f; if [ -n "$$f" ]; then echo "FAIL: TypeScript file: $$f"; exit 1; fi) |
| 33 | + @echo 'PASS: no banned files' |
| 34 | + |
| 35 | +# === DUST (Recovery & Rollback) === |
| 36 | +# Source: contractiles/dust/ |
| 37 | + |
| 38 | +# Show available recovery actions |
| 39 | +dust-status: |
| 40 | + @echo ' dust-rollback-source: Revert source changes to last commit [rollback]' |
| 41 | + @echo ' dust-clean-build: Remove build artifacts [cleanup]' |
| 42 | + |
| 43 | +# Revert source changes to last commit |
| 44 | +dust-rollback-source: |
| 45 | + @echo 'Rolling back source changes...' |
| 46 | + git checkout HEAD -- src/ elixir-orchestration/lib/ 2>/dev/null || true |
| 47 | + @echo 'Rollback complete.' |
| 48 | + |
| 49 | +# Remove build artifacts |
| 50 | +dust-clean-build: |
| 51 | + cargo clean 2>/dev/null || true |
| 52 | + rm -rf elixir-orchestration/_build elixir-orchestration/deps 2>/dev/null || true |
| 53 | + @echo 'Build artifacts cleaned.' |
| 54 | + |
| 55 | +# === LUST (Aspirational Goals) === |
| 56 | +# Source: contractiles/lust/ |
| 57 | + |
| 58 | +# Show aspirational goals |
| 59 | +lust-status: |
| 60 | + @echo 'VeriSimDB aspirational goals:' |
| 61 | + @echo ' - Formally verified query execution engine' |
| 62 | + @echo ' - Cross-store federation with VQL' |
| 63 | + @echo ' - Sub-millisecond graph query performance' |
| 64 | + @echo ' - Zero-downtime schema migration' |
| 65 | + |
| 66 | +# === TRUST (Verification Evidence) === |
| 67 | +# Source: contractiles/trust/ |
| 68 | + |
| 69 | +# Collect and display trust evidence |
| 70 | +trust-evidence: |
| 71 | + @echo '=== VeriSimDB Trust Evidence ===' |
| 72 | + @echo 'Test suite:' |
| 73 | + cargo test --quiet 2>&1 | tail -3 || echo ' (cargo test unavailable)' |
| 74 | + @echo 'Idris2 ABI verification:' |
| 75 | + @ls src/abi/*.idr 2>/dev/null | wc -l | xargs printf ' %s ABI files\n' |
| 76 | + @echo 'License compliance:' |
| 77 | + @grep -r 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ 2>/dev/null | wc -l | xargs printf ' %s files licensed\n' |
0 commit comments