Repository navigation
fix(mcp): run_tests runs fixtures behind the operator host's plugins (#1112) - #1115
Merged
Merged
Conversation
… 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1112.
Reproduced
A new case in
test/fixture-run.test.tsuses a host file whose plugin adds anx-operator-plugin: onheader inonResponse, and a fixture that expects it. On main,run_test(theurlcode testchild) exited 0 with{total:1,failed:0}, whilerun_testsreturnedfailed: 1with{check:'header',name:'x-operator-plugin',expected:'on',actual:null}. After the fix both pass.Change
packages/core/src/fixture-run.ts: newrunFixturesOnHost(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.runHermeticFixturesloads the hermetic host and calls it, so it no longer takespluginsfrom its caller.packages/core/src/cli.ts:urlcode testcallsrunFixturesOnHostwith the host it already loaded (hermetic) instead ofrunProjectTestsdirectly.packages/core/src/mcp.ts:run_testsunchanged in inputs; it gets the plugins of the server's--host-filethrough the core. It gains no--alias-origin:urlcode mcphas none, andrun_testforwards none either, so the two tools agree.docs/TOOLING.md(run_tests vs run_test) and theRIM-EXT-HERMETIC-001card (behavior sentence, source map, fixture).Evidence
npm run typecheck,npm run verifyandnpm run test:packagepass locally (macOS). This is not an independent security review.🤖 Generated with Claude Code