refactor!: simplify runtime tools and remove replay engines (#572)
* fix(hopper): report unavailable procedure body coverage * refactor!: simplify runtime tools and remove replay engines Keep direct inspection, capture, and comparison tools. Bind handlers to named contracts and let agents compose experiments with commands and local fixture servers. BREAKING CHANGE: Remove controlled replay, Node characterization, finite replay-machine, managed runtime planning, and redundant string-tracing tools. Retire process replay, shims, reactive scenarios, custom checkpoints, and active browser replay and origin-scope inputs.
This commit is contained in:
@@ -2,6 +2,43 @@ import { expect, it } from "vitest";
|
||||
import { processScenarioSchema } from "../domain/processScenario.js";
|
||||
import { AnalysisCapabilityUnavailableError } from "../domain/errors.js";
|
||||
import { captureProcessScenario } from "./ProcessHarness.js";
|
||||
import { settleProcessCaptureJournal } from "./ProcessCaptureLifecycle.js";
|
||||
import { processCaptureSchema } from "../domain/processCapture.js";
|
||||
import { EMPTY_PROCESS_CAPTURE_EXAMPLE } from "../domain/processCapture.fixture.js";
|
||||
|
||||
it("rejects legacy replay output instead of silently discarding it", () => {
|
||||
expect(
|
||||
processCaptureSchema.safeParse({
|
||||
...EMPTY_PROCESS_CAPTURE_EXAMPLE,
|
||||
protocol_events: [],
|
||||
}).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("waits for terminal observations delivered after the exit callback", async () => {
|
||||
const journal: Array<{
|
||||
capture_order: number;
|
||||
collection: "frames";
|
||||
index: number;
|
||||
}> = [{ capture_order: 0, collection: "frames", index: 0 }];
|
||||
const lateFrame = new Promise<void>((resolve) => {
|
||||
setTimeout(() => {
|
||||
journal.push({ capture_order: 1, collection: "frames", index: 1 });
|
||||
resolve();
|
||||
}, 12);
|
||||
});
|
||||
|
||||
let settled = false;
|
||||
const wait = settleProcessCaptureJournal(journal, 20, 200).then(() => {
|
||||
settled = true;
|
||||
});
|
||||
await lateFrame;
|
||||
expect(settled).toBe(false);
|
||||
await wait;
|
||||
|
||||
expect(journal).toHaveLength(2);
|
||||
expect(journal[1]).toMatchObject({ collection: "frames", index: 1 });
|
||||
});
|
||||
|
||||
it("fails closed on Windows before resolving or launching scenario paths", async () => {
|
||||
const scenario = processScenarioSchema.parse({
|
||||
|
||||
Reference in New Issue
Block a user