pub fn execute_with_source_metadata(
plan: &ImportActionPlan,
workspace: &mut Workspace,
config: &ImportConfig,
source: &SourceMetadataIndex,
on_event: impl Fn(ImportProgressEvent),
cancel: &CancellationToken,
) -> Result<ImportExecutionSummary, Box<dyn Error + Send + Sync>>Expand description
execute, with the folded metadata a third-party source adapter extracted attached to
each file it covers.
The adapter resolved the precedence rule at extraction; the executor is what makes the
result durable — each member’s record is mapped onto sidecar fields by
sidecar_enrichment and written inside the signed sidecar at import, rather than being
discarded once the plan was built. A file the index does not cover imports exactly as it
does through execute.
Catalog batching. The plan runs in bounded batches (IMPORT_BATCH_SIZE, 64 entries),
each one catalog transaction with every asset’s index write a savepoint inside it. A
CandidateCompleted event can therefore precede the commit that makes its rows visible
to another connection; every batch has committed by the time this returns, which is
before any caller can release a Move source.