feat(watchdog): 卡死执行机械白名单处置——双120命中自动 cancel+reopen+沙箱快照,值守兜底自动化

Abierto
#22 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
git
Área
devops

Línea de trabajo

The change belongs in the existing inflight-watch or keeper-shadow watchdog, which the issue says is owned by another automation track, and it depends on the resume ledger at duty/inflight-resume.json and the run directory layout. Read the playbook section on the 120-minute double-threshold criterion and the sandbox-watch cleanup precedent first. Done means the three acceptance checks pass: a matching running execution is auto-cancelled and reopened with salvage-snapshot.patch written, an active impl is not touched, and a third stall in 24h escalates to a duty ticket.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

优先级 P1 · 依赖:无

基线 HEAD = 59cdc5e

Summary

  • 今日(2026-10-09)单日 5 次 cancel 全部同一 signature:sbx 通道条件假分支悬死(引擎缺口已单独立单 jeffkit/plaita#53,其落地前会持续复发)。实测样本:plaita#33(resume retry 假受理后悬死 running)、recursive#145 三连(impl 进程死亡后 checkpoint 零落盘、执行壳空挂到 zombie 线 >7200s)。
  • 现行处置阶梯:inflight-watch 检测(*/15)→ 自动 resume(每执行限 1 次,账本 duty/inflight-resume.json)→ 无效后靠值守人工 cancel+reopen。缺口:值守轮次间隔 30min+ 且消耗 LLM 轮次;值守不在场(夜间)时卡死 run 空跑 2h+ 无人收。
  • 判据已由 playbook §1 验证并经今日样本复核:末节点结束 >120min 且 进度龄(last_update_time 年龄)>120min。双交集天然排除活跃 impl 误杀——健康 impl 周期性写步界/状态刷新进度龄;命中双 120 即 state 两小时未刷新,是确定性死信号。
  • 机械白名单先例:sandbox-watch 自动杀孤儿沙箱实例(capability: delete_cache, level: authorized),体系已有 authorized 机械动作形态。

影响

每例卡死从命中判据到被处置延迟 30min~2h+(夜间无人);每次值守人工处置消耗一轮 LLM 会话。按今日频率(5 例/日)与 plaita#53 修复排期,积压期将持续多日。

建议

在 inflight-watch(或 keeper-shadow 看门狗)现有检测后追加第二阶梯,全部为 authorized 机械动作:

  1. 触发:执行 running 且(末节点结束 >120min 且进度龄 >120min)且其 resume 额度已用(账本可查);
  2. 动作:cancel_execution → reopen_issue(自动摘 needs-human)→ 杀对应 AGS 沙箱实例(完整 sandbox_id);
  3. 快照代替抢救:cancel 前将 worktree git diff HEAD + git log --oneline -5 写入 <run_dir>/salvage-snapshot.patch,run 目录保留不删——复杂修复(如 #33 的 salvage 分支)仍留值守/人工,机械层只保证产物不丢;
  4. 熔断:账本扩展 cancelled 记录;同 issue 24h 内自动 cancel ≥2 次 → 停止自动处置,改递值守工单(防 reopen 后复发死循环);
  5. 留痕:每动作写 rounds.log + duty requests(capability: cancel_execution / reopen_issue, level: authorized)。

验收条件:

  • 构造双 120 命中的 running 执行 → 30min 内被自动 cancel+reopen,salvage-snapshot.patch 存在,账本与轮报有记录;
  • 活跃 impl(进度龄 <120min,即使末节点结束已久)不触发;
  • 同 issue 第 3 次卡死(24h 内 cancel 已 2 次)不再自动处置,值守工单出现。

边界

  • 不碰引擎缺陷本身(jeffkit/plaita#53 单独修,本单是其落地前的值守兜底);
  • keeper-shadow / inflight-watch 属 B 班 automation,值守不直接改——本单走排期由管线实现;
  • 与 2026-10-09「不做机器兜底」拍板不冲突:该拍板限制的是判断类动作;本单全部为确定性判据命中的机械白名单动作,判断仍归值守。
Lenguaje dominante
Python
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jeffkit/issue-keeper

Todos los issues de jeffkit/issue-keeper

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.