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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user