fix(lint): clear the staticcheck findings

Drop the RealIP middleware: the worker listens on 127.0.0.1 only, and RealIP is deprecated because a client can set its own address. Log the restart error directly, since Restart only returns on failure. Remove an unused slice in a test and pass a real context instead of nil. staticcheck now reports nothing.
This commit is contained in:
2026-10-03 05:00:27 +01:00
parent daa9959961
commit 9d7959f98f
4 changed files with 8 additions and 12 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package sdk
import (
"context"
"testing"
"github.com/lukaszraczylo/claude-mnemonic/internal/vector/sqlitevec"
@@ -121,7 +122,7 @@ func TestCheckVectorDeduplication_NilClient(t *testing.T) {
Narrative: "Some narrative text",
}
result := p.checkVectorDeduplication(nil, obs, "test-project")
result := p.checkVectorDeduplication(context.Background(), obs, "test-project")
if result.Action != "insert" {
t.Errorf("expected Action='insert' when vectorClient is nil, got %q", result.Action)
}
@@ -136,7 +137,7 @@ func TestCheckVectorDeduplication_EmptySearchText(t *testing.T) {
// All empty fields
}
result := p.checkVectorDeduplication(nil, obs, "test-project")
result := p.checkVectorDeduplication(context.Background(), obs, "test-project")
if result.Action != "insert" {
t.Errorf("expected Action='insert' for empty observation, got %q", result.Action)
}