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
Build Skills Index / trigger-deploy (push) Waiting to run
CI / Deny unrelated histories (push) Has been skipped
CI / CI timing report (push) Blocked by required conditions
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 / All required checks pass (push) Waiting to run
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
"""Regression tests for CLI prefill config key compatibility."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import cli
|
|
|
|
|
|
def test_resolve_prefill_messages_file_uses_top_level(monkeypatch):
|
|
monkeypatch.delenv("HERMES_PREFILL_MESSAGES_FILE", raising=False)
|
|
|
|
assert cli._resolve_prefill_messages_file(
|
|
{
|
|
"prefill_messages_file": "top.json",
|
|
"agent": {"prefill_messages_file": "legacy.json"},
|
|
}
|
|
) == "top.json"
|
|
|
|
|
|
def test_resolve_prefill_messages_file_accepts_legacy_agent_key(monkeypatch):
|
|
monkeypatch.delenv("HERMES_PREFILL_MESSAGES_FILE", raising=False)
|
|
|
|
assert cli._resolve_prefill_messages_file(
|
|
{"agent": {"prefill_messages_file": "legacy.json"}}
|
|
) == "legacy.json"
|
|
|
|
|
|
def test_resolve_prefill_messages_file_prefers_env(monkeypatch):
|
|
monkeypatch.setenv("HERMES_PREFILL_MESSAGES_FILE", "env.json")
|
|
|
|
assert cli._resolve_prefill_messages_file(
|
|
{
|
|
"prefill_messages_file": "top.json",
|
|
"agent": {"prefill_messages_file": "legacy.json"},
|
|
}
|
|
) == "env.json"
|