P4-W4: Metadata and observability for export jobs#125
Conversation
Enrich ExportJobStatus with provenance metadata: dataset_version_id,
dataset_version, completeness_status, completeness_coverage, started_at,
completed_at, and last_ingestion_run_id. These fields use
skip_serializing_if for backward compatibility.
Enhance run_export_job to look up the active DatasetVersion and
DatasetCompleteness records, aggregating coverage bounds and status
across matching targets/networks.
Enrich DeliveryMetadata with dataset_version_id and completeness_status
so sink consumers receive provenance context.
Add GET /v1/datasets/{name}/status endpoint for materialization
introspection: returns active version, all versions, and completeness
records for downstream consumers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 6a7e5fd842e4
P4-W4 Remote Review: Metadata and ObservabilityVerdict: No blocking issues. Review pass is clear. Reviewed the full diff against the 6 review criteria: ✅ Backward compatibilityAll 7 new fields on ✅ Query correctness
✅ No wallet-only assumptionsExport code uses generic ✅ PerformanceMetadata lookups (one version query + one completeness list) execute once per export job at start time, not on status polls. The ✅ No migration requiredAll enrichment is in-memory.
|
Summary
Attach provenance metadata and status introspection to export and materialization jobs so downstream consumers can determine data provenance and completeness.
dataset_version_id,completeness_status,started_at/completed_atwall-clock timestamps, andlast_ingestion_run_idtoExportJobStatusDatasetVersionandDatasetCompletenessrecords and propagate them into the job statusDeliveryMetadataso sinks receive complete lineage informationGET /v1/datasets/{name}/status— new materialization introspection endpoint returning dataset status, active version, completeness, and recent export job historyChanged files
core/src/materializer.rsExportJobStatusandDeliveryMetadataadapters/src/v2_repo.rsapi/src/main.rsGET /v1/datasets/{name}/statusendpoint; provenance wiring in export runnerREADME.mdValidation
All CI-equivalent checks pass locally:
cargo fmt --all --check✅cargo clippy --workspace --all-targets -- -D warnings✅cargo test --workspace— 780 tests, 0 failures ✅Test plan
cargo test --workspacepasses in CIcargo clippyandcargo fmtpass in CIExportJobStatusfor completeness/v1/datasets/{name}/statusresponse shape🤖 Generated with Claude Code