Skip to content

cleanup: remove dead code - #14

Merged
enekos merged 1 commit into
masterfrom
cleanup
Jun 15, 2026
Merged

enekos merged 1 commit into
masterfrom
cleanup

Conversation

@enekos

@enekos enekos commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Removes genuinely-unreachable code from the mairu Go module. Every removal was confirmed dead by two tools (deadcode -test and staticcheck); interface-method false positives were deliberately left in place.

Removed

File What
internal/cmd/errors.go whole file — unused CLIError type (Error/Unwrap/NewCLIError), never adopted
internal/cmd/review_council_cmd.go whole file — orphaned review-council cobra command, never wired into the tree; the council still runs via minion_cmd.go, so this was a redundant second entry point
internal/cmd/config.go GetAPIKey, ProviderTypeFromString, LoadConfigForDirectory (superseded by GetLLMProviderConfig) + now-unused import
internal/acpbridge/bridge.go unused Bridge.Shutdown
internal/tui/chrome.go unused sineLite helper
internal/tui/styles.go unused userStyle / agentStyle / systemStyle / footerStyle

Net: 2 files deleted, ~105 lines removed. staticcheck U1000 5→0.

Deliberately NOT removed (flagged for your call)

  • TUI list-item methods (graphListItem/memoryListItem/skillListItem/listItem .Title/.Description/.FilterValue) — deadcode false positives; they satisfy the bubbletea list.Item interface.
  • trace.WithParent — only writer of a context key still read by ParentFromContext; an incomplete feature, not garbage.
  • approved.With{DiffContext,IgnoreFields,FuzzyFields} — unused, but a coherent option-API on a working test helper.
  • Skip_TestContextCommandsEndToEnd (207-line disabled e2e test) — Skip_ prefix reads as intentionally parked.

go build/go vet/gofmt clean. (acpbridge/TestSessionEchoRoundTrip is a pre-existing flaky timing test, unrelated.)

Verified unreachable via `deadcode -test` and `staticcheck`:
- cmd/errors.go: unused CLIError type (Error/Unwrap/NewCLIError)
- cmd/review_council_cmd.go: orphaned 'review-council' command, never
  wired into the tree; functionality still reachable via minion
- cmd/config.go: GetAPIKey, ProviderTypeFromString, LoadConfigForDirectory
  (superseded by GetLLMProviderConfig)
- tui: unused sineLite helper + userStyle/agentStyle/systemStyle/footerStyle
@enekos
enekos merged commit f41dba5 into master Jun 15, 2026
1 check failed
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