Refine terminal history scrolling and job failure summaries
This commit is contained in:
@@ -67,6 +67,20 @@ describe("operations console contracts", () => {
|
||||
expect(summaries.find((item) => item.instance.id === "job-failed")?.failedJobs).toBe(1);
|
||||
});
|
||||
|
||||
it("does not count failed jobs older than the latest healthy server projection", () => {
|
||||
const summaries = summarizeServerOperations(
|
||||
[server("recovered", "running", "2026-07-18T10:10:00Z")],
|
||||
new Map(),
|
||||
[
|
||||
job("old-failed-start", "failed", "2026-07-18T10:03:00Z", "recovered"),
|
||||
job("healthy-start", "succeeded", "2026-07-18T10:10:00Z", "recovered")
|
||||
]
|
||||
);
|
||||
|
||||
expect(summaries[0]?.failedJobs).toBe(0);
|
||||
expect(summaries[0]?.latestJob?.id).toBe("healthy-start");
|
||||
});
|
||||
|
||||
it("summarizes only endpoint-safe capacity and status values", () => {
|
||||
const endpoints: RunEndpointResponse[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user