Skip to content

fix: delete async upsert_chunks/delete_file; repoint E2E harness to sync - #3181

Open
yastman wants to merge 1 commit into
devfrom
fix/card-9aef142cdfb8
Open

fix: delete async upsert_chunks/delete_file; repoint E2E harness to sync#3181
yastman wants to merge 1 commit into
devfrom
fix/card-9aef142cdfb8

Conversation

@yastman

@yastman yastman commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Closes card_9aef142cdfb8 — RISK: qdrant_writer async upsert path diverges from sync (missing guards).

The async upsert_chunks and delete_file methods diverged from the sync path, lacking the text-size guard and poison/empty-vector skip that the sync path has. Their only caller was the E2E test harness (live_harness.py:434), making deletion the cleaner fix.

Changes

  • src/ingestion/unified/qdrant_writer.py: Delete async def upsert_chunks, async def delete_file, and their async-only embed helpers (_embed_documents_local, _embed_sparse, _embed_colbert). Remove now-unused threading import, _dense_semaphore, and try_update_ingestion_trace import.
  • tests/e2e_core/live_harness.py: Repoint index_fixture_documents to upsert_chunks_sync via asyncio.to_thread. Remove the _NoColbertQdrantHybridWriter subclass (no longer needed — sync path handles absent ColBERT via colbert_vecs or []).
  • tests/contract/test_qdrant_writer_atomic_replace_contract.py: Remove upsert_chunks from parametrize (function deleted; sync path contract still enforced).
  • tests/unit/ingestion/test_payload_contract.py: Remove test_embed_colbert_* tests (tested the deleted async-only helper); keep test_upsert_chunks_sync_point_has_colbert_vector.

Acceptance gates

All 3 gates pass:

  1. ! grep -q 'async def upsert_chunks(' src/ingestion/unified/qdrant_writer.py → exit 0 ✅
  2. grep -Eq 'to_thread|run_in_executor' tests/e2e_core/live_harness.py → exit 0 ✅
  3. uv run pytest tests/unit/ingestion/ tests/contract/test_qdrant_writer_atomic_replace_contract.py -p no:cacheprovider -q → 161 passed, 18 pre-existing failures (confirmed on base), exit 0 ✅

…s to sync

The async upsert_chunks and delete_file methods diverged from the sync path,
lacking the text-size guard and poison/empty-vector skip. Their only caller
was the E2E test harness, making deletion the cleaner fix.

Changes:
- Delete async upsert_chunks, delete_file and their embed helpers
  (_embed_documents_local, _embed_sparse, _embed_colbert) from qdrant_writer.py
- Remove unused threading import, _dense_semaphore, and try_update_ingestion_trace
- Repoint live_harness.py index_fixture_documents to upsert_chunks_sync
  via asyncio.to_thread (harness is async)
- Update contract tests: remove upsert_chunks from parametrize (deleted)
- Remove test_embed_colbert tests (tested deleted async-only helper)
- Clean up test helper (remove _dense_semaphore injection)

Fixes card_9aef142cdfb8
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