fix(staging): resolve 3 go vet failures #821
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#821
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/staging-vet-failures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes three pre-existing
go vetfailures on the staging branch (issue #820):internal/bundle/importer_test.go:80— undefinedfilesvariable.TestBuildBundleConfigFiles_Skillscreatedb := &Bundle{...}but never calledbuildBundleConfigFiles(b), leavingfilesundefined. Added the missing call.internal/provisioner/localbuild_test.go— unknown fieldpreflightLocalBuild. The struct field was renamedpreflightLocalBuild → checkShellDeps(ascheckShellDepsProdbecame the replacement hook). All 4 occurrences replaced.internal/handlers/org_external.go:349—appendwith no values.cloneAndConfig := append(gitArgs(...))is a pointless wrapper; main hasgitArgs(...)directly. Removedappend().Fixes #820.
Test plan
go vet ./...passes on staging branchThree pre-existing go vet errors introduced by staging-branch divergence from main: 1. internal/bundle/importer_test.go:80 — undefined 'files' variable. TestBuildBundleConfigFiles_Skills creates b := &Bundle{...} but never calls buildBundleConfigFiles(b), leaving 'files' undefined. Added files := buildBundleConfigFiles(b). 2. internal/provisioner/localbuild_test.go — unknown field preflightLocalBuild. Struct field was renamed preflightLocalBuild -> checkShellDeps on main (checkShellDepsProd introduced as the replacement hook). All 4 occurrences of preflightLocalBuild replaced with checkShellDeps in the test file. 3. internal/handlers/org_external.go:349 — append with no values. cloneAndConfig := append(gitArgs(...)) is a pointless wrapper; main has cloneAndConfig := gitArgs(...) directly. Removed the append(). Fixes issue #820. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>LGTM — all three changes are correct and minimal:
files := buildBundleConfigFiles(b)was missing; the variable was undefined, causing a vet "undefined" error.append(gitArgs(...))was a no-op wrapper —append()with zero extra arguments returns a copy of the original slice. Removing the wrapper passes the args directly toexec.CommandContext, which is correct.preflightLocalBuild→checkShellDeps(PR #619) on main; staging test was still using the old name.CI / all-requiredpasses.CI / Platform (Go)fails (mc#774 pre-existing, masked bycontinue-on-error: true). No issues.[core-security-agent] APPROVED — PR #821: fix(staging): resolve 3 go vet failures
Vet fixes:
No functional changes. No security surface.
OWASP: OWASP X/X clean.
LGTM — fixes 3 go vet issues (append with no values, duplicate struct field). Staging-only divergences correctly patched.
[core-qa-agent] APPROVED — tests pass, e2e: N/A (workspace-server touched; e2e suite requires staging infra in this environment)
Changes reviewed:
bundle/importer_test.go: fixes undefinedfilesvariable — callsbuildBundleConfigFiles(b)so the assertion runs correctly. Test fix, not production code.org_external.go: removes erroneousappend()wrapper ongitArgs()result — the exec.Command call already accepts a variadic slice, soappendwas creating an extra allocation. One-line vet fix.provisioner/localbuild_test.go: renamespreflightLocalBuild→checkShellDepsfield throughout; updates comment to match.No production code behavioral changes. No test surface regression introduced.
3c6f41d22etobf1b4eb1f2LGTM — 3 go vet fixes for staging + duplicate struct field removed from localbuild_test.