hooks/pre-task-ritual.sh has no test #44

Closed
opened 2026-09-07 20:24:47 +00:00 by mathias · 0 comments
Owner

hooks/pre-task-ritual.sh has no test at all. It is one of only two bash-shebang
hooks in this repo; the other, hooks/secret-guard.sh, was just found to have been dead in
CI for as long as its suite was silently skipped (see skills 4edf42c).

Why this specific hook matters: it enforces the Rule 0 pre-task ritual — brain query, skill
load, failing test first. Its failure mode, like any hook that cannot start, is to produce
no output, and a hook that produces no output does not block anything. So "enforcing" and
"dead on line 1" are indistinguishable from the outside, and there is currently nothing
that would tell them apart.

Minimum worth having, mirroring tests/secret_guard_test.sh:

  • invoke it as a program, never sh "$HOOK" — that override is exactly what hid the
    secret-guard breakage, since it substitutes a different interpreter than production uses
  • assert the exec bit, since direct invocation depends on it
  • one allow case and one block case, so a hook that never blocks fails the suite

Not urgent — no evidence it is currently broken — but it is untested by inspection, and the
sibling hook's failure showed that "untested and probably fine" and "dead" look the same
from here.

`hooks/pre-task-ritual.sh` has **no test at all**. It is one of only two bash-shebang hooks in this repo; the other, `hooks/secret-guard.sh`, was just found to have been dead in CI for as long as its suite was silently skipped (see skills `4edf42c`). Why this specific hook matters: it enforces the Rule 0 pre-task ritual — brain query, skill load, failing test first. Its failure mode, like any hook that cannot start, is to produce no output, and a hook that produces no output does not block anything. So "enforcing" and "dead on line 1" are indistinguishable from the outside, and there is currently nothing that would tell them apart. Minimum worth having, mirroring `tests/secret_guard_test.sh`: - invoke it **as a program**, never `sh "$HOOK"` — that override is exactly what hid the secret-guard breakage, since it substitutes a different interpreter than production uses - assert the exec bit, since direct invocation depends on it - one allow case and one block case, so a hook that never blocks fails the suite Not urgent — no evidence it is currently broken — but it is untested by inspection, and the sibling hook's failure showed that "untested and probably fine" and "dead" look the same from here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/skills#44