"""Auto-generated from LOOM_CONTRACT.md by contract_compiler.py vv1.1.0"""

from pydantic import BaseModel, Field
from datetime import datetime
from typing import List, Dict, Optional, Any

class PolicyFreezeReceipt(BaseModel):
    """Immutable policy bundle."""

    # Standard receipt fields
    receipt_id: str
    receipt_type: str = "policy.freeze.v1"
    loomdip: str = "pending"
    signature: str = "unsigned"
    valid_time: datetime = Field(default_factory=datetime.utcnow)
    tier: str = "SIGNED"

    # Policy-specific fields
    rules: List[str]  # e.g., ["dignity >= 0.15", "ece <= 0.03"]
    immutable: bool = True
    policy_version: str  # e.g., "v1.0.0"
