fix: exempt reconciler close_pr from branches-only worktree guard (Closes #468) #472

Merged
sysadmin merged 1 commits from feat/issue-468-reconciler-close-guard into master 2026-07-08 02:48:57 -05:00
Owner

Summary

Closes #468. Reconciler close_pr is a Gitea metadata mutation and must not be blocked by the #274 branches-only author worktree guard when the MCP workspace resolves to the stable control checkout (no GITEA_AUTHOR_WORKTREE).

Changes

  • gitea_mcp_server.py — exempt reconciler role from _enforce_branches_only_author_mutation alongside reviewer
  • tests/test_reconciler_close_workspace_guard.py — reconciler close from control checkout succeeds; author create_issue still blocked

Verification

venv/bin/python -m pytest tests/test_reconciler_close_workspace_guard.py tests/test_create_issue_workspace_guard.py tests/test_reconciler_close_gate.py -q
# 25 passed

venv/bin/python -m pytest tests/ -q
# 1674 passed, 6 skipped

Worktree

branches/issue-468-reconciler-close-guard @ c7b462a

## Summary Closes #468. Reconciler `close_pr` is a Gitea metadata mutation and must not be blocked by the #274 branches-only author worktree guard when the MCP workspace resolves to the stable control checkout (no `GITEA_AUTHOR_WORKTREE`). ## Changes - `gitea_mcp_server.py` — exempt `reconciler` role from `_enforce_branches_only_author_mutation` alongside `reviewer` - `tests/test_reconciler_close_workspace_guard.py` — reconciler close from control checkout succeeds; author `create_issue` still blocked ## Verification ```bash venv/bin/python -m pytest tests/test_reconciler_close_workspace_guard.py tests/test_create_issue_workspace_guard.py tests/test_reconciler_close_gate.py -q # 25 passed venv/bin/python -m pytest tests/ -q # 1674 passed, 6 skipped ``` ## Worktree `branches/issue-468-reconciler-close-guard` @ `c7b462a`
jcwalker3 added 1 commit 2026-07-07 16:37:46 -05:00
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]>
sysadmin approved these changes 2026-07-08 02:24:27 -05:00
sysadmin left a comment
Owner

APPROVED: PR #472 is clean, fully verified, and successfully resolves issue #468 by exempting the reconciler role from the branches-only author mutation guard. This allows metadata closing operations to proceed without GITEA_AUTHOR_WORKTREE context.

Note: This review resolves the prior run contradiction. In the prior session, PR #411 was merged via a separate merger profile (consuming the terminal mutation budget for that run), while this PR #472 lease was registered but its review could not be submitted. This session resumes and posts the approved review.

APPROVED: PR #472 is clean, fully verified, and successfully resolves issue #468 by exempting the reconciler role from the branches-only author mutation guard. This allows metadata closing operations to proceed without GITEA_AUTHOR_WORKTREE context. Note: This review resolves the prior run contradiction. In the prior session, PR #411 was merged via a separate merger profile (consuming the terminal mutation budget for that run), while this PR #472 lease was registered but its review could not be submitted. This session resumes and posts the approved review.
sysadmin merged commit f89949cea9 into master 2026-07-08 02:48:57 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#472