[Bug] `memorix ingest log` creates duplicate git records on repeated runs
Description
Running memorix ingest log multiple times ingests the same commits repeatedly, creating duplicate git-memory records in observations.json. Each duplicate has the same commitHash, title, narrative, facts, and filesModified.
Expected Behavior
Repeated runs of memorix ingest log should skip commits that have already been ingested (same commitHash), similar to how memorix ingest commit works.
Actual Behavior
Every time memorix ingest log is executed, all commits (including previously ingested ones) are stored again, resulting in duplicate entries.
Root Cause
ingest-log.ts lacks deduplication logic, while ingest-commit.ts has it at lines 84-85:
// ingest-commit.ts ✅ Has dedup
const existingObs = await loadObservationsJson(dataDir) as Array<{ commitHash?: string }>;
if (existingObs.some(o => o.commitHash === commit.hash)) { ... }
// ingest-log.ts ❌ Missing dedup check
for (const commit of commits) {
const result = ingestCommit(commit);
await storeObservation({ // No check if commit.hash already exists
...
commitHash: commit.hash,
});
}
Steps to Reproduce
- Run
memorix ingest log --count 10in a git project - Run
memorix ingest log --count 10again - Observe: all 10 commits are ingested again (marked ✅), not skipped
Fixed in #50 and now merged into main.\n\nThis update adds commitHash dedup to the CLI memorix ingest log path, so repeated runs now skip already-ingested commits instead of creating duplicate git-backed observations. It also aligns the CLI batch behavior with the existing single-ingest and TUI ingest flows, and adds regression tests for repeat-run / mixed-batch cases.\n\nThanks for the report — this one is now resolved.