Skip to content

refactor(agent): drop two verified-dead symbols (vulture, #1136)#1286

Open
axisrow wants to merge 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-65/dead-code-agent
Open

refactor(agent): drop two verified-dead symbols (vulture, #1136)#1286
axisrow wants to merge 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-65/dead-code-agent

Conversation

@axisrow

@axisrow axisrow commented Jul 10, 2026

Copy link
Copy Markdown
Owner

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.pyrequire_args() (8 lines)

  • Repo-wide grep (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 zero import \* statements), no getattr dispatch by that name.
  • git history: born in refactor(agent): add shared tool context helpers #534 (refactor sharing tool-context helpers) already without a caller or testgit show 0fdae381 | grep -c require_args → 1 (definition only). Dead since birth.
  • Five surfaces: it's a private helper inside the agent-tool registry; tools are reached via the registry, never via this function.

2. src/agent/provider_registry.pyZAI_BASE_URL_REQUIRED_HINT constant (5 lines)

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.
  • Full suite (pytest tests/ -m "not aiosqlite_serial" -n auto then -m aiosqlite_serial) — green (the only unrelated failures are pre-existing on origin/main: tests/test_quality_scoring_service.py and the xdist-flaky tests/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)

Part of #1136 / #1130.

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>
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