Repository navigation
fix(mcp): adopt official SDK with bounded persistent stdio - #4899
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (19)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…88-official-sdk-status
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: 1e35991
integration_basis: normal merge of prior SDK 3f87 and material prerequisite #4911 (67de892); current Linux checkout b1e2f61 has candidate-identical tree 26db6633.
claim_boundary: official SDK lifecycle for the inherited read-only, root-redacted status tool/resource, with finite cancellation-safe IO and matching-response-flush request admission.
changed_surfaces_and_semantic_owners_inspected: complete 20-path diff, SDK handler/lifecycle consumers, framing/writer/transport, manifests/lock, process policy, ADR 0022 and interop. Root independently reread prior 239/f612/12a semantic reviews, actual current server/interop and 12a-to-1e owner delta; no conflict resolution or MCP production changes accompanied the normal prerequisite merge.
blocking_findings: none.
proof_and_ci_observed: current all-target compilation, fast fifteen gates and six precommit commands PASS; exact 1389 kind/path/old_path pairs and 1391 path union matched independently, no skipped gates or limitations. Linux required run 36564584544 SUCCESS, actual JUnit 10154/0 failure/0 error/0 skipped cases, all 30 unique MCP cases (21 library, four official SDK, five public stdio) PASS. Raw summary separately records one explicitly ignored committed-fixture writer; it is not MCP coverage. Actual PRECOMMIT_RESULT=success and all 20 owned paths match CI including removed modules absent.
wrong_behavior_oracle_challenge: retained oversized-output failure 143503 versus 131072 bytes and old held-stdout admission of 33 requests discriminate the repaired seams. Current actual SDK typed-admission witness and partial-write/held-flush cancellation, matching-ID, wrong/no-ID, notification and fatal blocked-input controls exercise the intended boundaries; public held-stdin exit denies helpful EOF.
proof_or_review_missing: bot quota/unavailable output is missing automated review, not clean review. The accountable root supplied substantive current-head acceptance. Historical Windows first-reply deadline cause remains NOT_ESTABLISHED in #4914; later diagnostic success is not its repair.
residual_assumptions_and_non_claims: finite controls do not qualify full MCP conformance, analysis authority, general resource bounds, embedding/repeated sessions, blocking-stdin worker joining, performance, Windows live PyPI or release readiness. Guard policy success is not an ideal reference-corpus verdict. Broader #3088 acceptance remains separately reconciled.
disposition: REVIEW_READY.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis 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. |
| standard JSON-RPC codes. The pinned official Rust SDK owns negotiation, | ||
| dispatch, correlation and cancellation. Syntax-invalid JSON is ignored; | ||
| well-formed messages with invalid typed shapes receive Invalid Request and | ||
| the transport can read the next frame. Unknown request IDs are omitted in SDK | ||
| error responses; readable IDs remain correlated. Messages are capped at |
There was a problem hiding this comment.
🔍 Changelog retains retired MCP error contract
The existing MCP changelog entry still promises an id on every error. The SDK migration omits unknown IDs and ignores syntax-invalid JSON; a follow-up entry can distinguish the current contract from its history.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e359916b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ServerCapabilities::builder() | ||
| .enable_tools() | ||
| .enable_resources() | ||
| .build(), |
There was a problem hiding this comment.
Restore resource-template listing
The previous adapter returned an empty successful result for resources/templates/list, but this ServerHandler advertises resource support without implementing list_resource_templates; the SDK default therefore returns Method Not Found. MCP clients that enumerate templates as part of resource discovery can now abort before reaching the remaining status resource. Implement the typed empty-list handler and add an SDK/public-stdio regression case for this method. Validation: cargo test -p ripr mcp. Confidence: High.
Useful? React with 👍 / 👎.
| The server feature adds the following locked transitive packages. Their | ||
| published manifest declarations fit the repository's Rust 1.95 and | ||
| MIT/Apache-2.0 license posture; this is not a vulnerability-audit result. | ||
| Cargo generated the lockfile, and dependency-only `cargo fetch --locked` | ||
| completed after resolving the new graph. |
There was a problem hiding this comment.
Make the dependency-admission inventory complete
This paragraph presents the following table as the locked transitive packages added by the server feature, but the same commit's lockfile adds 24 package names, including direct rmcp dependencies such as chrono 0.4.45 and tokio-stream 0.1.18 that are absent from the six-row table. That makes the retained license/MSRV admission record incomplete and can cause later dependency reviews to treat unrecorded packages as already assessed. List the complete introduced graph or explicitly narrow the claim and document where the remaining packages were admitted; validate it against the parent-to-candidate Cargo.lock package-name diff. Confidence: High.
Useful? React with 👍 / 👎.
Summary
ripr mcpuses the official Rust SDK for negotiation and request lifecycle. The status-only adapter retains finite stdio framing, cancellation-safe partial IO, correlated errors, and serial request admission until the matching response is fully written and flushed.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal / governing issue: #3088.
Spec: MCP interoperability.
ADR / plan: ADR 0022, including all former-control dispositions and dependency admission.
Acceptance delta: delegate lifecycle to the SDK while preserving the read-only status authority boundary and finite cancellation-safe transport.
Candidate Relationships
Candidate branch:
codex/3088-official-sdk-status; current head1e359916b959029ccea9c89c7ef2359b25d1cae4, tree26db6633725114c3f6b79f2646f83f0408c3859b.Material prerequisite: merged #4911 (
67de8927b5d39bd437d33272eda3b4d41b3d567b), normally merged without conflicts. MCP owner source, tests, Cargo manifest and lock remain byte-identical to prior SDK head 3f87. No proposed replacement candidate.Scope
Scope Classification
Production delta: SDK owns negotiation and dispatch; adapter owns static status data and bounded stdio. Input limit is 256 KiB; output limit 128 KiB including delimiter. Oversized correlated IDs trigger bounded termination without substitute IDs. Persistent queued identity survives canceled writes/flushes; notifications and unmatched replies cannot release request admission. CLI runtime shutdown after service termination avoids waiting for uncancellable stdin work; this does not join that worker or qualify embedding/repeated sessions.
Evidence/support delta: 21 library controls, 4 official SDK-client sessions and 5 public stdio cases; bounded diagnostic harness observations retain executable custody and response stages without payload logging.
Single acceptance criterion: SDK-backed status discovery and response behavior retain authority boundaries and the exercised IO/admission invariants.
Non-goals: analysis authority, repair tools, HTTP, custom lifecycle, support promotion, performance or release qualification.
Support-tier Impact
No support promotion. SDK owns protocol negotiation and compatibility mapping. Missing-resource compatibility and available-URI text are documented; one root-redacted resource/tool remains.
Policy Impact
rmcp is pinned 3.5.0 (Apache-2.0/MSRV 1.88); six added transitive packages have exact admission recorded in the ADR, within repository MSRV 1.95. Current owning policy gates pass; this is not a vulnerability audit.
Proof
Raw nextest summary reports 10154 passed and 1 skipped:
output::executed_control::tests::write_executed_control_contract_fixturesis explicitly ignored because it writes committed fixtures. It is not an MCP omission; no executed JUnit case is skipped. Current required log records PRECOMMIT_RESULT=success. Local driver terminal0 and all 36 recorded owned PIDs absent before shared-target release.Discriminating historical failures remain retained: local oversized output 143503 bytes versus 131072 limit; old SDK transport admitted 33 requests with held stdout rather than discovery plus one outstanding request. Current actual SDK controls check admission count, matching flushed-ID release, wrong/no-ID/notification nonrelease and canceled write/flush resumption. Earlier test-only constructor/lint/environment/PyPI fixture failures are repaired with separate retained receipts; they are not current passes.
Historical Windows 12a first-reply 10 s deadline had empty stdout/stderr; its cause remains NOT_ESTABLISHED in #4914. Later 3f diagnostic PASS is not a production root-cause repair and instrumentation can perturb timing. Historical3f focused Windows 21/4/5 evidence covers unchanged owners; it is not repeated current 1e Windows runtime execution.
Evidence packet:
F:/code/Opencode/Rust/ripr-4382-proof/3088-1e359-hosted; local guards:.../3088-1e359-sdk-guards-v8. Required raw/context/JUnit and named cases are retained. Exact-head substantive REVIEW_READY is posted as COMMENT PRR_kwDOSiSx0c8AAAABPwsOEQ. Protected squash merged as3f07824efb2c35898973d23ca6acad109f3366c6at 2026-09-29T12:35:44Z; broader issue #3088 remains open for explicitly unestablished predicates.Claim Boundary
Finite executed controls establish the tested SDK status, IO, correlated-ID and admission behavior. They do not establish general resource bounds, full MCP conformance, speed, Windows live PyPI support, embedding guarantees or release readiness. Reference-corpus departures in raw guard output remain observations; policy pass is not an ideal-product claim.
Rollback
Revert adapter/dependency/documentation changes normally. No persisted-data migration or release action.
Spec-Test-Code Traceability
docs/interop/mcp.md.server.rs; persistentframing.rs,writer.rs,transport.rs.tests/mcp_sdk.rs,tests/mcp_stdio.rsusing actual SDK/just-built CLI.Static Language Check
CI Economics
n/a: no workflow, protection or routing changes; existing required gates used.
Engineering Check
Gates
cargo check --workspace --all-targets --locked --jobs 2cargo xtask check-fast(15 gates includingfmt/strictClippy/policies)cargo xtask precommit(six exact commands)cargo nextest run --workspace --profile ci(current Linux required producer)