-
Notifications
You must be signed in to change notification settings - Fork 29
[Bug] memorix ingest log creates duplicate git records on repeated runs #48
Copy link
Copy link
Closed
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels