From 53d03e995dac6cdc05cbc9f540fbcc517f053c1f Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Thu, 26 Nov 2026 08:33:09 +0000 Subject: [PATCH] =?UTF-8?q?PEP-268:=20=D1=82=D0=B5=D1=81=D1=82=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=82=D0=B5=D1=80=D1=8F=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=B3=D0=BE=D0=B2=D0=BE=D1=80=D0=B0=20?= =?UTF-8?q?=E2=80=94=20=D0=BF=D1=80=D0=BE=D0=BF=D0=B0=D0=B2=D1=88=D0=B8?= =?UTF-8?q?=D0=B9=20tmux=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D1=81?= =?UTF-8?q?=D0=B1=D0=BE=D0=B9=20=D0=BF=D0=BB=D0=B0=D1=82=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D1=8B,=20=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D1=82=D1=80=D0=B0=D1=82=D0=B8=D1=82=D1=81=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- packages/testkit/test/lost-conversation.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/testkit/test/lost-conversation.test.ts b/packages/testkit/test/lost-conversation.test.ts index e68d4c02..76431568 100644 --- a/packages/testkit/test/lost-conversation.test.ts +++ b/packages/testkit/test/lost-conversation.test.ts @@ -40,7 +40,9 @@ describe("Потерянный разговор — новый запуск, а await tickAt(new Date(t0.getTime() + MIN + 1000)); const resumed = await p.waitLog("resume refused", (e) => e.ev === "exit" && e.reason === "no_conversation"); assert.equal(resumed.gen, "2"); - assert.equal((await sess(sid)).watchState?.restarts?.length, 1); + // PEP-268: a vanished tmux session is the platform's failure — no automatic restart spent. + assert.equal((await sess(sid)).watchState?.restarts?.length ?? 0, 0); + assert.equal((await sess(sid)).watchState?.platformFails?.length, 1); // …Claude no longer has it: the conversation is forgotten, a new one starts at once. const t1 = new Date(t0.getTime() + MIN + 5000); @@ -53,7 +55,7 @@ describe("Потерянный разговор — новый запуск, а const start = await p.waitLog("fresh start", (e) => e.ev === "start" && e.gen === "3"); assert.equal(start.resume, null, "no --resume"); assert.ok((start.argv as string[]).some((a) => a.includes("сверься с peppa.get_task и tasks.md") || a.includes("Сверься с peppa.get_task и tasks.md")), "the prompt sends the agent to get_task and tasks.md"); - assert.equal((await sess(sid)).watchState?.restarts?.length, 1, "no automatic restart spent"); + assert.equal((await sess(sid)).watchState?.restarts?.length ?? 0, 0, "no automatic restart spent"); assert.equal((await eventsOf(sid, "conversation_restarted")).length, 1); await runner.stopSession(db, sid); });