From e7b7459353b2c683e7e3669127c39ff87d6908a4 Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 20 Feb 2026 11:48:48 +0000 Subject: [PATCH] docs: mark Phase 7 complete in TODO Co-Authored-By: Virgil --- TODO.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index 8eed18d..2f00d00 100644 --- a/TODO.md +++ b/TODO.md @@ -98,22 +98,22 @@ The `AgentRegistry` interface only has `MemoryRegistry` — a restart drops all - [x] **`DefaultBaseURL`** changed from `api.core-agentic.dev` (nonexistent) to `http://localhost:8080` for local dev. Set `AGENTIC_BASE_URL` env var for production. -## Phase 7: Priority-Ordered Dispatch + Retry +## Phase 7: Priority-Ordered Dispatch + Retry — `ba8c19d` `DispatchLoop` dispatches tasks in arbitrary order with no retry backoff. ### 7.1 Priority Sorting -- [ ] **Sort pending tasks** in `DispatchLoop` by `Priority` (Critical > High > Normal > Low) before dispatching -- [ ] **Tie-break** by `CreatedAt` (oldest first within same priority) -- [ ] **Tests** — 5 tasks with mixed priorities dispatched in correct order +- [x] **Sort pending tasks** in `DispatchLoop` by `Priority` (Critical > High > Normal > Low) before dispatching +- [x] **Tie-break** by `CreatedAt` (oldest first within same priority) +- [x] **Tests** — 5 tasks with mixed priorities dispatched in correct order ### 7.2 Retry Backoff -- [ ] **Add `MaxRetries` and `RetryCount` fields** to `Task` type -- [ ] **Exponential backoff** in `DispatchLoop` — skip tasks where `RetryCount > 0` and `LastAttempt + backoff(RetryCount) > now` -- [ ] **Dead-letter** — tasks exceeding `MaxRetries` (default 3) get status `TaskFailed` with reason "max retries exceeded" -- [ ] **Tests** — retry delay respected, dead-letter after max retries, backoff calculation +- [x] **Add `MaxRetries` and `RetryCount` fields** to `Task` type +- [x] **Exponential backoff** in `DispatchLoop` — skip tasks where `RetryCount > 0` and `LastAttempt + backoff(RetryCount) > now` +- [x] **Dead-letter** — tasks exceeding `MaxRetries` (default 3) get status `TaskFailed` with reason "max retries exceeded" +- [x] **Tests** — retry delay respected, dead-letter after max retries, backoff calculation ## Phase 8: Event Hooks