fix: classify D601 provider health signals
This commit is contained in:
@@ -25,8 +25,10 @@ describe("provider triage contract", () => {
|
||||
], "2026-05-20T00:00:00.000Z");
|
||||
|
||||
expect(result.blockingDisposition).toBe("runner-local-observation-gap");
|
||||
expect(result.decision).toBe("retryable-transient");
|
||||
expect(result.retryable).toBe(true);
|
||||
expect(result.scope).toBe("runner-local");
|
||||
expect(result.failedScopes).toContain("runner-local");
|
||||
expect(result.contract.singlePathProviderOfflineIsGlobalBlocker).toBe(false);
|
||||
});
|
||||
|
||||
@@ -38,6 +40,7 @@ describe("provider triage contract", () => {
|
||||
], "2026-05-20T00:00:00.000Z");
|
||||
|
||||
expect(result.blockingDisposition).toBe("global-blocker");
|
||||
expect(result.decision).toBe("global-offline");
|
||||
expect(result.retryable).toBe(false);
|
||||
expect(result.failedIndependentScopes).toContain("provider-gateway");
|
||||
expect(result.failedIndependentScopes).toContain("ssh");
|
||||
@@ -52,8 +55,26 @@ describe("provider triage contract", () => {
|
||||
], "2026-05-20T00:00:00.000Z");
|
||||
|
||||
expect(result.blockingDisposition).toBe("service-degraded");
|
||||
expect(result.decision).toBe("service-degraded");
|
||||
expect(result.retryable).toBe(true);
|
||||
expect(result.failedScopes).toContain("registry");
|
||||
expect(result.healthyScopes).toContain("provider-gateway");
|
||||
expect(result.healthyIndependentScopes).toContain("provider-gateway");
|
||||
expect(result.healthyIndependentScopes).toContain("ssh");
|
||||
});
|
||||
|
||||
test("registry systemd inactive with listener and api healthy is service degraded", () => {
|
||||
const result = buildProviderTriageResult("D601", [
|
||||
signal("backend-core-node", "provider-gateway", "ok"),
|
||||
signal("host-ssh-probe", "ssh", "ok"),
|
||||
signal("artifact-registry-health", "registry", "degraded"),
|
||||
signal("k3sctl-adapter-health", "k3s", "ok"),
|
||||
], "2026-05-20T00:00:00.000Z");
|
||||
|
||||
expect(result.decision).toBe("service-degraded");
|
||||
expect(result.blockingDisposition).toBe("service-degraded");
|
||||
expect(result.retryable).toBe(true);
|
||||
expect(result.degradedScopes).toContain("registry");
|
||||
expect(result.healthyScopes).toEqual(expect.arrayContaining(["k3s", "provider-gateway", "ssh"]));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user