Bug: gitea_resolve_task_capability returns internal_error for acquire_reviewer_pr_lease #726

Open
opened 2026-07-17 08:54:26 -05:00 by jcwalker3 · 0 comments
Owner

Description
gitea_resolve_task_capability fails with an unhandled ValueError when an unknown task is requested (such as acquire_reviewer_pr_lease which is missing from the capability map). This exception escapes to the MCP framework and is converted into a non-retryable internal_error, breaking workflows that rely on structured capability resolution.

Acceptance Criteria

  1. Add acquire_reviewer_pr_lease and gitea_acquire_reviewer_pr_lease to the canonical task map, mapping them to gitea.pr.comment and the reviewer role.
  2. Ensure gitea_resolve_task_capability returns a canonical structured unsupported/unknown-task response instead of raising a ValueError.
  3. Add regression tests to verify structured responses for authorized, unauthorized, and unknown tasks.
**Description** `gitea_resolve_task_capability` fails with an unhandled `ValueError` when an unknown task is requested (such as `acquire_reviewer_pr_lease` which is missing from the capability map). This exception escapes to the MCP framework and is converted into a non-retryable `internal_error`, breaking workflows that rely on structured capability resolution. **Acceptance Criteria** 1. Add `acquire_reviewer_pr_lease` and `gitea_acquire_reviewer_pr_lease` to the canonical task map, mapping them to `gitea.pr.comment` and the `reviewer` role. 2. Ensure `gitea_resolve_task_capability` returns a canonical structured unsupported/unknown-task response instead of raising a `ValueError`. 3. Add regression tests to verify structured responses for authorized, unauthorized, and unknown tasks.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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