Repository navigation
Closed
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)kind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
mcpx(settings): TestThePluginReadsNoUndeclaredSetting red on main — MCPX_PLUGIN_DISABLED_TOOLS landed in #5122 without a pluginSettings() declaration
Evidence (verified this run, laptop, clean worktree at origin/main 1391b59)
The v2 plugin gained a new environment knob today, and the settings registry — the package whose whole point is that every knob is declared there — never heard about it:
pkgs/mcpx/plugin/opencode/v2/options.ts:135—disabledTools: nameList(o.disabledTools) ?? nameList(env.MCPX_PLUGIN_DISABLED_TOOLS)(documented at options.ts:55; exercised byplugin/opencode/v2/tool-filter.test.ts:247).- The read landed in commit d4f1c24 ("mcpx v2 plugin: wire disabledTools option as the tool-filter policy writer (mcpx opencode v2 plugin: item (1) of #2841 — per-session tool filtering via session context hook (mcp.transform deviation) #5122)"), merged via PR mcpx v2 plugin: per-session tool filtering via session context hook (#5122) #5170.
pkgs/mcpx/internal/settings/plugin.go:18—pluginSettings()declares plugin.bin, plugin.binArgs, plugin.backend, plugin.discoveryRetry, plugin.toolTiming, plugin.env, plugin.instructions, … but noplugin.disabledToolsentry, so the derived env nameMCPX_PLUGIN_DISABLED_TOOLSis declared nowhere (grep for the name acrossinternal/settings/*.gohits only tests' prose).
Repro (standalone, deterministic):
$ cd pkgs/mcpx && go test ./internal/settings/ -run TestThePluginReadsNoUndeclaredSetting -count=1
--- FAIL: TestThePluginReadsNoUndeclaredSetting (0.01s)
consumed_test.go:283: the plugin honours variables nothing declares:
MCPX_PLUGIN_DISABLED_TOOLS (plugin/opencode/v2/options.ts:135)
Add them to pluginSettings() so `mcpx settings` can report them.
Why it matters
mcpx settingscannot report a live plugin knob: a user asking whatMCPX_PLUGIN_DISABLED_TOOLSdoes gets nothing, which is exactly the failureplugin.go's header says the registry exists to prevent ("a knob is a knob regardless of which process reads it").- It is a fresh regression from today's mcpx opencode v2 plugin: item (1) of #2841 — per-session tool filtering via session context hook (mcp.transform deviation) #5122 landing, not part of the pre-existing settings redness: the older guard failures are tracked separately in mcpx: internal/settings (scriptenv) and internal/conformance (TestAuthSplit, TestMatrix) failing on clean main #2716 / mcpx: three internal/settings guard tests fail on main (compendium chapter + undeclared adapter env) #2697 / mcpx docs: 13 pages missing from compendium.manifest.json — TestEveryDocumentHasAChapter red on main #2552 (filed 2026-10-30, acceptances scoped to the scriptenv/compendium/env-doc failures), and no open or closed issue mentions
MCPX_PLUGIN_DISABLED_TOOLS(searched 2026-11-03). Keeping this one separate keeps the mcpx opencode v2 plugin: item (1) of #2841 — per-session tool filtering via session context hook (mcp.transform deviation) #5122 follow-up owned instead of dissolving it into the older umbrella.
Fix shape (per the guard's own instructions)
Add a plugin.disabledTools entry to pluginSettings() in pkgs/mcpx/internal/settings/plugin.go (ScopePlugin; the name derivation from the path produces exactly MCPX_PLUGIN_DISABLED_TOOLS — do not hand-write an Env override). Watch the follow-on guards that enumerate plugin settings: the path→env map in internal/settings/registry_test.go (~:352), the effect-probe-or-exemption guard for the new setting, and any settings/Plugin README snapshots that list plugin settings.
Acceptance criteria
go test ./internal/settings/ -run TestThePluginReadsNoUndeclaredSetting -count=1passes on clean main.- The settings registry reports
plugin.disabledTools/MCPX_PLUGIN_DISABLED_TOOLSwith plugin scope (e.g. viamcpx settings). - No other
internal/settingstest regresses relative to the pre-existing red baseline tracked in mcpx: internal/settings (scriptenv) and internal/conformance (TestAuthSplit, TestMatrix) failing on clean main #2716 / mcpx: three internal/settings guard tests fail on main (compendium chapter + undeclared adapter env) #2697 / mcpx docs: 13 pages missing from compendium.manifest.json — TestEveryDocumentHasAChapter red on main #2552.
Metadata
Metadata
Assignees
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)kind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
dezren39 commentedon Nov 4, 2026
🤖 Agent note · filed
MCPX_PLUGIN_DISABLED_TOOLS(plugin/opencode/v2/options.ts:135) without declaring it inpluginSettings()(internal/settings/plugin.go:18), soTestThePluginReadsNoUndeclaredSettingis red on clean main (standalone repro in the issue body). Distinct from the pre-existing settings redness tracked in issue mcpx: internal/settings (scriptenv) and internal/conformance (TestAuthSplit, TestMatrix) failing on clean main #2716 / issue mcpx: three internal/settings guard tests fail on main (compendium chapter + undeclared adapter env) #2697 / issue mcpx docs: 13 pages missing from compendium.manifest.json — TestEveryDocumentHasAChapter red on main #2552 — no earlier issue mentions this env var.plugin.disabledToolsdeclaration (plus any enumerating-guard updates); done when the named guard test passes on clean main and no other settings test regresses against the tracked baseline. Enqueued as a small_fix packet on repo-health-code-pilot.dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
plugin.disabledToolsdeclaration topluginSettings()in pkgs/mcpx/internal/settings/plugin.go so TestThePluginReadsNoUndeclaredSetting passes, plus the follow-on registry guards the issue names. Claim labels synced; work proceeds in a laptop worktree on branch queue/8999-5242-plugin-disabled-tools.3 remaining items
dezren39 commentedon Nov 4, 2026
🤖 Agent note · parked
queue/8999-5242-plugin-disabled-toolsdezren39 commentedon Nov 4, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up (resume)
Merge pull request #5303 from developing-today/queue/8999-5242-plugin…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done (fixed & merged)
Done: PR #5303 merged (merge commit dea64bf); this issue auto-closed.
go test ./internal/settings/ -run TestThePluginReadsNoUndeclaredSetting -count=1→ ok.