The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tools): classify git bisect as a worktree mutation
kshitijdaa139c9e38e
diff --git a/tests/tools/test_self_repo_guard.py b/tests/tools/test_self_repo_guard.pyindex 503eac02edc..d2738ecc903 100644--- a/tests/tools/test_self_repo_guard.py+++ b/tests/tools/test_self_repo_guard.py@@ -30,6 +30,8 @@ class TestBlocksMutationsInSourceRepo:["checkout pr-51020","switch main",+ "bisect start",+ "bisect good HEAD~10","reset --hard origin/main","reset --har origin/main","rebase origin/main",diff --git a/tools/self_repo_guard.py b/tools/self_repo_guard.pyindex 32d3641f29e..6d3f4b4c815 100644--- a/tools/self_repo_guard.py+++ b/tools/self_repo_guard.py@@ -27,6 +27,9 @@ _WORKTREE_MUTATIONS = frozenset({"clean","cherry-pick","revert",+ # bisect drives repeated checkouts of the running root — the exact+ # module-version-skew hazard this guard exists for.+ "bisect",})_WORKTREE_TARGET_ACTIONS = frozenset({"move", "remove"})_STASH_SAFE_ACTIONS = frozenset({"list", "show", "create", "store", "drop", "clear"})@@ -35,7 +38,6 @@ _KNOWN_GIT_BUILTINS = frozenset({"add","am","apply",- "bisect","blame","branch","bundle",