mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
refactor: update timeout constants in CLI and Codex providers
- Removed redundant definition of CLI base timeout in `cli-provider.ts` and added a detailed comment explaining its purpose. - Updated `codex-provider.ts` to use the imported `DEFAULT_TIMEOUT_MS` directly instead of an alias. - Enhanced unit tests to ensure fallback behavior for invalid reasoning effort values in timeout calculations.
This commit is contained in:
@@ -388,6 +388,13 @@ describe('codex-provider.ts', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('falls back to 1.0 multiplier for invalid reasoning effort', () => {
|
||||
// Test that invalid values fallback gracefully to default multiplier
|
||||
// This tests the defensive ?? 1.0 in calculateReasoningTimeout
|
||||
const invalidEffort = 'invalid_effort' as never;
|
||||
expect(calculateReasoningTimeout(invalidEffort)).toBe(DEFAULT_TIMEOUT_MS);
|
||||
});
|
||||
|
||||
it('produces expected absolute timeout values', () => {
|
||||
// Verify the actual timeout values that will be used:
|
||||
// none: 30000ms (30s)
|
||||
|
||||
Reference in New Issue
Block a user