Skip to content

Add hook smoke tests — 20 tests across all 10 hooks - #24

Merged
5uck1ess merged 1 commit into
mainfrom
fix/hook-smoke-tests
Apr 5, 2026
Merged

Add hook smoke tests — 20 tests across all 10 hooks#24
5uck1ess merged 1 commit into
mainfrom
fix/hook-smoke-tests

Conversation

@5uck1ess

@5uck1ess 5uck1ess commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

First-ever test coverage for the hook enforcement layer. 20 smoke tests across all 10 registered hooks, running as a new CI job.

What's tested

Hook Tests Key behaviors
safety-check.sh 3 Allow safe command, block rm -rf / (exit 2), empty input
audit-trail.sh 2 Log command, empty input
rtk-rewrite.sh 1 Pass through
pr-gate.sh 1 Allow git status
security-patterns.sh 2 Allow clean code, detect SQL concatenation
post-validate.sh 2 Clean output, empty input
slop-detect.sh 1 Allow clean code
lang-review.sh 4 Clean Go, error-path detection, skip non-code, empty input
subagent-stop.sh 2 Approve clean output, empty input
stop-gate.sh 2 Approve clean tree, empty input

CI

New hook-smoke-tests job runs in parallel with build-and-test and validate-counts.

Test plan

  • All 20 tests pass locally
  • CI passes with the new job

Tests each hook's I/O contract: valid JSON output, correct exit codes,
empty input handling, and key behaviors (safety-check blocks rm -rf /,
lang-review skips non-code files, stop-gate approves clean trees).

Added as a separate CI job (hook-smoke-tests) alongside build-and-test
and validate-counts.
@5uck1ess
5uck1ess merged commit af9cc7a into main Apr 5, 2026
3 checks passed
@5uck1ess
5uck1ess deleted the fix/hook-smoke-tests branch April 5, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant