Skip to content

fix(acp): read elicitation_timeout_secs from _meta in mcp_bridge#4453

Merged
bug-ops merged 1 commit into
mainfrom
4446-acp-elicitation-timeout
May 18, 2026
Merged

fix(acp): read elicitation_timeout_secs from _meta in mcp_bridge#4453
bug-ops merged 1 commit into
mainfrom
4446-acp-elicitation-timeout

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 18, 2026

Summary

  • Adds elicitation_timeout_from_meta() helper in mcp_bridge.rs that reads elicitation_timeout_secs (u64) from the InitializeResult._meta object, falling back 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
  • Mirrors the elicitation_from_meta() pattern introduced in fix(acp): read elicitation_enabled from _meta instead of hardcoding false #4441

Tests

5 unit tests added in mcp_bridge::elicitation_timeout_tests:

  • absent meta → 120 (fallback)
  • missing key → 120 (fallback)
  • valid u64 value → returned as-is
  • wrong type (string) → 120 (fallback)
  • negative value → 120 (fallback)

9997/9997 workspace tests pass.

Checklist

  • cargo +nightly fmt --check clean
  • cargo clippy --workspace -- -D warnings clean
  • cargo nextest run --workspace --lib --bins — 9997 passed

Closes #4446

@github-actions github-actions Bot added rust Rust code changes bug Something isn't working size/M Medium PR (51-200 lines) labels May 18, 2026
@bug-ops bug-ops force-pushed the 4446-acp-elicitation-timeout branch from 1a508c3 to 29bd9f1 Compare May 18, 2026 22:37
@bug-ops bug-ops enabled auto-merge (squash) May 18, 2026 22:37
@bug-ops bug-ops force-pushed the 4446-acp-elicitation-timeout branch from 29bd9f1 to 1247e7b Compare May 18, 2026 22:42
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
@bug-ops bug-ops force-pushed the 4446-acp-elicitation-timeout branch from 1247e7b to dc2fdb0 Compare May 18, 2026 22:45
@bug-ops bug-ops merged commit d470064 into main May 18, 2026
32 checks passed
@bug-ops bug-ops deleted the 4446-acp-elicitation-timeout branch May 18, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

acp: elicitation_timeout_secs hardcoded 120s in mcp_bridge.rs — not readable from _meta

1 participant