fix: remove 115 verified dead code symbols across 46 production files

Automated dead code audit using vulture + coverage.py + ast-grep intersection,
confirmed by Opus deep verification pass. Every symbol verified to have zero
production callers (test imports excluded from reachability analysis).

Removes ~1,534 lines of dead production code across 46 files and ~1,382 lines
of stale test code. 3 entire files deleted (agent/builtin_memory_provider.py,
hermes_cli/checklist.py, tests/hermes_cli/test_setup_model_selection.py).

Co-authored-by: alt-glitch <balyan.sid@gmail.com>
This commit is contained in:
alt-glitch
2026-04-10 03:44:43 -07:00
committed by Teknium
parent 04baab5422
commit 96c060018a
70 changed files with 876 additions and 2877 deletions
+8 -8
View File
@@ -4,12 +4,12 @@ import os
import pytest
import yaml
import tools.env_passthrough as _ep_mod
from tools.env_passthrough import (
clear_env_passthrough,
get_all_passthrough,
is_env_passthrough,
register_env_passthrough,
reset_config_cache,
)
@@ -17,10 +17,10 @@ from tools.env_passthrough import (
def _clean_passthrough():
"""Ensure a clean passthrough state for every test."""
clear_env_passthrough()
reset_config_cache()
_ep_mod._config_passthrough = None
yield
clear_env_passthrough()
reset_config_cache()
_ep_mod._config_passthrough = None
class TestSkillScopedPassthrough:
@@ -63,7 +63,7 @@ class TestConfigPassthrough:
config_path = tmp_path / "config.yaml"
config_path.write_text(yaml.dump(config))
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
reset_config_cache()
_ep_mod._config_passthrough = None
assert is_env_passthrough("MY_CUSTOM_KEY")
assert is_env_passthrough("ANOTHER_TOKEN")
@@ -74,7 +74,7 @@ class TestConfigPassthrough:
config_path = tmp_path / "config.yaml"
config_path.write_text(yaml.dump(config))
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
reset_config_cache()
_ep_mod._config_passthrough = None
assert not is_env_passthrough("ANYTHING")
@@ -83,13 +83,13 @@ class TestConfigPassthrough:
config_path = tmp_path / "config.yaml"
config_path.write_text(yaml.dump(config))
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
reset_config_cache()
_ep_mod._config_passthrough = None
assert not is_env_passthrough("ANYTHING")
def test_no_config_file(self, tmp_path, monkeypatch):
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
reset_config_cache()
_ep_mod._config_passthrough = None
assert not is_env_passthrough("ANYTHING")
@@ -98,7 +98,7 @@ class TestConfigPassthrough:
config_path = tmp_path / "config.yaml"
config_path.write_text(yaml.dump(config))
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
reset_config_cache()
_ep_mod._config_passthrough = None
register_env_passthrough(["SKILL_KEY"])
all_pt = get_all_passthrough()