fix(core): separate interruption from finish

This commit is contained in:
Kit Langton 2026-06-26 11:04:08 -04:00
commit fd229f7edf
12 changed files with 141 additions and 18 deletions

View file

@ -361,7 +361,7 @@ Recent work
time: { created, completed: created },
}),
],
finish: "interrupted",
settlement: "interrupted",
time: { created, completed: created },
}),
],

View file

@ -519,6 +519,7 @@ const verifyPartialFlushOnFailure = (kind: FragmentKind) =>
{
type: "assistant",
finish: "error",
settlement: "failed",
error: { type: "unknown", message: "Provider unavailable" },
content: [fixture.expectedContent],
},
@ -563,7 +564,7 @@ const verifyPartialFlushOnInterruption = (kind: FragmentKind) =>
{ type: "user", text: prompt },
{
type: "assistant",
finish: "interrupted",
settlement: "interrupted",
content: [
kind === "tool input"
? { type: "tool", id: fragmentID(kind, "interrupted"), state: { status: "error" } }
@ -2669,7 +2670,7 @@ describe("SessionRunnerLLM", () => {
state: { status: "error", error: { type: "unknown", message: "Tool execution interrupted" } },
},
],
finish: "interrupted",
settlement: "interrupted",
},
])
}),
@ -2814,7 +2815,7 @@ describe("SessionRunnerLLM", () => {
state: { status: "error", error: { type: "unknown", message: "Tool execution interrupted" } },
},
],
finish: "interrupted",
settlement: "interrupted",
},
])
}),