Align tests with gm-first context projection and retry snapshot semantics.

History synthesis expects world-simulator slot; retryStuckRun compares artifact count against checkpoint baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-25 01:02:23 +08:00
co-authored by Cursor
parent 6d4dfd0d89
commit 123c44ec49
2 changed files with 16 additions and 12 deletions
+5 -3
View File
@@ -108,7 +108,7 @@ describe("phase runtime", () => {
);
const snap = runtime.getLastWorkerRunSnapshot();
expect(snap?.workerId).toBe("design-flow");
const artifactsBefore = runtime.getSession().artifacts.length;
const artifactsAtSnapshot = snap!.runtimeSession.artifacts.length;
const session = runtime.getSession();
session.phase = "running";
@@ -116,10 +116,12 @@ describe("phase runtime", () => {
session.currentWorkerId = "design-flow";
await runtime.retryStuckRun();
expect(runtime.getSession().artifacts.length).toBeGreaterThan(artifactsBefore);
expect(runtime.getSession().artifacts.length).toBeGreaterThan(
artifactsAtSnapshot,
);
expect(
runtime.getSession().artifacts.filter((a) => a.workerId === "design-flow").length,
).toBeGreaterThanOrEqual(2);
).toBeGreaterThanOrEqual(1);
});
it("retryStuckRun throws when nothing is running", async () => {