You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop the Unused leading_cd and moved Parameters From the Write Guard's Bare-Push Reader #3723
Raised by the local strict review of #3722, the fix for #3716.
_bare_push_branch in host-setup/agent-safety/claude/gh-write-guard.py takes leading_cd and moved, and runs an if not moved branch that depends on them. Since #3722, both production callers pass the constants None, False: branch_of in _bypass_denial and the _push_repo_selftest harness. A cd reaches the function already resolved through _cd and _join_dir, never as leading_cd. So the two parameters are reached only from TestBarePushRootedDirectoryOnWindows in host-setup/agent-safety/claude/test_install.py, which tests a path the hook never takes.
#3722 kept the signature because test_install.py was held by an open pull request at the time.
Fix:
Reduce the function to (cwd, c_dirs, git_dir), composing _moved(_msys_drive_path(cwd), c_dirs).
Point the class's two -C tests at that form.
Rewrite its three cd tests to pass the directory _cd produces as cwd, or None where a rooted path with no drive stays unresolved on Windows.
Question: Is the cleanup approved that drops the unused leading_cd and moved parameters from _bare_push_branch in host-setup/agent-safety/claude/gh-write-guard.py and repoints TestBarePushRootedDirectoryOnWindows in test_install.py?
Maintainer answer (decision triage, 2026-11-01): Approved, folded in. Drop the unused leading_cd and moved parameters from _bare_push_branch and repoint TestBarePushRootedDirectoryOnWindows, in the same PR that implements #3729 and #3730. This agent-safety edit is approved for implementation.
Released (2026-11-01): worktree and branch removed, so this claim holds no files. Its fix merged to develop in PR #3764. The issue closes when that is promoted.
This edits the agent-safety tree: the worker drives the pull request to the Merge Gate and does not merge it. The merge waits on the maintainer's go-ahead after reading the diff.
Activity
Read env's Directory and Environment Options in the Write Guard (#3722)
Promote Develop: Read a Push's Remote in the Repository Git Uses, Rea…
ptr727 commentedon Nov 1, 2026
Decision needed (decision triage, 2026-11-01)
Question: Is the cleanup approved that drops the unused
leading_cdandmovedparameters from_bare_push_branchin host-setup/agent-safety/claude/gh-write-guard.py and repointsTestBarePushRootedDirectoryOnWindowsin test_install.py?Options, recommended first:
None, False(gh-write-guard.py:922), so theif not movedpath runs only in a test of a path the hook never takes. Read env's Directory and Environment Options in the Write Guard #3722 kept the signature because test_install.py was held by an open PR, and there are now no open PRs. Sequence it with Read a Bare Push's Branch After an Earlier Branch Switch in the Same Command in the Write Guard #3729/Decide Whether Every Bare Push With an Undetermined Repository Fails Closed in the Write Guard #3730, which edit the same function._bare_push_branch, avoiding a merge conflict and giving one strict review over the function. Slightly mixes scope. No work in flight.Evidence: Signature at gh-write-guard.py:779-785, the single call site at line 922, the test at test_install.py:2448 and 2472.
Blocks: none
ptr727 commentedon Nov 1, 2026
Maintainer answer (decision triage, 2026-11-01): Approved, folded in. Drop the unused leading_cd and moved parameters from _bare_push_branch and repoint TestBarePushRootedDirectoryOnWindows, in the same PR that implements #3729 and #3730. This agent-safety edit is approved for implementation.
ptr727 commentedon Nov 1, 2026
Released (2026-11-01): worktree and branch removed, so this claim holds no files. Its fix merged to develop in PR #3764. The issue closes when that is promoted.
Backlog burndown claim (round 1, group G2). Branch:
feature/burn-3729. Issues: #3729, #3730, #3723.Predicted file set:
host-setup/agent-safety/claude/gh-write-guard.pyhost-setup/agent-safety/claude/test_install.pyhost-setup/agent-safety/README.mdtests/test_guard_size.pyThis edits the agent-safety tree: the worker drives the pull request to the Merge Gate and does not merge it. The merge waits on the maintainer's go-ahead after reading the diff.
Read an Unread Bare Push Branch as Every Protected Default in the Wri…