Hybrid search and snapshots¶
You can pass Snapshot(name, revision, metadata) instead of loading every row
into a Store. The application must route to that exact, immutable revision of
both data and indexes. A descriptor might be:
{
"name": "support-tickets",
"revision": "release-2026-10-17-001",
"metadata": {"collection": "support-2026-10-17-001"}
}
With an installed custom application factory configured in TOML:
uv run storecheck compare baseline.json candidate.json \
--input-format snapshot --config evaluation.toml --json comparison.json
Storecheck records these external identities but cannot verify a service’s
contents or enforce its routing. Pin immutable versions instead of aliases such
as latest. Schema/duplicate checks on the entire collection and local row
influence still require a Store; a remote descriptor does not load its rows.
A runnable database example is included:
uv run python examples/hybrid_review.py --output-dir /tmp/storecheck-hybrid
It creates two separate SQLite databases, runs BM25 and hash-vector retrieval, fuses their rankings, and predicts the top example’s label. The whole application is supplied as one callable. The proposed addition breaks the permissions case; the command deliberately exits 1, showing 3/3 → 2/3 accuracy and error cost 0 → 50. Its report includes both branch rankings, fusion scores, and final evidence. The generated directory retains the databases, descriptors, and report. This example checks each database’s file digest and refuses modified snapshots.
The lexical branch uses SQLite FTS5 BM25. The fusion step uses reciprocal-rank fusion. The vector branch uses toy hashing vectors; this demonstrates integration and observed regressions, not production embedding quality or scalable indexing.