You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(lint): two pre-existing golangci-lint findings (from_box_vm.go errcheck, schema_splice_test.go staticcheck) #40
category:governanceOrg policy/config/tooling: rulesets, workflows, landing gate, control plane.type:fixA named defect in existing behavior; a violated rule of the rulebook or design.
The configured golangci-lint run ./... (v2.13.2, go1.26.8) on candy/plugin-fleet/
reports two pre-existing findings, both outside any change in flight:
$ GOTOOLCHAIN=go1.26.8 ~/go/bin/golangci-lint run ./...
from_box_vm.go:108:17: Error return value of `out.Close` is not checked (errcheck)
defer out.Close()
^
schema_splice_test.go:48:15: SA1019: (cuelang.org/go/cue.Value).Struct is deprecated: use [Value.Fields]. (staticcheck)
if _, err := def.Struct(); err != nil {
^
2 issues:
* errcheck: 1
* staticcheck: 1
Measured on origin/main (0976edf48bfdb3a795fc607e219e0c25be837c7f) in a clean
checkout, so this is not introduced by the dependency-bump PR that measured it.
RCA
Mechanism.defer out.Close() discards the close error; cue.Value.Struct is
deprecated in the pinned cuelang. Neither path is exercised by a failing test, and
the repo has no CI workflow that runs golangci-lint (.github/workflows/ carries
only tag-on-merge.yml), so nothing surfaces them.
Missed control. This repo's stated build/test gate is go build ./... + go test ./...; lint is not in its workflow. A lint run is therefore an ad-hoc
measurement, and the findings survive because no gate owns them.
Blast radius. Lint-only: the errcheck arm is a legitimate-looking defer Close
that the configured errcheck does not exempt in this file; the staticcheck arm is
an API-deprecation warning. No runtime behavior is changed by either.
Root fix (one cutover, when scheduled). Replace the bare defer out.Close() with
an explicit ignored-close or a checked close, and migrate def.Struct() to def.Fields(); add the configured lint run to a repo CI workflow so the class cannot
silently return.
Why this is filed rather than fixed here
The finding is separable from the dependency-bump change that measured it: that change
is correct and complete without it, and touching unrelated code would widen a pin bump
into a lint cutover. This issue is the RCA home for the fix.
Agent: containerd-crabbox-program/engine Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash:cloud (documentation reviewed)
category:governanceOrg policy/config/tooling: rulesets, workflows, landing gate, control plane.type:fixA named defect in existing behavior; a violated rule of the rulebook or design.
Activity