Skip to content

test(mcpx): cover the daemon, stdio-proxy and supervise commands - #11910

Merged
dezren39 merged 1 commit into
mainfrom
test/mcpx-cli-daemon-stdio-proxy
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
test/mcpx-cli-daemon-stdio-proxy

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: cli daemon, cli stdio-proxy and cli supervise were the last three CLI commands on the feature-coverage exemption list, with no integration test exercising them.

After: each has an e2e test, and the CLI section of the exemption list is empty.

How: TestForegroundDaemonServesUntilInterrupted starts mcpx daemon in the foreground, waits for status to report its PID, lists servers through it, then interrupts it and expects exit 0. TestStdioProxyCarriesHTTPToTheDaemon writes a raw GET /v1/health to mcpx stdio-proxy and expects a 200 back. TestSuperviseKeepsTheChildAcrossADaemonStop reads the supervised child's parent from /proc, checks it runs mcpx supervise --socket, stops the daemon, and checks the next daemon answers through the same child. Part of #8461.


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for foreground daemon operation, stdio proxy health responses, and supervised processes persisting and being reused after a daemon restart.

Runs `mcpx daemon` in the foreground and checks it serves and exits 0 on
an interrupt, proxies an HTTP health check through `mcpx stdio-proxy`,
and checks a supervised server runs under `mcpx supervise` with a child
that outlives a stopped daemon. Drops the last three cli exemption lines
(#8461).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 20:58
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 20:58
@dezren39
dezren39 merged commit 19a950e into main Nov 18, 2026
@dezren39
dezren39 deleted the test/mcpx-cli-daemon-stdio-proxy branch November 18, 2026 20:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T20:59:51.368464Z ad5a779 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request adds end-to-end tests for foreground daemon operation, stdio proxy health requests, and supervised child persistence across a daemon stop. It also removes the CLI coverage exemptions for daemon, stdio-proxy, and supervise.

Changes: CLI daemon end-to-end coverage

Layer / File(s) Summary
Foreground daemon and proxy tests
pkgs/mcpx/internal/e2e/cli_daemon_foreground_test.go
A helper starts the foreground daemon and polls status for its PID. Tests check that it serves the configured demo server and exits successfully after an interrupt, and that stdio-proxy returns an HTTP 200 health response.
Supervised child persistence
pkgs/mcpx/internal/e2e/cli_daemon_foreground_test.go, pkgs/mcpx/internal/e2e/feature_coverage_exemptions.txt
A /proc-dependent test checks that the supervised child survives a daemon stop and is reused by the next daemon. The CLI exemptions for daemon, stdio-proxy, and supervise are removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related issues

  • developing-today/code#8461 — The issue tracks missing integration tests for daemon, stdio-proxy, and supervise; this pull request adds tests for those commands.
  • developing-today/code#9963 — The test checks supervised child survival across a daemon stop, but the pull request does not implement the issue’s default-supervised behavior or adopt-or-reap scan.
Merge Risk: Low · up to ad5a7

This PR adds end-to-end tests for the daemon, stdio-proxy and supervise commands and has no production impact. On the timeout failure paths, the test reads the daemon's output buffer while the daemon may still be writing to it. This can make failure output unreliable or trigger race-detector reports. It is a small fix and does not block merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants