@@ -362,17 +362,17 @@ The `Dispatcher` constructor gains a `task_queue: TaskQueue` parameter.
362362
363363** Acceptance criteria:**
364364
365- - [ ] ` dispatch() ` calls ` task_queue.enqueue() ` with correct ` TaskMessage ` and ` agent_url `
366- - [ ] ` dispatch() ` sends ` POST <agent_url>/task ` with body ` {"task_id": ...} ` and returns 202
367- - [ ] ` dispatch() ` does not await agent response or parse ` DecisionMessage `
368- - [ ] Nudge HTTP errors are logged and swallowed (fire-and-forget)
369- - [ ] All synchronous response-parsing code is deleted
370- - [ ] ` Dispatcher.__init__ ` accepts ` task_queue: TaskQueue `
365+ - [x ] ` dispatch() ` calls ` task_queue.enqueue() ` with correct ` TaskMessage ` and ` agent_url `
366+ - [x ] ` dispatch() ` sends ` POST <agent_url>/task ` with body ` {"task_id": ...} ` and returns 202
367+ - [x ] ` dispatch() ` does not await agent response or parse ` DecisionMessage `
368+ - [x ] Nudge HTTP errors are logged and swallowed (fire-and-forget)
369+ - [x ] All synchronous response-parsing code is deleted
370+ - [x ] ` Dispatcher.__init__ ` accepts ` task_queue: TaskQueue `
371371
372372** Verification:**
373373
374- - [ ] ` uv run pytest --agent-digest=term tests/test_server.py `
375- - [ ] ` pre-commit run --all-files `
374+ - [x ] ` uv run pytest --agent-digest=term tests/test_server.py `
375+ - [x ] ` pre-commit run --all-files `
376376
377377** Dependencies:** Tasks 2, 6
378378
@@ -399,17 +399,17 @@ Both tasks are cancelled cleanly on shutdown.
399399
400400** Acceptance criteria:**
401401
402- - [ ] ` drain_loop ` calls ` drain_completed() ` and passes each ` (TaskMessage, DecisionMessage) ` to
402+ - [x ] ` drain_loop ` calls ` drain_completed() ` and passes each ` (TaskMessage, DecisionMessage) ` to
403403 ` executor.execute() ` and ` memory.upsert_memory_summary() `
404- - [ ] ` drain_loop ` wakes immediately when ` drain_event ` is set
405- - [ ] ` requeue_loop ` calls ` requeue_stale() ` and ` fail_exhausted(max_retries=config.queue.max_retries) `
406- - [ ] Both tasks log structured events on each cycle
407- - [ ] Both tasks are cancelled without error on SIGINT/shutdown
404+ - [x ] ` drain_loop ` wakes immediately when ` drain_event ` is set
405+ - [x ] ` requeue_loop ` calls ` requeue_stale() ` and ` fail_exhausted(max_retries=config.queue.max_retries) `
406+ - [x ] Both tasks log structured events on each cycle
407+ - [x ] Both tasks are cancelled without error on SIGINT/shutdown
408408
409409** Verification:**
410410
411- - [ ] ` uv run pytest --agent-digest=term tests/test_server.py `
412- - [ ] ` pre-commit run --all-files `
411+ - [x ] ` uv run pytest --agent-digest=term tests/test_server.py `
412+ - [x ] ` pre-commit run --all-files `
413413
414414** Dependencies:** Task 10
415415
@@ -429,16 +429,16 @@ Add `--queue-db` CLI argument (overrides `config.queue.db_path`).
429429
430430** Acceptance criteria:**
431431
432- - [ ] ` TaskQueue ` is constructed with the resolved ` db_path ` and ` claim_timeout_seconds `
433- - [ ] ` Dispatcher ` receives the ` task_queue ` instance
434- - [ ] ` app.state.task_queue ` and ` app.state.drain_event ` are set before the server starts
435- - [ ] Default ` db_path ` is ` ~/.agent-harness/queue.db ` when not set in config
436- - [ ] Existing ` --db ` arg for ` memory.db ` is unchanged
432+ - [x ] ` TaskQueue ` is constructed with the resolved ` db_path ` and ` claim_timeout_seconds `
433+ - [x ] ` Dispatcher ` receives the ` task_queue ` instance
434+ - [x ] ` app.state.task_queue ` and ` app.state.drain_event ` are set before the server starts
435+ - [x ] Default ` db_path ` is ` ~/.agent-harness/queue.db ` when not set in config
436+ - [x ] Existing ` --db ` arg for ` memory.db ` is unchanged
437437
438438** Verification:**
439439
440- - [ ] ` uv run pytest --agent-digest=term tests/test_main.py `
441- - [ ] ` pre-commit run --all-files `
440+ - [x ] ` uv run pytest --agent-digest=term tests/test_main.py `
441+ - [x ] ` pre-commit run --all-files `
442442
443443** Dependencies:** Tasks 10, 11
444444
@@ -457,17 +457,17 @@ Test the drain loop by injecting a mocked `drain_completed()` return and verifyi
457457
458458** Acceptance criteria:**
459459
460- - [ ] ` dispatch() ` test: ` enqueue() ` called with correct task + agent_url; nudge POST is fire-and-forget
461- - [ ] ` dispatch() ` test: nudge HTTP error is swallowed and logged; no exception propagated
462- - [ ] Drain loop test: ` drain_completed() ` returning one task → ` executor.execute() ` called once
463- - [ ] Drain loop test: ` drain_event ` set → drain loop wakes immediately
464- - [ ] Requeue loop test: ` requeue_stale() ` and ` fail_exhausted() ` called on schedule
465- - [ ] No test directly touches ` queue.db `
460+ - [x ] ` dispatch() ` test: ` enqueue() ` called with correct task + agent_url; nudge POST is fire-and-forget
461+ - [x ] ` dispatch() ` test: nudge HTTP error is swallowed and logged; no exception propagated
462+ - [x ] Drain loop test: ` drain_completed() ` returning one task → ` executor.execute() ` called once
463+ - [x ] Drain loop test: ` drain_event ` set → drain loop wakes immediately
464+ - [x ] Requeue loop test: ` requeue_stale() ` and ` fail_exhausted() ` called on schedule
465+ - [x ] No test directly touches ` queue.db `
466466
467467** Verification:**
468468
469- - [ ] ` uv run pytest --agent-digest=term tests/test_server.py `
470- - [ ] ` pre-commit run --all-files `
469+ - [x ] ` uv run pytest --agent-digest=term tests/test_server.py `
470+ - [x ] ` pre-commit run --all-files `
471471
472472** Dependencies:** Tasks 10, 11, 12
473473
@@ -479,9 +479,9 @@ Test the drain loop by injecting a mocked `drain_completed()` return and verifyi
479479
480480### Checkpoint: Phase 4
481481
482- - [ ] ` uv run pytest --agent-digest=term ` — all tests pass
483- - [ ] Synchronous dispatch path is fully deleted from ` server.py `
484- - [ ] ` pre-commit run --all-files ` — clean
482+ - [x ] ` uv run pytest --agent-digest=term ` — all tests pass
483+ - [x ] Synchronous dispatch path is fully deleted from ` server.py `
484+ - [x ] ` pre-commit run --all-files ` — clean
485485- [ ] Human review before proceeding
486486
487487### Phase 5: Agent Update
0 commit comments