MCP namespace EOF after server restart blocks registered Gitea tools from merger flow #543
Closed
opened 2026-07-08 12:26:18 -05:00 by jcwalker3
·
5 comments
No Branch/Tag Specified
master
fix/issue-709-decision-lock-cross-profile
fix/issue-695-native-transport-quarantine
fix/issue-698-report-validator-schema
fix/issue-702-stale-binding-lease-recovery
fix/issue-699-structured-auth-mcp-errors
fix/issue-695-native-quarantine-v2
fix/issue-693-review-decision-lock-recovery
fix/issue-691-obsolete-reviewer-lease-cleanup
feat/issue-687-reconciler-branch-delete
fix/issue-683-workflow-guard-hardening
chore/issue-681-preserve-review-session-wip
feat/issue-604-anti-stomp-preflight
feat/issue-606-sentry-observability
fix/issue-671-block-stable-branch-push
fix/issue-675-residual-preflight-remediation
fix/issue-673-remediate-regressions-part2
fix/issue-673-remediate-regressions
feat/issue-603-lifecycle-labels
fix/issue-627-set-issue-labels-pagination
feat/issue-601-first-class-leases
feat/issue-612-incident-bridge
feat/issue-600-controller-allocator-api
fix/issue-620-head-scoped-review-locks
feat/issue-613-allocator-db-substrate
docs/mcp-stable-control-runtime-policy
feat/issue-609-prepared-review-verdict-resume
feat/issue-610-live-remote-parity
feat/issue-503-reviewer-active-worktree
feat/issue-470-preflight-contract
feat/issue-440-lock-recovery
feat/issue-440-branch-recovery
feat/issue-458-queue-fail-closed-copy
feat/issue-400-early-duplicate-work-gate
feat/issue-308-reconcile-inventory-pagination
feat/issue-308-reconcile-pagination-proof
docs/issue-261-agent-temp-artifact-cleanup
feat/issue-262-map-commit-files
fix/infra-stop-conflict-marker-false-positive
feat/issue-139-role-aware-task-routing
feat/issue-188-continuation-selection-wall
feat/issue-189-continuation-mode-proofs
feat/issue-232-refresh-wiki-proof-heads
feat/issue-210-block-workspace-edits
feat/issue-204-exact-issue-lock
docs/issue-80-label-taxonomy
docs/issue-79-safety-boundary-updates
v1.1.0
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
status:pr-open
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#543
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.
Context
During the PR #418 merge flow, the merger attempted to restart the Gitea MCP server so the newly landed tool
gitea_adopt_merger_pr_leasewould become available.Observed facts
git fetch prgsconfirmed local state was current withprgs/master.mcp_server.pyprocesses were terminated.gitea_adopt_merger_pr_leaseis compiled and registered in theFastMCPtool manager.gitea-reviewerandgitea-author, includinggitea_whoami, failed withclient is closing: EOF.context7, responded successfully, suggesting this is not a global MCP client failure.Problem
The server code can contain and register a tool while the IDE/MCP namespace remains unusable. This creates a false-ready state: local code inspection says the tool exists, but the actual workflow path cannot call it.
Required outcome
Add diagnostics, guardrails, and/or recovery tooling so MCP server restart success is validated through the same namespace path the workflow will use.
Acceptance criteria
gitea-author,gitea-reviewer,gitea-merger, and any sharedgitea-toolsnamespace.gitea_whoamiorgitea_list_profiles.client is closing: EOF.Canonical handoff
Do not retry PR #418 merge until the live MCP namespace can successfully call
gitea_adopt_merger_pr_leasethrough the merger-authorized path. The issue is not whether the tool exists in code; the issue is that the active MCP client namespace cannot invoke it.Requested labels
type:defectarea:mcp-runtimearea:ide-mcp-managerprocess:mergerstatus:blockedpriority:highGap assessment vs #531/#545 (what landed) — 0 of 7 AC fully met
#531/#545 (
5ad764b+be0123c) landedtest_mcp_conn.py,tests/test_mcp_stale_runtime.py, and_check_mcp_runtimes_diagnostics. Mapped against this issue's 7 acceptance criteria onmaster, they do not close it.Core finding
The landed code detects the wrong failure mode.
_check_mcp_runtimes_diagnostics(gitea_mcp_server.py:9290) checks OS-process staleness viaps— is a process running, is its start time older than the code mtime. This issue's defect is process alive + tool registered in FastMCP, but the live IDE/MCP namespace returnsclient is closing: EOF. The diagnostic never invokes a tool through the client namespace, so it cannot observe the EOF case at all. Right instinct, wrong path validated.AC scorecard
:9290is apsprocess check keyed on profile match — not a per-namespace health probe across the 4 named namespaces.test_mcp_conn.pydoes a real handshake; it is a standalone script, not wired into any production check. Prod path isps-only.gitea_adopt_merger_pr_leasecallable through the merger namespace." The registered-vs-callable distinction is exactly what's missing.:9339/:9354/:9359) give restart guidance + atouch <config>hint + profile list. Missing structured PID, env/profile detail, namespace name; and they only fire on the stale-process branch — never on EOF._verify_role_mutation_workspace(:725→raise RuntimeError) andgitea_resolve_task_capability(:9531→restart_required=True). But they trip on stale process, not EOF, so this issue's actual scenario still wouldn't block.tests/test_mcp_stale_runtime.pyhas one test (test_stale_and_missing_runtimes), mockingps/getpid/getmtimefor process-staleness reasons only.test_mcp_conn.pyhas nodef test_*, is not pytest-collected, and asserts nothing.client is closing: EOFrecovery path.mdand.py. No recovery doc exists.Secondary defects in what landed
test_mcp_conn.py:106hardcodes/Users/<user>/.gemini/config/mcp_config.json— machine-specific, not CI-runnable.test_mcp_conn.pytests onlygitea-author+gitea-reviewer— not merger/tools.:702,:9530) short-circuit underPYTEST_CURRENT_TESTunlessGITEA_FORCE_MCP_RUNTIME_CHECKis set → normal test runs skip the live check.:9309(ps-failure),:9379(all-stale-running).Remaining work to close #543 (five items)
gitea_whoami/gitea_list_profiles) through the client and classifies OK / EOF / timeout / tool-missing. This is the missing piece; distinct from thepsstaleness check — both should run.in FastMCP._tool_manager.docs/page: symptomclient is closing: EOF, cause, correct restart/reconnect sequence.Relationship to #544
#544 is the investigation twin of this issue, not a separate implementation track. Its five asks — (1) inspect IDE MCP config/env/lifecycle, (2) add a live namespace health-check script, (3) diagnose root cause, (4) block the merger workflow with diagnostics, (5) add test coverage — are a strict subset of #543's remaining work above. #544 should be treated as folded into / dependent on #543; closing items 1–5 here resolves it.
Not proposing to close either issue — flagging the dependency for triage.
Issue claim heartbeat
Canonical Issue State
STATE:
status:pr-open— additional live reviewer-namespace transport failure evidenceWHO_IS_NEXT: reviewer
NEXT_ACTION: Restart PR #596's canonical reviewer workflow from identity/live-state preflight and acquire a fresh reviewer lease before validation.
NEXT_PROMPT:
WHAT_HAPPENED:
sysadmin / prgs-reviewer.2941ec529c1e9a27b46ea66723df4bd34d7f3c9f.branches/review-fix-issue-539-role-boundary-hard-stops, detached at the candidate head.gitea_acquire_reviewer_pr_leasefailed withTransport closed.WHY: This is another live example of the #543/#544 failure class: the
gitea-reviewernamespace became non-callable through the active transport during a mandatory canonical workflow gate. It extends the tracker evidence beyond merger adoption because reviewer lease acquisition can fail with the same transport-closed/EOF class.RELATED_PRS: #587 implements the #543/#544 transport diagnostics and blocking path. #596 is the review blocked by this occurrence.
BLOCKERS: The original PR #596 review remains blocked and cannot resume from stale state. This evidence-update task can currently call the MCP comment path, but a retry still must prove transport health and acquire a new reviewer lease.
VALIDATION: Current-session MCP reads verified Issue #543 open with
status:pr-open; Issue #544 open; PR #587 open and mergeable, closing #543/#544; PR #596 open and mergeable at2941ec529c1e9a27b46ea66723df4bd34d7f3c9f;gitea.issue.commentresolved forsysadmin / prgs-reviewer. No code validation was run in this update-only task.LAST_UPDATED_BY:
sysadmin / prgs-reviewerCanonical Issue State
STATE:
status:pr-open— host/client reviewer-namespace recurrence and recovery proofWHO_IS_NEXT: reviewer
NEXT_ACTION: Start a fresh canonical review workflow for PR #587; do not reuse any state from the transport-blocked sessions.
NEXT_PROMPT:
WHAT_HAPPENED:
gitea-reviewer.mcp_get_control_plane_guidecall withTransport closed.gitea-reviewer.gitea_whoami(remote="prgs")withTransport closed.gitea_whoami(remote="prgs")->sysadmin / prgs-reviewermcp_get_control_plane_guide-> Gitea-Tools resolved, reviewer profile verifiedgitea_resolve_task_capability(task="review_pr")-> allowed, no restart/stop requiredgitea_whoami(remote="prgs")-> succeededWHY: The namespace failure occurred before Gitea live triage and was recoverable only from the host/client layer. This is the exact process-alive/client-transport-unavailable class tracked by #543/#544, now observed on control-plane guidance and identity verification as well as reviewer lease acquisition.
RELATED_PRS: #587 remains the open implementation PR for #543/#544. PR #596 remains a separate review target and was not retried in this recovery task.
BLOCKERS: The immediate transport outage is cleared for repeated read and capability calls. PR #587 still requires an independent canonical review; no review lease or review decision was attempted in this recovery task.
VALIDATION: Live reads after reconnect verified #543 open with
status:pr-open, #544 open, and PR #587 open and mergeable at653a728bb5fcccc68fc6e7d609240f04531fcdd8with no formal reviews. Open-PR inventory returned five PRs withhas_more=false,is_final_page=true, andinventory_complete=true.LAST_UPDATED_BY:
sysadmin / prgs-reviewerCanonical Issue State
STATE:
status:pr-open— repeated post-recovery transport instabilityWHO_IS_NEXT: reviewer
NEXT_ACTION: Continue the fresh canonical review of PR #587 only while the reviewer namespace remains stable through lease acquisition and review submission.
NEXT_PROMPT:
WHAT_HAPPENED:
mcp_get_control_plane_guidecall withTransport closed.gitea_whoami(remote="prgs")call withTransport closed.whoami, control-plane guide,review_prcapability resolution, and repeatedwhoami.653a728bb5fcccc68fc6e7d609240f04531fcdd8, and a fresh detached reviewer worktree was created atbranches/review-feat-issue-543-mcp-namespace-health-check.WHY: Recovery probes alone did not prove session longevity; the namespace closed again on the first subsequent canonical call. This recurrence directly supports #543's requirement to validate the live client path across real workflow transitions, not only isolated health probes.
RELATED_PRS: #587 is the active implementation PR for #543/#544. PR #596 and PR #592 were not touched.
BLOCKERS: No immediate blocker at comment time. Any further
Transport closedresult must terminate the review and be treated as another #543 recurrence.VALIDATION: Current-session MCP reads verified #543/#544 open, PR #587 open and mergeable, no prior formal review, no active reviewer lease, reviewer identity
sysadmin / prgs-reviewer, and complete open-PR pagination. Local checks verified the detached reviewer worktree has no status entries and matches the live PR head.LAST_UPDATED_BY:
sysadmin / prgs-reviewer