hermes-agent/tests/hermes_cli/test_desktop_repo_discovery_config.py
Hermes Agent d10afb5a88 fix(tests): import CONFIG_SCHEMA from its defining module
check_compat_pointers (the step after the footgun scan) fails the job on
in-tree imports of plugin-compat pointers: hermes_cli.web_server re-exports
CONFIG_SCHEMA only for plugins. Import from hermes_cli.web_server_config.
2026-09-25 19:09:03 -05:00

18 lines
792 B
Python

from hermes_cli.config import DEFAULT_CONFIG
from hermes_cli.web_server_config import CONFIG_SCHEMA
def test_desktop_repo_discovery_defaults_are_opt_in_by_root():
desktop = DEFAULT_CONFIG["desktop"]
assert desktop["repo_scan_enabled"] is True
# Empty roots are deliberately safe: Desktop does not infer a home-wide
# search. Users must explicitly configure roots or use session projects.
assert desktop["repo_scan_roots"] == []
assert desktop["repo_scan_exclude_paths"] == []
def test_desktop_repo_discovery_keys_are_in_generated_schema():
assert CONFIG_SCHEMA["desktop.repo_scan_enabled"]["type"] == "boolean"
assert CONFIG_SCHEMA["desktop.repo_scan_roots"]["type"] == "list"
assert CONFIG_SCHEMA["desktop.repo_scan_exclude_paths"]["type"] == "list"