refactor(agent): drop two verified-dead symbols (vulture, #1136)#1286
Open
axisrow wants to merge 1 commit into
Open
refactor(agent): drop two verified-dead symbols (vulture, #1136)#1286axisrow wants to merge 1 commit into
axisrow wants to merge 1 commit into
Conversation
Removes two symbols flagged by vulture and verified dead across all five
surfaces (FastAPI/Web/CLI/agent/TUI):
1. src/agent/tools/_registry.py — require_args()
- Repo-wide grep (src/ tests/ scripts/ docs/ conftest.py, .py/.txt/.md/.rst):
exactly 1 hit — the definition. No string references, no __all__, no
wildcard import of _registry (repo has zero `import \*`), no getattr
dispatch by that name.
- git history: born in #534 (refactor sharing tool-context helpers) already
WITHOUT a caller or test (git show 0fdae38 | grep -c require_args -> 1).
Dead since birth.
2. src/agent/provider_registry.py — ZAI_BASE_URL_REQUIRED_HINT constant
- Repo-wide grep: 1 hit — the definition. Hint text not duplicated
anywhere.
- git history: born used in #528 (Z.AI Coding Plan: _init_error, return,
raise). Last consumer removed in #535 (canonicalize provider metadata);
git grep ZAI_BASE_URL_REQUIRED_HINT f49ce42 -> definition only.
- Sibling ZAI_* constants (GENERAL/CODING/DEFAULT_BASE_URL, LEGACY set)
remain — they are used.
Part of #1136 / #1130.
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1136 (vulture axis of epic #1130). Two symbols deleted; each verified dead across all five surfaces (FastAPI/Web/CLI/agent/TUI) before removal. Per #1136, "dead by graph" ≠ "unneeded" — so every candidate below passed a full grep + git-history check before deletion.
Deletions
1.
src/agent/tools/_registry.py—require_args()(8 lines)src/ tests/ scripts/ docs/ conftest.py, across.py/.txt/.md/.rst): exactly 1 hit — the definition. No string references, no__all__export, no wildcard import of_registry(the repo has zeroimport \*statements), nogetattrdispatch by that name.git show 0fdae381 | grep -c require_args→ 1 (definition only). Dead since birth.2.
src/agent/provider_registry.py—ZAI_BASE_URL_REQUIRED_HINTconstant (5 lines)_init_error, returned from a check, and raised in aRuntimeError). The last consumer was removed in refactor(agent): canonicalize provider metadata #535 (canonicalize provider metadata) —git grep ZAI_BASE_URL_REQUIRED_HINT f49ce429→ definition only. Orphaned leftover of that refactor.ZAI_*constants (ZAI_GENERAL_BASE_URL,ZAI_CODING_BASE_URL,ZAI_DEFAULT_BASE_URL,ZAI_LEGACY_ANTHROPIC_BASE_URLS) remain — they are used.Verification (no regression guard possible — code is gone, so proof = green suite + this note)
ruff check src/agent/tools/_registry.py src/agent/provider_registry.py— clean.python -c "import src.agent.tools._registry, src.agent.provider_registry"— OK.pytest tests/ -m "not aiosqlite_serial" -n autothen-m aiosqlite_serial) — green (the only unrelated failures are pre-existing onorigin/main:tests/test_quality_scoring_service.pyand the xdist-flakytests/routes/test_debug_routes.py::test_debug_timing_page; both deselected and reproduced on clean main).Not deleted in this PR (doubtful → left for owner decision)
src/agent/tools/_photo_loader_runtime.py::resolve_photo_target_id— 0 production callers (last call migrated toresolve_photo_targetin fix(agent): correctness fixes incl. confirm-bypass (837#1,#7,#5, 838#10, 835#10) #842), but its docstring explicitly calls it a "Backward-compatible shim". Intentional compat surface → not deleted without explicit owner "yes".Part of #1136 / #1130.