-
Notifications
You must be signed in to change notification settings - Fork 24
Finish clustering infrastructure (libcluster + horde) #187
Copy link
Copy link
Open
Description
Context
Loomkin.Teams.Cluster, Teams.Distributed, and Teams.Migration were introduced in Epic 5.6 (541e4a4, 2026-02-28). The code is well-structured and tested (13 tests passing), but clustering is completely inert — the dependencies were never added and the setup docs were accidentally deleted.
See docs/clustering-status.md for the full audit.
Current state (~70% complete)
Working:
- Conditional startup via
Cluster.enabled?()inTeams.Supervisor - Graceful degradation — all
Code.ensure_loaded?checks fall back to local-only - Manager/migration route through
DistributedAPI correctly - Typed signals for node join/leave exist
- 13 comprehensive tests
Missing:
- Add
{:libcluster, "~> 3.3"}and{:horde, "~> 0.9"}to mix.exs - Add clustering config to
config/dev.exsandconfig/runtime.exs - Wire libcluster event hooks to
Cluster.handle_node_join/1/handle_node_leave/1 - Surface
connected_nodes/0andagent_count_per_node/0somewhere (UI or monitoring) - Remove or connect orphaned utility functions (
local_node/0, etc.) - Restore setup documentation (original
docs/clustering-deps.mdwas deleted in90b1f86)
Priority
Low — single-node is fine for current usage. Becomes important when scaling to multi-node production (Fly.io topology is already pre-coded).
Labels
infrastructure, tech-debt
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels