"""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 ContractVerificationReceipt(BaseModel):
    """CI contract verification result."""

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

    # Verification-specific fields
    spec_hash: str  # SHA256 of LOOM_CONTRACT_V01.md
    compiler_version: str  # e.g., "v1.0.0"
    invariants_passed: List[str]  # ["test_dignity_floor", ...]
    golden_scenarios_passed: List[str]  # ["test_golden_prior_auth_refusal"]
    all_receipts_signed: bool
    ci_run_id: Optional[str] = None    # GitHub Actions run ID
    commit_sha: Optional[str] = None    # Git commit SHA
