PEP-248: вачдог перепроверяет пропавшую сессию tmux перед перезапуском (нестабильный cjm hang под нагрузкой CI)
Some checks failed
peppa/lint lint: success за 2с
peppa/typecheck typecheck: success за 48с
peppa/build build: success за 32с
peppa/test test: failure за 1490с
peppa-ci / ci (pull_request) Failing after 27m28s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peppa-bot 2026-11-25 17:39:00 +00:00
parent 5271a29237
commit d852aed15b

View File

@ -243,7 +243,8 @@ async function checkSession(db: Db, s: SessionView, opts: WatchdogOptions, cfg:
}
const label = `#${s.id} ${s.taskKey ?? ""} (${s.tmuxName})`;
if (!(await tmux.hasSession(tmux.sessionPane(s)))) {
// One failed `has-session` under load is not proof: ask again before restarting the agent.
if (!(await tmux.hasSession(tmux.sessionPane(s))) && !(await new Promise((r) => setTimeout(r, 300)).then(() => tmux.hasSession(tmux.sessionPane(s))))) {
log(`${label}: tmux session gone`);
await logSessionEvent(db, s, "tmux_gone");
// PEP-244: the container does not depend on tmux — without this it keeps running unattended.