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 <noreply@anthropic.com>
This commit is contained in:
Claude (M3 Studio) 2026-02-10 11:12:46 +00:00 committed by Snider
parent 79b88c79fe
commit 6bf271e4b1

View file

@ -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
}