Skip to content

fix: make green on darwin (dead broker stub + fmt worktree scope)#65

Merged
ysyneu merged 2 commits into
mainfrom
fix/darwin-make-lint-and-fmt-scope
Jun 11, 2026
Merged

fix: make green on darwin (dead broker stub + fmt worktree scope)#65
ysyneu merged 2 commits into
mainfrom
fix/darwin-make-lint-and-fmt-scope

Conversation

@ysyneu

@ysyneu ysyneu commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

make failed locally on darwin/macOS in two ways (both invisible to CI):

  1. golangci-lint unusedenvironment/broker_other.go (//go:build !linux) carried a serveBrokerControl stub that nothing on the non-Linux path calls (the stub setupBrokerForCmd returns the error directly). CI lints on Linux, where the build tag excludes this file, so it only fails on darwin.
  2. make fmt reformatting other branchesgofumpt -l -w . / gci write … . walk the raw filesystem and descend into git worktrees under .claude/worktrees/, silently rewriting other branches' files on every run.

Fix

  1. Delete the dead non-Linux serveBrokerControl stub (it's a Linux-internal helper, not part of the cross-platform contract — setupBrokerForCmd + the BrokerSupported const are).
  2. Add a GO_SRC list that prunes .claude/ and feed it to gofumpt/gci. go mod tidy and golangci-lint run ./... are module-aware and already skip the nested worktrees.

Verification

make (fmt → lint → test → build) green end-to-end locally; go build ./..., go vet ./environment/..., and go test ./environment/... all pass. No runtime code changed.

ysyneu added 2 commits June 11, 2026 11:33
The !linux build's setupBrokerForCmd returns errBrokerUnsupportedPlatform
directly and never calls serveBrokerControl, so the stub is dead code that
only compiles on non-Linux. golangci-lint flags it 'unused' on darwin/local
while CI stays green (CI lints on Linux, where the build tag excludes this
file). serveBrokerControl is a Linux-internal helper, not part of the
cross-platform contract, so the stub never needed it.
make fmt ran 'gofumpt -l -w .' / 'gci write ... .', which walk the raw
filesystem and descend into git worktrees under .claude/worktrees/,
silently reformatting other branches' files on every run. Feed both
formatters a GO_SRC list that prunes .claude/. go mod tidy and
golangci-lint are module-aware and already skip those nested modules.
@ysyneu ysyneu merged commit 3bf7591 into main Jun 11, 2026
8 checks passed
@ysyneu ysyneu deleted the fix/darwin-make-lint-and-fmt-scope branch June 11, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant