Skip to content

test(mcp): cap below every payload in the capped-response contract test - #23

Merged
maxgfr merged 1 commit into
mainfrom
claude/features-review-optimization-x657hf
Sep 29, 2026
Merged

maxgfr merged 1 commit into
mainfrom
claude/features-review-optimization-x657hf

Conversation

@maxgfr

@maxgfr maxgfr commented Sep 29, 2026

Copy link
Copy Markdown
Owner

The Release workflow failed on main after #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 tool in tests/mcp-output.test.ts caps 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, coupling on the mini-repo fixture 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 a shallow flag 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.ts passes (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

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
maxgfr marked this pull request as ready for review September 29, 2026 14:14
@maxgfr
maxgfr merged commit 486e33f into main Sep 29, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants