Skip to content

Commit 145ec37

Browse files
authored
refactor(agents): consolidate failover classification into one substrate (#121341)
* refactor(agents): consolidate failover classification substrate * chore(agents): align failover refactor guards * fix(agents): preserve leading 429 status handling * perf(agents): retain lazy failover hook gating * chore(agents): refresh failover guard artifacts
1 parent 0e74a1b commit 145ec37

85 files changed

Lines changed: 4863 additions & 3984 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config/knip.config.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@ const config = {
404404
// Registry facades retain direct registration/reset compatibility seams used by focused
405405
// tests; the full-tree scan still audits every named export against those consumers.
406406
"src/agents/harness/registry.ts": ["exports"],
407+
// Transitional public failover predicates stay available until their remaining callers
408+
// migrate in later consolidation PRs; focused tests audit the retained behavior.
409+
"src/agents/failover/classify.ts": ["exports"],
410+
"src/agents/failover/provider-patterns.ts": ["exports"],
411+
// Runtime reason values are exported now so protocol schemas can derive from one tuple later.
412+
"src/agents/failover/signal.ts": ["exports"],
407413
"src/context-engine/registry.ts": ["exports", "types"],
408414
"src/plugins/compaction-provider.ts": ["exports"],
409415
"src/plugins/interactive-registry.ts": ["exports"],

‎config/max-lines-baseline.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ src/agents/command/cli-compaction.ts
366366
src/agents/command/delivery.test.ts
367367
src/agents/command/delivery.ts
368368
src/agents/command/session-store.test.ts
369-
src/agents/embedded-agent-helpers.isbillingerrormessage.test.ts
370-
src/agents/embedded-agent-helpers/errors.ts
371369
src/agents/embedded-agent-runner-extraparams.test.ts
372370
src/agents/embedded-agent-runner.cache.live.test.ts
373371
src/agents/embedded-agent-runner.e2e.test.ts

‎docs/.generated/plugin-sdk-api-baseline.sha256‎

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

‎src/agents/auth-profiles/failure-copy.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vi.mock("../provider-auth-recovery-hint.js", () => ({
1212
`${LOGIN_HINT_SENTINEL}:${params.provider}`,
1313
}));
1414

15-
import type { FailoverReason } from "../embedded-agent-helpers/types.js";
15+
import type { FailoverReason } from "../failover/signal.js";
1616
import { formatAuthProfileFailureMessage } from "./failure-copy.js";
1717

1818
const PROVIDER = "openai-codex";

‎src/agents/auth-profiles/failure-copy.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
import type { OpenClawConfig } from "../../config/types.openclaw.js";
77
import { formatErrorMessage } from "../../infra/errors.js";
8-
import type { FailoverReason } from "../embedded-agent-helpers/types.js";
8+
import type { FailoverReason } from "../failover/signal.js";
99
import { buildProviderAuthRecoveryHint } from "../provider-auth-recovery-hint.js";
1010

1111
type AuthProfileFailureCopyParams = {

0 commit comments

Comments
 (0)