fix(resume): recover cleanly after Pi exits

This commit is contained in:
User
2026-07-14 21:35:50 +02:00
parent 7e1d72c9a4
commit df1e7dea9c
13 changed files with 214 additions and 17 deletions
+13
View File
@@ -68,6 +68,19 @@ test("assistant provider errors are sanitized and leave the turn failed", () =>
expect(JSON.stringify(seen)).not.toContain("DO_NOT_LEAK");
});
test("markFailed records backend-detected failure without emitting raw detail", () => {
const { rpc } = fakeRpc();
const bridge = new SessionBridge(rpc);
const seen: any[] = [];
bridge.onClientEvent((event) => seen.push(event));
bridge.beginTurn();
bridge.markFailed();
expect(bridge.turnState()).toBe("failed");
expect(seen).toEqual([]);
});
test("reviewer wait and response transition waiting back to running", () => {
const { rpc, fire } = fakeRpc();
const bridge = new SessionBridge(rpc);