fix: address PR review comments

- Add error logging to CodexProvider auth check instead of silent failure
- Fix cachedAt timestamp to return actual cache time instead of request time
- Replace misleading hardcoded rate limit values (100) with sentinel value (-1)
- Fix unused parameter warning in codex routes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-10 16:26:12 +01:00
parent 604f98b08f
commit c99883e634
4 changed files with 31 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ import {
extractTextFromContent,
classifyError,
getUserFriendlyErrorMessage,
createLogger,
} from '@automaker/utils';
import type {
ExecuteOptions,
@@ -658,6 +659,8 @@ async function loadCodexInstructions(cwd: string, enabled: boolean): Promise<str
.join('\n\n');
}
const logger = createLogger('CodexProvider');
export class CodexProvider extends BaseProvider {
getName(): string {
return 'codex';
@@ -1045,7 +1048,7 @@ export class CodexProvider extends BaseProvider {
return { authenticated: true, method: 'oauth' };
}
} catch (error) {
// Silent fail
logger.warn('Error running login status command during auth check:', error);
}
}