🤖 fix: increase stream timeouts in CI to handle rate limits #514
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Integration tests from PR #513 were flaking in CI due to stream timeouts:
tests/ipcMain/runtimeFileEditing.test.ts- File creation timed out after 15stests/ipcMain/sendMessage.test.ts- Multiple Anthropic provider tests timed out after 30stests/ipcMain/sendMessage.test.ts- Image support test timed outCI logs show tests that passed took 10-258 seconds total, while failing tests hit the 15-30s stream timeouts. The issue is exacerbated by:
Solution
Make stream timeouts CI-aware with 2.5x multiplier for CI environments:
STREAM_TIMEOUT_LOCAL_MS: 15s → 37.5s in CISTREAM_TIMEOUT_SSH_MS: 25s → 62.5s in CIwaitForStreamSuccessdefault: 30s → 75s in CICI detection uses standard
process.env.CIcheck. Local development keeps existing faster timeouts for quick feedback.Testing
The failing tests already have Jest retry logic (
jest.retryTimes(2-3)) which will validate the fix across multiple attempts if needed. Extended timeouts give API calls breathing room without slowing down successful runs (streams still end immediately on completion).Generated with
cmux