diff --git a/.claude/settings.json b/.claude/settings.json index 8bd03a93..8318c70a 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -29,8 +29,16 @@ "Bash(git clean*)", "Bash(git restore*)", "Bash(git apply*)", - "Bash(gh pr *)", - "Bash(gh issue *)", + "Bash(gh pr create*)", + "Bash(gh pr merge*)", + "Bash(gh pr close*)", + "Bash(gh pr edit*)", + "Bash(gh pr comment*)", + "Bash(gh pr review*)", + "Bash(gh issue create*)", + "Bash(gh issue close*)", + "Bash(gh issue edit*)", + "Bash(gh issue comment*)", "Bash(gh repo *)", "Bash(gh api *)", "Read(/home/patrick/Patrick-Personal/**)", diff --git a/src/aipass/ai_mail/apps/handlers/email/delivery.py b/src/aipass/ai_mail/apps/handlers/email/delivery.py index 3c8bd13c..9fa6523d 100644 --- a/src/aipass/ai_mail/apps/handlers/email/delivery.py +++ b/src/aipass/ai_mail/apps/handlers/email/delivery.py @@ -232,7 +232,7 @@ def deliver_email_to_branch( json_handler.log_operation("deliver_email", {"to": to_branch, "subject": email_data.get("subject", "")}) # Handle path input from DRONE's @ resolution - if Path(to_branch).is_absolute(): + if to_branch.startswith("/") or Path(to_branch).is_absolute(): branches_list = get_all_branches() path_to_email = {b["path"]: b["email"] for b in branches_list} if to_branch in path_to_email: diff --git a/src/aipass/seedgo/tests/test_hooks_snapshot.py b/src/aipass/seedgo/tests/test_hooks_snapshot.py index 61ce2e83..2b0ba1ca 100644 --- a/src/aipass/seedgo/tests/test_hooks_snapshot.py +++ b/src/aipass/seedgo/tests/test_hooks_snapshot.py @@ -16,6 +16,7 @@ Baselines in tests/fixtures/*_hooks_snapshot.json. import json import re +import sys from pathlib import Path import pytest @@ -105,8 +106,8 @@ def _extract_hook_matchers(hooks_config: dict) -> dict[str, list[str]]: @pytest.mark.skipif( - not (Path.home() / ".claude" / "settings.json").exists(), - reason="No provider settings.json (CI environment)", + sys.platform == "win32" or not (Path.home() / ".claude" / "settings.json").exists(), + reason="No provider settings.json (CI environment) or Windows CI", ) class TestProviderHooksSnapshot: """Compare ~/.claude/settings.json hooks against known-good baseline.""" diff --git a/src/aipass/spawn/apps/handlers/regenerate_registry_ops.py b/src/aipass/spawn/apps/handlers/regenerate_registry_ops.py index 65afe5f3..719c828a 100644 --- a/src/aipass/spawn/apps/handlers/regenerate_registry_ops.py +++ b/src/aipass/spawn/apps/handlers/regenerate_registry_ops.py @@ -90,7 +90,7 @@ def regenerate_template_registry(template_dir: Path) -> dict: json.dumps(registry, indent=2, ensure_ascii=False) + "\n", encoding="utf-8", ) - tmp_path.rename(registry_path) + tmp_path.replace(registry_path) except (IOError, OSError) as exc: logger.error(f"Failed to write template registry: {exc}") return {"error": f"Failed to write registry: {exc}"} diff --git a/src/aipass/spawn/apps/handlers/sync_registry_ops.py b/src/aipass/spawn/apps/handlers/sync_registry_ops.py index 238fab28..b780a676 100644 --- a/src/aipass/spawn/apps/handlers/sync_registry_ops.py +++ b/src/aipass/spawn/apps/handlers/sync_registry_ops.py @@ -176,7 +176,7 @@ def sync_registry(fix: bool = False) -> dict: today = datetime.now().strftime("%Y-%m-%d") for name in unregistered_list: branch_path = filesystem_branches[name] - rel_path = str(branch_path.relative_to(project_root)) + rel_path = branch_path.relative_to(project_root).as_posix() entry = { "name": name.upper(),