Allow read-only PR queue inventory under author profiles while preserving hard review/merge gates #164

Closed
opened 2026-07-05 10:21:28 -05:00 by jcwalker3 · 0 comments
Owner

Problem

Multiple LLM runtimes are stopping before listing open PRs whenever the active profile is jcwalker3 / prgs-author. This is correct for review/merge actions, but too strict for read-only controller triage.

There are known open PRs waiting, including:

But the workflow stops before calling PR inventory/listing tools, then reports that no PRs were enumerated. That makes it look like the tool failed or that no PRs exist, when the real issue is that the workflow conflates safe read-only discovery with reviewer-only actions.

Observed behavior

  • Fresh MCP reconnect still authenticates as jcwalker3 / prgs-author.
  • Runtime context correctly says review/merge are forbidden.
  • The agent stops at gate 2 before fetching/listing PRs.
  • This happens across different LLMs, so it appears to be a workflow/tooling design issue, not a single-agent mistake.
  • gitea_activate_profile / profile switching is not a valid fix when runtime_switching_supported=false; the operator must reconnect to a reviewer namespace.

Required behavior

  1. Split PR workflows into two phases:

    • read-only PR queue discovery / inventory
    • reviewer-only review / merge actions
  2. Allow author profiles with read permission to perform safe PR inventory:

    • list open PRs
    • show repo, PR number, title, author, base, head branch, mergeability/status, linked issue, labels, and head SHA
    • identify which PRs require a non-author reviewer
    • clearly report that review/merge is blocked under the current profile
  3. Continue hard-blocking all reviewer/merge actions under author profiles:

    • no approve
    • no request-changes review
    • no merge
    • no reviewer eligibility check if that action implies reviewer role
    • no merge cleanup
    • no branch deletion tied to merge
  4. Improve final reports:

    • Do not say or imply "no open PRs" when PR listing was never attempted.
    • Distinguish:
      • "Open PRs found"
      • "PR inventory not attempted"
      • "Review/merge blocked"
    • A review/merge request under prgs-author should be allowed to produce a read-only queue report, then stop before review/merge.
  5. Static profile mode UX:

    • If runtime_switching_supported=false, profile activation should be hidden, rejected, or clearly documented as unavailable.
    • Runtime guidance should say to reconnect to the reviewer namespace, not activate a profile in-place.
  6. Add tests:

    • author profile can list open PRs but cannot review/merge
    • author profile can produce a queue report for pending reviewer work
    • author profile never calls mutation tools during inventory
    • reviewer profile can proceed past inventory into review gates
    • static runtime rejects or hides profile activation
    • stopped-before-listing is not reported as "no PRs"
    • a review/merge request under author profile lists candidate PRs, then stops cleanly before reviewer-only actions

Acceptance criteria

  • "Show/list open PRs" works under prgs-author.
  • "Review and merge open PRs" under prgs-author may list the waiting PR queue, but must stop before review/merge and say a sysadmin / prgs-reviewer runtime is required.
  • No review/merge safety gates are weakened.
  • Reports are explicit about what was actually enumerated versus what was blocked.

Related: #139 (role-aware task routing umbrella), #141 (read-only task capability resolver — gitea_resolve_task_capability can back phase-1 inventory), #142 (structured permission failure reports).

## Problem Multiple LLM runtimes are stopping before listing open PRs whenever the active profile is `jcwalker3 / prgs-author`. This is correct for review/merge actions, but too strict for read-only controller triage. There are known open PRs waiting, including: * mcp-control-plane #64 * mcp-control-plane #62 * Gitea-Tools #159 * Gitea-Tools #160 * Gitea-Tools #161 But the workflow stops before calling PR inventory/listing tools, then reports that no PRs were enumerated. That makes it look like the tool failed or that no PRs exist, when the real issue is that the workflow conflates safe read-only discovery with reviewer-only actions. ## Observed behavior * Fresh MCP reconnect still authenticates as `jcwalker3 / prgs-author`. * Runtime context correctly says review/merge are forbidden. * The agent stops at gate 2 before fetching/listing PRs. * This happens across different LLMs, so it appears to be a workflow/tooling design issue, not a single-agent mistake. * `gitea_activate_profile` / profile switching is not a valid fix when `runtime_switching_supported=false`; the operator must reconnect to a reviewer namespace. ## Required behavior 1. Split PR workflows into two phases: * read-only PR queue discovery / inventory * reviewer-only review / merge actions 2. Allow author profiles with read permission to perform safe PR inventory: * list open PRs * show repo, PR number, title, author, base, head branch, mergeability/status, linked issue, labels, and head SHA * identify which PRs require a non-author reviewer * clearly report that review/merge is blocked under the current profile 3. Continue hard-blocking all reviewer/merge actions under author profiles: * no approve * no request-changes review * no merge * no reviewer eligibility check if that action implies reviewer role * no merge cleanup * no branch deletion tied to merge 4. Improve final reports: * Do not say or imply "no open PRs" when PR listing was never attempted. * Distinguish: * "Open PRs found" * "PR inventory not attempted" * "Review/merge blocked" * A review/merge request under `prgs-author` should be allowed to produce a read-only queue report, then stop before review/merge. 5. Static profile mode UX: * If `runtime_switching_supported=false`, profile activation should be hidden, rejected, or clearly documented as unavailable. * Runtime guidance should say to reconnect to the reviewer namespace, not activate a profile in-place. 6. Add tests: * author profile can list open PRs but cannot review/merge * author profile can produce a queue report for pending reviewer work * author profile never calls mutation tools during inventory * reviewer profile can proceed past inventory into review gates * static runtime rejects or hides profile activation * stopped-before-listing is not reported as "no PRs" * a review/merge request under author profile lists candidate PRs, then stops cleanly before reviewer-only actions ## Acceptance criteria * "Show/list open PRs" works under `prgs-author`. * "Review and merge open PRs" under `prgs-author` may list the waiting PR queue, but must stop before review/merge and say a `sysadmin / prgs-reviewer` runtime is required. * No review/merge safety gates are weakened. * Reports are explicit about what was actually enumerated versus what was blocked. **Related:** #139 (role-aware task routing umbrella), #141 (read-only task capability resolver — `gitea_resolve_task_capability` can back phase-1 inventory), #142 (structured permission failure reports).
jcwalker3 added the mcpgiteatestingworkflowenhancement labels 2026-07-05 10:21:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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