fix(#664): remediate PR #908 review #641 blockers B13, B1, B14, B6/B11, and B8

Register runtime.break_glass_restart in the multi-service operation normalizer
and enforce it through the real profile gate. Authorize only the exact trusted
prgs-controller profile plus that capability; remove substring controller
authority so declared reconciler roles and cleanup_merged_pr_branch semantics
are preserved. Route non-dry-run apply through a canonical injectable executor
delegate with truthful execution flags. Correct under/over-redaction for
credentials while preserving benign sec- text.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
2026-07-28 23:33:25 -04:00
co-authored by Claude Opus 4.8
parent 4463a300ba
commit c67f39b40e
6 changed files with 1030 additions and 538 deletions
+8 -3
View File
@@ -37,12 +37,17 @@ def normalize_role_kind(
*,
profile_name: str | None = None,
) -> str:
"""Map profile/task role to a workspace namespace key."""
"""Map profile/task role to a workspace namespace key.
Exact profile-name matches only for controller routing (#840 / #664 B1):
substring lookalikes such as ``fake-controller`` must not become
controller.
"""
role = (role_kind or "author").strip().lower()
profile = (profile_name or "").strip().lower()
if role == "reviewer" and "merger" in profile:
if role == "reviewer" and profile in ("prgs-merger", "mdcps-merger", "merger"):
return "merger"
if "controller" in profile or role == "controller":
if role == "controller" or profile in ("prgs-controller", "controller"):
return "controller"
if role in ROLE_WORKTREE_ENVS:
return role