Summary
pkg/rag/manager.go:219-225 (Initialize) and :352-360 (Query) receive from resultsChan without selecting on ctx.Done(); a strategy that hangs (ignoring ctx) blocks the caller forever. Buffered channels already prevent goroutine leaks; only the caller hang remains.
Fix
select on ctx.Done() in both collect loops.
Acceptance
- A hanging strategy no longer blocks the caller past ctx cancellation; test.
Summary
pkg/rag/manager.go:219-225(Initialize) and:352-360(Query) receive fromresultsChanwithout selecting onctx.Done(); a strategy that hangs (ignoring ctx) blocks the caller forever. Buffered channels already prevent goroutine leaks; only the caller hang remains.Fix
selectonctx.Done()in both collect loops.Acceptance