Repository navigation
test(mcp): share server result readers - #15174
Conversation
[Low impact] This test-only cleanup appears safe to merge. SummaryShares MCP result readers across four test suites without changing their checks or error messages.
Reviews (1) · Last reviewed commit: "test(mcp): share server result readers" · Reviewed by Greptile |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
* commit '7f7d34ad7c30a5fe015b642118dd40e8e9ac093d': (167 commits) fix(artifacts): classify member presence from the absent side coverage (morluto#15200) fix(tar): account for retained pax owner names (morluto#15195) fix(conformance): validate paired fixture count expectations (morluto#14125) fix(nds): report unreachable file name directories (morluto#15192) refactor(firmware): share admitted-file decoder buffering (morluto#15198) fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123) fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971) test(environment): share the loopback capture fixture (morluto#15196) perf(png): reconstruct scanlines with one filter dispatch (morluto#11818) feat(iso9660): stream files across separated extents (morluto#15190) perf(apple): build only the requested asset catalog page (morluto#14032) perf(artifacts): isolate offline session composition from deep providers (morluto#15194) perf(evidence): bound investigation closure worklist by depth (morluto#15193) perf(audit): avoid copying complete log lines (morluto#15184) test(mcp): share server result readers (morluto#15174) fix(android): declare Android mapping and JNI fixed allowances (morluto#15183) fix(artifacts): retain deep comparison source chains (morluto#15191) perf(evidence): bound link inspection frontier by records (morluto#15189) perf(evidence): retain snapshots across duplicate imports (morluto#15186) fix(nro): exclude ASET header bytes from asset ranges (morluto#15185) ...
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (173 commits) fix(paths): reject Windows console device names (morluto#14972) fix(artifacts): classify member presence from the absent side coverage (morluto#15200) fix(tar): account for retained pax owner names (morluto#15195) fix(conformance): validate paired fixture count expectations (morluto#14125) fix(nds): report unreachable file name directories (morluto#15192) refactor(firmware): share admitted-file decoder buffering (morluto#15198) fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123) fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971) test(environment): share the loopback capture fixture (morluto#15196) perf(png): reconstruct scanlines with one filter dispatch (morluto#11818) feat(iso9660): stream files across separated extents (morluto#15190) perf(apple): build only the requested asset catalog page (morluto#14032) perf(artifacts): isolate offline session composition from deep providers (morluto#15194) perf(evidence): bound investigation closure worklist by depth (morluto#15193) perf(audit): avoid copying complete log lines (morluto#15184) test(mcp): share server result readers (morluto#15174) fix(android): declare Android mapping and JNI fixed allowances (morluto#15183) fix(artifacts): retain deep comparison source chains (morluto#15191) perf(evidence): bound link inspection frontier by records (morluto#15189) perf(evidence): retain snapshots across duplicate imports (morluto#15186) ...
* commit '4ca43e2cb20f0edd86cdbf315a9c99c7b9b87468': (34 commits) fix(paths): reject Windows console device names (morluto#14972) fix(artifacts): classify member presence from the absent side coverage (morluto#15200) fix(tar): account for retained pax owner names (morluto#15195) fix(conformance): validate paired fixture count expectations (morluto#14125) fix(nds): report unreachable file name directories (morluto#15192) refactor(firmware): share admitted-file decoder buffering (morluto#15198) fix(binary): carry the runtime refusal's repair instruction in remediation (morluto#14123) fix(agentenv): reject COM0 and LPT0 bundle names (morluto#14971) test(environment): share the loopback capture fixture (morluto#15196) perf(png): reconstruct scanlines with one filter dispatch (morluto#11818) feat(iso9660): stream files across separated extents (morluto#15190) perf(apple): build only the requested asset catalog page (morluto#14032) perf(artifacts): isolate offline session composition from deep providers (morluto#15194) perf(evidence): bound investigation closure worklist by depth (morluto#15193) perf(audit): avoid copying complete log lines (morluto#15184) test(mcp): share server result readers (morluto#15174) fix(android): declare Android mapping and JNI fixed allowances (morluto#15183) fix(artifacts): retain deep comparison source chains (morluto#15191) perf(evidence): bound link inspection frontier by records (morluto#15189) perf(evidence): retain snapshots across duplicate imports (morluto#15186) ...
Summary
Share the structured-result reader used by three MCP boundary suites and the text reader used by two. This removes 22 net lines of test code.
Problem and expected behavior
The server lifecycle, workflow and unknowns suites copied the same rules for reading a structured success or a typed tool failure. The lifecycle and session suites also copied the rule for selecting the first text content item. Maintaining each copy separately could let identical responses produce different assertions.
Change and scope
The shared test helpers keep the existing checks and error messages. Typed failures still go through
parseMcpToolError. Suites that validate successful output against a Zod schema keep their own assertions. This internal test cleanup has no linked issue.Evidence and regression coverage
Compared both readers with each of the five original functions on successful content, malformed or missing content, and tool failures, using a controlled decoder for the failure branch. All 29 comparisons matched the expected outcomes. Verified that the four suites have identical test bodies after removing imports and the duplicated helpers.
Validation performed
git diff --checkpassed on the final patch.fad32e5be. All 539 selected portable tests passed across six suites, including the four MCP boundary suites in this change.Compatibility, safety, and release
Only test code changes. Production contracts, SDK initialization, and fixture connection lifetimes are outside the diff.
Author readiness
Human owner: @vincentkoc
Author checklist (completed by the PR author before requesting review)
type(scope): outcome.REA_runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.