feat: add prgs-reconciler profile and gated already-landed PR close (Closes #310) #381

Merged
sysadmin merged 4 commits from feat/issue-310-prgs-reconciler-profile into master 2026-07-07 09:22:56 -05:00
Owner

Summary

Adds a dedicated reconciler role and MCP tool for closing open PRs whose head SHA is already an ancestor of the target branch.

Changes

  • New already_landed_reconcile module with ancestry gates and target-branch fetch proof
  • New gitea_reconcile_already_landed_pr MCP tool (read-only assessment + gated close)
  • reconcile_already_landed_pr resolver task mapped to gitea.pr.close / reconciler role
  • Role session router support for reconciler tasks and work_issue author alias
  • _role_kind detects reconciler profiles (close without review/author powers)
  • Docs: gitea-reconciler namespace in dual-namespace deployment, execution profiles, runbooks
  • Tests for assessment gates, MCP tool, routing, and capability resolution

Safety

  • Normal prgs-author and prgs-reviewer profiles do not gain broad PR-close authority
  • PR close only proceeds after live PR fetch, fresh target-branch fetch, and ancestor proof
  • PRs not already landed are denied close via the reconciler path

Closes #310

## Summary Adds a dedicated reconciler role and MCP tool for closing open PRs whose head SHA is already an ancestor of the target branch. ## Changes - New `already_landed_reconcile` module with ancestry gates and target-branch fetch proof - New `gitea_reconcile_already_landed_pr` MCP tool (read-only assessment + gated close) - `reconcile_already_landed_pr` resolver task mapped to `gitea.pr.close` / reconciler role - Role session router support for reconciler tasks and `work_issue` author alias - `_role_kind` detects reconciler profiles (close without review/author powers) - Docs: `gitea-reconciler` namespace in dual-namespace deployment, execution profiles, runbooks - Tests for assessment gates, MCP tool, routing, and capability resolution ## Safety - Normal `prgs-author` and `prgs-reviewer` profiles do not gain broad PR-close authority - PR close only proceeds after live PR fetch, fresh target-branch fetch, and ancestor proof - PRs not already landed are denied close via the reconciler path Closes #310
jcwalker3 added 1 commit 2026-07-07 08:21:23 -05:00
Introduce a dedicated reconciler role with gitea_reconcile_already_landed_pr,
which closes open PRs only after live fetch and ancestor proof against a fresh
target branch. Document the gitea-reconciler namespace and extend task routing.
jcwalker3 added 1 commit 2026-07-07 08:38:34 -05:00
jcwalker3 added 1 commit 2026-07-07 08:58:50 -05:00
Merge prgs/master and keep already-landed reconcile close tool routing (#310)
alongside dedicated reconciler close tasks (#309).
jcwalker3 added 1 commit 2026-07-07 09:18:54 -05:00
# Conflicts:
#	tests/test_resolve_task_capability.py
sysadmin approved these changes 2026-07-07 09:22:42 -05:00
sysadmin left a comment
Owner

All tests pass successfully after merging master (1497 passed). Reviewed the implementation of already_landed_reconcile.py, gitea_mcp_server.py, role_session_router.py, task_capability_map.py, and the test coverage in tests/test_already_landed_reconcile.py and tests/test_reconcile_already_landed_pr_tool.py. It correctly introduces the prgs-reconciler execution profile with gated capabilities for already-landed PR close and reconciliation comments, enforcing role-based task session routing.

All tests pass successfully after merging master (1497 passed). Reviewed the implementation of `already_landed_reconcile.py`, `gitea_mcp_server.py`, `role_session_router.py`, `task_capability_map.py`, and the test coverage in `tests/test_already_landed_reconcile.py` and `tests/test_reconcile_already_landed_pr_tool.py`. It correctly introduces the `prgs-reconciler` execution profile with gated capabilities for already-landed PR close and reconciliation comments, enforcing role-based task session routing.
sysadmin merged commit 4243b60ca3 into master 2026-07-07 09:22:56 -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#381