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
This commit is contained in:
parent
5c052ed106
commit
4cde4e489a
31 changed files with 2498 additions and 51 deletions
40
tests/conftest.py
Normal file
40
tests/conftest.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from maturity_engine.engine import Engine
|
||||
from maturity_engine.models import Evidence
|
||||
|
||||
INSTANT = datetime(2026, 8, 29, 12, 0, tzinfo=timezone.utc)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def engine(tmp_path: Path) -> Engine:
|
||||
inst = Engine.open(tmp_path / "maturity.sqlite")
|
||||
inst.bootstrap(at=INSTANT)
|
||||
yield inst
|
||||
inst.close()
|
||||
|
||||
|
||||
def evidence(
|
||||
engine: Engine,
|
||||
subject: str,
|
||||
kind: str,
|
||||
*,
|
||||
at: datetime = INSTANT,
|
||||
until: datetime | None = None,
|
||||
by: str = "fixture",
|
||||
) -> Evidence:
|
||||
return Evidence(
|
||||
id=engine.evidence_id(subject, kind, at),
|
||||
subject=subject,
|
||||
kind=kind,
|
||||
submitted_by=by,
|
||||
submitted_at=at,
|
||||
valid_from=at,
|
||||
valid_until=until,
|
||||
payload={"kind": kind},
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue