Skip to content

Commit 7d081bd

Browse files
steipeteruel225
andauthored
test(cli): keep watchdog regressions in their owning plugins
Keep Anthropic and Google descriptor assertions inside their plugin-owned registration suites, preserve generic resumed/custom watchdog coverage in its core owner, and remove the cross-plugin core test rejected by architecture CI. Co-authored-by: ruel225 <[email protected]>
1 parent 4134aeb commit 7d081bd

4 files changed

Lines changed: 25 additions & 99 deletions

File tree

‎extensions/anthropic/index.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ describe("anthropic provider replay hooks", () => {
101101
modelArg: "--model",
102102
sessionArgs: ["--session-id", "{sessionId}"],
103103
});
104+
expect(backend.config.reliability?.watchdog?.resume).toBeUndefined();
104105
});
105106

106107
it("lets native session discovery be disabled without disabling Anthropic", () => {

‎extensions/google/setup-api.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ import setupEntry from "./setup-api.js";
77
describe("google setup entry", () => {
88
it("registers setup runtime providers declared by the manifest", () => {
99
const providerIds: string[] = [];
10-
const cliBackendIds: string[] = [];
10+
const cliBackends: CliBackendPlugin[] = [];
1111

1212
setupEntry.register({
1313
registerProvider(provider: ProviderPlugin) {
1414
providerIds.push(provider.id);
1515
},
1616
registerCliBackend(backend: CliBackendPlugin) {
17-
cliBackendIds.push(backend.id);
17+
cliBackends.push(backend);
1818
},
1919
} as never);
2020

2121
expect(providerIds).toEqual(["google-vertex"]);
22-
expect(cliBackendIds).toEqual(["google-gemini-cli"]);
22+
expect(cliBackends.map((backend) => backend.id)).toEqual(["google-gemini-cli"]);
23+
expect(cliBackends[0]?.config.reliability?.watchdog?.resume).toBeUndefined();
2324
});
2425
});
2526

‎src/agents/cli-runner.reliability.test.ts‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4397,7 +4397,7 @@ describe("resolveCliNoOutputTimeoutMs", () => {
43974397

43984398
it("lets explicit cron timeouts lift the default resume no-output ceiling", () => {
43994399
const timeoutMs = resolveCliNoOutputTimeoutMs({
4400-
backend: { command: "codex" },
4400+
backend: { command: "agent-cli" },
44014401
timeoutMs: 600_000,
44024402
useResume: true,
44034403
trigger: "cron",
@@ -4407,7 +4407,7 @@ describe("resolveCliNoOutputTimeoutMs", () => {
44074407

44084408
it("lets explicit embedded run timeouts lift the default resume no-output ceiling", () => {
44094409
const timeoutMs = resolveCliNoOutputTimeoutMs({
4410-
backend: { command: "codex" },
4410+
backend: { command: "agent-cli" },
44114411
timeoutMs: 600_000,
44124412
runTimeoutOverrideMs: 600_000,
44134413
useResume: true,
@@ -4418,13 +4418,30 @@ describe("resolveCliNoOutputTimeoutMs", () => {
44184418

44194419
it("keeps inherited user resume timeouts on the default resume no-output ceiling", () => {
44204420
const timeoutMs = resolveCliNoOutputTimeoutMs({
4421-
backend: { command: "codex" },
4421+
backend: { command: "agent-cli" },
44224422
timeoutMs: 600_000,
44234423
useResume: true,
44244424
trigger: "user",
44254425
});
44264426
expect(timeoutMs).toBe(180_000);
44274427
});
4428+
4429+
it("preserves explicit backend watchdog tuning for resumed cron runs", () => {
4430+
const timeoutMs = resolveCliNoOutputTimeoutMs({
4431+
backend: {
4432+
command: "agent-cli",
4433+
reliability: {
4434+
watchdog: {
4435+
resume: { noOutputTimeoutRatio: 0.2, minMs: 1_000, maxMs: 120_000 },
4436+
},
4437+
},
4438+
},
4439+
timeoutMs: 600_000,
4440+
useResume: true,
4441+
trigger: "cron",
4442+
});
4443+
expect(timeoutMs).toBe(120_000);
4444+
});
44284445
});
44294446

44304447
describe("resolveCliRunTimeoutOverrideMs", () => {

‎src/agents/cli-runner/watchdog-promotion.test.ts‎

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)