primus.optimization.orchestration module
Injected live-evidence adapters shared by optimization transports.
- primus.optimization.orchestration.build_indexed_optimizer_review_evidence(indexed: Mapping[str, Any], *, procedure_id: str, read_evaluation: Callable[[str], Mapping[str, Any]]) dict[str, Any]
Build promotion-review evidence from indexed optimizer artifacts.
This adapter is intentionally conservative. Identifiers prove only that an artifact was referenced; terminal state, exact candidate linkage, matched baselines, class coverage, RCA, non-collapse, and safe improvement must all be established from the indexed manifest and terminal evaluation records.
- primus.optimization.orchestration.refresh_target_freshness(targets: Sequence[Mapping[str, Any]], *, read_score_info: Callable[[str, str], Mapping[str, Any]], read_feedback_latest: Callable[[str, str], Mapping[str, Any]], now: datetime | str | None = None) tuple[dict[str, str], dict[tuple[str, str], dict[str, Any]], list[dict[str, Any]]]
Read current champion/watermark evidence for every exact target.
Individual read errors are reported as target-scoped failures so callers can reject only those targets. The assessment fingerprint is deliberately not recomputed here: it covers the complete assessment packet, while this live check only refreshes the champion and feedback watermark.