pub const MAX_TIMEOUT: Duration;Expand description
The longest timeout a caller may ask for.
docs/openapi.json has declared "maximum": 300 on timeout_secs since the
route existed, and security::validation::ValidationConfig names the same
figure — but nothing enforced either, so timeout_secs: 999999999 was
accepted and honoured. That is the published reference being false, which is
the failure this repository has been bitten by repeatedly; the value here is
the one the reference already promises rather than a new one invented to
match the code.
It also bounds a resource that is not local to the request. One command holds
one blocking thread for its whole deadline, the runtime is built with tokio’s
default blocking pool, and AuditSink::record_async and every filesystem
route await spawn_blocking — so a saturated pool stalls routes that have
nothing to do with the command holding it.
Clamped rather than refused, as [MAX_OUTPUT_BYTES_CEILING] is: the caller
asked for “as long as possible”, and timed_out plus duration_ms report
what actually happened either way.