Files
docker-agent/pkg/upstream
David Gageot c849b7f350 lint: enable noctx and deduplicate touched code
Adds noctx to the enabled golangci-lint set and threads context through the HTTP, SQL, exec and net APIs it flags.

- Tests use t.Context() with the *Context / WithContext variants.

- Production code passes ctx where it is already in scope, uses context.Background() for genuine background work (DB schema migrations, sqlite Ping at startup, fire-and-forget audio playback) and adds //nolint:noctx for the few intentionally non-context-bound calls (tea.ExecProcess-driven interactive shells/editors and the explicit kill+WaitDelay flow in the shell tool).

While here, factor out the patterns that ended up duplicated:

- pkg/sqliteutil.CheckpointAndClose, used by the three RAG strategy databases.

- pkg/skills.httpGet, used by both cache.go and remote.go.

- pkg/sound.runDetached, used by all platform-specific play funcs.

- pkg/tools/mcp listenTCPRetry test helper, used in three places.

- pkg/tui handlers split into newInteractiveShellCmd + a single execCmd wrapper carrying the only //nolint:noctx (was four).

No behavior change.

Assisted-By: docker-agent
2026-04-25 19:59:47 +02:00
..