You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pre-commit coverage gate fails on clean main — four functions from #25 below 100% #30
scripts/check-coverage.sh (run by the pre-commit hook) fails on clean main (bf3a719), so every commit currently requires --no-verify regardless of what it touches. PR #25 merged four functions below the 100% coverage bar:
A gate that always fails trains contributors to bypass it, which silently waives coverage for genuinely new code too (e.g. #29 had to commit with --no-verify).
Fix
For each function, either add tests covering the missed branches or, where a branch is genuinely untriggerable in tests, add it to EXCLUDED_FUNCTIONS in scripts/check-coverage.sh with a comment explaining why. The uncovered branches in agent.New are likely the ladder/advisor warning paths, and NewEscalation at 66.7% suggests most of its error handling is untested.
Fixed by PR #33 (d2cbf84), which merged after this was filed. All four functions now report 100% coverage — tests were added in strategy_test.go, agent_test.go, escalation_test.go, and observer_test.go rather than expanding the exclusion list. The same PR also fixed the mktemp template in check-coverage.sh (BSD mktemp treats a template with a suffix after the X's as a literal path, so runs shared one coverage file). Verified on clean main: ./scripts/check-coverage.sh passes with 93.3% total coverage.
Activity
bdougie commentedon Jul 5, 2026
Fixed by PR #33 (d2cbf84), which merged after this was filed. All four functions now report 100% coverage — tests were added in strategy_test.go, agent_test.go, escalation_test.go, and observer_test.go rather than expanding the exclusion list. The same PR also fixed the mktemp template in check-coverage.sh (BSD mktemp treats a template with a suffix after the X's as a literal path, so runs shared one coverage file). Verified on clean main:
./scripts/check-coverage.shpasses with 93.3% total coverage.