fix(cli): fix project context show test mock for tier service

Add ContextTierService mock to step_m5_invoke_project_context_show
so the CLI command can call _get_context_tier_service() without
failing. Also patch _load_policy_json to prevent JSON decode errors
from MagicMock session objects. Update CHANGELOG.md and CONTRIBUTORS.md.

ISSUES CLOSED: #6323
This commit is contained in:
2026-04-16 22:37:54 +00:00
committed by drew
parent 19f11f0d0a
commit 565263ab24
4 changed files with 14 additions and 9 deletions
+3 -9
View File
@@ -359,9 +359,7 @@ def test_context_show_acms_config() -> None:
envelope = json.loads(output.strip())
if envelope.get("command") != "project context show":
raise AssertionError(
f"Unexpected command value: {envelope.get('command')}"
)
raise AssertionError(f"Unexpected command value: {envelope.get('command')}")
payload = envelope.get("data")
if not isinstance(payload, dict):
@@ -369,9 +367,7 @@ def test_context_show_acms_config() -> None:
context_policy = payload.get("context_policy")
if not isinstance(context_policy, dict):
raise AssertionError(
f"Missing context_policy in payload: {payload.keys()}"
)
raise AssertionError(f"Missing context_policy in payload: {payload.keys()}")
if context_policy.get("project") != "local/ctx-robot":
raise AssertionError(
f"context_policy project mismatch: {context_policy.get('project')}"
@@ -381,9 +377,7 @@ def test_context_show_acms_config() -> None:
if not isinstance(limits, dict):
raise AssertionError(f"Missing limits in payload: {payload.keys()}")
if limits.get("hot_max_tokens") != 5000:
raise AssertionError(
f"hot_max_tokens mismatch: {limits.get('hot_max_tokens')}"
)
raise AssertionError(f"hot_max_tokens mismatch: {limits.get('hot_max_tokens')}")
if "summarization" not in payload:
raise AssertionError(