MCP: execute Tools through request-scoped SDK handlers
CI / UI Checks (pull_request) Successful in 8s
CI / Rust Checks (pull_request) Successful in 35m42s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped

This commit is contained in:
bsodfather committed 2026-11-13 16:57:28 +00:00
1 parent 5611e81579
commit 3b30aad28e
12 files changed
+798 -151

No files matched your search

@@ -365,6 +365,45 @@ async fn rmcp_runtime_sdk_dispatch_legacy() {
);
}
async fn handler_execution_control(revision: &str) {
let h = Endpoint::started().await;
let session = h.session(revision).await;
let session = session.as_deref();
h.list(revision, session, TOOL_NAME).await;
h.call(
revision,
session,
TOOL_NAME,
&format!("{revision}@handler.test"),
)
.await;
assert_eq!(
h.calls.load(Ordering::SeqCst),
1,
"one domain call expected"
);
assert_eq!(
[
h.counters.sdk_tools_list_handler_completed(),
h.counters.sdk_tools_list_handler_consumed(),
h.counters.sdk_tools_call_handler_completed(),
h.counters.sdk_tools_call_handler_consumed(),
],
[1, 1, 1, 1],
"real build_app HTTP tools/list and tools/call must execute and consume SDK handler results ({revision})"
);
}
#[tokio::test]
async fn rmcp_tools_handler_http_modern() {
handler_execution_control(MODERN_REVISION).await;
}
#[tokio::test]
async fn rmcp_tools_handler_http_legacy() {
handler_execution_control(LEGACY_REVISION).await;
}
#[tokio::test]
async fn rmcp_runtime_observer_is_request_scoped() {
let counters = Arc::new(CounterSet::default());