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.
877 B
877 B
07 — 监控和告警
What to build: 实现关键指标计算、告警规则、告警通知功能。
Blocked by: 04 — 决策逻辑 + 端到端执行
Status: ready-for-agent
- 实现关键指标计算(池使用率、任务积压、卡死率、平均处理时间、评估完成率)
- 实现
GET /api/openclaw/cron-pool/metricsAPI(查询指标) - 实现告警规则(池使用率 > 90% 持续 10 分钟、任务积压 > 50、卡死率 > 10%)
- 实现告警通知(日志 + 可选的 webhook)
- 实现告警历史记录(保存到 DB)
- 实现
GET /api/openclaw/cron-pool/alertsAPI(查询告警历史) - 单元测试:指标计算、告警规则
- 集成测试:触发告警条件 → 收到告警通知
- 可演示:触发告警条件(如手动让 20 个 cron 都 busy),收到告警