mpfaffenberger / mpfaffenberger/code_puppy

Dead code: superseded/unused helpers in subagent_panel and token_ratio_learner plugins

Open
#535 0 comments 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
finish code_puppy/plugins/subagent_panel/state.py:71 function HIGH (superseded)
fmt_elapsed code_puppy/plugins/subagent_panel/state.py:202 function HIGH (superseded)
uninstall code_puppy/plugins/subagent_panel/coalesce_patch.py:213 function (in __all__) MEDIUM
get_ratio_for_model code_puppy/plugins/token_ratio_learner/ratios.py:201 function MEDIUM
list_known_ratios code_puppy/plugins/token_ratio_learner/ratios.py:210 function MEDIUM
set_ratios_path code_puppy/plugins/token_ratio_learner/ratios.py:222 function MEDIUM

Evidence chain

  • state.finish: superseded by mark_done — whose docstring explicitly explains why popping immediately (what finish does) was replaced ("avoids the vanish-then-reappear gap"). Zero callers.
  • state.fmt_elapsed: superseded by fmt_elapsed_entry (used at panel_render.py:185). Zero callers of the old variant.
  • coalesce_patch.uninstall: install is invoked from register_callbacks.py:451; uninstall is never called (in __all__ only). Monkey-patch is never reverted — either wire into shutdown or delete.
  • token_ratio_learner trio: register_callbacks.py imports only count_tokens and _record_token_ratio. set_ratios_path docstring says "mostly for testing" but no test imports it. Zero references repo-wide.
  • Runtime trace: none executed across the full suite (11,691 tests).
  • Git: fmt_elapsed/finish date to the panel plugin's introduction (0e0cef94) and the bottom-bar rewrite (ab0bcf50); superseding functions were added alongside without removing the originals.

Caveats

  • Plugins are the extension surface of this codebase; user/project plugins living outside this repo could import these names. Low likelihood for these specific helpers, but grep your plugin ecosystem first.

Verification

pytest tests/plugins/ tests/ -q --no-cov
rg 'fmt_elapsed\b|state\.finish|coalesce_patch\.uninstall|get_ratio_for_model|list_known_ratios|set_ratios_path'

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 helpers in code_puppy/plugins/subagent_panel/state.py, coalesce_patch.py, and token_ratio_learner/ratios.py, then inspect the cited callback imports and superseding functions. Run the provided rg command and review external plugin compatibility before deciding how each candidate should be handled. Run pytest tests/plugins/ tests/ -q --no-cov; done means the reviewed helpers have an intentional disposition and the suite remains green.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.