Implement Ticket 01 of intelligent eval cron pool architecture (ADR-0007): - Add 4 new tables: task_queue, cron_pool, config_snapshots, decision_logs - Implement task enqueueing logic with priority calculation - Implement task assignment and completion APIs - Add unit tests (9) and integration tests (7) - Update CONTEXT.md with new vocabulary - Add ADR-0007 documenting cron pool architecture decision All 760 tests passing.
1.0 KiB
1.0 KiB
06 — 故障恢复 + 状态对账
What to build: 实现 cron 卡死检测、任务重新入队、状态对账、OpenClaw 重启恢复等故障恢复机制。
Blocked by: 04 — 决策逻辑 + 端到端执行
Status: ready-for-agent
- 实现卡死检测(10 分钟未活跃的 cron 标记为 stuck)
- 实现任务重新入队(cron 卡死后,任务重新分配给其他 cron)
- 实现状态对账(每 5 分钟检查平台 DB 与 OpenClaw state 一致性)
- 实现 OpenClaw 重启恢复(cron state 持久化,重启后继续处理)
- 实现平台重启恢复(扫描 assigned 任务,检查 cron 是否还活跃)
- 实现卡死 cron 的清理逻辑(删除卡死的 cron,创建新 cron 补充)
- 单元测试:卡死检测、任务重新入队、状态对账
- 集成测试:模拟 cron 卡死 → 任务自动重新分配;重启 OpenClaw → 任务继续执行
- 可演示:模拟 cron 卡死,看到任务自动重新分配;重启 OpenClaw,看到任务继续执行