René's URL Explorer Experiment


Title: mcpx: takeover orphans a removed server's upstream HTTP session — never DELETEd, left to expire upstream · Issue #260 · developing-today/code · GitHub

Open Graph Title: mcpx: takeover orphans a removed server's upstream HTTP session — never DELETEd, left to expire upstream · Issue #260 · developing-today/code

X Title: mcpx: takeover orphans a removed server's upstream HTTP session — never DELETEd, left to expire upstream · Issue #260 · developing-today/code

Description: Summary In this repo's pkgs/mcpx copy, a daemon takeover (mcpx upgrade / mcpx daemon --takeover) orphans the upstream streamable-HTTP session of any server that was removed from the configuration between the old and new daemon: the succe...

Open Graph Description: Summary In this repo's pkgs/mcpx copy, a daemon takeover (mcpx upgrade / mcpx daemon --takeover) orphans the upstream streamable-HTTP session of any server that was removed from the configuration b...

X Description: Summary In this repo's pkgs/mcpx copy, a daemon takeover (mcpx upgrade / mcpx daemon --takeover) orphans the upstream streamable-HTTP session of any server that was removed from the configurati...

Opengraph URL: https://github.com/developing-today/code/issues/260

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: takeover orphans a removed server's upstream HTTP session — never DELETEd, left to expire upstream","articleBody":"## Summary\n\nIn this repo's `pkgs/mcpx` copy, a daemon takeover (`mcpx upgrade` / `mcpx daemon --takeover`) orphans the upstream streamable-HTTP session of any server that was removed from the configuration between the old and new daemon: the successor never sends the session-termination `DELETE`, so the session is left to expire on the upstream on its own. `pkgs/mcpx/TODO.md` line 6 records this as known-not-done.\n\nThis is the same defect that was filed as dezren39/nix#390 and fixed there by dezren39/nix PR #391 (merge 723e091); this repo's mcpx copy does not have that fix.\n\n## Evidence (verified on main 54c223ce)\n\n- `pkgs/mcpx/TODO.md:6` — \"An upstream session whose server is removed from the configuration during a takeover is not adopted and expires upstream on its own; it is not DELETEd.\"\n- `pkgs/mcpx/internal/pool/handoff.go` (`pool.Adopt`, ~line 193): HTTP instances are explicitly skipped — `if h.Stdio == nil { if h.HTTP != nil { continue } }` — so a handed HTTP session produces no `Adopted` at all.\n- `pkgs/mcpx/internal/daemon/registry_handoff.go` (`Registry.Adopt`): `AdoptSessions` is only called for pools that match the new configuration; for an unmatched pool only the stdio children become `orphans`, and the HTTP session is dropped on the floor. `Adoption.Attach` therefore has nothing to close for it.\n- `pkgs/mcpx/internal/mcpclient/http.go:588` — `HTTPHandoff` carries only `SessionID` + `Negotiated`: no endpoint URL or headers, so a successor could not construct a transport for the orphaned session even if it wanted to terminate it. `PoolHandoff` (`pool/handoff.go:38`) likewise has no server name for logging.\n- `grep -rn TerminateHTTPSession pkgs/mcpx` — no matches: the termination helper does not exist in this copy.\n- The primitive does exist: `HTTPTransport.Close()` (`mcpclient/http.go:566`) already sends exactly one `DELETE` for its session id — it is simply never invoked for a removed server's session, because no transport is ever built for it.\n\n## Why it matters\n\nStreamable HTTP upstreams hold per-session state (auth context, subscriptions, server-side resources). A config edit that removes a server followed by a routine `mcpx upgrade` silently leaks that session until the upstream's own expiry, and the leak is invisible — nothing is logged. The stdio side of the same handoff handles orphans correctly (children are closed post-commit), so the HTTP side is an asymmetric gap in an otherwise careful protocol.\n\n## Suggested fix (reference: dezren39/nix PR #391)\n\n1. Carry the endpoint in the handoff: add `URL` + `Headers` to `mcpclient.HTTPHandoff` (populated from the transport at `Detach` time; the handoff travels only over the takeover unix socket), and add a `Server` name to `pool.PoolHandoff`.\n2. In `Registry.Adopt`, record the HTTP sessions of pools with no match as orphan sessions (no upstream contact at adopt time).\n3. In `Adoption.Attach` (post-commit only), end each orphan session with exactly one `DELETE` via a `pool.TerminateOrphanedSession` helper built on `mcpclient`'s session termination; `Abort` must leave the predecessor's session untouched. Log success/failure (e.g. `upstream.session.terminated` / `upstream.session.orphaned` with server + session + reason).\n4. Remove the TODO.md line 6 entry.\n\n## Acceptance criteria\n\n- A daemon-level regression test (predecessor hands off a pool whose server is absent from the successor's config, with a live HTTP session) shows exactly one `DELETE` with that session id reaching the upstream after the handoff commits — and zero before the fix.\n- An aborted handoff sends no DELETE (the predecessor keeps its session).\n- A matched pool's sessions are adopted as today (no behaviour change; existing takeover/handoff tests pass).\n- `go test ./internal/pool/ ./internal/daemon/ ./internal/mcpclient/` green in `pkgs/mcpx`.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-18T08:55:01Z","url":"https://github.com/developing-today/code/issues/260"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:10f9af11-3cd0-315e-47e2-beb0f4c5ab50
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCA96:1FD7D4:417C97:5813C8:6B061E6E
html-safe-nonced77370a0aadcfc8855600c5b24d5c9357d7a18f4b3fac904303b38c5402d6f0a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTk2OjFGRDdENDo0MTdDOTc6NTgxM0M4OjZCMDYxRTZFIiwidmlzaXRvcl9pZCI6IjY1Njc5MTY3OTc0NjE2Njc0MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac54fb60b5105c2fedeecdb7e4fd2a76d48dcb8bdb58c3b0404a24ffec9e0b31b6
hovercard-subject-tagissue:5907857074
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/260/issue_layout
twitter:imagehttps://opengraph.githubassets.com/90fe1c2ffb8e51fd42d317747365d4ebfd7a160e8557e8ecaec99a2a8df6f18b/developing-today/code/issues/260
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/90fe1c2ffb8e51fd42d317747365d4ebfd7a160e8557e8ecaec99a2a8df6f18b/developing-today/code/issues/260
og:image:altSummary In this repo's pkgs/mcpx copy, a daemon takeover (mcpx upgrade / mcpx daemon --takeover) orphans the upstream streamable-HTTP session of any server that was removed from the configuration b...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb25c3080e84402f75431d8dc7a96b2635219cec7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/260#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F260
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F260
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/260
Reloadhttps://github.com/developing-today/code/issues/260
Reloadhttps://github.com/developing-today/code/issues/260
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests144 (144)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/260
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/260
#267https://github.com/developing-today/code/pull/267
mcpx: takeover orphans a removed server's upstream HTTP session — never DELETEd, left to expire upstreamhttps://github.com/developing-today/code/issues/260#top
#267https://github.com/developing-today/code/pull/267
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 18, 2026https://github.com/developing-today/code/issues/260#issue-5907857074
dezren39/darwin-nix#390https://github.com/dezren39/darwin-nix/issues/390
#391https://github.com/developing-today/code/pull/391
54c223chttps://github.com/developing-today/code/commit/54c223ce040d27d034c049372c231ccbe54bbc86
#391https://github.com/developing-today/code/pull/391
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 18, 2026https://github.com/developing-today/code/issues/260#event-33563384402
dezren39https://github.com/dezren39
on Oct 18, 2026https://github.com/developing-today/code/issues/260#event-33565978315
Merge pull request #267 from developing-today/sweep/260-orphan-http-s…https://github.com/developing-today/code/commit/0adeeca20adce5a83a1cfc7ed5bb8c047a852385
#267https://github.com/developing-today/code/pull/267
0adeecahttps://github.com/developing-today/code/commit/0adeeca20adce5a83a1cfc7ed5bb8c047a852385
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#267https://github.com/developing-today/code/pull/267
on Oct 18, 2026https://github.com/developing-today/code/issues/260#event-33565978378
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/260
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/260
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.