Commit Graph

2 Commits

Author SHA1 Message Date
Claude Code
9aeaa433fc Fix Docker Swarm discovery network name mismatch
- Changed NetworkName from 'chorus_default' to 'chorus_net'
- This matches the actual network 'CHORUS_chorus_net' (service prefix added automatically)
- Fixes discovered_count:0 issue - now successfully discovering all 25 agents
- Updated IMPLEMENTATION-SUMMARY with deployment status

Result: All 25 CHORUS agents now discovered successfully via Docker Swarm API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 10:35:25 +11:00
Claude Code
2826b28645 Phase 1: Implement Docker Swarm API agent discovery
Replaces DNS-based discovery (2/34 agents) with Docker API enumeration
to discover ALL running CHORUS containers.

Implementation:
- NEW: internal/p2p/swarm_discovery.go (261 lines)
  * Docker API client for Swarm task enumeration
  * Extracts container IPs from network attachments
  * Optional health verification before registration
  * Comprehensive error handling and logging

- MODIFIED: internal/p2p/discovery.go (~50 lines)
  * Integrated Swarm discovery with fallback to DNS
  * New config: DISCOVERY_METHOD (swarm/dns/auto)
  * Tries Swarm first, falls back gracefully
  * Backward compatible with existing DNS discovery

- NEW: IMPLEMENTATION-SUMMARY-Phase1-Swarm-Discovery.md
  * Complete deployment guide
  * Testing checklist
  * Performance metrics
  * Phase 2 roadmap

Expected Results:
- Discovery: 34/34 agents (100% vs previous ~6%)
- Council activation: Both core roles claimed
- Task execution: Unblocked

Security:
- Read-only Docker socket mount
- No privileged mode required
- Minimal API surface (TaskList + Ping only)

Next: Build image, deploy, verify discovery, activate council

Part of hybrid approach:
- Phase 1: Docker API (this commit) 
- Phase 2: NATS migration (planned Week 3)

Related:
- /home/tony/chorus/docs/DIAGNOSIS-Agent-Discovery-And-P2P-Architecture.md
- /home/tony/chorus/docs/ARCHITECTURE-ANALYSIS-LibP2P-HMMM-Migration.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 09:48:16 +11:00