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
gate.py: failure_class classification is undertested #67
Found by the correctness-tests-specialist reviewing PR #59 (non-blocking; PR merged with this recorded as follow-up).
Two coverage gaps in the failure_class distinction PR #59 introduced:
1. The infrastructure default is pinned on a private call, not a public interface. tests/test_gate.py:556-560 (test_absent_tooling_is_not_filed_as_an_internal_error) calls gate_module._degraded("plan", "no git") directly and asserts the default literal, so it can only fail if that literal changes. Mutating the one real infrastructure call site -- _small_change_gate's _degraded(...) at gate.py:620-622 -- to pass "internal_error" explicitly leaves the whole suite green. tests/test_health.py:74-88 already drives an equivalent gate through its public check("small-change", ...) interface with a forced None return; the same pattern would close this for failure_class.
2. The hooks' failure_class pass-through has zero coverage. .claude/hooks/require_plan.py:238, require_small_change.py:237, require_wave_shape.py:238, and their three bundle mirrors all changed identically to carry failure_class through from a degraded gate answer to the local decision log -- six files, no test exercising any of them receiving a degraded verdict with failure_class set. tests/test_claude_hook.py:540 already drives a hook as a subprocess with a CODEV_CLI override; a stub gate answer plus one assertion on the resulting log record would pin this.
Relevant to issue #65 (the triplicated CLI-resolution logic across the three hooks): a dedup refactor there is exactly where an untested per-file kwarg like this could get silently dropped.
Activity