Skip to content

chore: remove confirmed dead code (deadcode r84: tool/a2a x5) - #4351

Open
topcheer wants to merge 1 commit into
mainfrom
chore/deadcode-r84
Open

topcheer wants to merge 1 commit into
mainfrom
chore/deadcode-r84

Conversation

@topcheer

Copy link
Copy Markdown
Owner

deadcode r84 - 5 symbols + dedicated-only tests (-213 lines)

Baseline: fresh worktree @ origin/main (d8050d4, #4347+#4350 both in), deadcode -tags goolm ./... + repo-wide grep dual-verify.

Removed (100% confirmed: zero prod refs, tests existed only to test the dead symbol itself)

  • internal/a2a: isToolAllowed + TestIsToolAllowed - nil-allow-all helper, zero prod refs
  • internal/tool: SetPrecommitGateEnabled + test - config setter never wired; precommitGateEnabled var stays live
  • internal/tool: SetPostEditDiagEnabled + test - same class; var stays live
  • internal/tool: LoadProtectedPatternsFromFile + test - .ggcode/protect loader never wired; orphaned os import pruned
  • internal/tool: readFileRange + read_file_range_test.go (6 tests all dedicated to it) - thin wrapper over live readFileRangeWithOptions

Kept - classification ledger (r83 ledger continuation)

Verification

…t-block map)

Five confirmed-dead symbols removed with their dedicated-only tests
(deadcode -tags goolm fresh-main scan + repo-wide grep dual-verify):

- internal/a2a: isToolAllowed (+ TestIsToolAllowed) — zero prod refs,
  only its own unit test
- internal/tool: SetPrecommitGateEnabled (+ test), SetPostEditDiagEnabled
  (+ test) — config setters never wired, vars stay live
- internal/tool: LoadProtectedPatternsFromFile (+ test) — .ggcode/protect
  loader never wired; "os" import pruned with it
- internal/tool: readFileRange (+ read_file_range_test.go, 6 tests all
  dedicated to it) — thin wrapper over live readFileRangeWithOptions

Kept (classification ledger): resetPeerBreakers/stateSnapshot (test-only
helpers, 8 tests), NewMemoryBindingStore (4 tui panel tests), decodeSSE
(zz565 regression), VerifyAgentCardSignature (tests live pipeline via
wrapper), agent 7-check family (revival precedent), agentruntime desktop/
interaction/session family (wailskit dead-block dependency, frozen),
sdk/plugin + a2a exported options (SDK API face), shell_sandbox/atspi/ydo
(Linux build-tag false-positive family).

Verified: go build -tags goolm ./... ; go vet ; go test internal/a2a
internal/tool all pass.

Co-Authored-By: ggcode <noreply@ggcode.dev>

This branch has not been deployed

No deployments
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