PEP-268: тест потерянного разговора — пропавший tmux теперь сбой платформы, попытка не тратится
All checks were successful
peppa/lint lint: success за 2с
peppa/typecheck typecheck: success за 49с
peppa/build build: success за 34с
peppa/test test: success за 1521с
peppa-ci / ci (pull_request) Successful in 27m40s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peppa-bot 2026-11-26 08:33:09 +00:00
parent 3a3a0549b9
commit dafa4c77bb

View File

@ -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);
});