You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fit_result_or_limit_error: bound approval_request_id in the oversized-result fallback #1727
fit_result_or_limit_error (apis/src/openai/responses/mcp_dispatch/mod.rs) guarantees the oversized-result fallback fits MIN_RETAINED_RESULT_BYTES by capping call_id and the tool name at ≤64 bytes via bounded_identity, but it passes approval_request_id through unbounded. The ≤budget guarantee is therefore only enforced by a debug_assert!, which is compiled out in release builds.
Impact
Low — defense in depth, not a live bug. The approval_request_id that reaches this path is the server-issued pending id: a client mcp_approval_response only proceeds if its id matches a server-owned pending approval, so a long/bogus id is rejected before execution and never reaches the fallback. Server-issued ids are short, so the fallback stays within budget in practice. This is about making the retained-byte invariant self-enforcing rather than relying on that external fact.
Proposed fix
Bound the approval id in the fallback the same way call_id/name are bounded — but drop it (None) when it exceeds the cap rather than truncating, since a truncated id breaks approval correlation.
Activity