harivansh-afk opened issue getcompanion-ai/computer-host#4

harivansh-afk
Thu, 09 Apr 2026 04:29:01 +0000

4#is not staticcheck/golangci-lint clean#

The repo currently passes go vet and go test -race, but it is not clean under the stricter static analysis pass we should expect for a public host daemon.

What I hit locally:

staticcheck ./... reports unused symbols:

hostVSockPath in internal/firecracker/launch.go:234

snapshotPaths and buildSnapshotPaths in internal/firecracker/paths.go:71-77

golangci-lint run ./... reports a larger errcheck and ineffassign set, including unchecked closes and removals plus an ineffectual assignment in waitForSocket.

Representative findings:

unchecked file, dir, and socket closes in main.go:63, internal/daemon/files.go, internal/daemon/snapshot.go, and internal/store/file_store.go

unchecked cleanup calls in internal/daemon/files.go:270, internal/daemon/files.go:309

ineffectual assignment in internal/firecracker/launch.go:164

Expected behavior:

The public host daemon repo should be clean under staticcheck and golangci-lint, with analyzer runs enforced in CI.

Suggested follow-up:

Remove dead code, fix the errcheck violations, and wire analyzer execution into the normal validation path for this repo.