refactor(tools): remove artificial analysis ceilings

This commit is contained in:
morluto
2026-09-29 16:29:23 +08:00
parent 36aeec9586
commit 2f08c7c932
202 changed files with 2314 additions and 3072 deletions
@@ -1,4 +1,4 @@
import { expect, it } from "vitest";
import { expect, it, vi } from "vitest";
import WebSocket from "ws";
import { startLoopbackReplay } from "../../../src/application/LoopbackReplay.js";
@@ -91,6 +91,37 @@ it("matches bounded HTTP scripts without persisting request secrets", async () =
}
});
it("keeps long replay delays pending and cancels them when replay closes", async () => {
const scenario = parseProcessScenario({
executable: "/bin/sh",
working_directory: "/tmp",
replay: {
http: [
{
method: "GET",
path: "/later",
status: 200,
body: "ready",
delay_ms: 2_147_483_648,
},
],
},
});
const replay = await startLoopbackReplay(scenario);
const response = fetch(`${replay.httpUrl}/later`);
try {
await vi.waitFor(() => {
expect(
replay.events.some(({ direction }) => direction === "request"),
).toBe(true);
});
await replay.close();
await expect(response).resolves.toMatchObject({ status: 200 });
} finally {
await replay.close();
}
});
it("consumes ordered WebSocket reconnect scripts and reports exhaustion", async () => {
const scenario = parseProcessScenario({
executable: "/bin/sh",