Repository navigation
fix(mcpx): JSON-null sampling/roots root declarations count as undeclared (#9828) - #9833
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
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 57 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex gate disposition (lane code-d, task 16520): the Codex code review on this PR FAILED to run — Codex usage limits reached (see the connector's own comments); it produced zero findings and zero inline review comments (verified via the PR review-comments API). There is no undispositioned Codex finding. Merging under the standing criteria: full |
Fixes #9828.
PR #4194's
declaredValuefix (the #2474 rule: a JSON-null capability declaration is no declaration) covered the elicitation root and the sampling sub-capabilities, but two presence-only root gates remained inpkgs/mcpx/internal/mcpserver/conn.go:CanSample()returnedp.Declared("sampling"), so{"sampling":null}counted as declared — a plainsampling/createMessagewas Sendable andAnswersInline()was true.roots/listbranch ofQuestion.Sendablereturnedp.Declared("roots"), so{"roots":null}counted as declared.Both now use
declaredValue(p.Caps[...]), mirroringCanElicit. A malformed non-null declaration still counts as declared (declaredValue only rejects absent/empty/null), preserving the existing sampling-gating test's parent-meaning expectation.Tests (
null_root_caps_test.go, #2474 style, oracle = the #2474 rule):TestNullSamplingRootDeclaresNothing:CanSamplefalse,AnswersInlinefalse, plain sampling question not Sendable for{"sampling":null};{}still true/Sendable.TestNullRootsRootDeclaresNothing:roots/listnot Sendable for{"roots":null}; Sendable for{}and{"listChanged":true}.Verification:
go test ./internal/mcpserver/ -count=1— full package PASS (16.5s) on the laptop, including the existing #2474 elicitation and sampling sub-capability suites.Queue: task 16520 (lane code-d), triaged inline from task/triage to task/small-fix per the packet acceptance.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.