[codex] Add runtime lifecycle recovery and live issue visibility (#4419)

This commit is contained in:
Dotta
2026-04-24 15:50:32 -05:00
committed by GitHub
parent 9a8d219949
commit 5a0c1979cf
121 changed files with 9625 additions and 2044 deletions
+30
View File
@@ -0,0 +1,30 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
const mockApi = vi.hoisted(() => ({
get: vi.fn(),
}));
vi.mock("./client", () => ({
api: mockApi,
}));
import { heartbeatsApi } from "./heartbeats";
describe("heartbeatsApi.liveRunsForCompany", () => {
beforeEach(() => {
mockApi.get.mockReset();
mockApi.get.mockResolvedValue([]);
});
it("keeps the legacy numeric minCount signature", async () => {
await heartbeatsApi.liveRunsForCompany("company-1", 4);
expect(mockApi.get).toHaveBeenCalledWith("/companies/company-1/live-runs?minCount=4");
});
it("passes minCount and limit options to the company live-runs endpoint", async () => {
await heartbeatsApi.liveRunsForCompany("company-1", { minCount: 50, limit: 50 });
expect(mockApi.get).toHaveBeenCalledWith("/companies/company-1/live-runs?minCount=50&limit=50");
});
});