"""Receipts for the Scout organ (discovery probes)."""

from __future__ import annotations

from datetime import datetime, timezone
from typing import Any, Dict, Optional

from receipts.compat.pyd import BaseModel, ConfigDictLike, Field


class DiscoveryReceipt(BaseModel):
    """Minimal DiscoveryReceipt schema used by tests."""

    model_config = ConfigDictLike(frozen=True)

    receipt_type: str = Field(default="DiscoveryReceipt")
    schema: str = Field(default="receipt.discovery.v1")
    discovery_id: str
    hypothesis: str
    probe: Dict[str, Any]
    expected: Dict[str, Any]
    actual: Dict[str, Any]
    crif_before: Dict[str, Any]
    crif_after: Dict[str, Any]
    laughter_entropy: Optional[float] = None
    ts: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))


__all__ = ["DiscoveryReceipt"]
