Skip to content

feat(#64): add batch ingest API with per-item outcomes#68

Merged
randomm merged 3 commits intomainfrom
feature/issue-64-batch-ingest-api
Mar 27, 2026
Merged

feat(#64): add batch ingest API with per-item outcomes#68
randomm merged 3 commits intomainfrom
feature/issue-64-batch-ingest-api

Conversation

@randomm
Copy link
Copy Markdown
Owner

@randomm randomm commented Mar 27, 2026

Summary

Add MemoryStore::batch_ingest() for efficient multi-memory ingestion with conflict-aware and force policies. Returns per-item results (Added/Conflicts/Error) with deterministic index mapping.

Changes

  • IngestPolicy enum (ConflictAware, Force)
  • BatchIngestItemResult with per-item outcome tracking
  • Input validation (empty, whitespace, oversized content)
  • Comprehensive test suite (unit + integration)
  • Consistency guarantees documented (independent processing, no atomics)

Quality

  • 154 tests passing
  • Adversarial review: APPROVED (3 rounds)
  • Code review: APPROVED
  • All quality gates green (fmt, clippy, test)

Fixes #64
Part of #61

randomm added 3 commits March 27, 2026 20:48
Add MemoryStore::batch_ingest() for efficient multi-memory ingestion
with conflict-aware and force policies. Returns per-item results
(Added/Conflicts/Error) with deterministic index mapping.

- IngestPolicy enum (ConflictAware, Force)
- BatchIngestItemResult with per-item outcome tracking
- Input validation (empty, whitespace, oversized content)
- Comprehensive test suite (9 tests: unit + integration)
- Consistency guarantees documented (independent processing, no atomics)

Fixes #64
- Replace new_with_db with from_db (HEAD naming convention)
- Remove .unwrap() from from_db calls (returns Self, not Result)
- Update all batch test and main.rs calls to use correct API
The test was using semantically similar but different text ('Alice works at Microsoft'
vs 'Alice is employed at Microsoft'), expecting mock embeddings to detect semantic
similarity. However, mock embeddings use hash-based deterministic generation which
produces dissimilar vectors for different text, regardless of semantic similarity.

Fixed by changing the test to use exact duplicate text, which mock embeddings can
reliably detect as conflicts. This aligns with existing batch_tests behavior and
is a valid test of conflict detection with mock embeddings.
@randomm randomm merged commit fa9430c into main Mar 27, 2026
8 checks passed
@randomm randomm deleted the feature/issue-64-batch-ingest-api branch March 27, 2026 18:59
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.

feat: add batch ingest API with conflict-aware results

1 participant