Integrate BACKBEAT SDK and resolve KACHING license validation
Major integrations and fixes: - Added BACKBEAT SDK integration for P2P operation timing - Implemented beat-aware status tracking for distributed operations - Added Docker secrets support for secure license management - Resolved KACHING license validation via HTTPS/TLS - Updated docker-compose configuration for clean stack deployment - Disabled rollback policies to prevent deployment failures - Added license credential storage (CHORUS-DEV-MULTI-001) Technical improvements: - BACKBEAT P2P operation tracking with phase management - Enhanced configuration system with file-based secrets - Improved error handling for license validation - Clean separation of KACHING and CHORUS deployment stacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,11 +7,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"chorus.services/bzzz/logging"
|
||||
"chorus.services/bzzz/pkg/config"
|
||||
"chorus.services/bzzz/pubsub"
|
||||
"chorus.services/bzzz/repository"
|
||||
"chorus.services/hmmm/pkg/hmmm"
|
||||
"chorus/internal/logging"
|
||||
"chorus/pkg/config"
|
||||
"chorus/pubsub"
|
||||
"chorus/pkg/repository"
|
||||
"chorus/pkg/hmmm"
|
||||
"github.com/google/uuid"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
)
|
||||
@@ -88,8 +88,8 @@ func NewTaskCoordinator(
|
||||
MaxTasks: cfg.Agent.MaxTasks,
|
||||
Status: "ready",
|
||||
LastSeen: time.Now(),
|
||||
Performance: 0.8, // Default performance score
|
||||
Availability: 1.0,
|
||||
Performance: map[string]interface{}{"score": 0.8}, // Default performance score
|
||||
Availability: "available",
|
||||
}
|
||||
|
||||
return coordinator
|
||||
@@ -148,7 +148,7 @@ func (tc *TaskCoordinator) shouldProcessTask(task *repository.Task) bool {
|
||||
}
|
||||
|
||||
// Check minimum score threshold
|
||||
score := tc.taskMatcher.ScoreTaskForAgent(task, tc.agentInfo.Role, tc.agentInfo.Expertise)
|
||||
score := tc.taskMatcher.ScoreTaskForAgent(task, tc.agentInfo)
|
||||
return score > 0.5 // Only process tasks with good fit
|
||||
}
|
||||
|
||||
@@ -162,15 +162,15 @@ func (tc *TaskCoordinator) processTask(task *repository.Task, provider repositor
|
||||
}
|
||||
|
||||
// Attempt to claim the task
|
||||
claimedTask, err := provider.ClaimTask(task.Number, tc.agentInfo.ID)
|
||||
if err != nil {
|
||||
claimed, err := provider.ClaimTask(task.Number, tc.agentInfo.ID)
|
||||
if err != nil || !claimed {
|
||||
fmt.Printf("⚠️ Failed to claim task %s #%d: %v\n", task.Repository, task.Number, err)
|
||||
return false
|
||||
}
|
||||
|
||||
// Create active task
|
||||
activeTask := &ActiveTask{
|
||||
Task: claimedTask,
|
||||
Task: task,
|
||||
Provider: provider,
|
||||
ProjectID: projectID,
|
||||
ClaimedAt: time.Now(),
|
||||
@@ -208,7 +208,7 @@ func (tc *TaskCoordinator) processTask(task *repository.Task, provider repositor
|
||||
NodeID: tc.nodeID,
|
||||
HopCount: 0,
|
||||
Timestamp: time.Now().UTC(),
|
||||
Message: fmt.Sprintf("Seed: Task '%s' claimed. Description: %s", task.Title, task.Description),
|
||||
Message: fmt.Sprintf("Seed: Task '%s' claimed. Description: %s", task.Title, task.Body),
|
||||
}
|
||||
if err := tc.hmmmRouter.Publish(tc.ctx, seedMsg); err != nil {
|
||||
fmt.Printf("⚠️ Failed to seed HMMM room for task %d: %v\n", task.Number, err)
|
||||
@@ -308,7 +308,12 @@ func (tc *TaskCoordinator) executeTask(activeTask *ActiveTask) {
|
||||
"agent_role": tc.agentInfo.Role,
|
||||
}
|
||||
|
||||
err := activeTask.Provider.CompleteTask(activeTask.Task.Number, tc.agentInfo.ID, results)
|
||||
taskResult := &repository.TaskResult{
|
||||
Success: true,
|
||||
Message: "Task completed successfully",
|
||||
Metadata: results,
|
||||
}
|
||||
err := activeTask.Provider.CompleteTask(activeTask.Task, taskResult)
|
||||
if err != nil {
|
||||
fmt.Printf("❌ Failed to complete task %s #%d: %v\n", activeTask.Task.Repository, activeTask.Task.Number, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user