From 1058fb7c9081669ae3f451943ab6aac4d44cecea Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Sun, 3 May 2026 23:40:32 -0700 Subject: [PATCH] feat(system): fix(ci): test_git_gate falls back to repo hook copy when user copy absent Co-Authored-By: @devpulse --- src/aipass/devpulse/tests/test_git_gate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aipass/devpulse/tests/test_git_gate.py b/src/aipass/devpulse/tests/test_git_gate.py index a8f41817..93ea0220 100644 --- a/src/aipass/devpulse/tests/test_git_gate.py +++ b/src/aipass/devpulse/tests/test_git_gate.py @@ -19,7 +19,9 @@ from pathlib import Path import pytest -HOOK_PATH = Path.home() / ".claude" / "hooks" / "git_gate.py" +_USER_HOOK = Path.home() / ".claude" / "hooks" / "git_gate.py" +_REPO_HOOK = Path(__file__).resolve().parents[4] / ".claude" / "hooks" / "git_gate.py" +HOOK_PATH = _USER_HOOK if _USER_HOOK.is_file() else _REPO_HOOK _spec = importlib.util.spec_from_file_location("git_gate", HOOK_PATH) _mod = importlib.util.module_from_spec(_spec)