Problem
When running aft_inspect on a large monorepo, the language server may need more than two minutes to start and finish publishing diagnostics.
At present, blocking diagnostics have a fixed 120-second deadline. If the language server is still loading when that deadline expires, AFT returns:
lsp_quiescence_timeout
The user cannot increase this limit through configuration.
There is also a separate transport timeout for the inspect command. These two timeouts can be misaligned: the transport may stop waiting before the internal diagnostics phase has finished. Increasing only the transport timeout exposes the internal 120-second failure but does not resolve it.
Current implementation
The relevant values are currently set here:
- The blocking diagnostics phase has a hard-coded 120-second deadline in
diagnostics_category.rs (BLOCKING_DIAGNOSTICS_PHASE_TIMEOUT).
- The bridge transport timeout for
inspect is set to 60 seconds in command-timeouts.ts (inspect: 60_000).
Proposed change
Make the blocking diagnostics timeout configurable, for example:
The current default could remain 120000 so existing installations keep their current behavior.
The inspect transport timeout should also be configurable or automatically derived from the diagnostics timeout, with enough additional time for the final response. For example:
Alternatively, a single inspect timeout setting could control both values and prevent the transport timeout from being shorter than the internal diagnostics deadline.
Expected behavior
- Small repositories continue to use the current defaults.
- Large repositories can increase the timeout without rebuilding AFT.
- AFT still reports a clear timeout failure when the configured limit is reached.
- Invalid or excessively small timeout values are rejected with a useful configuration error.
- The configured timeout is covered by tests for both the diagnostics phase and the transport layer.
A configurable timeout would allow users to accommodate slow language-server startup while preserving the existing bounded behavior.
Problem
When running
aft_inspecton a large monorepo, the language server may need more than two minutes to start and finish publishing diagnostics.At present, blocking diagnostics have a fixed 120-second deadline. If the language server is still loading when that deadline expires, AFT returns:
lsp_quiescence_timeoutThe user cannot increase this limit through configuration.
There is also a separate transport timeout for the
inspectcommand. These two timeouts can be misaligned: the transport may stop waiting before the internal diagnostics phase has finished. Increasing only the transport timeout exposes the internal 120-second failure but does not resolve it.Current implementation
The relevant values are currently set here:
diagnostics_category.rs(BLOCKING_DIAGNOSTICS_PHASE_TIMEOUT).inspectis set to 60 seconds incommand-timeouts.ts(inspect: 60_000).Proposed change
Make the blocking diagnostics timeout configurable, for example:
{ "inspect": { "blocking_diagnostics_timeout_ms": 300000 } }The current default could remain
120000so existing installations keep their current behavior.The
inspecttransport timeout should also be configurable or automatically derived from the diagnostics timeout, with enough additional time for the final response. For example:{ "bridge": { "inspect_request_timeout_ms": 330000 } }Alternatively, a single inspect timeout setting could control both values and prevent the transport timeout from being shorter than the internal diagnostics deadline.
Expected behavior
A configurable timeout would allow users to accommodate slow language-server startup while preserving the existing bounded behavior.