mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:10:45 +00:00
test: accept codex elevated execution fallback
(cherry picked from commit 26b359bebd)
This commit is contained in:
@@ -43,10 +43,14 @@ describe("gateway codex harness live helpers", () => {
|
||||
});
|
||||
|
||||
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.";
|
||||
const texts = [
|
||||
"I couldn’t list them because `codex models` requires running outside the sandbox here, and that approval was rejected.",
|
||||
"I couldn’t list them because the local `codex models` command requires elevated execution in this environment, and that request was rejected.",
|
||||
];
|
||||
|
||||
expect(isExpectedCodexModelsCommandText(text)).toBe(true);
|
||||
for (const text of texts) {
|
||||
expect(isExpectedCodexModelsCommandText(text)).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("accepts the interactive TUI current-model summary", () => {
|
||||
|
||||
@@ -59,6 +59,7 @@ export function isExpectedCodexModelsCommandText(text: string): boolean {
|
||||
normalized.includes("sandbox blocks") ||
|
||||
(normalized.includes("outside the sandbox") &&
|
||||
normalized.includes("approval was rejected")) ||
|
||||
(normalized.includes("elevated execution") && normalized.includes("request was rejected")) ||
|
||||
normalized.includes("interactive in this environment") ||
|
||||
normalized.includes("sandboxed session") ||
|
||||
normalized.includes("required user namespace") ||
|
||||
|
||||
Reference in New Issue
Block a user