PEP-10: hook stays silent only for done stories (a manual run on a backlog story still pings)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Асель 2026-11-14 06:00:51 +05:00
parent 6b75324971
commit 3c84608125

View File

@ -201,8 +201,8 @@ async function turnEnd(db: Db, s: SessionView, text: string | null, canContinue:
return null;
}
const [task] = await db.select().from(tasks).where(eq(tasks.id, s.taskId));
// PEP-10: the story left work (done, back in the backlog) — a queue runner waits for the next one.
if (task && (task.status === "done" || task.status === "backlog")) {
// PEP-10: the story is done — a queue runner waits for its next one without a ping.
if (task?.status === "done") {
await updateSession(db, s.id, { status: "idle", lastActivityAt: new Date() });
return null;
}