aboutsummaryrefslogtreecommitdiff
path: root/scripts/tests/install-hooks-link.bats
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-25 15:35:14 -0500
committerCraig Jennings <c@cjennings.net>2026-07-25 15:35:14 -0500
commitf2609d9f9ad33486bef43211d753ba53e1e24181 (patch)
tree561f0514866570d47c446816daa131ce13064639 /scripts/tests/install-hooks-link.bats
parent3203bd803b6a05d10781634e7e18742879c1046a (diff)
downloadrulesets-f2609d9f9ad33486bef43211d753ba53e1e24181.tar.gz
rulesets-f2609d9f9ad33486bef43211d753ba53e1e24181.zip
feat: enforce clean wraps and inbox-safe syncHEADmain
Centralize repository-state checks, bind teardown to a certified clean HEAD, and allow inbox-only refreshes. Guard installed symlinks from cross-project writes and add regression coverage.
Diffstat (limited to 'scripts/tests/install-hooks-link.bats')
-rw-r--r--scripts/tests/install-hooks-link.bats15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/tests/install-hooks-link.bats b/scripts/tests/install-hooks-link.bats
index 80ac8dd..5368781 100644
--- a/scripts/tests/install-hooks-link.bats
+++ b/scripts/tests/install-hooks-link.bats
@@ -20,6 +20,7 @@ run_install() {
RULES_DIR="$TMPHOME/rules" \
HOOKS_DIR="$TMPHOME/hooks" \
CLAUDE_DIR="$TMPHOME/claude" \
+ CODEX_DIR="$TMPHOME/codex" \
LOCAL_BIN="$TMPHOME/bin"
}
@@ -28,6 +29,20 @@ run_install() {
[ "$status" -eq 0 ]
[ -L "$TMPHOME/hooks/session-clear-resume.sh" ]
[ -L "$TMPHOME/hooks/precompact-priorities.sh" ]
+ [ -L "$TMPHOME/hooks/rulesets-write-boundary.py" ]
+}
+
+@test "install links Codex Stop-hook configuration" {
+ run run_install
+ [ "$status" -eq 0 ]
+ [ -L "$TMPHOME/codex/hooks.json" ]
+ grep -q "ai-wrap-teardown.sh" "$TMPHOME/codex/hooks.json"
+}
+
+@test "install links the shared Git worktree gate beside the launcher" {
+ run run_install
+ [ "$status" -eq 0 ]
+ [ -L "$TMPHOME/bin/git-worktree-gate" ]
}
@test "install does not link opt-in hooks" {