Skip to content

Skip duplicate events during import-jsonl - #101

Merged
barrydeen merged 1 commit into
masterfrom
import-jsonl-dup-skip
Apr 22, 2026
Merged

Skip duplicate events during import-jsonl#101
barrydeen merged 1 commit into
masterfrom
import-jsonl-dup-skip

Conversation

@barrydeen

Copy link
Copy Markdown
Owner

Summary

  • Users running import-jsonl have reported it aborting with save: duplicate: event already exists when the input contains events already in the store (e.g. re-running an import).
  • Treat eventstore.ErrDupEvent as a benign skip so imports are idempotent. Counted separately and surfaced in the final summary line.
  • Other save errors still behave as before (fatal unless -skip-errors).

Test plan

  • Run import-jsonl -db <path> < events.jsonl twice; second run should complete and report N duplicates skipped with 0 failures.
  • Confirm genuine parse/save failures still abort without -skip-errors.

🤖 Generated with Claude Code

Treat eventstore.ErrDupEvent as a benign skip so re-running an import
is idempotent instead of aborting on the first already-saved event.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@barrydeen
barrydeen merged commit 7c5803f into master Apr 22, 2026
1 check passed
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.

1 participant