fix: exempt reconciler close_pr from branches-only worktree guard (#468)
Reconciler profiles perform Gitea metadata mutations (close_pr) and must not be blocked when the MCP workspace resolves to the stable control checkout without GITEA_AUTHOR_WORKTREE. Author file mutations remain guarded. Add regression tests for reconciler close vs author create_issue. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
+7
-2
@@ -399,8 +399,13 @@ def record_preflight_check(type_name: str, resolved_role: str | None = None):
|
||||
|
||||
|
||||
def _enforce_branches_only_author_mutation(worktree_path: str | None = None) -> None:
|
||||
"""#274: author mutations must run from a branches/ session worktree."""
|
||||
if _preflight_resolved_role == "reviewer":
|
||||
"""#274: author file/branch mutations must run from a branches/ worktree.
|
||||
|
||||
Reviewer and reconciler roles are exempt: reconciler ``close_pr`` is a
|
||||
Gitea metadata mutation and must not require ``GITEA_AUTHOR_WORKTREE``
|
||||
(#468).
|
||||
"""
|
||||
if _preflight_resolved_role in ("reviewer", "reconciler"):
|
||||
return
|
||||
workspace = author_mutation_worktree.resolve_mutation_workspace(
|
||||
worktree_path,
|
||||
|
||||
Reference in New Issue
Block a user