mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 17:41:39 +00:00
chore(cli): drop dead classifiers and single-use wrappers left by fallback removal (#112191)
Follow-up to c5254f13ee (#112074): delete the legacy string-match timeout
classifier (the CLI path only sees typed GatewayTransportError from
callGateway's wrapper timer), the duplicate JSON/blank-message validation
in the private gateway command, the now-pointless getGatewayDispatchConfig
wrapper, the single-use embedded-loader alias, and the cross-os release
guard for the EMBEDDED FALLBACK marker no build can emit anymore.
This commit is contained in:
committed by
GitHub
parent
ae27ee98f0
commit
e1ff65fb77
@@ -19,7 +19,6 @@ import { pathToFileURL } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
agentOutputHasExpectedOkMarker,
|
||||
agentTurnUsedEmbeddedFallback,
|
||||
buildCrossOsDiscordRoundtripNonces,
|
||||
buildCrossOsReleaseAgentSessionId,
|
||||
buildCrossOsReleaseSmokePluginAllowlist,
|
||||
@@ -455,11 +454,6 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
new Error("Command timed out and could not be terminated cleanly"),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldRetryCrossOsAgentTurnError(
|
||||
new Error("Agent turn used embedded fallback instead of gateway."),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldRetryCrossOsAgentTurnError(
|
||||
new Error(
|
||||
@@ -486,35 +480,6 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("detects embedded fallback agent turns as non-gateway proof", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-fallback-"));
|
||||
const logPath = join(dir, "agent.log");
|
||||
expect(
|
||||
agentTurnUsedEmbeddedFallback({
|
||||
stdout: JSON.stringify({ payloads: [{ text: "OK" }] }),
|
||||
stderr: "EMBEDDED FALLBACK: Gateway agent failed; running embedded agent: gateway closed",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
agentTurnUsedEmbeddedFallback({
|
||||
stdout: JSON.stringify({ payloads: [{ text: "OK" }] }),
|
||||
stderr: "",
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
agentTurnUsedEmbeddedFallback(
|
||||
{ stdout: "", stderr: "" },
|
||||
{ logText: 'EMBEDDED FALLBACK: Gateway agent failed\n{"payloads":[{"text":"OK"}]}' },
|
||||
),
|
||||
).toBe(true);
|
||||
try {
|
||||
writeFileSync(logPath, "EMBEDDED FALLBACK: Gateway agent failed\n");
|
||||
expect(agentTurnUsedEmbeddedFallback({ stdout: "", stderr: "" }, { logPath })).toBe(true);
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("skips optional live agent turns only for model availability failures", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-skip-"));
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user