fix(pi-workflow): consume interrupted implementation recovery

This commit is contained in:
jb
2026-08-25 19:55:49 -04:00
parent a54a92ace4
commit 141fcd145f
4 changed files with 16 additions and 9 deletions
+9 -8
View File
@@ -4348,16 +4348,17 @@ export class WorkflowEngine {
next.status = "running";
});
if (run.implementationContext?.status === "ready") {
if (interruptedMutating.length > 0) {
if (
interruptedMutating.length > 0 &&
stage(run, "implement").status !== "completed"
) {
run = await this.transition(run, (next) => {
const implement = stage(next, "implement");
if (implement.status !== "completed") {
implement.status = "completed";
implement.finishedAt = this.now();
implement.output = {
recovery: "User requested a new remediation Assignment after interruption",
};
}
implement.status = "completed";
implement.finishedAt = this.now();
implement.output = {
recovery: "User requested a new remediation Assignment after interruption",
};
});
return this.remediate(run);
}