Implement live-shaped readiness workplan

This commit is contained in:
2026-05-19 01:06:41 +02:00
parent 3a52b3df41
commit 635d999621
21 changed files with 1507 additions and 54 deletions

View File

@@ -4,6 +4,7 @@ from pathlib import Path
from phase_memory.adapters import InMemorySemanticIndex
from phase_memory.contracts import graph_from_markitect
from phase_memory.evaluation import EVALUATION_REPORT_SCHEMA, evaluation_threshold_report
from phase_memory.models import ActivationPlan, MemoryPath
from phase_memory.retrieval import activation_quality_report, select_event_path
from phase_memory.runtime import PhaseMemoryRuntime
@@ -85,6 +86,22 @@ def test_budget_path_and_semantic_hint_scenario_meets_quality_thresholds() -> No
assert report["explanation_coverage"] == 1.0
def test_evaluation_threshold_report_summarizes_all_scenarios() -> None:
data = json.loads((FIXTURES / "evaluation-scenarios.json").read_text(encoding="utf-8"))
report = evaluation_threshold_report(data)
assert report["schema_version"] == EVALUATION_REPORT_SCHEMA
assert report["valid"] is True
assert report["metrics"]["scenario_count"] == 3
assert report["metrics"]["policy_denial_count"] == 1
assert report["metrics"]["lifecycle_action_count"] >= 3
assert report["metrics"]["path_event_count"] == 1
assert report["metrics"]["semantic_hit_count"] == 1
assert report["metrics"]["budget_omission_count"] == 1
assert report["diagnostics"] == []
def _activation_plan(response):
data = response["data"]["activation_plan"]
return ActivationPlan(