Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions scripts/codex_audit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,19 +673,6 @@ def _job_dedupe_key(payload: dict[str, Any]) -> str:
def _classify_codex_exec_failure(text: str) -> str:
if any(word in text for word in ("quota", "rate limit", "too many active", "budget")):
return "quota_or_capacity_failure"
if any(word in text for word in ("timeout", "timed out", "temporarily", "unavailable", "connection", "network")):
return "transient_service_failure"
codex_auth_config_signals = (
"not authenticated",
"authentication failed",
"login required",
"please log in",
"invalid api key",
"401 unauthorized",
"403 forbidden",
)
if any(signal in text for signal in codex_auth_config_signals):
return "auth_or_config_failure"
return "unknown_failure"


Expand Down
13 changes: 0 additions & 13 deletions scripts/run_monthly_codex_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,6 @@ class BridgeError(RuntimeError):
def _classify_codex_exec_failure(text: str) -> str:
if any(word in text for word in ("quota", "rate limit", "too many active", "budget")):
return "quota_or_capacity_failure"
if any(word in text for word in ("timeout", "timed out", "temporarily", "unavailable", "connection", "network")):
return "transient_service_failure"
codex_auth_config_signals = (
"not authenticated",
"authentication failed",
"login required",
"please log in",
"invalid api key",
"401 unauthorized",
"403 forbidden",
)
if any(signal in text for signal in codex_auth_config_signals):
return "auth_or_config_failure"
return "unknown_failure"


Expand Down
13 changes: 0 additions & 13 deletions service/ai_gateway_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,6 @@ def _job_dedupe_key(payload: dict[str, Any]) -> str:
def _classify_codex_exec_failure(text: str) -> str:
if any(word in text for word in ("quota", "rate limit", "too many active", "budget")):
return "quota_or_capacity_failure"
if any(word in text for word in ("timeout", "timed out", "temporarily", "unavailable", "connection", "network")):
return "transient_service_failure"
codex_auth_config_signals = (
"not authenticated",
"authentication failed",
"login required",
"please log in",
"invalid api key",
"401 unauthorized",
"403 forbidden",
)
if any(signal in text for signal in codex_auth_config_signals):
return "auth_or_config_failure"
return "unknown_failure"


Expand Down
3 changes: 3 additions & 0 deletions tests/test_run_monthly_codex_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ def test_service_failure_classification_ignores_source_code_secret_words(self) -
allowlist_message = "codex exec failed: raise ValueError('not allowed by source allowlist')"
self.assertEqual(classify_service_failure(allowlist_message), "unknown_failure")
self.assertEqual(codex_audit_service._classify_failure(allowlist_message), "unknown_failure")
forbidden_message = "codex exec failed: fixture text includes 403 forbidden"
self.assertEqual(classify_service_failure(forbidden_message), "unknown_failure")
self.assertEqual(codex_audit_service._classify_failure(forbidden_message), "unknown_failure")
self.assertEqual(classify_service_failure("codex exec failed: too many active requests"), "quota_or_capacity_failure")
self.assertEqual(
classify_service_failure("source_repository foo is not allowed by service allowlist"),
Expand Down
Loading