mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 08:02:04 +00:00
* fix(agents): skip auth-profile failure on overload * fix(agents): note overload auth-profile fallback fix * fix(agents): classify overloaded failures separately * fix(agents): back off before overload failover * fix(agents): tighten overload probe and backoff state * fix(agents): persist overloaded cooldown across runs * fix(agents): tighten overloaded status handling * test(agents): add overload regression coverage * fix(agents): restore runner imports after rebase * test(agents): add overload fallback integration coverage * fix(agents): harden overloaded failover abort handling * test(agents): tighten overload classifier coverage * test(agents): cover all-overloaded fallback exhaustion * fix(cron): retry overloaded fallback summaries * fix(cron): treat HTTP 529 as overloaded retry
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { mapFailoverReasonToProbeStatus } from "./list.probe.js";
|
|
|
|
describe("mapFailoverReasonToProbeStatus", () => {
|
|
it("maps auth_permanent to auth", () => {
|
|
expect(mapFailoverReasonToProbeStatus("auth_permanent")).toBe("auth");
|
|
});
|
|
|
|
it("keeps existing failover reason mappings", () => {
|
|
expect(mapFailoverReasonToProbeStatus("auth")).toBe("auth");
|
|
expect(mapFailoverReasonToProbeStatus("rate_limit")).toBe("rate_limit");
|
|
expect(mapFailoverReasonToProbeStatus("overloaded")).toBe("rate_limit");
|
|
expect(mapFailoverReasonToProbeStatus("billing")).toBe("billing");
|
|
expect(mapFailoverReasonToProbeStatus("timeout")).toBe("timeout");
|
|
expect(mapFailoverReasonToProbeStatus("format")).toBe("format");
|
|
});
|
|
|
|
it("falls back to unknown for unrecognized values", () => {
|
|
expect(mapFailoverReasonToProbeStatus(undefined)).toBe("unknown");
|
|
expect(mapFailoverReasonToProbeStatus(null)).toBe("unknown");
|
|
expect(mapFailoverReasonToProbeStatus("model_not_found")).toBe("unknown");
|
|
});
|
|
});
|