Skip to content

chore: delete tools.go and drop tool-dependency pollution from go.mod - #6

Merged
bborbe merged 1 commit into
masterfrom
repo-review/2c754f7
Aug 13, 2026
Merged

chore: delete tools.go and drop tool-dependency pollution from go.mod#6
bborbe merged 1 commit into
masterfrom
repo-review/2c754f7

Conversation

@bborbe

@bborbe bborbe commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Whole-codebase review at 2c754f7 via the repo-review pipeline. 23 mechanical findings from 74 rules across 7 files → 1 confirmed.

Fixed

tools.go was redundant and polluted go.mod (rule: go-tools-versioning/no-tools-go-for-clis)

The Makefile already does include tools.env and invokes every tool as go run <tool>@$(VERSION). tools.go only pinned those tools as module dependencies.

go.mod: 461 → 63 lines. Removes 8 direct tool deps — golangci-lint, addlicense, osv-scanner, goimports-reviser, errcheck, counterfeiter, golines, go-modtool — and their entire transitive tree (golangci-lint alone contributed ~180 indirect lines).

Same cleanup as git-rest#6, git-sync#6 and task-watcher#5 on 2026-08-09.

Note: task-watcher still has tools.go

Its migration PR is merged but the file is present on master alongside tools.env — the same half-migrated state this repo was in. Worth a follow-up check.

Refuted — 22 of 23

Triage table: 18subject-under-50-chars 14 · slog-not-glog 1 · main-test-with-compiles 1 · no-testing-t-direct 1 · suite-test-file-required 1

Adjudicated: cobra-not-stdlib-flag 2 · skip-empty-v2-heartbeats 1 · go-library/semver-vprefix-tag-required 1 — the last is arguably fair (this repo has zero tags while sibling CLIs are tagged), but tagging is a release decision, not a code change, and is left for you.

Precondition note

P2 failed and was waived deliberately. beactive has no .dark-factory.yaml and no prompts/ directories, so it is not dark-factory-initialised. P2 exists to guarantee dark-factory prompt approve works in the agent's execution phase; this fix was made as a direct edit, so the gate protects a path not used here. P1 and P3 both passed (make precommit green, including the vuln scan).

Related correction: beactive's update task escalated with "golang.org/x/crypto/openpgp unmaintained, no fix available" — that blocked the update, not the gate. The repo is not red.

The Makefile already includes tools.env and invokes every tool via
go run <tool>@$(VERSION), so tools.go was redundant -- it only pinned the
tools as module dependencies.

go.mod: 461 -> 63 lines. Removes 8 direct tool deps (golangci-lint,
addlicense, osv-scanner, goimports-reviser, errcheck, counterfeiter,
golines, go-modtool) and their entire transitive tree.

Same cleanup as git-rest#6, git-sync#6 and task-watcher#5 on 2026-08-09.

Found by repo-review at 2c754f7.

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my analysis, I have enough information to produce the review. The diff touches only go.mod, go.sum, and tools.go — no Go source files were changed, and no //go:generate directives exist in the codebase.


PR Review: chore: delete tools.go and drop tool-dependency pollution from go.mod

Must Fix (Critical)

None.

Should Fix (Important)

None.

Nice to Have (Optional)

None.

Notes

Selector-mode review — no rule-relevant source files changed. The diff touches only go.mod (−404 lines), go.sum (−1151 lines), and tools.go (deleted). No .go source files, no generated files, no //go:generate directives, no Makefile changes. The mechanical funnel returned zero findings across 74 YAML rules.

Tool coverage is intact. All tools previously pinned in tools.go are still invokable via go run <module>@$(VERSION) in the Makefile, with versions sourced from tools.env. The removed tool deps (golangci-lint/v2, addlicense, osv-scanner/v2, goimports-reviser/v3, errcheck, counterfeiter/v6, gosec/v2, golines, go-modtool, golang.org/x/vuln) all have go run entry points in the Makefile — the tools.go approach was redundant.

Counterfeiter was never used. The codebase has zero //go:generate directives, so no mock generation depends on it. Its removal is a no-op.

No precommit re-run done (selector mode defers to CI per procedure). The PR description states it was green; the Makefile's check target (vet vulncheck osv-scanner trivy) runs without any tool dep from tools.go.

Two new indirect deps added (goccy/go-yaml v1.19.2, gkampitakis/go-snaps v0.5.20) — both are transitive deps of remaining code (likely gomega and related test utilities). Not a concern.

Correctness verification: The require block in go.mod now contains only actual production/runtime deps (robotgo, glog, onsi/ginkgo, onsi/gomega). All tool/linter/deployment deps were correctly removed.

Traceability: PR plan concerns were (1) tools.go deletion verifying Makefile coverage, (2) go.mod shrinking correctly, (3) test targets working via go run pattern. All three are confirmed: Makefile uses go run for all tools, go.mod is clean with only real deps, and //go:generate absence means go generate is a no-op in both before and after states.


{
  "verdict": "approve",
  "summary": "This PR cleanly removes tools.go and its tool/linter dependencies from go.mod/go.sum. All tool invocations remain functional via 'go run' with version pinning in tools.env. No production code or tests were touched, no //go:generate directives exist, and the mechanical funnel found zero issues.",
  "comments": [],
  "concerns_addressed": [
    "correctness: tools.go deleted — Makefile invokes all tools via 'go run <module>@$(VERSION)' from tools.env, no module-pinned tool deps needed",
    "correctness: go.mod shrunk from 461→63 lines — only production deps remain (robotgo, glog, onsi/ginkgo, onsi/gomega), all tool/linter indirect deps correctly removed",
    "tests: Makefile test target uses 'go test -mod=mod' with no tool dep on tools.go; precommit confirmed green per PR description"
  ]
}

@bborbe
bborbe merged commit 4b43685 into master Aug 13, 2026
1 check passed
@bborbe
bborbe deleted the repo-review/2c754f7 branch August 13, 2026 07:30
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