Skip to content

Feat/raw vector api - #58

Merged
mudler merged 14 commits into
mainfrom
feat/raw-vector-api
Oct 12, 2026
Merged

mudler merged 14 commits into
mainfrom
feat/raw-vector-api

Conversation

@mudler

@mudler mudler commented Oct 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

mudler added 14 commits October 11, 2026 22:10
Keep caller-supplied vectors separate from legacy embedding APIs.
Define raw DTOs, validation, strict JSON decoding, and bound cursors.

Freeze legacy signatures and record the actual LocalAI consumer revision.
Add an isolated contract runner with worktree-local caches and logs.

Verified: sh test/raw/verify.sh contracts
HTML escaping makes some valid 256-byte IDs exceed the cursor cap.\nDisable it for base64-encoded cursor JSON without changing either limit.

Cover maximum-length HTML characters, quotes, backslashes, and Unicode\nwith round-trip tests, including JSON-escaped line and paragraph separators.
Keep raw collections separate from legacy discovery and embedding paths.
Use one owned pool, transactional lifecycle operations, and schema checks.
Probe dependency usability instead of reporting installed indexes as ready.

Share PostgreSQL helpers without changing legacy timeout or fallback policy.
Reuse collection cursors and verify rollback, privileges, pool cleanup,
configuration snapshots, and reset semantics with an owned database fixture.

Verification: sh test/raw/verify.sh lifecycle
Contracts, helper tests, and 16 lifecycle tests pass with race detection.
Use a fresh statement snapshot for reset while protecting table lifetime.
Preserve quoted text configuration names through creation and reopen.
Keep operational lookup failures distinct from invalid configuration.

Add deterministic regressions for the reset boundary and lookup failures.
Store caller-supplied vectors without entering the embedding lifecycle.
Replace each batch atomically and preserve request order in responses.
Bound filtered deletion and bind weakly consistent cursors to projections.

Verify with sh test/raw/verify.sh records.
Keep caller-supplied vectors independent of embeddings and legacy fallback.
Fence exact ranking from ANN and fuse bounded hybrid arms in one snapshot.
Expose scores, component ranks, and fusion parameters without vectors.

Preserve unsupported errors for immutable disabled lexical capability.
Return unavailable errors for missing runtime indexes instead of fallback.

Verify generated plans, filtered recall, candidate bounds, and cancellation.
Validation: sh test/raw/verify.sh search.
An L2 ANN index cannot serve cosine ordering. Reject approximate search\ninstead of silently accepting an incompatible index.

Check the selected opclass family for pgvector cosine ordering support.\nBind type and operator identity to pgvector and query search-path visibility.\nKeep BM25 checks unchanged.

Preserve the regression for L2 rejection, exact search, and cosine success.\nVerify with sh test/raw/verify.sh search.
Expose caller-supplied vectors without entering legacy embedding paths.
Own the raw pool independently and drain or cancel requests on shutdown.

Verify HTTP and client contracts against the owned PostgreSQL fixture.
Context cancellation alone cannot interrupt an incoming HTTP body read.
Interrupt raw transport reads and preserve timeout responses without
changing legacy read timeouts. Test stalled POST and DELETE requests.

Return startup failures after cleanup so bind errors exit nonzero.
Reject oversized client responses and preserve encoded URL prefixes.
Check legacy envelopes and discovery while raw collections remain live.

Verify with sh test/raw/verify.sh api, including prior suites and race
checks against private database fixtures.
Run legacy regression suites with an owned database and genuine model.
Keep raw isolation tests separate from legacy database mutations.
Exercise private source ingestion and discovery from fresh processes.
Count real consumer embeddings while raw operations share its database.

Add a strict all runner with repeated race tests and vet.
Document deployment, consistency limits, and evidence boundaries.

Validation: sh test/raw/verify.sh all passes with the supplied native
backend and library paths. Optional HTTP/2 and additional outage
regressions remain outside this bounded validation milestone.
Keep the owned fixture alive across PostgreSQL stop/start and preserve
BM25 preload settings. Assert bounded failure, retained vectors, recovery,
and cancellation with released database sessions.

Reject escaping outputs before runner writes. Synchronize real consumer
embedding traffic with raw work and record pool and catalog measurements.

The full acceptance gate passes, including ten race repetitions.
Afterward, stronger vector-retention and readiness assertions pass the
focused outage and shutdown tests. Document observed metrics and limits.
Keep explicitly empty selectors on the wire so invalid deletes stay invalid.
Derive response bounds from the contract to accept legal escaped text.

Share advertised limits with validation and preserve safe error identity.
Regression tests cover selector presence, response bounds, and sanitization.
Run every unit package against a fresh owned database to avoid missing
fixtures and catalog contamination. Keep owned E2E coverage explicit.

Assert empty PostgreSQL results after reset. Replace mutable source content
with a private fixture and verify three completed updates without duplicates.
@mudler
mudler merged commit 88432ad into main Oct 12, 2026
6 checks passed
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