Skip to content

test(mcpx): effect probe for plugin.disabledTools (#8472) - #13370

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

dezren39 merged 1 commit into
mainfrom
lane-yi-8472

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What

The plugin.disabledTools slice of the #8472 settings effect-probe burn-down, landed under Drew's 2026-11-23 batch approval of the former flag holds. Recovery pass: Lane YD's takeover claim on the issue ended silently with no worktree, PR, or commits; this branch adopts that orphaned claim (Lane JN's original flag hold stands behind it). The scope follows the landed plugin.instructions slice (PR #13345) exactly.

  • New bun suite plugin/opencode/v2/disabled-tools.test.ts driving the real setupMcpxV2 with the setting set the way a user sets it — MCPX_PLUGIN_DISABLED_TOOLS in the process environment: unset hides nothing and seeds no policy; a named tool is hidden from the session's second turn while its siblings and the host tools stay; a separated list hides each named tool; a name outside the mcpx_ namespace can never hide a host tool; the host option beats the environment in both directions.
  • Go probe TestPluginDisabledToolsHidesToolsFromTheEnvironment in internal/e2e/plugin_test.go, with the mirror entry in implementedEffectProbes and the anchor in effectProbeFuncs (internal/e2e/effect_test.go).
  • plugin.disabledTools moved from EffectExemptions to EffectProbes in internal/settings/effect.go; EffectExemptionPin 7 → 6; its line deleted from feature_coverage_exemptions.txt.

#8472 stays open for the remaining exemptions (the daemon, http, and embeddings settings, plus protoTasks.cancelGrace under #8473).

Verification (laptop, this branch)

  • bun test plugin/opencode/v2/disabled-tools.test.ts — 5 pass / 0 fail.
  • bun test plugin/opencode/v2/tool-filter.test.ts plugin/opencode/v2/instructions.test.ts — 18 pass / 0 fail.
  • go test ./internal/settings/ -count=1 — ok.
  • go test ./internal/e2e/ -run 'TestPluginDisabledToolsHidesToolsFromTheEnvironment|TestEffectProbeDeclarationsMatchTheProbesThatExist|TestFeatureCoverage' -count=1 — all pass.
  • go test ./internal/e2e/ -run TestPlugin -count=1 — all 14 plugin probes pass.

Start Proof
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 39 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: 22924a31-358a-49dc-aa57-86779cf8ab95
Commits

Reviewing files that changed from the base of the PR and between 6ae558c and c10797b.

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/v2/disabled-tools.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-23T14:27:38.098084Z c10797b 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.

The plugin.disabledTools setting (MCPX_PLUGIN_DISABLED_TOOLS) hid
tools only on the say-so of the filter's own unit tests: the real
setup path was driven with the host option, never with the setting
as a user sets it. New bun suite plugin/opencode/v2/disabled-tools.test.ts
drives the real setupMcpxV2 with the variable in the process
environment and asserts the observable differences: unset hides
nothing and seeds no policy; a named tool is hidden from the
session's second turn while its siblings and the host tools stay;
a separated list hides each named tool; a name outside the mcpx_
namespace can never hide a host tool; the host option beats the
environment in both directions. Go probe
TestPluginDisabledToolsHidesToolsFromTheEnvironment runs the suite
from internal/e2e, with the mirror and anchor entries in
effect_test.go.

plugin.disabledTools moves from EffectExemptions to EffectProbes
in internal/settings/effect.go, EffectExemptionPin 7 -> 6, and its
line is deleted from feature_coverage_exemptions.txt.
@dezren39
dezren39 merged commit 8039a35 into main Nov 23, 2026
1 check passed
@dezren39
dezren39 deleted the lane-yi-8472 branch November 23, 2026 14:26
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