test(mcp): cap below every payload in the capped-response contract test - #23
Merged
Merged
Conversation
The Release job failed on main: with the full git history it checks out,
`coupling` on the mini-repo fixture answers `{"ok": true, "couplings": []}`
(36 bytes), which fits under the 40-byte cap the test used, so it came back
as a normal result instead of the size notice the test asserts. CI's
shallow clone adds a `shallow` flag and pushed the same answer over 40,
which is why the PR's checks passed. A 1-byte cap is below the smallest
possible JSON answer, so every tool takes the notice path in any checkout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWLTLwAs9kt9Ac2YvAXV1q
maxgfr
marked this pull request as ready for review
September 29, 2026 14:14
Contributor
|
🎉 This PR is included in version 2.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
The Release workflow failed on
mainafter #22 merged (run). CI on the same commit was green.Cause. The test
sends a capped response as a tool error without structuredContent, for every schema-declaring toolintests/mcp-output.test.tscaps every MCP answer at 40 bytes and expects each tool to come back as the size notice. The Release job checks out the full git history (fetch-depth: 0). With full history,couplingon themini-repofixture returns{"ok": true, "couplings": []}, which is 36 bytes. That fits under the cap, so the tool returns a normal result and the assertion fails. CI's shallow clone adds ashallowflag to the same answer, which pushed it over 40 and hid the problem.Fix. The test now uses a 1-byte cap, which is below the smallest possible JSON answer (
[]is 2 bytes), so every tool takes the notice path in any checkout. Only the test changes; the engine is untouched. With this merged, the next Release run should publish the version for #22.Checked.
tests/mcp-output.test.tspasses (17/17) in a full-history clone, where it reproduced the failure before the fix, and in a shallow clone.🤖 Generated with Claude Code
https://claude.ai/code/session_01XWLTLwAs9kt9Ac2YvAXV1q
Generated by Claude Code