Summary
McpTasksConfig gives the MCP task poller its own integer knobs, but they accept YAML booleans. Pydantic coerces true to 1 before the constraint check, so with:
mcp_tasks:
enabled: true
poll_interval_seconds: true # intended 5 - loads as 1
max_concurrent_polls: true # intended 8 - loads as 1
max_poll_backoff_seconds: true # intended 300 - loads as 1
...the config loads cleanly and:
poll_interval_seconds: true -> the poller hits MCP task backends five times as often as the configured default;
max_concurrent_polls: true -> task polling serializes to one concurrent poll;
max_poll_backoff_seconds: true -> retry backoff against a failing server is capped at one second;
tracking_degraded_after_errors: true -> tracking is marked degraded after a single error.
Verified live on main (pydantic 2.13.3): all eight integer fields accept True as 1. lease_seconds, input_required_poll_interval_seconds, max_result_bytes and result_preview_max_chars reject it only via their higher ge floors, with a misleading "greater than or equal to" message.
Fix
Mirror the scheduler-config boolean guard (#6258): register the shared boolean guard (#6226) as a before-validator rejecting booleans with a field-specific error across all eight integer fields of McpTasksConfig. PR follows immediately.
Summary
McpTasksConfiggives the MCP task poller its own integer knobs, but they accept YAML booleans. Pydantic coercestrueto1before the constraint check, so with:...the config loads cleanly and:
poll_interval_seconds: true-> the poller hits MCP task backends five times as often as the configured default;max_concurrent_polls: true-> task polling serializes to one concurrent poll;max_poll_backoff_seconds: true-> retry backoff against a failing server is capped at one second;tracking_degraded_after_errors: true-> tracking is marked degraded after a single error.Verified live on main (pydantic 2.13.3): all eight integer fields accept
Trueas1.lease_seconds,input_required_poll_interval_seconds,max_result_bytesandresult_preview_max_charsreject it only via their highergefloors, with a misleading "greater than or equal to" message.Fix
Mirror the scheduler-config boolean guard (#6258): register the shared boolean guard (#6226) as a before-validator rejecting booleans with a field-specific error across all eight integer fields of
McpTasksConfig. PR follows immediately.