fix: harden workflow execution recovery

This commit is contained in:
liujing
2026-07-17 15:56:58 +08:00
parent 90551414b1
commit fb39ab289a
14 changed files with 355 additions and 30 deletions
+24
View File
@@ -0,0 +1,24 @@
import { describe, expect, it } from "vitest";
import { parseWorkflowArgs } from "./workflow-args.js";
describe("workflow retry-execute arguments", () => {
it("accepts an explicit Claude session ID", () => {
expect(parseWorkflowArgs([
"retry-execute",
"--run", "run-123",
"--session", "22778b47-e4f3-4645-84cd-1c6a74a912d8",
])).toEqual({
sub: "retry-execute",
runId: "run-123",
sessionId: "22778b47-e4f3-4645-84cd-1c6a74a912d8",
});
});
it("preserves retry without a session override", () => {
expect(parseWorkflowArgs(["retry-execute", "--run", "run-123"])).toEqual({
sub: "retry-execute",
runId: "run-123",
sessionId: undefined,
});
});
});