fix: harden workflow execution recovery
This commit is contained in:
@@ -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,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user