Import Run
One processing of one source artifact. Aggregate root; retry requeues the same run (ADR-0103).
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 | deleted(IllegalImportRunTransitionError). Steward retry requeues the same run (failed | deleted → queued). Ready must delete-graph first (ADR-0103). 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 is queued | in_progress | ready | failed | deleted. The HTTP import-run log and Airtable revit_import_runs label in_progress as processing. There is no persisted uploaded status.
Domain Events
None. The aggregate does not record domain events. Do not invent SourceImportRegistered or SourceImportProcessed catalog pages.