放宽游玩正文判定,并允许错误阶段输入后恢复。

减少长稿被误丢,同时让失败会话可继续推进。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 01:15:36 +08:00
co-authored by Cursor
parent 51ff139454
commit 3684e0d6e2
4 changed files with 52 additions and 7 deletions
+12
View File
@@ -337,6 +337,18 @@ describe("phase runtime", () => {
expect(runtime.getSession().waitingReason).toBeUndefined();
});
it("submitInput recovers from error phase", async () => {
const runtime = new PhaseRuntime({ autoStubWorker: true });
await runtime.start();
await runtime.submitInput("随便写点");
await runtime.failRun("fetch failed");
expect(runtime.getSession().phase).toBe("error");
await runtime.submitInput("重试一下");
expect(runtime.getSession().phase).not.toBe("error");
expect(runtime.getSession().slots.lastUserInput).toBe("重试一下");
});
it("recoverOrphanedRun turns stuck running into node pick when DAG exists", async () => {
const runtime = new PhaseRuntime();
await runtime.start();