From 6bf271e4b180657caea91cbf8a02a5fff0bc103e Mon Sep 17 00:00:00 2001 From: "Claude (M3 Studio)" Date: Tue, 10 Feb 2026 11:12:46 +0000 Subject: [PATCH] fix(bugseti): acquire mutex in NewQueueService before load() q.load() accesses shared state (issues, seen, current) without holding the mutex, creating a race condition. Wrap the call with q.mu.Lock(). Fixes #52 Co-Authored-By: Claude Opus 4.6 --- internal/bugseti/queue.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/bugseti/queue.go b/internal/bugseti/queue.go index 2bc07cc..b89b6ff 100644 --- a/internal/bugseti/queue.go +++ b/internal/bugseti/queue.go @@ -103,7 +103,9 @@ func NewQueueService(config *ConfigService) *QueueService { seen: make(map[string]bool), } heap.Init(&q.issues) + q.mu.Lock() q.load() // Load persisted queue + q.mu.Unlock() return q }