mpfaffenberger / mpfaffenberger/code_puppy
Dead code: superseded/unused helpers in subagent_panel and token_ratio_learner plugins
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 bymark_done— whose docstring explicitly explains why popping immediately (whatfinishdoes) was replaced ("avoids the vanish-then-reappear gap"). Zero callers.state.fmt_elapsed: superseded byfmt_elapsed_entry(used atpanel_render.py:185). Zero callers of the old variant.coalesce_patch.uninstall:installis invoked fromregister_callbacks.py:451;uninstallis never called (in__all__only). Monkey-patch is never reverted — either wire into shutdown or delete.- token_ratio_learner trio:
register_callbacks.pyimports onlycount_tokensand_record_token_ratio.set_ratios_pathdocstring 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/finishdate 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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