"""Training review state — stub for trial compatibility."""

from typing import Any


def build_training_review_state(
    effective_payload: dict[str, Any],
    candidate_value: Any = None,
) -> dict[str, Any]:
    """Build a training review snapshot from effective params and a candidate."""
    return {
        "effective_params": effective_payload,
        "candidate_value": candidate_value,
        "review_ready": bool(effective_payload),
    }


def public_training_review_state(review_state: dict[str, Any]) -> dict[str, Any]:
    """Extract the public-facing subset of a training review."""
    return {
        "reviewReady": review_state.get("review_ready", False),
        "effectiveParams": review_state.get("effective_params", {}),
    }
