fix(acp): read elicitation_timeout_secs from _meta in mcp_bridge#4453
Merged
Conversation
1a508c3 to
29bd9f1
Compare
29bd9f1 to
1247e7b
Compare
Adds elicitation_timeout_from_meta() helper that reads the elicitation_timeout_secs field (u64) from the InitializeResult _meta object, with fallback to 120 when the key is absent or has a wrong type. Replaces three hardcoded `elicitation_timeout_secs: 120` literals across the Stdio, Http, and Sse transport arms with calls to the new helper, matching the pattern established by elicitation_from_meta() in #4441. Adds 5 unit tests covering: absent meta, missing key, valid value, wrong type, and out-of-range (negative) value. Closes #4446
1247e7b to
dc2fdb0
Compare
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.
Summary
elicitation_timeout_from_meta()helper inmcp_bridge.rsthat readselicitation_timeout_secs(u64) from theInitializeResult._metaobject, falling back to120when the key is absent or has a wrong typeelicitation_timeout_secs: 120literals across the Stdio, Http, and Sse transport armselicitation_from_meta()pattern introduced in fix(acp): read elicitation_enabled from _meta instead of hardcoding false #4441Tests
5 unit tests added in
mcp_bridge::elicitation_timeout_tests:9997/9997 workspace tests pass.
Checklist
cargo +nightly fmt --checkcleancargo clippy --workspace -- -D warningscleancargo nextest run --workspace --lib --bins— 9997 passedCloses #4446