fix(resume): recover cleanly after Pi exits
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user