test(hooks): audit hooks/tests for absence-scored crashed subjects, harden the affected suites #465
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!465
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-417-hooks-tests-audit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
#366 hardened the eight hooks/tests suites that run their subject as bash "$HOOK", but scoped the file list on that name and missed release-gate.test.sh (subject $GATE), which scored a crashed/empty gate as allow - a real CI instance failed over-threshold-stale with "expected deny, got allow" when the gate produced no output under load.
Full audit, derived from the defect SHAPE (subject-under-test with stderr discarded, exit status unchecked, verdict by absence of an expected string), not from a name. Classification, stated in the lib-hook-harness.sh header:
lib-hook-harness.sh gains two shared subject wrappers, script_exec_in_repo and gate_exec: they capture the subject's exit status and stderr, surface the stderr on failure, and report a non-zero exit, empty output, or missing subject as a named error - never allow or block. Three affected suites route their subject through them; assemble-plugin-artifact is fixed inline because its tested path legitimately exits non-zero, so it scores by a positive forge-shim marker instead. Six new self-test cases in lib-hook-harness.test.sh prove a subject stubbed to exit non-zero or produce no output is now reported as an error, not scored as allow. All suites keep their exact pass counts (12/11/13/39 identical before and after). No hook or gate script changed. Full gate green.
Closes #417