test: tolerate unavailable release agent turn

This commit is contained in:
Peter Steinberger
2026-05-02 17:52:06 +01:00
parent e5851cfcc2
commit 30e05211c1
2 changed files with 72 additions and 10 deletions

View File

@@ -56,6 +56,7 @@ import {
shouldStopManagedGatewayBeforeManualFallback,
shouldRunMainChannelDevUpdate,
shouldRetryCrossOsAgentTurnError,
shouldSkipOptionalCrossOsAgentTurnError,
shouldUseManagedGatewayForInstallerRuntime,
shouldUseManagedGatewayService,
verifyDevUpdateStatus,
@@ -124,6 +125,47 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
).toBe(true);
});
it("skips optional live agent turns only for model availability failures", () => {
const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-skip-"));
try {
const logPath = join(dir, "agent.log");
writeFileSync(
logPath,
JSON.stringify({
status: "timeout",
result: {
payloads: [
{
text: "Request timed out before a response was generated.",
},
],
},
}),
);
expect(
shouldSkipOptionalCrossOsAgentTurnError(
new Error("Agent output did not contain the expected OK marker."),
logPath,
),
).toBe(true);
expect(
shouldSkipOptionalCrossOsAgentTurnError(
new Error("document-extract: failed to install bundled runtime deps"),
logPath,
),
).toBe(false);
expect(
shouldSkipOptionalCrossOsAgentTurnError(
new Error("Agent output did not contain the expected OK marker."),
join(dir, "missing.log"),
),
).toBe(false);
} finally {
rmSync(dir, { recursive: true, force: true });
}
});
it("allows cross-OS provider smoke models to use faster CI overrides", () => {
expect(
resolveProviderConfig("openai", {