b4fbd6fe9f
Deploy Site / deploy-vercel (push) Has been skipped
Deploy Site / deploy-docs (push) Has been skipped
Build Skills Index / build-index (push) Has been skipped
CI / Deny unrelated histories (push) Has been skipped
CI / Detect affected areas (push) Successful in 27m35s
CI / OSV scan (push) Failing after 4s
CI / Build&Test Docker image (push) Successful in 9s
CI / Supply-chain scan (push) Has been skipped
CI / Lint Docker scripts (push) Failing after 5m13s
CI / Check contributors (push) Failing after 12m8s
CI / Docs Site (push) Failing after 12m8s
CI / TypeScript (push) Failing after 12m8s
CI / Python lints (push) Failing after 12m9s
CI / Python tests (push) Failing after 12m9s
CI / Check uv.lock (push) Failing after 23m22s
CI / CI timing report (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
CI / All required checks pass (push) Has been cancelled
37 lines
1.6 KiB
Python
37 lines
1.6 KiB
Python
"""Regression tests for removed dead config keys.
|
|
|
|
This file guards against accidental re-introduction of config keys that were
|
|
documented or declared at some point but never actually wired up to read code.
|
|
Future dead-config regressions can accumulate here.
|
|
"""
|
|
|
|
import inspect
|
|
|
|
|
|
def test_delegation_default_toolsets_removed_from_cli_config():
|
|
"""delegation.default_toolsets was dead config — never read by
|
|
_load_config() or anywhere else. Removed.
|
|
|
|
Guards against accidental re-introduction in cli.py's CLI_CONFIG default
|
|
dict. If this test fails, someone re-added the key without wiring it up
|
|
to _load_config() in tools/delegate_tool.py.
|
|
|
|
We inspect the source of load_cli_config() instead of asserting on the
|
|
runtime CLI_CONFIG dict because CLI_CONFIG is populated by deep-merging
|
|
the user's ~/.hermes/config.yaml over the defaults (cli.py:359-366).
|
|
A contributor who still has the legacy key set in their own config
|
|
would cause a false failure, and HERMES_HOME patching via conftest
|
|
doesn't help because cli._hermes_home is frozen at module import time
|
|
(cli.py:76) — before any autouse fixture can fire. Source inspection
|
|
sidesteps all of that: it tests the defaults literal directly.
|
|
"""
|
|
from cli import load_cli_config
|
|
|
|
source = inspect.getsource(load_cli_config)
|
|
assert '"default_toolsets"' not in source, (
|
|
"delegation.default_toolsets was removed because it was never read. "
|
|
"Do not re-add it to cli.py's CLI_CONFIG default dict; "
|
|
"use tools/delegate_tool.py's DEFAULT_TOOLSETS module constant or "
|
|
"wire a new config key through _load_config()."
|
|
)
|