fix: classify provider runner transient failures

This commit is contained in:
Codex
2026-05-21 02:45:28 +00:00
parent 9e4561e102
commit 71cada25f2
8 changed files with 285 additions and 5 deletions
+8 -1
View File
@@ -3,6 +3,7 @@ import { coreInternalFetch } from "./microservices";
import { debugDispatch, debugHealth } from "./debug";
import { runArtifactRegistryCommand } from "./artifact-registry";
import { runCodeQueueCommand } from "./code-queue";
import { classifyRunnerError } from "../../src/components/microservices/code-queue/src/runner-error-classifier";
export type ProviderSignalScope =
| "runner-local"
@@ -270,6 +271,12 @@ function codeQueueTasksSignal(response: unknown): ProviderTriageSignal {
}
function classifyErrorMessage(message: string): ProviderSignalScope {
const runnerClassification = classifyRunnerError(message);
if (runnerClassification.scope === "provider-gateway") return "provider-gateway";
if (runnerClassification.scope === "registry") return "registry";
if (runnerClassification.scope === "k3s") return "k3s";
if (runnerClassification.scope === "scheduler") return "scheduler";
if (runnerClassification.scope === "runner-local") return "runner-local";
const normalized = message.toLowerCase();
if (/provider is not online|provider .*offline|provider .*not online/u.test(normalized)) return "runner-local";
if (/ssh|host\.ssh/u.test(normalized)) return "ssh";
@@ -282,7 +289,7 @@ function classifyErrorMessage(message: string): ProviderSignalScope {
}
function observedErrorSignal(message: string, scope: ProviderSignalScope): ProviderTriageSignal {
return signal("observed-error", scope, "failed", message, { message }, scope !== "runner-local");
return signal("observed-error", scope, "failed", message, { message, runnerErrorClassification: classifyRunnerError(message) }, scope !== "runner-local");
}
export function providerTriageRecommendedCrossChecks(providerId: string): string[] {