test(monitoring): guard Claude renewal delivery path

This commit is contained in:
jenkins 2026-08-25 20:06:09 -03:00
parent 6c35930f0b
commit 975399cbe0

View File

@ -164,6 +164,33 @@ def test_claude_quota_renewal_has_dashboard_and_alert_contracts():
for rule in alerts.values() for rule in alerts.values()
) )
helm_releases = list(
yaml.safe_load_all(
(ROOT / "services/monitoring/helmrelease.yaml").read_text()
)
)
alertmanager = next(
release
for release in helm_releases
if release.get("kind") == "HelmRelease"
and release.get("metadata", {}).get("name") == "alertmanager"
)
values = alertmanager["spec"]["values"]
assert not values.get("nodeSelector")
required = values["affinity"]["nodeAffinity"][
"requiredDuringSchedulingIgnoredDuringExecution"
]["nodeSelectorTerms"][0]["matchExpressions"]
assert {
"key": "node-role.kubernetes.io/control-plane",
"operator": "DoesNotExist",
} in required
routes = values["config"]["route"]["routes"]
assert any(
route["receiver"] == "email-platform"
and "service = hermes-ai-quota" in route["matchers"]
for route in routes
)
def test_ai_dashboard_top_bands_are_full_width_and_provider_symmetric(): def test_ai_dashboard_top_bands_are_full_width_and_provider_symmetric():
"""The first three KPI bands must compare providers without layout gaps.""" """The first three KPI bands must compare providers without layout gaps."""