From 3af5ce687c10c98fd61ea84b402741060d61a1eb 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 2bc07cc8..b89b6fff 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 }