Skip to content

chore(deadcode): remove 3 unreachable funcs in internal/agent (r80) - #4348

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

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

Conversation

@topcheer

Copy link
Copy Markdown
Owner

r80 dead-code scan (state-branched: no new merges in pool -> fresh-diff-first, then agentruntime domain)

New wave (r80 fresh vs r79-after: +3 hits, all internal/agent, all double-mode unreachable via deadcode + deadcode -test, zero repo refs by grep):

Symbol File Note
simStripAllLineNumberPrefixes agent_tool.go:1642 sibling sim* helpers keep 3 other callers - no orphan cascade
Agent.cascadeTurnProvider model_cascade.go:156 comment claimed "exposed for tests" but no test refs; provider import dropped with it
isEmptyToolResult tool_fallback_hints.go:149 superseded by isZeroMatchSuccess (#3673); comment mentions kept (issue-history records)

agentruntime domain (50 hits, first single-listed): ALL reachable in -test mode (test-kept) -> deferred per methodology, zero files touched.

Verification:

  • go build -tags goolm ./... OK
  • go vet -tags goolm ./internal/agent/ OK
  • go test -tags goolm ./internal/agent/ OK (38s)
  • post-scan = 1004 lines, diff vs r79-after baseline IDENTICAL (exact 3-symbol removal, zero new orphans)
  • pure deletion: 3 files, -28 lines, no logic changed

Pool status checked: #4317/#4321/#4325/#4327/#4329/#4331/#4333/#4337/#4343 all OPEN, none touch agentruntime files.

New-wave symbols surfaced by r80 fresh scan vs r79 baseline (all
double-mode unreachable: deadcode + deadcode -test, zero repo refs):

- agent_tool.go: simStripAllLineNumberPrefixes (11 lines; sibling sim*
  helpers keep 3 other callers - no orphan cascade)
- model_cascade.go: Agent.cascadeTurnProvider (comment claimed "exposed
  for tests" but no test references it; provider import dropped with it)
- tool_fallback_hints.go: isEmptyToolResult (superseded by
  isZeroMatchSuccess per #3673; only comment mentions remain, kept)

agentruntime domain (50 hits, first single-listed scan): ALL reachable
in -test mode (test-kept) - deferred per methodology, none touched.

Verified: go build -tags goolm ./... OK; go vet ./internal/agent/ OK;
go test ./internal/agent/ OK (38s); post-scan = 1004 lines, diff vs
r79-after baseline IDENTICAL, zero new orphans.

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

Copy link
Copy Markdown
Owner Author

Duplicate of #4343 (deadcode r79, same 3 symbols: cascadeTurnProvider/isEmptyToolResult/simStripAllLineNumberPrefixes, identical file set). Root cause: r80 scan misread the r79-after baseline (post-cleanup worktree state, 1004) vs fresh main scan (1007) — the +3 delta was r79's own unmerged deletions, not a new wave. Keeping first PR #4343; closing this one. agentruntime domain result (50 hits all test-alive, correctly pooled) unaffected.

@topcheer topcheer closed this Oct 21, 2026
@topcheer
topcheer deleted the chore/deadcode-r80 branch October 21, 2026 19:38
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