test(gateway): accept compact codex status

This commit is contained in:
Vincent Koc
2026-05-06 00:31:11 -07:00
parent 6c7c0e559a
commit 2dc8748b59
2 changed files with 9 additions and 0 deletions

View File

@@ -101,6 +101,14 @@ describe("gateway codex harness live helpers", () => {
expect(isExpectedCodexStatusCommandText(text)).toBe(true);
});
it("accepts the compact status-card pointer emitted by current codex", () => {
const text = "OpenClaw status shown above.";
expect(
EXPECTED_CODEX_STATUS_COMMAND_TEXT.some((expectedText) => text.includes(expectedText)),
).toBe(true);
});
it("rejects status prose for a different codex session", () => {
const text =
"OpenClaw is running on `openai/gpt-5.5` with low reasoning/text settings. Context is at `22k/272k` tokens, no compactions, and the current session is `agent:dev:other`.";

View File

@@ -86,6 +86,7 @@ export const EXPECTED_CODEX_STATUS_COMMAND_TEXT = [
"model `codex/",
"session `agent:dev:live-codex-harness`",
"Model/status card shown above",
"OpenClaw status shown above.",
"Status shown above.",
] as const;