Skip to content

test(mcpx): probe daemon.socketProbeTimeout with a second daemon - #11917

Merged
dezren39 merged 1 commit into
mainfrom
test/mcpx-socket-probe-timeout
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
test/mcpx-socket-probe-timeout

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: daemon.socketProbeTimeout carried a coverage exemption saying its effect is a bound the isolated harness can't vary deterministically.

After: it has an effect probe, and the exemption pin drops from 33 to 32.

How: before a daemon binds, it dials any existing socket file within this bound to tell a live daemon from a crashed one's leftover. TestDaemonSocketProbeTimeoutDecidesWhetherALiveSocketIsStale starts a daemon with mcpx ls, then runs mcpx daemon for the same configuration. At the default the dial answers and the second one exits with "a daemon is already listening". With MCPX_DAEMON_SOCKET_PROBE_TIMEOUT=1ns no dial can finish, so it logs "removing stale socket" and listens. The test kills the orphaned first daemon and its server child itself. Part of #8468 and #8473.


Generated by Claude Code


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

Starts `mcpx daemon` beside a live daemon for the same configuration.
By default the socket probe answers and the second daemon refuses to
start; with a 1ns bound it takes the live socket for stale, removes it
and listens. Pin 33 -> 32 (#8473 chain 71, #8468).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 21:09
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 21:09
@dezren39
dezren39 merged commit c7f23d2 into main Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

@dezren39
dezren39 deleted the test/mcpx-socket-probe-timeout branch November 18, 2026 21:09
@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-18T21:10:12.755861Z d5fbe32 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.

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