test: harden gateway live docker flake handling

This commit is contained in:
Peter Steinberger
2026-04-15 20:13:21 +01:00
parent 52ef42302e
commit 4caa882476
2 changed files with 28 additions and 13 deletions

View File

@@ -649,18 +649,30 @@ describeLive("gateway live (ACP bind)", () => {
}
}
if (!recallHistory) {
const recallTurn = await waitForAssistantTurn({
client,
sessionKey: spawnedSessionKey,
minAssistantCount: expectedRecallAssistantCount,
timeoutMs: 60_000,
});
recallHistory = {
messages: recallTurn.messages,
lastAssistantText: recallTurn.lastAssistantText,
matchedAssistantText: recallTurn.lastAssistantText,
};
logLiveStep("bound memory recall response did not repeat token; using turn progression");
if (liveAgent === "claude") {
const recallTurn = await waitForAssistantTurn({
client,
sessionKey: spawnedSessionKey,
minAssistantCount: expectedRecallAssistantCount,
timeoutMs: 60_000,
});
recallHistory = {
messages: recallTurn.messages,
lastAssistantText: recallTurn.lastAssistantText,
matchedAssistantText: recallTurn.lastAssistantText,
};
logLiveStep(
"bound memory recall response did not repeat token; using turn progression",
);
} else {
// Non-Claude lanes can miss or significantly delay this intermediate recall turn.
// Continue from the previously observed bound transcript and validate marker/image/cron
// on subsequent turns.
recallHistory = firstBoundHistory;
logLiveStep(
"bound memory recall response not observed; continuing from previous bound transcript",
);
}
}
const recallAssistantText = recallHistory.matchedAssistantText;
if (liveAgent === "claude") {
@@ -884,6 +896,6 @@ describeLive("gateway live (ACP bind)", () => {
}
}
},
LIVE_TIMEOUT_MS + 180_000,
LIVE_TIMEOUT_MS + 360_000,
);
});

View File

@@ -491,6 +491,7 @@ describeLive("gateway live (Codex harness)", () => {
"OpenClaw status:",
"model `codex/",
"session `agent:dev:live-codex-harness`",
"Model/status card shown above",
],
});
logCodexLiveStep("codex-status-command", { statusText });
@@ -508,6 +509,8 @@ describeLive("gateway live (Codex harness)", () => {
"running as Codex on `codex/",
"currently running on `codex/",
"stdin is not a terminal",
"Configured model from `~/.codex/config.toml`:",
"Current OpenClaw session status reports the active model as:",
],
});
logCodexLiveStep("codex-models-command", { modelsText });