testing library

Test support for hosts of knowledge_store.dart: a deterministic encoder that exercises indexing, storage and search without a model.

Its vectors check mechanisms only; they are not a retrieval baseline (ADR-0017). Import this library from tests, never from shipping code.

final encoder = DeterministicEncoderProvider();
final store = WayfinderKnowledgeStore(
  dataDirectory: Directory(temp),
  encoder: encoder,
);
await store.index(bundle);
final result = await store.search([bundle], 'password recovery');

Classes

DeterministicEncoderProvider
A WayfinderEncoderProvider of DeterministicTestEmbedders.
DeterministicTestEmbedder
A deterministic 384-dimension embedder for mechanism tests: indexing, storage, freshness, ranking order and output, without a model.