From 63db9e87334ae742783df81f57742a8424d2e1b4 Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 26 Mar 2026 11:30:38 +0000 Subject: [PATCH] fix(runner): use c.Config().Get() instead of ConfigGet generic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ConfigGet type assertion fails across package boundaries — agentic stores map[string]agentic.ConcurrencyLimit but runner tries to retrieve map[string]runner.ConcurrencyLimit. Use Core's c.Config().Get() → Result → type assert instead. This is why concurrency limits were never enforced. Co-Authored-By: Virgil --- pkg/agentic/queue.go | 6 ++++-- pkg/runner/queue.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/agentic/queue.go b/pkg/agentic/queue.go index 8ea8c55..209ee65 100644 --- a/pkg/agentic/queue.go +++ b/pkg/agentic/queue.go @@ -251,10 +251,12 @@ func baseAgent(agent string) string { // // codex: {total: 2, models: {gpt-5.4: 1}} → max 2 codex total, max 1 gpt-5.4 func (s *PrepSubsystem) canDispatchAgent(agent string) bool { - // Read concurrency from shared config (loaded once at startup) var concurrency map[string]ConcurrencyLimit if s.ServiceRuntime != nil { - concurrency = core.ConfigGet[map[string]ConcurrencyLimit](s.Core().Config(), "agents.concurrency") + r := s.Core().Config().Get("agents.concurrency") + if r.OK { + concurrency, _ = r.Value.(map[string]ConcurrencyLimit) + } } if concurrency == nil { cfg := s.loadAgentsConfig() diff --git a/pkg/runner/queue.go b/pkg/runner/queue.go index 363ba29..e0f3775 100644 --- a/pkg/runner/queue.go +++ b/pkg/runner/queue.go @@ -107,8 +107,10 @@ func (s *Service) loadAgentsConfig() *AgentsConfig { func (s *Service) canDispatchAgent(agent string) bool { var concurrency map[string]ConcurrencyLimit if s.ServiceRuntime != nil { - concurrency = core.ConfigGet[map[string]ConcurrencyLimit]( - s.Core().Config(), "agents.concurrency") + r := s.Core().Config().Get("agents.concurrency") + if r.OK { + concurrency, _ = r.Value.(map[string]ConcurrencyLimit) + } } if concurrency == nil { cfg := s.loadAgentsConfig()