Skip to content

feat(pipeline): add file-backed FileProvenanceStore#636

Merged
ddeboer merged 1 commit into
mainfrom
file-provenance-store
Jul 23, 2026
Merged

feat(pipeline): add file-backed FileProvenanceStore#636
ddeboer merged 1 commit into
mainfrom
file-provenance-store

Conversation

@ddeboer

@ddeboer ddeboer commented Jul 23, 2026

Copy link
Copy Markdown
Member

Fix #634

Ships a file-backed ProvenanceStore in @lde/pipeline, alongside the interface and the existing FileLoadedSparqlProvenanceStore, so a consumer that runs the pipeline without a triplestore (e.g. a single CronJob persisting to a mounted volume) no longer has to stand one up purely to remember processing records.

Changes

  • FileProvenanceStore persists all records to a single JSON file, keyed by dataset URI, with atomic writes (temp file + rename) so a run killed mid-write cannot corrupt the next run’s skip decisions. A missing file is the empty store; any other read error (including corruption) propagates instead of silently starting over.
  • Takes an options object ({ path }) rather than a positional argument, matching FileLoadedSparqlProvenanceStore.
  • JSDoc and README document the caveats from the issue: single writer only (concurrent pods need the SPARQL-backed store or file locking) and the durable-volume requirement.
  • Tests cover round-tripping, multi-dataset persistence, cross-instance reads, parent-directory creation, temp-file cleanup, and error propagation; fileProvenanceStore.ts is at 100% coverage and the package coverage thresholds auto-updated upward.

- Persist processing records in a single JSON file keyed by dataset URI,
  for pipelines that run without a triplestore
- Write atomically (temp file + rename) so a run killed mid-write cannot
  corrupt later skip decisions
- Document the single-writer scope and durable-volume requirement in JSDoc
  and README
@ddeboer
ddeboer merged commit 1365270 into main Jul 23, 2026
2 checks passed
@ddeboer
ddeboer deleted the file-provenance-store branch July 23, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship a file-backed ProvenanceStore in @lde/pipeline

1 participant