fix(test): MCP sandbox 断言对齐 #917 的 _meta 回显 - #949
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com> #917 给 fixture 加上 meta= 字段后,旧的连续子串不再成立;session/token 转发本身没坏。
|
🚀 Released in v3.16.0 |
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.
优先级:P1(master
build当前红灯,本 PR 转绿)根因
#917 给 MCP fixture 的 echo 加上
meta=${JSON.stringify(_meta ?? {})},用来验证_meta.botmuxTrustedCaller。plugin-mcp-gateway已改成只断言session=/token=;plugin-mcp-sandbox仍toContain('alpha:echo:{"value":1}:session=...')。无宿主身份时实际回显是
alpha:echo:{"value":1}:meta={}:session=...,连续子串断裂。该文件skipIfLinux + 可用 bwrap,macOS 本机会 skip,合入后 Linux CI 才红。改动
test/plugin-mcp-sandbox.test.ts:分段断言alpha:echo:{"value":1}与session=${id}:token=host-only-token,与 gateway 测试对齐。影响面
adapters/、worker.ts、daemon.ts。验证
pnpm build通过。pnpm exec vitest run test/plugin-mcp-sandbox.test.ts test/plugin-mcp-gateway.test.ts --reporter=dot:gateway 20 通过;sandbox 3 skip(本机非 Linux/bwrap,与改前相同)。sandbox 两条失败用例需 Linux CI 实跑确认。