Repository navigation
mcpx: cap the ask-abandon body read; move the audience window to defaults.json - #11329
Merged
Merged
Conversation
…ults.json Two guard tests went red on main once mcpx tests ran on schedule: - TestNoUnboundedBodyReaders: handleAskAbandon (#8922) decoded its optional body with no size ceiling. It now reads through http.MaxBytesReader at the call body limit, like every other route. This is also what failed the mcpx nix build. - TestNoPackageRedeclaresADefault: elicit's DefaultAudienceWindow (#2438) was an inline 2*time.Minute. It now comes from defaults.json (elicit.audienceWindow, 2m), an internal bound kept out of the settings registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Fixes #11327 (the
mcpx nix buildfailure isTestNoUnboundedBodyReaders).Before: the scheduled
mcpx testandmcpx nix buildruns on main (2a7cbd1) failed on two guard tests:TestNoUnboundedBodyReaders:routes_proto.go:909-910readr.Bodywith no size ceiling.TestNoPackageRedeclaresADefault:internal/elicit/presence.go:31declaredconst DefaultAudienceWindow = 2 * time.Minute.After: both guards pass, so the nix build's
go testphase passes too.How:
handleAskAbandondecodes its optionaltaskCancelledbody throughhttp.MaxBytesReaderatdefaults.HTTPCallBodyLimit, like every other body read in the daemon. A missing or malformed body still means not cancelled.defaults.jsonaselicit.audienceWindow, exposed asdefaults.ElicitAudienceWindow. It's an internal bound and stays out of the settings registry.elicit.DefaultAudienceWindowkeeps its name, so callers don't change.Testing: with the repo's Go 1.27.2 toolchain,
go veton elicit, defaults and daemon is clean.go test ./internal/defaults ./internal/elicit ./internal/daemonall pass; daemon includesTestNoUnboundedBodyReaders.Not covered here: the
mcpx teste2e shards. They have failed on main since 2026-11-16, before the nightly switch, and that's a separate breakage.Generated by Claude Code