test(daemon): multi-agent board — lifecycle, capability routing, contention #186

Merged
clawdie merged 4 commits from feat/multi-agent-board-tests into main 2026-06-25 16:58:26 +02:00

4 commits

Author SHA1 Message Date
Sam & Claude
9443a03369 style: cargo fmt fix for multi_agent_board.rs
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
Fix two formatting nits (wrapped let, assert! macro) introduced in
the capability-routing test. No logic changes.

(Sam & Claude)
2026-06-25 16:43:24 +02:00
e1dfe1db52 test(daemon): add real capability-routing test; fix misleading comments
The two existing tests assign tasks by manual claim-task — they prove
board lifecycle + contention + session isolation, not capability
routing. One comment claimed 'intake tasks requiring freebsd' while the
code used plain create-task with no required capabilities; corrected,
and added doc comments scoping each test honestly.

Add scheduler_routes_intake_tasks_by_capability: the actual Phase 1b
proof. Two agents with disjoint capabilities, two intake-task submissions
with matching required caps, and the scheduler's pick_agent assigns each
task to the capable agent — no manual claim. Note capabilities must be
registered in array form (['freebsd']); pick_agent deserializes Vec<String>,
so the object form scores zero.

All 3 board tests pass; full colibri-daemon suite green (91 unit +
integration), clippy --tests clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 16:36:12 +02:00
2288c12c8b test(daemon): multi-agent board — 2-agent distinct claims + 1-agent multi-task
Phase 1b: two agents claim distinct tasks on the board.
  Registers sysadmin (freebsd) and db-admin (postgres), creates
  two tasks, each agent claims one, both transition queued→claimed
  →started→done. Proves different agents get different tasks.

Phase 1c: one agent handles two tasks with isolated sessions.
  Registers one worker (freebsd), submits two freebsd tasks,
  same agent claims both, both transition to done independently.
  Documents current behavior (no guard against multi-claim) and
  proves session isolation.

All workspace tests green (0 failures).
2026-06-25 16:26:35 +02:00
6264d5f432 test(daemon): multi-agent board — register, claim, lifecycle
Proves the coordination board handles two agents concurrently:
- Register agents with distinct capability sets
- Create tasks visible to both agents
- Each agent claims only their assigned task
- Tasks flow through the full lifecycle: queued→claimed→started→done
- Final state: both done, zero queued

Uses isolated daemon with temp paths — zero production impact.
2026-06-25 16:24:44 +02:00