"""Domain models for the upload use case (ADR-0008, ADR-0009).""" import uuid from dataclasses import dataclass @dataclass(frozen=True) class ValidatedUpload: """The result of extension/content validation, before any I/O.""" source_type: str content_type: str content_sha256: str @dataclass(frozen=True) class UploadResult: """What `upload_source_file` returns; the route maps this to `FileUploadResponse`.""" file_id: uuid.UUID ingestion_job_id: uuid.UUID status: str chunks_indexed: int is_new_attempt: bool """`False` when an identical active upload already succeeded and no new ingestion attempt was made (route returns `200`, not `201`)."""