From 60a443a2f99a5e67cca2fb4300032e79570ea492 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 15 Oct 2026 10:02:26 +0000 Subject: [PATCH] fix(plugins): pass lookup context instead of storing it in lyricsCall Satisfies the containedctx linter: the call keeps only its cancel func and hands the timeout context straight to run(). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_016L1sBqsygMkdhf583gTEnE --- plugins/lyrics_adapter.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/lyrics_adapter.go b/plugins/lyrics_adapter.go index 76a0fb885..2a641d05a 100644 --- a/plugins/lyrics_adapter.go +++ b/plugins/lyrics_adapter.go @@ -37,7 +37,6 @@ type lyricsCallGroup struct { type lyricsCall struct { group *lyricsCallGroup key string - ctx context.Context cancel context.CancelFunc done chan struct{} lyrics model.LyricList @@ -62,7 +61,6 @@ func (g *lyricsCallGroup) join( call := &lyricsCall{ group: g, key: key, - ctx: ctx, cancel: cancel, done: make(chan struct{}), waiters: 1, @@ -73,12 +71,12 @@ func (g *lyricsCallGroup) join( g.calls[key] = call g.mu.Unlock() - go call.run(lookup) + go call.run(ctx, lookup) return call } -func (c *lyricsCall) run(lookup func(context.Context) (model.LyricList, error)) { - lyrics, err := lookup(c.ctx) +func (c *lyricsCall) run(ctx context.Context, lookup func(context.Context) (model.LyricList, error)) { + lyrics, err := lookup(ctx) c.group.mu.Lock() c.lyrics = lyrics