From 5aa6a15ffdf68a8dbe12eb0fdfff93deafb9da10 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 3 Apr 2026 08:39:32 +0000 Subject: fix: remove drain-lock circuit breaker that halted all executions after 3 consecutive failures Co-Authored-By: Claude Sonnet 4.6 --- internal/api/executions.go | 8 -------- internal/api/server.go | 1 - 2 files changed, 9 deletions(-) (limited to 'internal/api') diff --git a/internal/api/executions.go b/internal/api/executions.go index d39de9f..4d8ba9c 100644 --- a/internal/api/executions.go +++ b/internal/api/executions.go @@ -128,14 +128,6 @@ func (s *Server) handleGetAgentStatus(w http.ResponseWriter, r *http.Request) { }) } -// handleUndrainAgent resets the drain state and failure counter for the given agent type. -// POST /api/pool/agents/{agent}/undrain -func (s *Server) handleUndrainAgent(w http.ResponseWriter, r *http.Request) { - agent := r.PathValue("agent") - s.pool.UndrainingAgent(agent) - w.WriteHeader(http.StatusOK) -} - // tailLogFile reads the last n lines from the file at path. func tailLogFile(path string, n int) (string, error) { data, err := os.ReadFile(path) diff --git a/internal/api/server.go b/internal/api/server.go index be944a3..aec1439 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -127,7 +127,6 @@ func (s *Server) routes() { s.mux.HandleFunc("GET /api/executions", s.handleListRecentExecutions) s.mux.HandleFunc("GET /api/stats", s.handleGetDashboardStats) s.mux.HandleFunc("GET /api/agents/status", s.handleGetAgentStatus) - s.mux.HandleFunc("POST /api/pool/agents/{agent}/undrain", s.handleUndrainAgent) s.mux.HandleFunc("GET /api/executions/{id}", s.handleGetExecution) s.mux.HandleFunc("GET /api/executions/{id}/log", s.handleGetExecutionLog) s.mux.HandleFunc("GET /api/tasks/{id}/logs/stream", s.handleStreamTaskLogs) -- cgit v1.2.3