fix: register gitea_lock_issue as MCP tool (Closes #521) #526
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#526
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Restore
gitea_lock_issueas a discoverable MCP tool so the authorcreate_prflow can acquire the issue lock thatgitea_create_prrequires.Problem
@mcp.tool()was attached to internal_list_open_pullswhilegitea_lock_issuehad no decorator, so ToolSearch/clients could not discover the lock tool even thoughgitea_create_prfails closed without a lock.Changes
@mcp.tool()from_list_open_pulls(internal helper only)@mcp.tool()togitea_lock_issuetests/test_lock_issue_mcp_registration.pywith registration and create_pr lock-flow regression testsValidation
Closes #521
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #526
issue: #521
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 97777-052a67d99227
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr526
phase: claimed
candidate_head:
d56baa635etarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T08:47:35Z
expires_at: 2026-07-08T10:47:35Z
blocker: none
Review: PR #526 / Issue #521
Verdict: APPROVED at head
d56baa635e53f71be3a895816cecbea411f9363b.Identity / profile proof
sysadmin(prgs-reviewer)jcwalker3— not reviewer identityHead pin
d56baa6d56baa635e53f71be3a895816cecbea411f9363b— no driftScope (2 files only)
gitea_mcp_server.py— move@mcp.tool()from_list_open_pullstogitea_lock_issuetests/test_lock_issue_mcp_registration.py— new regression testsReview focus
gitea_lock_issuedecorated with@mcp.tool()_list_open_pullsno longer exposed (_list_open_pulls∉ tool registry)gitea_lock_issuestill gated by_profile_permission_block(task_capability_map.required_permission("lock_issue"))(author role); no reviewer/merger/reconciler wideningcreate_prstill fails closed without lock (test_create_pr_still_fails_closed_without_issue_lock)test_create_pr_proceeds_after_valid_issue_lock+ existingTestIssueLockingcases)Validation
Registry check:
gitea_lock_issueregistered=True,_list_open_pullsexposed=False.Mutation ledger
gitea_acquire_reviewer_pr_lease97777-052a67d99227)gitea_mark_final_review_decisiond56baa6gitea_submit_pr_reviewNo merge performed.
Merger prompt (paste when ready to merge):
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #526
issue: #521
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 97777-052a67d99227
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr526
phase: claimed
candidate_head:
d56baa635etarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T08:50:17Z
expires_at: 2026-07-08T10:50:17Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #526
issue: #521
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 97777-052a67d99227
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr526
phase: merge
candidate_head:
d56baa635etarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T08:50:21Z
expires_at: 2026-07-08T10:50:21Z
blocker: none