Resolve import cycles and migrate to chorus.services module path

This comprehensive refactoring addresses critical architectural issues:

IMPORT CYCLE RESOLUTION:
• pkg/crypto ↔ pkg/slurp/roles: Created pkg/security/access_levels.go
• pkg/ucxl → pkg/dht: Created pkg/storage/interfaces.go
• pkg/slurp/leader → pkg/election → pkg/slurp/storage: Moved types to pkg/election/interfaces.go

MODULE PATH MIGRATION:
• Changed from github.com/anthonyrawlins/bzzz to chorus.services/bzzz
• Updated all import statements across 115+ files
• Maintains compatibility while removing personal GitHub account dependency

TYPE SYSTEM IMPROVEMENTS:
• Resolved duplicate type declarations in crypto package
• Added missing type definitions (RoleStatus, TimeRestrictions, KeyStatus, KeyRotationResult)
• Proper interface segregation to prevent future cycles

ARCHITECTURAL BENEFITS:
• Build now progresses past structural issues to normal dependency resolution
• Cleaner separation of concerns between packages
• Eliminates circular dependencies that prevented compilation
• Establishes foundation for scalable codebase growth

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-08-17 10:04:25 +10:00
parent e9252ccddc
commit d96c931a29
115 changed files with 1010 additions and 534 deletions

View File

@@ -7,12 +7,12 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/crypto"
"github.com/anthonyrawlins/bzzz/pkg/election"
"github.com/anthonyrawlins/bzzz/pkg/config"
"github.com/anthonyrawlins/bzzz/pkg/ucxl"
slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/crypto"
"chorus.services/bzzz/pkg/election"
"chorus.services/bzzz/pkg/config"
"chorus.services/bzzz/pkg/ucxl"
slurpContext "chorus.services/bzzz/pkg/slurp/context"
)
// DistributionCoordinator orchestrates distributed context operations across the cluster

View File

@@ -9,12 +9,12 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/crypto"
"github.com/anthonyrawlins/bzzz/pkg/election"
"github.com/anthonyrawlins/bzzz/pkg/ucxl"
"github.com/anthonyrawlins/bzzz/pkg/config"
slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/crypto"
"chorus.services/bzzz/pkg/election"
"chorus.services/bzzz/pkg/ucxl"
"chorus.services/bzzz/pkg/config"
slurpContext "chorus.services/bzzz/pkg/slurp/context"
)
// ContextDistributor handles distributed context operations via DHT

View File

@@ -10,12 +10,12 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/crypto"
"github.com/anthonyrawlins/bzzz/pkg/election"
"github.com/anthonyrawlins/bzzz/pkg/ucxl"
"github.com/anthonyrawlins/bzzz/pkg/config"
slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/crypto"
"chorus.services/bzzz/pkg/election"
"chorus.services/bzzz/pkg/ucxl"
"chorus.services/bzzz/pkg/config"
slurpContext "chorus.services/bzzz/pkg/slurp/context"
)
// DHTContextDistributor implements ContextDistributor using BZZZ DHT infrastructure

View File

@@ -9,9 +9,9 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/config"
"github.com/anthonyrawlins/bzzz/pkg/ucxl"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/config"
"chorus.services/bzzz/pkg/ucxl"
)
// GossipProtocolImpl implements GossipProtocol interface for metadata synchronization

View File

@@ -10,7 +10,7 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/config"
"chorus.services/bzzz/pkg/config"
)
// MonitoringSystem provides comprehensive monitoring for the distributed context system

View File

@@ -9,8 +9,8 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/config"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/config"
"github.com/libp2p/go-libp2p/core/peer"
)

View File

@@ -7,9 +7,9 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/dht"
"github.com/anthonyrawlins/bzzz/pkg/config"
"github.com/anthonyrawlins/bzzz/pkg/ucxl"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/pkg/config"
"chorus.services/bzzz/pkg/ucxl"
"github.com/libp2p/go-libp2p/core/peer"
)

View File

@@ -14,8 +14,8 @@ import (
"sync"
"time"
"github.com/anthonyrawlins/bzzz/pkg/config"
"github.com/anthonyrawlins/bzzz/pkg/crypto"
"chorus.services/bzzz/pkg/config"
"chorus.services/bzzz/pkg/crypto"
)
// SecurityManager handles all security aspects of the distributed system