Skip to content

test(mcpx): effect probe for plugin.headless (#8472) - #13029

Merged
dezren39 merged 1 commit into
mainfrom
lane-jy-8472
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-jy-8472

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

One #8472 burn-down slice: plugin.headless gets a real effect probe, in the shape of the landed annotate/backend/bin/env/binArgs slices.

  • plugin/opencode/mcpx/headless.test.ts (new) — five bun cases loading the real session plugin over two fake daemons on real unix sockets (the daemon.test.ts arrangement), so boot discovery is ambiguous and the boot warning toast is due. The stub client's showToast calls are the observable: MCPX_PLUGIN_HEADLESS=1 → none; the headless option → none; option cleared → the warning arrives ("2 daemons…"); MCPX_PLUGIN_HEADLESS=0 → it arrives; unset everywhere → none (the process-shape default reads headless on a runner's main thread — the CI case the setting exists for).
  • Go probe TestPluginHeadlessSuppressesToastsFromTheEnvironment in internal/e2e/plugin_test.go (runs the bun file; skips fail it); mirror entry in internal/e2e/effect_test.go (probe map + effectProbeFuncs anchor).
  • plugin.headless moved from EffectExemptions to EffectProbes in internal/settings/effect.go; exemption pin ratcheted 14 → 13 (rebased over the binArgs slice, which took it 15 → 14); the plugin.headless line deleted from feature_coverage_exemptions.txt.

Verification (laptop worktree, on the rebased head)

  • bun test plugin/opencode/mcpx/headless.test.ts — 5 pass / 0 fail; whole plugin/opencode/mcpx/ dir 18 pass / 0 fail.
  • go test ./internal/settings/ -count=1 — ok (guard + ratchet at pin 13).
  • go test ./internal/e2e/ -run TestEffectProbeDeclarationsMatchTheProbesThatExist — pass; the new probe and the sibling env/binArgs probes pass on the merged state.

#8472 stays open: the remaining plugin.* exemptions (discoveryRetry, toolTiming, instructions, tools, remember, daemonTools in flight, disabledTools held) are each their own slice.


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

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fadbc25-9b21-4fdf-95d5-bda20a27947b
Commits

Reviewing files that changed from the base of the PR and between d6acb45 and 02b6933.

Files selected for processing: 5

  • pkgs/mcpx/internal/e2e/effect_test.go
  • pkgs/mcpx/internal/e2e/feature_coverage_exemptions.txt
  • pkgs/mcpx/internal/e2e/plugin_test.go
  • pkgs/mcpx/internal/settings/effect.go
  • pkgs/mcpx/plugin/opencode/mcpx/headless.test.ts
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T07:41:38.704266Z 02b6933 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acceb35b49

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +145 to +146
process.env.MCPX_STATE_DIR = state;
process.env.TMPDIR = root;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Isolate the runtime directory before daemon discovery

When running on a host with a live daemon under $XDG_RUNTIME_DIR/mcpx, this setup still discovers the host's sockets: socketDirs() in plugin/core/daemon.ts scans that directory in addition to MCPX_STATE_DIR and TMPDIR. The extra daemon can change the warning to 3 daemons, breaking the positive assertions, or answer /v1/resolve and eliminate the ambiguous warning entirely. Clear XDG_RUNTIME_DIR or point it inside the test's scratch root so both the standalone effect probe and direct Bun runs depend only on the two fake daemons.

Useful? React with 👍 / 👎.

@dezren39
dezren39 force-pushed the lane-jy-8472 branch 4 times, most recently from 1ccdff3 to 6766cde Compare November 23, 2026 07:37
@dezren39
dezren39 merged commit df7f762 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-jy-8472 branch November 23, 2026 07:40
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