Skip to content

feat(api): add DELETE /ingest to reset the Qdrant collection - #14

Merged
konjoinfinity merged 1 commit into
mainfrom
claude/qdrant-reset-endpoint-722h3p
Aug 21, 2026
Merged

feat(api): add DELETE /ingest to reset the Qdrant collection#14
konjoinfinity merged 1 commit into
mainfrom
claude/qdrant-reset-endpoint-722h3p

Conversation

@wesleyscholl

Copy link
Copy Markdown
Contributor

Summary

Inti's eval harness (konjoai/inti) discovered that every prior Gate A run had been running against an accumulating, un-deduplicated Qdrant index β€” /ingest upserts under random UUID point ids, so nothing deduplicates across repeated ingests (362 points for a 30-case corpus after three sprints of re-ingesting the same corpus). This PR adds the reset capability Kyro was missing, scoped narrowly per Wes's decision: an automated reset endpoint, not tenant isolation or a documented manual step.

  • QdrantStore.reset() (konjoai/store/qdrant.py) β€” deletes and recreates the collection, returns the point count removed.
  • DELETE /ingest (api/main.py) β€” wipes the Qdrant collection /ingest writes to and returns {points_removed}. Scoped to the vector collection only: the BM25 index, semantic cache, and retrieval-by-id store are untouched.
  • Pipeline protocol gains reset(); the existing _StubPipeline test double in api/test_api.py gets a matching stub.

Test plan

  • python3 -m pytest api/test_api.py tests/unit/test_auth.py -q β€” 47 passed, including the two new tests (test_reset_invokes_pipeline_reset_and_reports_points_removed, TestQdrantStoreTenantScoping::test_reset_deletes_and_recreates_the_collection, which mocks the Qdrant client the same way the existing tenant-scoping tests in that class do)
  • ruff check / ruff format --check clean on all changed files
  • dry_check.py β€” no new DRY violations (the one pre-existing hit is in dashboard/src/lib/api.ts, unrelated to this change)
  • All changed files well under the 500-line file-size gate

Generated by Claude Code

/ingest upserts under random UUID point ids, so nothing deduplicates
across repeated calls -- a caller re-ingesting the same corpus (e.g. an
external eval harness before an authoritative run) needs a way to wipe
back to a clean, single-ingest index. QdrantStore.reset() deletes and
recreates the collection; the new endpoint is scoped to the vector
collection only, leaving BM25, the semantic cache, and the
retrieval-by-id store untouched.
@konjoinfinity
konjoinfinity marked this pull request as ready for review August 21, 2026 23:21
@konjoinfinity
konjoinfinity merged commit 40fb056 into main Aug 21, 2026
7 checks passed
@konjoinfinity
konjoinfinity deleted the claude/qdrant-reset-endpoint-722h3p branch August 21, 2026 23:21
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.

3 participants