Files
m-senior-developer 8c9a174ddc WYL-44 follow-up: add tests and extract poll_once for testability
R1: Add unit tests (22 total, all passing)
- tests/test_queue.py: enqueue/persist, is_issue_pending_or_running for all
  statuses, update_status mutate+persist, save/load roundtrip, corrupt file
  handling, pending() filtering
- tests/test_watcher.py: FakeMulticaClient drives poll_once across first
  observation, same updated_at dedupe, updated_at change while pending/running
  dedupe, re-enqueue after done, multi-issue, mix of new and seen

Refactor: extract poll_once(client, state, queue, logger) from watch_loop so
tests can call it directly without mocking time.sleep.

R2: Document known race near is_issue_pending_or_running — comment added
noting that orchestrator marking round done before updating issue status can
fire a second round; WYL-45 must resolve atomically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 21:20:23 +00:00

0 lines
0 B
Python