mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
test: accept codex sandbox approval fallback
This commit is contained in:
@@ -42,6 +42,13 @@ describe("gateway codex harness live helpers", () => {
|
||||
expect(isExpectedCodexModelsCommandText(text)).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts sandbox escalation rejection for codex models", () => {
|
||||
const text =
|
||||
"I couldn’t list them because `codex models` requires running outside the sandbox here, and that approval was rejected.";
|
||||
|
||||
expect(isExpectedCodexModelsCommandText(text)).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts the interactive TUI current-model summary", () => {
|
||||
const text = [
|
||||
"`codex models` didn’t return a plain list in this environment; it dropped into the interactive TUI instead.",
|
||||
|
||||
@@ -57,6 +57,8 @@ export function isExpectedCodexModelsCommandText(text: string): boolean {
|
||||
normalized.includes("fails to start") ||
|
||||
normalized.includes("repo-local fallback") ||
|
||||
normalized.includes("sandbox blocks") ||
|
||||
(normalized.includes("outside the sandbox") &&
|
||||
normalized.includes("approval was rejected")) ||
|
||||
normalized.includes("interactive in this environment") ||
|
||||
normalized.includes("sandboxed session") ||
|
||||
normalized.includes("required user namespace") ||
|
||||
|
||||
Reference in New Issue
Block a user