[claude] Wire delegate_task to DistributedWorker for actual execution (#985) #1273

Merged
Timmy merged 1 commits from claude/issue-985 into main 2026-03-24 01:47:10 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
efa899efb2 feat: wire delegate_task to DistributedWorker for actual execution
Some checks failed
Tests / lint (pull_request) Successful in 34s
Tests / test (pull_request) Failing after 29m15s
Fixes #985

- Create src/brain/__init__.py and src/brain/worker.py with DistributedWorker
- DistributedWorker routes tasks to three backends:
  - agentic_loop: local multi-step execution (default)
  - kimi: heavy research via Gitea kimi-ready issues (when gitea_enabled + exceeds_local_capacity)
  - paperclip: task submission via Paperclip API (when paperclip_api_key configured)
- Implements task lifecycle: queued → running → completed | failed
- Auto-retry with exponential fallback (MAX_RETRIES=2) on failure
- delegate_task now returns real task_id instead of None/"noted"
- Add brain package to pyproject.toml packages list
- Add 32 unit tests covering task submission, routing, lifecycle, and integration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:39:32 -04:00