mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
test(codex): accept current status prose
This commit is contained in:
@@ -61,6 +61,13 @@ describe("gateway codex harness live helpers", () => {
|
||||
expect(isExpectedCodexStatusCommandText(text)).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts running-session status prose emitted by current codex", () => {
|
||||
const text =
|
||||
"Session is running on `codex/gpt-5.5` with low reasoning, direct execution, and about `24k/272k` context used. Cache hit is `99%`; no compactions so far.";
|
||||
|
||||
expect(isExpectedCodexStatusCommandText(text)).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts the current status card emitted by OpenAI Codex", () => {
|
||||
const text = [
|
||||
"Current session status:",
|
||||
|
||||
@@ -122,10 +122,17 @@ export function isExpectedCodexStatusCommandText(text: string): boolean {
|
||||
normalized.includes("session status: running on") &&
|
||||
normalized.includes("context at") &&
|
||||
mentionsModel;
|
||||
const isRunningSessionStatus =
|
||||
normalized.includes("session is running on") &&
|
||||
normalized.includes("context used") &&
|
||||
normalized.includes("cache hit") &&
|
||||
normalized.includes("no compactions") &&
|
||||
mentionsModel;
|
||||
|
||||
return (
|
||||
isCurrentSessionStatus ||
|
||||
isCompactSessionStatus ||
|
||||
isRunningSessionStatus ||
|
||||
(mentionsOpenClawStatus && mentionsHarnessSession && mentionsModel)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user