nirs4all.pipeline.storage.model_catalogue module

Bounded, transactional model metadata reads owned by the workspace library.

nirs4all.pipeline.storage.model_catalogue.read_model_catalogue(workspace_path: str | Path, *, max_models: int | None = None) → list[dict[str, Any]][source]

Read chain summaries and metadata without opening a writable store.

One read-only transaction includes committed WAL data while another owner uses the workspace. Unsupported schemas are refused without migrations, model deserialization or array reconciliation. SQLite may maintain its coordination files; persisted data is never written by this reader. The existing chain-summary SQL remains the source of score meaning.

Parameters:
  • workspace_path – Workspace directory holding store.sqlite.

  • max_models – Optional host-supplied bound on the number of chains; None reads every chain. A catalogue larger than the bound is refused, never truncated.

Returns:

One {"summary", "chain"} record per chain.