uncommit .agent

This commit is contained in:
2026-08-24 10:59:45 -04:00
parent bc0158f858
commit 076358db94
10 changed files with 0 additions and 874 deletions
-39
View File
@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# .agent/validate.sh — validation gate for the phased-execution pipeline.
#
# A phase is only moved to .agent/phases/complete/ if this script exits 0.
# Gates (PLAN §10 / AGENTS.md): unit + integration tests, coverage >90%
# on app/, ruff, pyright — all through `uv` (the project's package manager).
set -uo pipefail
rc=0
if [[ -f pyproject.toml || -f pytest.ini || -f setup.py ]]; then
out="$(uv run pytest -q --cov=app --cov-report=term 2>&1)"; pytest_rc=$?
printf '%s\n' "$out" | tail -n 30
if [[ $pytest_rc -ne 0 ]]; then
echo "pytest FAILED (exit $pytest_rc)"
rc=1
fi
total="$(printf '%s\n' "$out" | grep -E '^TOTAL' | awk '{print $NF}' | tr -d '%')"
if [[ -n "${total:-}" ]]; then
if awk -v c="$total" 'BEGIN { exit !(c > 90.0) }'; then
echo "coverage gate: app/ ${total}% (>90%) OK"
else
echo "coverage gate FAILED: app/ ${total}% (need >90%)"
rc=1
fi
else
echo "coverage gate: TOTAL line not found — treating as pass (report above)"
fi
uv run ruff check . || rc=1
uv run pyright || rc=1
fi
if [[ $rc -ne 0 ]]; then
echo "validation FAILED (see output above)"
else
echo "validation OK"
fi
exit "$rc"