fix: resolve conflicts for PR #381

Merge prgs/master and keep already-landed reconcile close tool routing (#310)
alongside dedicated reconciler close tasks (#309).
This commit is contained in:
2026-07-07 09:58:45 -04:00
15 changed files with 2273 additions and 10 deletions
+8 -10
View File
@@ -103,6 +103,9 @@ TASK_REQUIRED_ROLE = {
"reconcile_already_landed_pr": "reconciler",
"reconcile_already_landed": "reconciler",
"reconcile-landed-pr": "reconciler",
# #309: reconciler tasks close already-landed PRs/issues only.
"reconcile_close_landed_pr": "reconciler",
"reconcile_close_landed_issue": "reconciler",
}
WRONG_ROLE_REVIEWER_MSG = (
@@ -110,7 +113,8 @@ WRONG_ROLE_REVIEWER_MSG = (
)
WRONG_ROLE_RECONCILER_MSG = (
"Wrong role/session for reconciler task. Launch reconciler MCP namespace."
"Wrong role/session for reconciler task. Launch a reconciler-capable "
"MCP namespace/profile with exact close capability."
)
_session_last_route: dict | None = None
@@ -209,12 +213,6 @@ def route_task_session(
return result
if required_role == "reconciler":
message = WRONG_ROLE_RECONCILER_MSG
if active_role_kind == "reconciler":
message = (
"Reconciler task requires gitea.pr.close on a dedicated "
"reconciler profile."
)
result = {
"task_type": task_type,
"required_role": required_role,
@@ -223,9 +221,9 @@ def route_task_session(
"route_result": ROUTE_WRONG_ROLE,
"downstream_allowed": False,
"reasons": [
message,
"Reconciler tasks cannot run in author or reviewer sessions.",
"Static-profile mode does not permit in-place role switching.",
WRONG_ROLE_RECONCILER_MSG,
"Reconciler tasks cannot run in author or reviewer "
"sessions without exact close capability.",
],
"message": WRONG_ROLE_RECONCILER_MSG,
"runtime_switching_supported": runtime_switching_supported,