-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Problem
`agents/agent_orchestration/topology.py` (PR #2149) has no mechanism to limit topology growth:
- No `last_updated` timestamp on `AgentConnection` (design doc schema includes it)
- No pruning of stale/low-weight connections
- No max connection count or LRU eviction
- Growth is O(A² × T) where A = distinct agent IDs, T = task types
With free-form string agent IDs (not enum-constrained), connection count is unbounded. Compare with `mesh_pruner.py` which actively deletes edges below `min_weight`.
Discovered During
Code review of PR #2149 (AgentTopology)
Recommended Fix
- Add `last_updated: Optional[datetime]` to `AgentConnection`
- Add `prune_stale_connections(max_age_days, min_weight)` method
- Document the bounded assumption (agent IDs map to ~13 AgentType values)
Impact
Severity: medium — bounded in current usage, unbounded if agent IDs become dynamic
Reactions are currently unavailable