Title: mcpx tests: port the spawn-marker assertion into TestEnsureDaemonCancelledWhileWaiting (nix copy has it, this copy doesn't) · Issue #361 · developing-today/code · GitHub
Open Graph Title: mcpx tests: port the spawn-marker assertion into TestEnsureDaemonCancelledWhileWaiting (nix copy has it, this copy doesn't) · Issue #361 · developing-today/code
X Title: mcpx tests: port the spawn-marker assertion into TestEnsureDaemonCancelledWhileWaiting (nix copy has it, this copy doesn't) · Issue #361 · developing-today/code
Description: Problem The mcpx dedup audit (2026-10-19, comparing this repo's pkgs/mcpx against the vendored copy in dezren39/nix at nix e5c6407 / code e04b519) found the two trees' production code behaviorally identical — the only real divergence is ...
Open Graph Description: Problem The mcpx dedup audit (2026-10-19, comparing this repo's pkgs/mcpx against the vendored copy in dezren39/nix at nix e5c6407 / code e04b519) found the two trees' production code behaviorally ...
X Description: Problem The mcpx dedup audit (2026-10-19, comparing this repo's pkgs/mcpx against the vendored copy in dezren39/nix at nix e5c6407 / code e04b519) found the two trees' production code behav...
Opengraph URL: https://github.com/developing-today/code/issues/361
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx tests: port the spawn-marker assertion into TestEnsureDaemonCancelledWhileWaiting (nix copy has it, this copy doesn't)","articleBody":"## Problem\n\nThe mcpx dedup audit (2026-10-19, comparing this repo's `pkgs/mcpx` against the vendored copy in dezren39/nix at nix e5c6407 / code e04b5190) found the two trees' production code behaviorally identical — the only real divergence is one test assertion the nix copy has and this copy lacks.\n\nIn dezren39/nix `pkgs/mcpx/internal/cli/ensuredaemon_test.go`, `TestEnsureDaemonCancelWhilePolling` (lines 70–103) asserts, after the prompt `context.Canceled` return, that the daemon spawn actually happened: it waits up to 5s for the fake daemon's marker file and fails with \"expected the daemon spawn to have happened before cancellation\" if it never appears.\n\nThis repo's counterpart, `TestEnsureDaemonCancelledWhileWaiting` (`pkgs/mcpx/internal/cli/ensuredaemon_test.go:62`), discards the marker (`c, _ := ensureTestClient(t, \"30s\")`). It would pass even if `EnsureDaemon` returned `context.Canceled` without ever spawning — e.g. if a future change moved the cancellation check ahead of the spawn in the polling path, silently turning \"cancel while waiting\" into \"never start\".\n\n## Why the wait-for-marker shape\n\n`cmd.Start` returns once the process exists, before the child has run any code, and the spawned child is Setsid + Released, so its marker write can legitimately land after `EnsureDaemon` returns. An instant marker assertion races child scheduling (this flake got the nix copy's test skipped in the darwin build, dezren39/nix#428, and is why `TestEnsureDaemonNeverReadyStillTimesOut` in this repo already uses the wait-for-marker pattern, citing dezren39/nix#445). The port must use the same bounded-wait shape.\n\n## Acceptance criteria\n\n- [ ] `TestEnsureDaemonCancelledWhileWaiting` keeps the returned marker and, after the existing error/promptness assertions, waits up to 5s for the marker to appear, failing if the daemon was never spawned.\n- [ ] The ported test fails if `EnsureDaemon` is made to return `context.Canceled` before spawning (ablation-checked), and passes unmodified code.\n- [ ] `go test ./internal/cli/` passes.\n- [ ] No production-code changes: the audit verified `client.go` differs between the copies only in comments.\n\nContext: this is the last migrate item before dezren39/nix deletes its vendored copy and pins this repo as the single mcpx source (its extraction plan, `planning/plans/mcpx-extraction.md` there; consumption decision tracked in #308).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-19T16:57:53Z","url":"https://github.com/developing-today/code/issues/361"}
| 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:1ef61e33-66ed-ee6a-ef54-49427a39f830 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC28:174DE2:605221:80439E:6B0625F4 |
| html-safe-nonce | 0dfa609376124f66917837292372a57d656fd6288c62d5ece8542586fdcbf860 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzI4OjE3NERFMjo2MDUyMjE6ODA0MzlFOjZCMDYyNUY0IiwidmlzaXRvcl9pZCI6IjQwOTAwMjQ5NzQ2OTI1MjU1NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f73f17ad75beaf891c22e8870130334c4273904a67723b7437821d8512386c75 |
| hovercard-subject-tag | issue:5928008581 |
| 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/361/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3caf68e01a3398c312c7188989f5cc3adb3535aac5d2916d0a808a06cb1ef4f/developing-today/code/issues/361 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3caf68e01a3398c312c7188989f5cc3adb3535aac5d2916d0a808a06cb1ef4f/developing-today/code/issues/361 |
| og:image:alt | Problem The mcpx dedup audit (2026-10-19, comparing this repo's pkgs/mcpx against the vendored copy in dezren39/nix at nix e5c6407 / code e04b519) found the two trees' production code behaviorally ... |
| 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