AgentEvalTool/.scratch/intelligent-eval-cron-pool/issues/01-data-model-and-task-queue.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

20 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 01 — 数据模型 + 任务入队 API
**What to build:** 创建任务队列和 Cron 池的数据表,实现任务入队逻辑和取任务 API。同时创建配置快照和决策日志表为后续的可观测性功能打基础。
**Blocked by:** None — 可立即开始
**Status:** ready-for-agent
- [ ] 创建 `intelligent_eval_task_queue` 表(任务队列)
- [ ] 创建 `openclaw_cron_pool`Cron 池状态)
- [ ] 创建 `intelligent_eval_config_snapshots` 表(配置快照)
- [ ] 创建 `intelligent_eval_decision_logs` 表(决策日志)
- [ ] 实现任务入队逻辑:每分钟扫描 executing 评估 → 判断是否需要处理 → 生成任务
- [ ] 实现任务优先级计算(时段到期 > 欠账多 > 等待时间长)
- [ ] 实现 `GET /api/intelligent-evals/tasks/next` API供 OpenClaw 调用)
- [ ] 实现任务去重逻辑(同一评估已有 pending 任务时不重复创建)
- [ ] 单元测试:任务入队逻辑、优先级计算、去重逻辑
- [ ] 集成测试:创建评估 → 批准 → 任务自动入队
- [ ] **可演示**:创建一个智能评估并批准执行,看到任务自动入队 + 配置快照自动保存