Import Run
One processing of one source artifact. Aggregate root; retry is a new run.
Purpose
An import run is one attempt to turn a stored Revit export artifact into definition-graph nodes and a rematerialized summary. It is not the artifact itself and not a batch of runs.
Identity is ImportRunId. The aggregate references a Design project by ProjectId and does not create projects.
ArtifactReference, IdempotencyKey, ImportCounts, and ImportWarning are value objects on this entity, not separate catalog entities.
Invariants
- Status path is
queued → in_progress → ready | failed(IllegalImportRunTransitionError). Retry is a new run. projectIdrequired after trim (ImportRunProjectIdRequiredError).sourceDocumentIdrequired after trim (ImportRunSourceDocumentIdRequiredError).sourceDocumentNameandcontractVersionrequired (ImportRunFieldRequiredError).- Reaching
readywithout counts is not a result (PDG-IM-INV-04). - SHA-256 on the artifact is of the uncompressed JSONL (ADR-0071).
Postgres CHECK stays queued | in_progress | ready | failed. The HTTP import-run log and Airtable revit_import_runs label in_progress as processing.
Domain Events
None. The aggregate does not record domain events. Do not invent SourceImportRegistered or SourceImportProcessed catalog pages.