Title: mcpx: CLI never notices a running daemon from an older binary (no daemon-version check) · Issue #265 · developing-today/code · GitHub
Open Graph Title: mcpx: CLI never notices a running daemon from an older binary (no daemon-version check) · Issue #265 · developing-today/code
X Title: mcpx: CLI never notices a running daemon from an older binary (no daemon-version check) · Issue #265 · developing-today/code
Description: Problem The mcpx CLI in this repo never notices when the daemon it connected to was started by a different (older) binary. After an upgrade, a daemon started by the old binary keeps running, the new CLI talks to it over the socket/url la...
Open Graph Description: Problem The mcpx CLI in this repo never notices when the daemon it connected to was started by a different (older) binary. After an upgrade, a daemon started by the old binary keeps running, the ne...
X Description: Problem The mcpx CLI in this repo never notices when the daemon it connected to was started by a different (older) binary. After an upgrade, a daemon started by the old binary keeps running, the ne...
Opengraph URL: https://github.com/developing-today/code/issues/265
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: CLI never notices a running daemon from an older binary (no daemon-version check)","articleBody":"## Problem\n\nThe mcpx CLI in this repo never notices when the daemon it connected to was started by a different (older) binary. After an upgrade, a daemon started by the old binary keeps running, the new CLI talks to it over the socket/url ladder rungs, and a command or field the old daemon lacks fails confusingly instead of saying why.\n\nThis is the same defect as dezren39/nix#344 (fixed there by dezren39/nix PR #386, merged 2026-10-18); this repo's `pkgs/mcpx` copy does not have that fix.\n\n## Evidence (verified on main 2d56eb2c, 2026-10-18)\n\n- The daemon already reports its version: `pkgs/mcpx/internal/daemon/server.go` `handleHealth` returns `\"version\": s.version` in the `GET /v1/health` answer.\n- The CLI never reads that field:\n - No `DaemonVersion()` method in `pkgs/mcpx/internal/cli/client.go` — the neighbouring `Endpoint()` parses only `endpoint` from the same `/v1/health` answer.\n - No `pkgs/mcpx/internal/cli/versioncheck.go` exists (no `daemonVersionNotice`, `daemonVersionWarning`, or `checkDaemonVersion` anywhere in `pkgs/mcpx/internal/cli/`).\n - `App.ensure()` in `pkgs/mcpx/internal/cli/commands.go:81` caches the client/ladder and returns without any version comparison.\n- Therefore a version mismatch is silent on every command that reuses an already-running daemon via the `socket` or `url` rungs (`Connect` in `pkgs/mcpx/internal/cli/connect.go`).\n\n## Why it matters\n\nUpgrades are the normal path (`mcpx upgrade`, package updates). Without the notice, the first symptom of a stale daemon is a confusing per-command failure, with no hint that `mcpx restart --daemon` is the fix.\n\n## Suggested fix (mirrors dezren39/nix PR #386)\n\n1. Add `Client.DaemonVersion(ctx)` in `client.go`: GET `/v1/health`, parse `version`; an older daemon reporting none yields `\"\"` with no error (absence is not a mismatch).\n2. Add `versioncheck.go`: `daemonVersionNotice(cli, daemon, remote)` — empty when equal or either side empty; otherwise one line naming both versions, with `mcpx restart --daemon` advice locally and \"restart it where it runs\" for a remote daemon. `checkDaemonVersion` only runs for `socket`/`url` ladder rungs (spawn/inline daemons run this binary by construction) and is best-effort (a failed health read stays silent).\n3. Call `a.checkDaemonVersion(ctx, c, ladder)` in `ensure()` after a successful connect.\n4. Port the regression tests from dezren39/nix (`versioncheck_test.go`): notice table cases, health-server warning cases (mismatch / matching / no-version / unreachable), and the spawned-daemon skip.\n\n## Acceptance criteria\n\n- [ ] With a daemon reporting a different version reached via socket/url, a CLI command prints exactly one stderr notice naming both versions and the restart command.\n- [ ] Equal versions, a daemon reporting no version, and spawn/inline daemons produce no notice and no extra health call failure mode.\n- [ ] New `versioncheck` tests pass; `go test ./internal/cli/` in `pkgs/mcpx` is green; ablation (removing the `ensure()` call) makes the wiring test fail.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-18T09:32:21Z","url":"https://github.com/developing-today/code/issues/265"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:94f5db3e-a360-6d06-e75a-46e32215e466 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8CE:3CF71B:693A37:8C5DAD:6B0628B7 |
| html-safe-nonce | c1a2dfbd20977108056819bc973911a27e0595b744df989228df7dc9801c8a25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOENFOjNDRjcxQjo2OTNBMzc6OEM1REFEOjZCMDYyOEI3IiwidmlzaXRvcl9pZCI6IjgwNDQ2Nzk0MDc0MTc1Njc0MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c31a570f8ac658dc07e1cad4088f6126160d4a53ee888abac0b4cd672dd7613a |
| hovercard-subject-tag | issue:5908166536 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/265/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ff083c84c710e16d10f89e71378ba13c259a1850f5bd3e7573ed6c8c25318f5d/developing-today/code/issues/265 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ff083c84c710e16d10f89e71378ba13c259a1850f5bd3e7573ed6c8c25318f5d/developing-today/code/issues/265 |
| og:image:alt | Problem The mcpx CLI in this repo never notices when the daemon it connected to was started by a different (older) binary. After an upgrade, a daemon started by the old binary keeps running, the ne... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width