Skip to content

Commit 8f59f07

Browse files
fix (Computer Use) Stabilize Codex Computer Use readiness
1 parent a0fdb56 commit 8f59f07

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

extensions/codex/src/app-server/computer-use-health.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,25 @@ describe("Codex Computer Use periodic health", () => {
8888
expect(client.request).not.toHaveBeenCalled();
8989
});
9090

91+
it("stops an existing monitor when Computer Use is disabled", async () => {
92+
vi.useFakeTimers();
93+
const client = createClient();
94+
95+
startCodexComputerUseHealthMonitor({
96+
client: client.client,
97+
config: computerUseConfig({ healthCheckEnabled: true, healthCheckIntervalMinutes: 30 }),
98+
});
99+
expect(
100+
startCodexComputerUseHealthMonitor({
101+
client: client.client,
102+
config: computerUseConfig({ enabled: false, healthCheckEnabled: true }),
103+
}),
104+
).toEqual({ started: false, reason: "disabled" });
105+
106+
await vi.advanceTimersByTimeAsync(30 * 60_000);
107+
expect(client.request).not.toHaveBeenCalled();
108+
});
109+
91110
it("replaces a same-interval monitor when probe configuration changes", async () => {
92111
vi.useFakeTimers();
93112
const client = createClient();

0 commit comments

Comments
 (0)