Skip to content

test(mcpx): pin EnsureDaemon remote-cancelled context (port from nix copy) - #324

Merged
dezren39 merged 1 commit into
mainfrom
creator/437-ensuredaemon-remote-test
Oct 19, 2026
Merged

dezren39 merged 1 commit into
mainfrom
creator/437-ensuredaemon-remote-test

Conversation

@dezren39

@dezren39 dezren39 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Code half of the cross-repo set tracked by dezren39/darwin-nix#437 (single origin issue; the nix half is dezren39/nix PR #438).

Adds TestEnsureDaemonRemoteCancelledContext to pkgs/mcpx/internal/cli/ensuredaemon_test.go, ported from dezren39/nix's mcpx copy. It pins behaviour that had no coverage here: with a remote endpoint and an already-cancelled context, EnsureDaemon reports context.Canceled rather than the generic no mcpx daemon at …; it is not started from here error.

Test-only change; no production code touched.

Verification: go test ./internal/cli/ -run TestEnsureDaemon -count=1 passes locally (all 4 EnsureDaemon tests); the same test passed in a scratch copy of main before the issue was filed.


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

Summary by CodeRabbit

  • Tests
    • Added automated coverage for cancellation error handling when a remote operation is started with an already-cancelled context. No user-facing functionality changed.

Port TestEnsureDaemonRemoteCancelledContext from dezren39/nix's mcpx
copy: a cancelled context against a remote endpoint must report
context.Canceled, not the generic 'no mcpx daemon at ...' error.

Refs dezren39/darwin-nix#437
@dezren39
dezren39 requested a review from a team as a code owner October 19, 2026 01:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T01:09:07.891309Z 96c3687 PR opened
ℹ️ 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 Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f93ac72-a2f2-4719-b7b5-8ebfee6ce6f3
📥 Commits

Reviewing files that changed from the base of the PR and between ca1abca and 96c3687.

📒 Files selected for processing: 1
  • pkgs/mcpx/internal/cli/ensuredaemon_test.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

Adds a test that checks whether EnsureDaemon returns an error matching context.Canceled for an already-canceled context and a remote endpoint.

Changes: Cancellation handling

Layer / File(s) Summary
Remote endpoint cancellation test
pkgs/mcpx/internal/cli/ensuredaemon_test.go
Adds a test that checks EnsureDaemon returns an error matching context.Canceled when the context is already canceled and the endpoint is remote.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 96c36

This change adds coverage for remote cancellation without changing production behavior; no merge-blocking risk is evident.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the added test for the remote cancelled-context behavior in EnsureDaemon. It is specific and directly related to the pull request changes.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@dezren39
dezren39 merged commit 97b0e54 into main Oct 19, 2026
17 checks passed
@dezren39
dezren39 deleted the creator/437-ensuredaemon-remote-test branch October 19, 2026 01:14
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.

1 participant