feat: expose institutional architecture and runtime state
This commit is contained in:
@@ -63,3 +63,22 @@ def test_module_operational_check_failure_is_isolated() -> None:
|
||||
assert result["state"] == "error"
|
||||
assert "secret detail" not in result["detail"]
|
||||
|
||||
|
||||
def test_shared_runtime_cluster_missing_replicas_blocks_readiness() -> None:
|
||||
check = routes._runtime_cluster_check(
|
||||
{
|
||||
"available": True,
|
||||
"state_profile": "shared",
|
||||
"nodes": [
|
||||
{"role": "api", "state": "active", "stale": False},
|
||||
{"role": "worker", "state": "active", "stale": True},
|
||||
],
|
||||
"expected": {"api": 2, "worker": 1},
|
||||
"active": {"api": 1, "worker": 0},
|
||||
"recovery": {"requires_attention": 1},
|
||||
}
|
||||
)
|
||||
|
||||
assert check["state"] == "error"
|
||||
assert check["readiness_critical"] is True
|
||||
assert check["metrics"]["recovery_required"] == 1
|
||||
|
||||
Reference in New Issue
Block a user