Conversation
| stream.write_all(request.as_bytes()).await.unwrap(); | ||
| let mut response = String::new(); | ||
| stream.read_to_string(&mut response).await.unwrap(); | ||
| assert!(response.starts_with("HTTP/1.1 200"), "{response}"); |
| stream.write_all(request.as_bytes()).await.unwrap(); | ||
| let mut response = String::new(); | ||
| stream.read_to_string(&mut response).await.unwrap(); | ||
| assert!(response.starts_with("HTTP/1.1 200"), "{response}"); |
| .to_string(); | ||
| let headers = "Authorization: Bearer secret\r\nAccept: application/json, text/event-stream\r\nContent-Type: application/json\r\nMCP-Protocol-Version: 2026-07-28\r\nMcp-Method: wrong/method\r\n"; | ||
| let mismatch = exchange(address, "POST", headers, &body).await; | ||
| assert!(mismatch.starts_with("HTTP/1.1 400"), "{mismatch}"); |
| assert!(mismatch.starts_with("HTTP/1.1 400"), "{mismatch}"); | ||
| assert!(mismatch.contains("-32020"), "{mismatch}"); | ||
| let batch = exchange(address, "POST", headers, "[]").await; | ||
| assert!(batch.starts_with("HTTP/1.1 400"), "{batch}"); |
Separate MCP outcomes from ACP failures, reuse request-native services, join tool cleanup before releasing admission, and bound retained frames, replies and HTTP response bodies. Preserve passive transport half-close semantics and test real rmcp HTTP workflows. BREAKING CHANGE: Channel now carries budgeted frames, ConnectTo returns ConnectionDriver, and native MCP uses request-scoped services with explicit outcome carriers. Coordinate the schema and dependent SDK major releases before publishing.
| let task = tokio::spawn(run_http_listener(listener, state)); | ||
| let auth = format!("Authorization: Bearer {token}\r\n"); | ||
| let legacy = exchange(address, route, "GET", &auth, "").await; | ||
| assert!(legacy.starts_with("HTTP/1.1 405"), "{legacy}"); |
| let legacy = exchange(address, route, "GET", &auth, "").await; | ||
| assert!(legacy.starts_with("HTTP/1.1 405"), "{legacy}"); | ||
| let delete = exchange(address, route, "DELETE", &auth, "").await; | ||
| assert!(delete.starts_with("HTTP/1.1 405"), "{delete}"); |
| exchange(address, route, "POST", "Origin: http://evil.test\r\n", "{}").await; | ||
| assert!( | ||
| invalid_origin.starts_with("HTTP/1.1 403"), | ||
| "{invalid_origin}" |
| exchange(address, route, "GET", "Origin: http://evil.test\r\n", "").await; | ||
| assert!( | ||
| invalid_get_origin.starts_with("HTTP/1.1 403"), | ||
| "{invalid_get_origin}" |
| "{invalid_get_origin}" | ||
| ); | ||
| let invalid_auth = exchange(address, route, "POST", "", "{}").await; | ||
| assert!(invalid_auth.starts_with("HTTP/1.1 401"), "{invalid_auth}"); |
| invalid_auth | ||
| .to_ascii_lowercase() | ||
| .contains("www-authenticate: bearer"), | ||
| "{invalid_auth}" |
| ); | ||
| let mismatch = exchange(address, route, "POST", &headers, &body).await; | ||
| assert!(mismatch.starts_with("HTTP/1.1 400"), "{mismatch}"); | ||
| assert!(mismatch.contains("-32020"), "{mismatch}"); |
Cover outer-id discrimination and separate v1/v2 method enums, and clarify that the binding adds no stronger cancellation support requirement.
17 tasks
Keep cancellation observable through readiness gates, bound all live tasks and frame sink reservations, and join protected MCP cleanup through connection termination. Repair cold HTTP session setup, release consumed output permits, abort rejected WebSocket input, and retain measured session metadata. Add regressions for the review findings and fix the minimal-feature build.
Keep raw JSON-RPC errors protocol-neutral so connector-backed MCP preserves explicit null and extension fields. Reserve HTTP queue capacity before publishing metadata and tear down idle agents after fatal router failure. Add permanent regressions for all three review findings. BREAKING CHANGE: RawJsonRpcMessage::Response now carries RawJsonRpcResponse with a boxed RawJsonRpcError instead of an ACP-specific schema response. Typed ACP request consumers retain the existing Error API.
Keep bounded HTTP response context until a terminal reply or teardown, and consistently bypass ordered POSTs for wrapped cancellation. Admit each connector operation as one protected task before construction, retaining ownership through backend shutdown and scoped cleanup. Add deterministic late-success, low-capacity, terminal-drain, and escaped-sender regressions.
This branch has not been deployed
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.
Draft: MCP 2026-07-28 only, with major-version API changes
Merged companion schema/RFD: agentclientprotocol/agent-client-protocol#2223
Builds on merged rmcp upgrade #372 and supersedes the connection-oriented checkpoint #375. This transport has no legacy MCP compatibility mode.
Implementation
Latest cancellation and ownership fixes (ae1cfac)
The HTTP fork regression uses a second serialized control POST as an acknowledgment barrier, not a timing sleep. Focused review found no remaining blocking regression in these fixes. All local validation below passes; GitHub CI must confirm this checkpoint before merge.
Earlier raw-error preservation, fatal HTTP overflow teardown, transactional POST admission, and protected connection-shutdown fixes remain in place. No additional public API or protocol-schema change was required for this checkpoint.
Review order
Verification
All Cargo validation used disabled incremental caching and stripped dev/test debug info. On this checkpoint:
just testpassed, including integration tests and doctests.cargo clippy --workspace --all-targets --all-features --locked -- -D warningspassed with no temporary lint allowances.cargo check --workspace --all-targets --all-features --lockedpassed with warnings denied.wasm32-wasip1,wasm32-wasip2, andwasm32-unknown-unknownwith all features.mdbook build, andgit diff --checkpassed. The book tool emitted only its installed preprocessor-version compatibility warning.Release gates — keep draft
e5c36d2671fd355f983533bc83b5feb7981d25a6with the released matching schema before package publication.