okf-wiki/tests/p1_repo.sh
Kjell Tore Guttormsen 0fd86a23a3
okf-wiki 1.1.1
First public release, published as one snapshot. What changed between
versions is in CHANGELOG.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 21:03:20 +01:00

26 lines
1.2 KiB
Bash

#!/bin/bash
# TRIAL (P1 method trial, branch p1-metodeprove): not v1 code.
# The repository checks behind SC9: the three unittest suites, mypy --strict, the frozen instruments unchanged
# since 9e72c46, and the excluded-terms guard. One PASS or FAIL line per check; exit 1 on any FAIL.
# It lives in tests/ because the plan's criteria runner only runs "bash tests/<script>.sh".
# bash 3.2 safe, ASCII only.
set -u
cd "$(dirname "$0")/.." || exit 2
FAILED=0
check() {
name="$1"
shift
if "$@" >/dev/null 2>&1; then
echo "PASS $name"
else
echo "FAIL $name"
FAILED=1
fi
}
check "unittest tests" python3 -m unittest discover -s tests
check "unittest gates/tests" python3 -m unittest discover -s gates/tests
check "unittest evals/tests" python3 -m unittest discover -s evals/tests
check "mypy --strict okfwiki evals tests gates" "$HOME/.local/bin/uvx" --offline --with types-PyYAML mypy --strict okfwiki evals tests gates
check "frozen instruments unchanged since 9e72c46" git diff --quiet 9e72c46 -- okfwiki/audit.py okfwiki/view.py okfwiki/claims.py okfwiki/reader.py gates agents/okf-wiki-reader.md .claude/agents/okf-wiki-reader.md
check "excluded terms in the tracked tree" bash tools/check-excluded-terms.sh
exit "$FAILED"