AgentEvalTool/.scratch/intelligent-eval-cron-pool/issues/06-fault-tolerance.md
sinohqb 1aa453ef0a feat(intelligent-eval): add cron pool data model and task queue API
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.
2026-08-12 02:13:21 +08:00

1.0 KiB
Raw Permalink Blame History

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看到任务继续执行