Skip to content

test(mcp): share server result readers - #15174

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/mcp-test-result-readers
Nov 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/mcp-test-result-readers

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • All 29 local differential comparisons passed.
  • Formatting and git diff --check passed on the final patch.
  • Hosted CI passed on 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

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Author checklist (completed by the PR author before requesting review)

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
  • I ran every test, build, or measurement needed to validate this change, reported a browser, GPU, or environment gap only when that runtime or hardware is unavailable, and reported the checks I ran and their results without presenting inferred correctness or speedups as measured.
  • Comments explain constraints or non-obvious decisions; task history and conversations stay out of code and docs.
  • Documentation is concise and factual, without punchy slogans or promotional language.
  • This change fixes the root cause and follows the engineering rules in AGENTS.md.
  • Formatted input is interpreted once at the owning boundary, and consumers use the owner's parsed facts. See Interpret boundary facts once.
  • Combined failures preserve partial observations, remaining resources, and cleanup facts. See Own the lifecycle.
  • A hardcoded limit is an REA_ runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This test-only cleanup appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only cleanup appears safe to merge.

Summary

Shares MCP result readers across four test suites without changing their checks or error messages.

  • Boundary tests read MCP results through shared helpers.

Reviews (1) · Last reviewed commit: "test(mcp): share server result readers" · Reviewed by Greptile

@vincentkoc
vincentkoc marked this pull request as ready for review November 30, 2026 09:40
@vincentkoc
vincentkoc merged commit 0460fb7 into main Nov 30, 2026
42 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-30T09:40:14.836930Z
We couldn’t complete this review. Comment @codex review to try again.
fad32e5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vincentkoc
vincentkoc deleted the refactor/mcp-test-result-readers branch November 30, 2026 09:40
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

vincentkoc added a commit to WoWHellgarve-HolyDeeW/rea that referenced this pull request Nov 30, 2026
* 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)
  ...
vincentkoc added a commit to XiaoBinGan/rea that referenced this pull request Nov 30, 2026
* 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)
  ...
vincentkoc added a commit to ShuaixinHuang/rea that referenced this pull request Nov 30, 2026
* 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)
  ...
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.

1 participant