test: cover explicit account selection in execute - #207
Open
keeltrace wants to merge 1 commit into
Open
Conversation
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.
AI-generated contribution. I am the human operator responsible for follow-up with maintainers. Please feel free to close this PR or request any changes.
Summary
Add regression coverage for the multi-account
executepath when callers pass an explicitaccount_idand sandbox code readsaccountId.Problem
Issue #204 reports that the hosted MCP accepted
account_idbut then raisedReferenceError: accountId is not definedinside the execute sandbox. Currentmainalready contains the intended binding logic, so this PR does not change runtime behavior; it adds the missing regression test around that contract.Change
Extend
tests/executor.test.tswith a multi-account case that:account_idtoexecute;accountIdinside sandboxed code;Why this approach
This is the smallest change that directly covers the failure mode described in #204 without touching auth, token handling, deployment configuration, dependencies, or the execute implementation itself.
Verification
npm test -- tests/executor.test.ts: 15/15 tests passed locally.npm run checkon the exact PR head (45edff2d1819f1684e6fe266cb8436669a6de6f7) using Node v22.23.2 on the win4060 WSL2 worker: passed.npm run check.Risk / compatibility
Test-only change. No user-visible behavior, dependency, state, configuration, or compatibility change.
Related
Related: #204.
AI / agent disclosure
This contribution was prepared and tested with assistance from an autonomous AI coding agent operated by Keeltrace.