MCP: classify inbound responses through SDK with fresh authorization
CI / UI Checks (pull_request) Successful in 10s
CI / Rust Checks (pull_request) Successful in 37m3s
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
CI / UI Checks (pull_request) Successful in 10s
CI / Rust Checks (pull_request) Successful in 37m3s
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:
1 parent
66bb135398
commit
65144fd8c6
7 files changed
+628
-47
No files matched your search
@@ -75,6 +75,10 @@ pub(crate) struct CounterSet {
|
||||
sdk_jsonrpc_error: AtomicUsize,
|
||||
sdk_ping_request: AtomicUsize,
|
||||
sdk_ping_result: AtomicUsize,
|
||||
sdk_inbound_response_decoded: AtomicUsize,
|
||||
sdk_inbound_error_decoded: AtomicUsize,
|
||||
sdk_inbound_response_consumed: AtomicUsize,
|
||||
sdk_inbound_error_consumed: AtomicUsize,
|
||||
sdk_dispatch_decoded: AtomicUsize,
|
||||
sdk_dispatch_consumed: AtomicUsize,
|
||||
sdk_initialized_decoded: AtomicUsize,
|
||||
@@ -85,6 +89,18 @@ pub(crate) struct CounterSet {
|
||||
}
|
||||
|
||||
impl CounterSet {
|
||||
pub(crate) fn sdk_inbound_response_decoded(&self) -> usize {
|
||||
self.sdk_inbound_response_decoded.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_inbound_error_decoded(&self) -> usize {
|
||||
self.sdk_inbound_error_decoded.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_inbound_response_consumed(&self) -> usize {
|
||||
self.sdk_inbound_response_consumed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_inbound_error_consumed(&self) -> usize {
|
||||
self.sdk_inbound_error_consumed.load(Ordering::SeqCst)
|
||||
}
|
||||
pub(crate) fn sdk_dispatch_decoded(&self) -> usize {
|
||||
self.sdk_dispatch_decoded.load(Ordering::SeqCst)
|
||||
}
|
||||
@@ -477,6 +493,26 @@ pub(crate) fn sdk_dispatch_envelope_consumed() {
|
||||
#[path = "../rmcp_dispatch_runtime_tests.rs"]
|
||||
mod rmcp_dispatch_runtime_tests;
|
||||
|
||||
/// Mark only after a real SDK success-response from_value succeeds.
|
||||
pub(crate) fn sdk_inbound_response_decoded() {
|
||||
increment(|c| &c.sdk_inbound_response_decoded);
|
||||
}
|
||||
/// Mark only after a real SDK error-response from_value succeeds.
|
||||
pub(crate) fn sdk_inbound_error_decoded() {
|
||||
increment(|c| &c.sdk_inbound_error_decoded);
|
||||
}
|
||||
/// Mark inside the matched typed SDK success variant that selects ACK.
|
||||
pub(crate) fn sdk_inbound_response_consumed() {
|
||||
increment(|c| &c.sdk_inbound_response_consumed);
|
||||
}
|
||||
/// Mark inside the matched typed SDK error variant that selects ACK.
|
||||
pub(crate) fn sdk_inbound_error_consumed() {
|
||||
increment(|c| &c.sdk_inbound_error_consumed);
|
||||
}
|
||||
|
||||
#[path = "../rmcp_response_runtime_tests.rs"]
|
||||
mod rmcp_response_runtime_tests;
|
||||
|
||||
fn increment(counter: impl Fn(&CounterSet) -> &AtomicUsize) {
|
||||
let _ = OBSERVER.try_with(|counters| {
|
||||
counter(counters).fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
Reference in new issue
Block a user