Skip to contents

The offline verdict engine of the P5 catalog-currency instrument. It resolves three legs and reports drift per governed source document:

Usage

ms_catalog_currency(cache = NULL, registry = NULL, refdb_manifest = NULL)

Arguments

cache

NULL (default; resolved from the `msuiter.catalog_currency.cache_dir` option, else the `MSUITER_CATALOG_CURRENCY_CACHE_DIR` environment variable, else the user cache directory) or a single directory holding a derived cache.

registry

NULL (the committed sidecar) or a single path to an alternative sidecar.

refdb_manifest

NULL (default; the governed manifest is read through [ms_refdb_manifest()], which itself re-verifies every shipped digest) or a governance-manifest-shaped list – a test/automation seam, validated before use and never trusted half-read.

Value

A `ms_catalog_currency_report`: the verdict, version_state, the pinned/latest/available legs, per-document states (each with `state`, `expected`, `cached`, `record_sha`), plus `messages` and `hints`.

Details

* **pinned** – what the committed sidecar and the live refdb governance manifest assert (version label, mirror commit, governed file set); * **latest** – what the last derived cache record measured as the official release line (only trusted when every cached document's bytes verify against the cache's own record); * **available** – the full measured release-label list.

**Verdict law** (precedence: `inconsistent` > `corrupt` > `no-cache` > `drift` > `behind` > `ok`): `inconsistent` is the pinned-vs-refdb cross-check disagreeing; `corrupt` is the cache breaking against its own record (bytes changed or vanished); `no-cache` means nothing was ever derived (an actionable state, not an error – see `$hints`); `drift` is the cached documents disagreeing with the committed sidecar digests; `behind` is the official line having published a newer release than the pinned one. `version_state` is the separate `current`/`behind`/`ahead`/`unknown` axis. Nothing here mutates anything; the returned report is a plain named list carrying class `ms_catalog_currency_report`.

See also

[ms_catalog_currency_update()] to (re-)derive the cache, [ms_catalog_registry()] for the sidecar contract.