Skip to content

feat: add indexed pgvector file search storage - #278

Draft
franciscojavierarceo wants to merge 5 commits into
feat/axum-ogx-integration-v2from
codex/file-search-pgvector
Draft

feat: add indexed pgvector file search storage#278
franciscojavierarceo wants to merge 5 commits into
feat/axum-ogx-integration-v2from
codex/file-search-pgvector

Conversation

@franciscojavierarceo

@franciscojavierarceo franciscojavierarceo commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Synchronize this layer with its updated parent after main's AgentPipeline refactor (#274), preserving the immediate-base review boundary.

Stack layer 2 of 7: #34 foundation → #278 pgvector/CI → #280 contextual retrieval/reranking/configuration → #281 streaming Files → #282 store lifecycle/content → #283 durable batches → #284 streaming/SDK compatibility.

Base: feat/axum-ogx-integration-v2 (#34). Next: #280. Review against the immediate base and land from the bottom of the stack.

Adds real PostgreSQL/pgvector candidate retrieval to the in-tree file search service. Deployments can select HNSW or IVFFlat with validated dimensions and index settings; SQLite and plain PostgreSQL retain the existing exact retrieval backend.

Vector data is projected transactionally from stored chunks, including existing rows, so attachment publication and deletion keep metadata and vectors consistent. Search uses database distance operators, typed attribute filters and bounded candidates before shared ranking. IVFFlat waits for sufficient training data; until then it uses bounded database distance retrieval. CI now provisions pgvector and runs the native integration scenarios.

Initial backfill/index construction requires DDL privileges and can lock the table. Replicas must agree on index construction settings; approximate indexes and bounded keyword candidates can differ from exact retrieval. These constraints and configuration examples are documented.

Test Plan

Layer-specific implementation verification:

  • Passed file-search service tests: 27 passed; PostgreSQL tests run separately.
  • Passed real PostgreSQL 17.11 / pgvector 0.8.6 tests: 3 pgvector scenarios, portable file-search lifecycle, and 5 persistence integration tests. Covers actual ANN index use, semantic retrieval without lexical overlap, filters/isolation, existing-data migration, dimension failures, rollback, index changes, restart and deletion. Includes English-database string ordering and concurrent retrieval while an initialization lock is held.
  • Passed 27 focused file-search unit tests and 17 server configuration tests.
  • Passed changed-crate all-target clippy with warnings denied, formatting, and all applicable pre-commit hooks.
  • Independent layer review completed before publication; integrated verification and final review are recorded in feat: complete file-search streaming and API compatibility #284.

After synchronization with #274: This updated layer passed locked all-feature workspace compilation, diff checks, and all-files pre-commit hooks. The combined stack in #284 passed 1,389 workspace tests, 31 PostgreSQL/pgvector tests, and 17 maintained SDK cases, plus the Rust 1.88 all-feature check and all-target workspace clippy. The pipeline integration review is complete. GitHub CI is rerunning for the updated heads; previous green checks apply to the prior revisions.

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
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