Allow native chat replies to finish after semantic completion

This commit is contained in:
Dotta committed 2026-09-11 14:34:34 -05:00
1 parent 40443d8158
commit 1c72c26a88
4 files changed
+128 -106

No files matched your search

@@ -3135,6 +3135,19 @@ describe("native session same-turn steering", () => {
});
describe("native warm session supervision", () => {
it.each([true, false])("preserves chat reply grace for per-turn providers: chat=%s", async (conversationMode) => {
state.execute.mockReset().mockImplementationOnce(async (options) => {
expect(options.semanticResultTerminalGraceMs).toBe(conversationMode ? 30_000 : undefined);
return {
result: { summary: "Reply completed" },
terminal: { runTerminalState: "succeeded" },
turnId: "turn-grace", normalizedSessionId: execution.session.normalizedSessionId,
providerSessionId: "provider-grace", driverKind: "test", driverVersion: "1",
nativeEventCount: 1, highestContiguousSourceSeq: 1,
};
});
await executePaperclipNativeSession({ db: leaseDb(), execution, runnerInstanceId: "runner", conversationMode });
});
it("persists agent-created goal continuity before a per-turn runner settles", async () => {
const goalCheckpoint = {
identity: { runId: execution.binding.runId, sessionId: "session" },