Phase 6d-1: SDK Semantic Search Integration Test

phase-postgres-6d1-sdk-integration-test Phase

Goal: Add integration tests for the SDK semantic_search method to verify the full round-trip: SDK → API → Ollama → pgvector → response.
Owner: Dev agent
Repo: forgejo_admin/pal-e-docs-sdk
Depends on: phase-postgres-6d-semantic-search deliverable 2 (SDK method, PR #20)

Problem

The SDK's semantic_search method has unit tests (mock httpx) but no integration tests against a live instance. Semantic search has a unique dependency chain (SDK → API → Ollama → pgvector) that unit tests can't verify. The existing search_notes method has integration tests — semantic_search should too.

Fix

  • Add integration tests to tests/integration/test_search.py (or new file) following the existing search_notes integration test pattern
  • Verify: results returned, response shape has block-level fields (anchor_id, similarity, content_snippet), similarity scores are ranked
  • phase-postgres-6d-semantic-search — parent phase
  • plan-2026-02-26-tf-modularize-postgres — parent plan