硬化 Codex stdio backend 错误观测

This commit is contained in:
Codex
2026-05-29 11:47:03 +08:00
parent a240122039
commit 843112ebff
8 changed files with 556 additions and 130 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
export function redactText(value: string): string {
return value
.replace(/\b(sk-[A-Za-z0-9_-]{8,}|ghp_[A-Za-z0-9_]{8,}|github_pat_[A-Za-z0-9_]+)\b/gu, "REDACTED")
.replace(/(authorization\s*[:=]\s*)(bearer\s+)?[A-Za-z0-9._~+/=-]+/giu, "$1$2REDACTED")
.replace(/((?:api[_-]?key|token|password|secret)\s*[:=]\s*)[A-Za-z0-9._~+/=-]+/giu, "$1REDACTED")
.replace(/((?:api[_-]?key|token|password|secret)\s*["']?\s*[:=]\s*["']?)[A-Za-z0-9._~+/=-]+/giu, "$1REDACTED")
.replace(/(postgres(?:ql)?:\/\/[^:\s/@]+:)[^@\s]+(@)/giu, "$1REDACTED$2")
.replace(/(https?:\/\/[^:\s/@]+:)[^@\s]+(@)/giu, "$1REDACTED$2");
}
+3
View File
@@ -9,6 +9,9 @@ export type FailureKind =
| "runner-lease-conflict"
| "backend-failed"
| "backend-protocol-error"
| "backend-spawn-failed"
| "backend-json-parse-error"
| "backend-response-invalid"
| "backend-timeout"
| "provider-auth-failed"
| "provider-rate-limited"