Problem
RateLimiterOptions.FromEnvironment accepts any finite positive CDIDX_MCP_RATE_LIMIT_RPS and CDIDX_MCP_RATE_LIMIT_BURST values. Extremely large values effectively disable throttling and can also make retry timing and token arithmetic unstable under load.
Suggested fix
Add documented upper bounds for both environment overrides, clamp or reject out-of-range values, and expose the effective values in diagnostics where useful.
Evidence
src/CodeIndex/Mcp/RateLimiter.cs: RateLimiterOptions.FromEnvironment
TryParsePositiveDouble
TokenBucket.TryAcquire
Problem
RateLimiterOptions.FromEnvironmentaccepts any finite positiveCDIDX_MCP_RATE_LIMIT_RPSandCDIDX_MCP_RATE_LIMIT_BURSTvalues. Extremely large values effectively disable throttling and can also make retry timing and token arithmetic unstable under load.Suggested fix
Add documented upper bounds for both environment overrides, clamp or reject out-of-range values, and expose the effective values in diagnostics where useful.
Evidence
src/CodeIndex/Mcp/RateLimiter.cs:RateLimiterOptions.FromEnvironmentTryParsePositiveDoubleTokenBucket.TryAcquire