Skip to content

Performance qualification and limits

The four cache states are cold_owner, warm_resources, warm_query_embedding, and warm_result. The benchmark keeps one immutable corpus, configuration, query, and output cap across all states. Its synthetic real-engine fixture starts the cold owner in a separate subprocess and records its PID/start identity, then uses a single warm owner. It traverses QueryService, canonical SQLite, lexical index, Chroma, and the Voyage request/response adapter with a synthetic recording provider transport. The generic client_factory interface cannot independently verify a caller's process isolation; only the fixture's explicit child identity does so. An owner close/open in one process is not process-cold.

Recorded stage times, nearest-rank p50/p95, throughput, provider/cache/eligibility calls, process-owned Python traced peak, RSS high-water, and index bytes come from executed operations. One synthetic sample on macOS arm64, 2026-10-05, ran tests.performance.engine_probe.run_real_benchmark with one query per state and a 203,716-byte Chroma index. Cold owner: child PID 14695, process start Mon Oct 5 23:24:02 2026, startup 2,030 ms, query 487 ms, one provider call/two retrieval calls/two policy revalidations, Python traced peak 7.9 MB, RSS high-water 149 MB. Warm resources: startup 1,408 ms, query 474 ms, one provider/two retrieval/two policy. Warm query embedding: query 473 ms, zero provider/two retrieval/two policy. Warm result: query 344 ms, zero provider/zero retrieval/one policy, one result-cache hit. All selected one unit and counted 14 output tokens. With one observation per state, p50 equals p95 and comparative tail-latency conclusions are unsupported. Process-cold does not clear OS page cache; the synthetic transport has no external provider cache, so this is not a live-provider latency benchmark. Native allocations and temporary copies need separate interpretation from Python tracing.

Query channels can overlap only the two configured independent text and visual awaits. They share one pinned attempt, deadline, and cancellation context, merge in deterministic channel order, and keep canonical SQLite work on the owner lane. Scheduler tests establish cancellation/deadline behavior. A synthetic combined test also ran both authorized provider requests through one real QueryService query with text and image Chroma families, proved both awaits entered before either provider call completed, and used EvaluationService to compare lexical-only and combined ablations against a canonical SQL source anchor. Its image family was an explicitly empty batch; this qualifies channel scheduling and evaluation mechanics, not visual relevance or an image parser. Canonical representation preparation has operation limits of 20,000 selected units, 100,000 rows, 16 MiB text, and 32 MiB serialized rows. These are admission bounds rather than proof of constant CPU or memory use.

A separate synthetic PNG fixture published one actual image vector with a retained caption-copy proxy and original-asset citation. QueryService selected the real image family, and EvaluationService observed a proxy_match to multimodal_match selection-reason change between lexical and image variants. Its recording embedding transport qualifies identity, citation, and ablation mechanics only; it does not measure image relevance or the installed visual model.

QueryCaches.max_bytes=64 MiB limits charged serialized entries, including a 256-byte charge per entry, rather than total process RAM. In one synthetic 128-result/80-embedding fill, the cache reported 67,099,392 charged bytes while traced retained Python allocation rose 67,182,776 bytes, 83,384 bytes above the charge. Fill peak was 68,275,623 bytes, and one 441,878-byte result lookup added a 1,630,426-byte traced peak during deserialization. A 4 MiB reserve beyond the charge covers this fixture's overhead and lookup peak with margin, not arbitrary decoded object graphs or concurrent callers. A strict total-memory guarantee needs a separate decoded-result and native-allocation bound.

Run-history discovery now reads a scope-filtered SQL keyset page of at most limit+1 rows; a direct definition reads one ID. Before the change, asking for one item among 15,000 synthetic matching runs allocated a traced 9,872,863-byte peak and took 0.2600 seconds. With the bounded read, the same n=1 workload allocated 10,769 bytes peak and took 0.0005 seconds. The existing run-ID primary key can order the keyset; without a principal/scope/run composite index, SQLite may still scan nonmatching rows, so this sample is not a worst-case latency bound. Old v1 run-scope proofs match only the caller's exact current serialization and can fail after an ordering change; new v2 proofs sort unordered grant sets.

The assertion reader verifies all leaves before exposing records, then reopens them for delivery. At 8,000 synthetic assertions in 16 leaves, live duplicate-ID metadata occupied about 2.73 MB and full verifier traced peak was about 20.16 MB. Iteration requested 17.55 MB of logical reference bytes, roughly a root plus two reads of the 8.77 MB of leaves; LocalArtifacts.open_verified also hashes each opened file. Leaf payloads are bounded, but whole-reader memory is not constant and its I/O has two passes. These n=1 tracemalloc observations exclude OS page-cache and device traffic.

A six-state synthetic repository delta regression traverses Git capture, actual parser-worker admission, a recording embedding port, Chroma and canonical publication. Parser calls for initial/no-op/one-file edit/deletion/rename/dirty edit are 2/0/1/0/0/1. Changed revisions still rebuild revision-qualified canonical evidence and projection bindings; this is not sublinear projection indexing. Syntax reuse is keyed by exact blob, grammar version/dialect, adapter/options identity and Tree-sitter runtime. The synthetic embedder measures engine work, not external provider latency or price.

cache/syntax-v1 holds discardable, checksum-validated JSON syntax facts under private workspace storage, with a 32 MiB entry and 256 MiB total on-disk cap (oldest entries are evicted). It contains source text and syntax, so treat it as private workspace data. It does not contain serialized executable objects or duplicate original byte fields. Missing, ordinary corrupt, incompatible or unsafe entries are treated as misses and files are re-parsed. A known resilience gap remains for deeply nested corrupt JSON: decoding can raise RecursionError rather than falling back to parsing. Valid cached syntax uses the expected bounded structure. Same-language renames reuse path-neutral facts, then resolve and normalize new paths, revision-qualified IDs, ranges and diagnostics. No schema migration is needed. Canonical extraction manifests retain their complete syntax closure independently; backup/export omit this cache, and restore can inspect/replay retained evidence without it. Closing the owner and removing this directory discards only parse acceleration; it is not the runtime query-cache namespace or a promise to erase retained canonical source evidence.

Repeated identical composition selectors previously rescanned every raw and canonical unit. A resolver-only untraced sample with 5,000 raw and 5,000 canonical units took 1.246 seconds for 500 identical valid selectors; an operation-local memo over the same synthetic shape took 0.00279 seconds (one sample each). The memo retains at most 256 validated selectors and 20,000 owner references for the current bundle, and invalidates on bundle replacement. These numbers do not include full document composition. Separately, 2,000 disjoint retained manual units (4,006 charged rows, 2.32 MiB serialized) loaded in 0.097 seconds and took 0.904 seconds to prepare ownership untraced; the text/code locator owner scan remains proportional to candidates. Inputs beyond the stated canonical operation caps fail admission; there is no constant-CPU claim.

In additional single-run synthetic probes, a 500-unit graph read took 0.021 seconds; a 500-unit native graph seal without assertions took 0.155 seconds; a 1,000-unit/500-assertion native seal plus manifest took 2.007 seconds. The measured RSS delta is not native peak memory. A clipped-code citation projection over 250 units, 64 clips, and 160,000 source characters took 0.0389 seconds untraced. Neither probe establishes worst-case scaling or a latency target.

No universal throughput target or provider cost is asserted. A verified local public model bundle was restored after the initial run, and the previously unavailable tokenizer/visual cases and focused real PDF, DOCX, OCR and selected-region cases were run. The synthetic rich-PDF Docling child reached a native-inclusive wait4 peak of about 1.42 GB; DOCX and OCR reached about 407 MB and 785 MB, respectively. These single macOS arm64 samples are neither aggregate memory limits nor portable resource budgets. The PDF mask preflight caps individual image and separately referenced mask pixels at 40 million before conversion; it does not bound total native allocation. No live-provider latency or semantic-quality result is inferred from synthetic recording transports.

Vector retrieval uses logical cosine over validated unit-normalized finite float32 values. The embedded Chroma HNSW collection physically stores ip with ef_search=200, embedding_function=None, and exact stored little-endian float32 byte receipts. 1-dot is a finite-precision cosine-distance approximation for unit vectors; near ties and ANN short results can change order or mark coverage truncated. The eligible-ID search partitions at 5,000 IDs, admits at most 64 partitions and 20,000 record checks, and never falls back to an unfiltered query when eligibility is empty. These bounds and receipts protect the published view; they do not prove universal top-k recall or a latency SLA.