fix: make green on darwin (dead broker stub + fmt worktree scope)#65
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
makefailed locally on darwin/macOS in two ways (both invisible to CI):golangci-lintunused—environment/broker_other.go(//go:build !linux) carried aserveBrokerControlstub that nothing on the non-Linux path calls (the stubsetupBrokerForCmdreturns the error directly). CI lints on Linux, where the build tag excludes this file, so it only fails on darwin.make fmtreformatting other branches —gofumpt -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
serveBrokerControlstub (it's a Linux-internal helper, not part of the cross-platform contract —setupBrokerForCmd+ theBrokerSupportedconst are).GO_SRClist that prunes.claude/and feed it to gofumpt/gci.go mod tidyandgolangci-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/..., andgo test ./environment/...all pass. No runtime code changed.