feat(core): add session snapshot and revert system (#33226)

This commit is contained in:
Dax
2026-06-24 23:41:16 +00:00
committed by GitHub
parent 25c6abc31a
commit 9bb5370205
42 changed files with 2311 additions and 365 deletions
@@ -125,3 +125,12 @@ test("old success event data containing result still decodes", () => {
})
expect(decoded.result).toMatchObject({ type: "content" })
})
test("step finish records settlement without publishing step ended", async () => {
const { published, publisher } = capture()
await Effect.runPromise(publisher.publish(LLMEvent.stepStart({ index: 0 })))
await Effect.runPromise(publisher.publish(LLMEvent.stepFinish({ index: 0, reason: "stop" })))
expect(published.some((event) => event.type === "session.next.step.ended.2")).toBe(false)
expect(publisher.stepSettlement()).toMatchObject({ finish: "stop" })
})