Files
foxhunt/.claude/helpers/pre_commit_behavioral_suite.sh
jgrusewski dff6e666ee feat(sp15-p2a.2): oracle policies + evaluator harness + pre-commit hook
Phase 2A scaffolding complete (per spec §7.2):
- oracle.rs: OracleAction enum + 3 oracle policies (flat, drift, OU)
- harness.rs: BehavioralResult + evaluate_policy_on_market stub.
   Trainer-side methods (eval_actions_on_features, read_isv_for_test)
   are documented gap #7; Phase 2B tests add them per-test as needed.
- pre-commit hook: cargo test -p ml --test behavioral_suite gates
   argo-train.sh per spec §4.5 discipline rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 11:29:22 +02:00

22 lines
720 B
Bash
Executable File

#!/bin/bash
# .claude/helpers/pre_commit_behavioral_suite.sh
#
# SP15 Phase 2 — behavioral suite gate. Blocks argo-train.sh if any
# behavioral test fails. Suite runs <10 min on dev RTX 3050 Ti.
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
echo "Running SP15 behavioral suite (gate for argo-train.sh)..."
if ! SQLX_OFFLINE=true CUDA_COMPUTE_CAP=86 \
cargo test -p ml --test behavioral_suite --features cuda \
-- --include-ignored --test-threads=1 2>&1 \
| tee /tmp/sp15_behavioral_suite.log; then
echo "Behavioral suite FAILED. argo-train.sh blocked."
echo " See /tmp/sp15_behavioral_suite.log for details."
exit 1
fi
echo "Behavioral suite PASS — argo-train.sh unblocked."