mpfaffenberger / mpfaffenberger/code_puppy

Dead code: tools/ and mcp_/ orphans (duplicate get_file_icon, untested start_servers_with_blocking)

Open
#534 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
814
Forks
278
Avg merge
2d 5h
Merged PRs (30d)
76

Description

Summary

Candidate Location Type Confidence
get_file_icon code_puppy/tools/file_operations.py:371 function HIGH (duplicate)
format_terminal_banner code_puppy/tools/browser/__init__.py:16 function (in __all__) MEDIUM
get_verified code_puppy/mcp_/server_registry_catalog.py:1120 method MEDIUM
start_servers_with_blocking code_puppy/mcp_/blocking_startup.py:430 async function MEDIUM
retry_example.py code_puppy/mcp_/examples/ whole file LOW (example/doc)

Evidence chain

  • get_file_icon: zero references. It duplicates RichRenderer._get_file_icon (messaging/rich_renderer.py:1264), which IS used and tested. Redundant copy.
  • format_terminal_banner: only its own def + __all__ entry. Git: survived 26d831cd "refactor: remove browser terminal subsystem and REST API" — classic refactor orphan.
  • get_verified: zero call sites. Notably tests/mcp/test_server_registry_catalog.py::test_get_verified_servers does NOT call it — it re-filters MCP_SERVER_REGISTRY manually.
  • start_servers_with_blocking: no production callers (managed_server.py imports only BlockingMCPServerStdio). tests/mcp/test_blocking_startup_coverage.py::TestStartServersWithBlocking never actually invokes the function — the tests exercise StartupMonitor instead (confirmed by runtime trace: the function never executed across 11,691 tests). Either delete the function + rename the misleading test class, or write real tests.
  • Runtime trace: none of these executed in the full suite.

Caveats

  • format_terminal_banner is in __all__ (public API surface) — check downstream consumers.
  • retry_example.py may be intentional documentation; consider moving to docs/ instead of deleting.
  • start_servers_with_blocking is the kind of orchestration entry point that could be intended for a future/external caller — confirm with the author before removal.

Verification

pytest tests/ -q --no-cov
rg 'get_file_icon|format_terminal_banner|get_verified|start_servers_with_blocking'

Filed by dead-code-detective-9a7d4c. Findings are read-only analysis; deletion requires human review.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed definitions and references in code_puppy/tools/file_operations.py, code_puppy/tools/browser/init.py, code_puppy/mcp_/server_registry_catalog.py, and code_puppy/mcp_/blocking_startup.py; run the provided rg command and inspect the related tests. Confirm public or future callers before choosing removal, relocation, or real coverage, then run pytest tests/ -q --no-cov with no orphan candidates remaining.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.