"""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 RefusalReceipt(BaseModel):
    """System refusal due to dignity floor breach."""

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

    # Refusal-specific fields
    reason: str  # "dignity_floor_breach"
    threshold_violated: str  # "dignity < 0.15"
    actual_value: float  # e.g., 0.12
    recourse: str  # How to proceed
    guardian_ref: str  # GuardianReceipt ID
