maturity-engine/tests/test_stance_and_readiness.py
tegwick 4cde4e489a Stand up the Engine/PIP surface for MAT-WP-0001
Declare layer.yaml, add a Python engine over a local SQLite store,
and cover deterministic assessment, the §13 gap register, stance-map
inventory, claim guardrails, and the gate-house review path with tests.

Assistant: grok
Assistant-Session: 01a04ceb-150e-7e80-a542-ec8b1372e164
2026-08-29 12:54:37 +02:00

16 lines
622 B
Python

from __future__ import annotations
def test_stance_inventory_includes_published_and_absence(engine):
maps = {item.consumer: item for item in engine.stance_maps()}
assert maps["ops-warden"].published is True
assert maps["ops-warden"].path == "ops-warden/pep-stance.yaml"
assert maps["ops-mason"].published is False
assert maps["ops-mason"].path is None
assert maps["ops-mason"].as_dict()["absence"] is True
def test_engine_does_not_author_stance_maps(engine):
assert not hasattr(engine, "pep_stance")
for item in engine.stance_maps():
assert "fail_open" not in (item.path or "")