Restore gitea_lock_issue MCP tool registration for author create_pr flow #521

Closed
opened 2026-07-08 03:35:49 -05:00 by jcwalker3 · 2 comments
Owner

Problem:
The author create_pr flow is globally blocked because gitea_create_pr requires an issue lock, but gitea_lock_issue is not registered as an MCP tool in the current server/toolset.

Observed on pristine master:

  • @mcp.tool() is attached to _list_open_pulls, an internal helper.
  • gitea_lock_issue has no @mcp.tool() decorator.
  • ToolSearch finds gitea_lock_issue in no namespace.
  • _save_issue_lock is only called inside gitea_lock_issue.
  • No CLI wrapper or alternate exposed MCP tool sets the required issue lock.
  • Result: gitea_create_pr fails closed with “Issue lock is missing. Call gitea_lock_issue first.”

Impact:
Author sessions can create/claim/implement/push branches, but cannot create PRs through the gated MCP path. This blocks the normal issue-backed PR workflow globally.

Acceptance criteria:

  1. Register gitea_lock_issue as an MCP tool in the appropriate author namespace.
  2. Ensure _list_open_pulls is not accidentally exposed as a public MCP tool unless intentionally supported.
  3. Add a regression test proving gitea_lock_issue is present in the MCP tool registry.
  4. Add a regression test proving create_pr can proceed after a valid issue lock is acquired.
  5. Add a regression test proving create_pr still fails closed when the issue lock is missing.
  6. Confirm the fix does not widen lock authority across author/reviewer/merger/reconciler roles.
  7. Update any runbook guidance if the lock/create_pr sequence changed.
Problem: The author create_pr flow is globally blocked because gitea_create_pr requires an issue lock, but gitea_lock_issue is not registered as an MCP tool in the current server/toolset. Observed on pristine master: - @mcp.tool() is attached to _list_open_pulls, an internal helper. - gitea_lock_issue has no @mcp.tool() decorator. - ToolSearch finds gitea_lock_issue in no namespace. - _save_issue_lock is only called inside gitea_lock_issue. - No CLI wrapper or alternate exposed MCP tool sets the required issue lock. - Result: gitea_create_pr fails closed with “Issue lock is missing. Call gitea_lock_issue first.” Impact: Author sessions can create/claim/implement/push branches, but cannot create PRs through the gated MCP path. This blocks the normal issue-backed PR workflow globally. Acceptance criteria: 1. Register gitea_lock_issue as an MCP tool in the appropriate author namespace. 2. Ensure _list_open_pulls is not accidentally exposed as a public MCP tool unless intentionally supported. 3. Add a regression test proving gitea_lock_issue is present in the MCP tool registry. 4. Add a regression test proving create_pr can proceed after a valid issue lock is acquired. 5. Add a regression test proving create_pr still fails closed when the issue lock is missing. 6. Confirm the fix does not widen lock authority across author/reviewer/merger/reconciler roles. 7. Update any runbook guidance if the lock/create_pr sequence changed.
jcwalker3 added the status:in-progress label 2026-07-08 03:41:37 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #521 - branch: feat/issue-521-lock-issue-registration - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: progress - issue: #521 - branch: feat/issue-521-lock-issue-registration - phase: create_pr - profile: prgs-author - pr: none - blocker: none - next_action: open pull request
sysadmin removed the status:in-progress label 2026-07-08 03:50:26 -05:00
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#521