Repository navigation
Size cap with max_mb opt-out, real text mode, release/CI hygiene (spec #16) - #20
Merged
Merged
Conversation
ChHsiching
marked this pull request as ready for review
October 31, 2026 07:44
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.
Implements spec #16. Closes #16. Closes #17. Closes #18. Closes #19.
What
max_mbopt-out (ticket Ticket: size cap with max_mb opt-out (reject, never truncate) #17, ADR-0007). Response bodies are capped at 2 MB by default on both the Passthrough and Extraction paths, enforced while reading (Content-Length allows an early reject). Over-limit documents are rejected with an error naming the size and the limit, never truncated. A new optionalmax_mbparameter raises the cap up to a hard ceiling of 8 for large-context models; it participates in the cache key.return_format: text(ticket Ticket: return_format text mode for HTML pages #18). HTML pages return the article's plain text (no markdown syntax) undertext, with a whole-document text fallback; raw documents keep returning identical content for both values (ADR-0006 unchanged). Unknown format values are rejected with a typed error instead of silently defaulting.dev), CI runs the e2e stdio suite, both workflows pin Go 1.26, release and license badges on both READMEs.Deliberate additions beyond the spec text
Unknown-
return_formatrejection and case-insensitive acceptance (consistent with themax_mbvalidation philosophy: never silently lie), andVERSIONplumbing in Makefile/build.sh so local release builds can reproduce CI binaries honestly.Verification
Each ticket landed through an implementer running TDD on its own branch; the integration branch re-verified
go test ./...,go vet ./..., andgo test -tags=e2e ./internal/mcpserverafter every merge. A two-axis code review (standards + spec) ran on the full diff; all findings were fixed in follow-up commits (shared max_mb validation and default-resolution helper, phrase-level test assertions,CeilingMBrename).One inherent limit, by design: for chunked responses with unknown length the over-limit error can only name the cap and how many bytes were read before the stop, not the document's true size.