Context
I ran a measure-first review of a local 22-commit performance exploration branch against current main. The branch mixed correctness fixes, deterministic search, model metadata, profiling harnesses, rejected batching experiments, and public drafts, so it should not be merged as one unit.
This issue proposes extracting only the independently reviewable pieces. It also relates to #34, but does not attempt to solve long-query scaling as one large performance PR.
Proposed focused changes
- Deterministic search ordering plus an index for
chunks(file_id) lookups.
- Read-only serve safety: no file watcher or startup cleanup/reconciliation writes, with a stale-index warning.
- Embedding startup/indexing improvement: prefer local tokenizer sources and reuse one llama.cpp context sequentially across
embed_batch inputs.
- Persist the actual embedding model URI and dimension for
engraph status.
- Replace obsolete HNSW/ONNX integration suites with current, model-free
Store + MockLlm coverage.
I plan to open these as separate draft PRs so each can be accepted, revised, or declined independently.
Evidence reproduced locally
cargo fmt --check, cargo clippy -- -D warnings, unit tests, and all-target tests pass on the extracted branch.
- Deterministic golden search repeats the same expected rankings ten times.
- Real embedding-model parity is exact for sequential context reuse:
max_abs_diff=0, with 0/32 vectors beyond 1e-6.
- A copied 11,251-vector lab showed the shared-context path about 24-25% faster than fresh contexts in the sampled runs.
- Read-only staleness and non-reconciliation behavior have focused tests.
Explicitly excluded
- The in-memory vector cache: it was faster, but a fresh deterministic battery reproduced a top-k set mismatch on 1 of 8 probes.
- True packed multi-sequence batching: it remains rejected because Metal and CPU results failed the existing
1e-6 parity gate.
- An implicit FTS porter-tokenizer rebuild during
Store::open: this needs a separate transactional migration design and explicit search-semantics review.
- Research notes, Fable harnesses, handoffs, and public drafts.
- Broad prepared-statement caching for now; its isolated A/B evidence is not strong enough to ride with the correctness changes.
Requested direction
Please use the draft PRs linked below to review the pieces independently. The deterministic-search and read-only correctness groups are the strongest candidates; performance and metadata changes can remain draft until their scope is accepted.
Context
I ran a measure-first review of a local 22-commit performance exploration branch against current
main. The branch mixed correctness fixes, deterministic search, model metadata, profiling harnesses, rejected batching experiments, and public drafts, so it should not be merged as one unit.This issue proposes extracting only the independently reviewable pieces. It also relates to #34, but does not attempt to solve long-query scaling as one large performance PR.
Proposed focused changes
chunks(file_id)lookups.embed_batchinputs.engraph status.Store + MockLlmcoverage.I plan to open these as separate draft PRs so each can be accepted, revised, or declined independently.
Evidence reproduced locally
cargo fmt --check,cargo clippy -- -D warnings, unit tests, and all-target tests pass on the extracted branch.max_abs_diff=0, with 0/32 vectors beyond1e-6.Explicitly excluded
1e-6parity gate.Store::open: this needs a separate transactional migration design and explicit search-semantics review.Requested direction
Please use the draft PRs linked below to review the pieces independently. The deterministic-search and read-only correctness groups are the strongest candidates; performance and metadata changes can remain draft until their scope is accepted.