Skip to content

fix(mcp): run_tests runs fixtures behind the operator host's plugins (#1112) - #1115

Merged
jimhoyd merged 1 commit into
mainfrom
claude/run-tests-plugins-1112
Oct 1, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/run-tests-plugins-1112

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #1112.

Reproduced

A new case in test/fixture-run.test.ts uses a host file whose plugin adds an x-operator-plugin: on header in onResponse, and a fixture that expects it. On main, run_test (the urlcode test child) exited 0 with {total:1,failed:0}, while run_tests returned failed: 1 with {check:'header',name:'x-operator-plugin',expected:'on',actual:null}. After the fix both pass.

Change

  • packages/core/src/fixture-run.ts: new runFixturesOnHost(project, host, {policy, review, log, origin, aliasOrigins}) hands the run the loaded host's extensions and plugins, the policy's grants and the alias origins. runHermeticFixtures loads the hermetic host and calls it, so it no longer takes plugins from its caller.
  • packages/core/src/cli.ts: urlcode test calls runFixturesOnHost with the host it already loaded (hermetic) instead of runProjectTests directly.
  • packages/core/src/mcp.ts: run_tests unchanged in inputs; it gets the plugins of the server's --host-file through the core. It gains no --alias-origin: urlcode mcp has none, and run_test forwards none either, so the two tools agree.
  • Docs: docs/TOOLING.md (run_tests vs run_test) and the RIM-EXT-HERMETIC-001 card (behavior sentence, source map, fixture).

Evidence

npm run typecheck, npm run verify and npm run test:package pass locally (macOS). This is not an independent security review.

🤖 Generated with Claude Code

… from the shared core (#1112)

runFixturesOnHost in fixture-run.ts now hands every fixture run the loaded
host's extensions and plugins, the verified policy's grants and any alias
origins. urlcode test (and so MCP run_test) and MCP run_tests both use it, so
a fixture that depends on a host plugin passes or fails the same way in each.
run_tests gains no option: it reads the server's --host-file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) October 1, 2026 02:11
@jimhoyd
jimhoyd merged commit 9e8996b into main Oct 1, 2026
21 checks passed
@jimhoyd
jimhoyd deleted the claude/run-tests-plugins-1112 branch October 1, 2026 02:16
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.

MCP run_tests ignores the operator host's plugins, which urlcode test and run_test apply

1 participant