test: accept codex not-approved fallback

(cherry picked from commit 542086ccea)
This commit is contained in:
Peter Steinberger
2026-04-21 16:27:54 +01:00
parent 68e97c9969
commit 99c3ec15df
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ describe("gateway codex harness live helpers", () => {
"I couldnt list them because `codex models` requires running outside the sandbox here, and that approval was rejected.",
"I couldnt list them because the local `codex models` command requires elevated execution in this environment, and that request was rejected.",
"I couldnt list them because the local `codex models` command requires host permissions here, and that escalation was rejected.",
"I couldnt run `codex models` because the sandboxed attempt failed and the required elevated retry was not approved.",
];
for (const text of texts) {

View File

@@ -57,7 +57,7 @@ export function isExpectedCodexModelsCommandText(text: string): boolean {
normalized.includes("fails to start") ||
normalized.includes("repo-local fallback") ||
normalized.includes("sandbox blocks") ||
(normalized.includes("rejected") &&
((normalized.includes("rejected") || normalized.includes("not approved")) &&
(normalized.includes("sandbox") ||
normalized.includes("permission") ||
normalized.includes("permissions") ||