Title: mcpx testing: a labelled real-software subset, pinned by the flake, run nightly · Issue #1990 · developing-today/code · GitHub
Open Graph Title: mcpx testing: a labelled real-software subset, pinned by the flake, run nightly · Issue #1990 · developing-today/code
X Title: mcpx testing: a labelled real-software subset, pinned by the flake, run nightly · Issue #1990 · developing-today/code
Description: Relocated from dezren39/darwin-nix#137 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/ni...
Open Graph Description: Relocated from dezren39/darwin-nix#137 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc...
X Description: Relocated from dezren39/darwin-nix#137 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue refe...
Opengraph URL: https://github.com/developing-today/code/issues/1990
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx testing: a labelled real-software subset, pinned by the flake, run nightly","articleBody":"Relocated from dezren39/nix#137 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).\n\nParent: #97\n\n## Summary\n\nDefine and label the subset of integration tests that must work end to end with **real software**: real MCP servers, real runtimes, and real network where the server needs it. Pin the versions they run against in one place, the flake. #134 recommends building the *test* image from the flake so there is one version set; #182's user-facing `pkgs/mcpx/Containerfile` pins its own (Go via `golang:1.26-bookworm`, bun via `oven/bun:1-debian`), so today there are two, and they already move separately (Renovate #184). The protocol half of the pin is the binary's own report, stamped into both (below). Run the subset nightly and on release, not per PR, because real servers bring network access and flakiness (#65). Fold the manual `scripts/stress.sh` into the subset.\n\n## Original notes\n\n> - testing\n> - a general goal is to ensure all features have one or more integration tests\n> - the mcp servers can be specialized mocks but the app entrypoint or binary is used and config is passed in or config path set to appropriate test\n> - for both binary && app entrypoint (consider binary a superset)\n> - all tests should pass for nix flake & container\n> - a specific subset should completely work with all real software\n> - these should be found/labeled whenever possible\n> - the supported mcp version is the one in the flake/containerfile \n\n## Current state (main d0b7e01)\n\n- **All e2e tests use fakes** (199 at d0b7e01, 209 at 05c78b2). `fakemcp`/`askmcp` (`internal/testsupport/`) and a stub registry (`MCPX_REGISTRY_URL`, `internal/e2e/e2e_test.go:52-57`, since #65). Nothing in CI runs a real MCP server.\n- **The runtimes are real but unpinned in CI.** `mcpx.yml` installs `setup-deno` `v2.x`, `setup-bun` latest and node 24. `package.nix` wraps the nixpkgs versions instead. The runtime version CI tests is not the one users of the package get (#134).\n- **`scripts/stress.sh`** checks discovery latency under load (\u003c200 ms per `mcpx ls` after 30 concurrent), concurrent isolation on a stateful server (`tools.chrome_devtools.new_page`/`list_pages`, lines 36-40), and leaks. It needs `MCPX=\u003cbinary>` and runs against **whatever `.mcpx.json` the caller's config chain resolves**, so the servers and their versions are the user's, not pinned. It is manual, and so is `scripts/bench.sh`. It uses `python3` for arithmetic.\n- **The MCP protocol version lives in Go source, not the flake:**\n - the client speaks `2025-11-25` (`internal/mcpclient/client.go:22`);\n - the server side serves `2025-03-26` (`internal/mcpserver/revisions.go:14`, `Oldest`) up to the newest, with per-feature floors (`revisions.go:85-87`, `conn.go:192,198`);\n - the full served list is `Supported = {\"2026-07-28\", \"2025-11-25\", \"2025-06-18\", \"2025-03-26\"}` (`internal/mcpserver/server.go:778`);\n - the mocks already span two revisions: `fakemcp` announces `2025-06-18` (`internal/testsupport/fakemcp/main.go:112`), `askmcp` `2025-11-25` (`askmcp/main.go:145`) -- keep that; it gives the negotiation some coverage for free (from #164);\n - the protocol matrix is served at `/v1/protocol` and tested by `TestTheProtocolMatrixIsServedFromTheTableTheCodeReads` (`internal/e2e/proto_test.go:567`).\n\n So \"the supported mcp version\" has two parts. The **protocol revisions** are fixed by the mcpx source at a commit. The **real server implementations and their versions** are what the flake can pin.\n\n How to pin the first part, from #164: there is no single \"supported mcp version\" to type into the flake or a Containerfile -- it is a list plus a client constant, and `/v1/protocol` already reports both. So (1) in the gating mock suite, assert `/v1/protocol` against a checked-in golden file, so any change to `Supported` or `mcpclient.ProtocolVersion` is a reviewed diff; (2) stamp the same list onto the artifacts *generated from the binary at build time*, the way `postInstall` generates the man page -- e.g. a `passthru` attribute on the nix package and an OCI label on the image -- never transcribed by hand; (3) in the real suite, assert each pinned server negotiated a revision in `Supported` and record which. The image label would live in #182's Containerfile, which the GIT architect owns; this is input for #134, not a design of that file. The golden file is the same \"generated reference that cannot drift\" problem as #96/#145 -- one mechanism for all of them.\n- **Real servers available in the pinned nixpkgs** (`c7def04`, `pkgs/by-name`):\n - the reference servers `mcp-server-fetch` 2026.8.31, `mcp-server-filesystem` 2026.8.18, `mcp-server-git` 2026.8.31, `mcp-server-memory` 2026.8.18, `mcp-server-time` 2026.8.31 and `mcp-server-sequential-thinking`;\n - `playwright-mcp` 0.0.76, `github-mcp-server` 1.11.0, `context7-mcp` 4.0.3, `firefox-devtools-mcp`, `mcp-proxy`, and others.\n\n Not in nixpkgs: **`@modelcontextprotocol/server-everything`**, the reference server that exercises every protocol feature (prompts, resources, templates, sampling, elicitation, notifications, long-running progress). Also absent: **chrome-devtools-mcp**, which `stress.sh` uses.\n\n## What the subset must cover\n\n\"completely work with all real software\" is too broad to be a test, so here it becomes: **every feature in the #132 inventory, exercised once against a real server that implements it**, plus the runtimes at pinned versions.\n\n| Feature | Real server (pinned in the flake) |\n| --- | --- |\n| stdio tools, schemas to TS client, `exec` on deno, bun and node | `mcp-server-time`, `mcp-server-memory` (no network) |\n| filesystem-scoped tools, workdirs | `mcp-server-filesystem` |\n| git scope (`repo`/`worktree`) | `mcp-server-git` + git |\n| prompts, resources, templates, completion, sampling, elicitation, progress, `list_changed` | `server-everything` (to package in `pkgs/`) |\n| stateful leasing, concurrent isolation (stress.sh) | `playwright-mcp` (in nixpkgs), replacing chrome-devtools-mcp, which is not |\n| network server, HTTP transport | `mcp-server-fetch` behind a local HTTP fixture (no internet); a streamable-HTTP server: `mcp-proxy` wrapping a stdio server |\n| registry search/add | the real registry, the **only** internet-dependent test, isolated in its own job (#65) |\n\n## Approaches -- how the subset is labelled\n\n### A -- a test-name prefix, `TestReal...` (least recommended)\nSelectable with `go test -run '^TestReal'`, and visible in output. Nothing stops a real-server test from going unnamed, and nothing stops a `TestReal` test from quietly using the fake. On a machine without the server, the test must skip itself, and the skip is invisible. That is the #35 lesson again. (`testing.Short()` with CI passing `-short` is worse still: it is opt-*out*, so the obvious `go test ./...` on a laptop runs the real servers -- the property that produced #65 -- and `-short` already means \"skip slow\", not \"skip network\"; from #164.)\n\n### B -- a manifest file\n`internal/e2e/realsoftware.json` lists test names with the server and version each needs. A guard fails if a listed test does not exist or an unlisted test starts a non-fake server. It is explicit and reviewable, and gives a place to record versions. It is also a second list to keep in sync, and the guard needs to know what counts as \"a non-fake server\". #164's variant lists *servers* instead of tests: a checked-in `.mcpx.json` with every server at an exact version (`npx -y @modelcontextprotocol/server-filesystem@1.2.3`, never `@latest`), bumped by Renovate as a reviewable diff. Simpler than a nix derivation, but it needs the network at test time; C's flake-built servers do not.\n\n### C -- a build tag `realsoftware` plus a harness helper (recommended)\n- The real-software tests live in `internal/e2e/real_*_test.go` behind `//go:build realsoftware`. They do not compile into the per-PR run, so they cannot slow it down or flake it.\n- Each test calls `testsupport.RealServer(t, \"mcp-server-time\")`, which resolves the server from `MCPX_REAL_SERVERS_DIR` (a nix-built directory of pinned servers: `nix build .#mcpx-real-servers`). Under `MCPX_TEST_REQUIRE` (#134) a missing server **fails**; without it, it skips with the name.\n- `RealServer` records the name and version into the #132 ledger. The ledger then serves as the \"found/labeled\" list, generated, not maintained by hand.\n- \"these should be found/labeled whenever possible\": a guard in the default build greps `real_*_test.go` for any test that does not call `RealServer` (it would be a fake test hiding in the tag), and the default-build tests for `RealServer` calls outside the tag.\n\nRecommended because the tag keeps the per-PR budget clean (#95), and the helper makes the label a fact about what the test does, not a naming convention. Pinning comes from the flake, so \"the supported version\" is `nix flake metadata` plus the `mcpx-real-servers` derivation.\n\nA compile-time tag has a cost: the tagged files are type-checked only when the tag is built. So the nightly job must run `go vet -tags realsoftware ./internal/e2e`, and it is cheap to also do so in tier 1.\n\n## Where it runs\n\n- **Nightly and on release** (tier 2, #136), in the flake image (#134) with `mcpx-real-servers` added. No internet except the registry job.\n- **stress.sh folded in:**\n - its latency check becomes a `realsoftware` test with a generous threshold (the 200 ms figure is a laptop number, so record it and alarm on regression rather than failing on an absolute value);\n - its isolation rounds become a test using `playwright-mcp`;\n - its leak check becomes an assertion on #138's isolated state dir.\n\n Keep the script as a thin wrapper for manual runs against *your own* config, which is still useful and is the only place \"the user's servers\" belong.\n- **On a flake update:** because the servers are pinned, a `nix flake update` that bumps a server is exactly when the subset must run. Trigger it on `flake.lock` changes (#95's path filters).\n- **Flakiness policy** (#99): a real-software failure opens an issue automatically and does not block. A test that is flaky twice is quarantined with an issue, not retried silently.\n\n## Open questions\n\n- Package `server-everything` in `pkgs/` (it is an npm package, so it needs an npmDeps hash), or run it via `npx` at a pinned version? The first is hermetic; the second needs the network.\n- Is there an official MCP conformance suite worth running against `mcpx serve`/`/mcp` as a *server*? mcpx is also an MCP server, and that direction has no real-client test today. Real clients to consider are opencode itself and the MCP Inspector CLI.\n- Which protocol revisions must the subset cover: only the client's `2025-11-25`, or also old-revision servers (`2025-03-26`, `2025-06-18`), since mcpx negotiates down? A pinned old version of a reference server would cover the latter.\n- Should the pinned server versions be printed by `mcpx doctor` or `/v1/protocol` in the test image, so a bug report says which ones were tested?\n- A real-software test that randomises (for example, concurrency order) takes the run seed (#93).\n- Does a feature tested *only* against real software count as covered in #132's ledger? #164 argued it must be excluded from the denominator: \"only tested against real software\" is a finding, not coverage, and counting it hides gaps behind a nightly job. `RealServer` can still record into the ledger as a label (C above) without counting as coverage.\n- A pinned server withdrawn upstream: fail, or report unavailable and continue? Probably fail on a pre-release run and report on a nightly (from #164).\n- `Supported` includes `2026-07-28`: does any real server speak it yet, and can the subset prove mcpx's newest-first negotiation downgrades correctly against servers that do not (from #164)?\n- An HTTP/SSE-transport server belongs in the set, since `docs/story.md:790` promises \"Streamable HTTP and SSE are spoken directly; no mcp-remote\" (from #164; `mcp-proxy` in the table above is one way).\n- Run the subset in the flake image (#134) with a warmed npm/uv cache? It is the difference between a short nightly and a long one if any server is still fetched (from #164).\n\n## Ease · Impact · Related\n\n**Ease** M (tag, helper, reference servers: M; server-everything packaging: S-M; stress.sh fold: S) · **Impact** med-high (the only proof mcpx works with anything but its own fakes)\n**Depends on / related**: #132 (ledger, inventory), #134 (flake image, `MCPX_TEST_REQUIRE`), #138 (isolation), #136 (tiers), #65 (no internet in normal tests; registry isolated), #95 (nightly/release workflow, `flake.lock` trigger), #99 (flake quarantine policy), #93 (seed), #49 (building `mcpx-real-servers` as a flake package).\n\nSecurity/auth deferred; see tracker.\n\n## Acceptance criteria\n\n- A labelled real-software subset, pinned by the flake, runs nightly in CI and its results are visible/recorded as the body specifies.\n- The work described in the Summary/Scope above is delivered via a branch + PR (no direct push to main); verification runs in GitHub Actions CI, not on the sandbox.\n- Evidence (CI links, timings, or probe output as applicable) is recorded on this issue before it is closed.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T22:57:12Z","url":"https://github.com/developing-today/code/issues/1990"}
| 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:b18a0342-ac38-ddb8-2909-ae94d00a72a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B450:249987:61ADBD:83038D:6B062A33 |
| html-safe-nonce | aa8b9ed8ea95d43da79c8121b65af9049407aa2baead006d2f464abfbb70da2e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDUwOjI0OTk4Nzo2MUFEQkQ6ODMwMzhEOjZCMDYyQTMzIiwidmlzaXRvcl9pZCI6IjQ4NzU0MjAyODY2MjUxMzEwNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e64a54ef3c4c19cbe1097cba181c7af7e3f0b5f83302917a06420811adac85be |
| hovercard-subject-tag | issue:6089036223 |
| 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/1990/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b37e8283f9b64c63119dd98b3d86cc77217305b97d8ae632bd924e592f5dda6b/developing-today/code/issues/1990 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b37e8283f9b64c63119dd98b3d86cc77217305b97d8ae632bd924e592f5dda6b/developing-today/code/issues/1990 |
| og:image:alt | Relocated from dezren39/darwin-nix#137 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc... |
| 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 | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| 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 | 494ea0bb1e0feef734a83e2628697647755e8864 |
| 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