Module repo

Module repo 

Source
Expand description

2026-09-29: A whole met circuit venn run over a repository reached through Repo: resolve the target and compared instances, load their circuits, check the family manifest against the kernel sources, build and render the report. The CLI supplies a file-system Repo; the tests supply the same one over the checked-out tree, so both run this code.

Owner: metrale-circuit (venn). Invariants:

  • Business logic only: every byte arrives through Repo (SBIO), nothing touches the environment.
  • Manifest drift against the sources is an error before any report is built.
  • A target named by a checkpoint directory is checked against that checkpoint’s own config.json (layer kinds, declared precision of every bound module); a disagreement is an error, never a note.

Traits§

Repo
2026-09-29: Read access to a repository, by repo-relative path.

Functions§

checkpoint_id_of
2026-09-29: The checkpoint id a directory holds, from its path: the Hugging Face cache layout (.../models--<org>--<name>/snapshots/<rev>) or, failing that, the last two path components (.../<org>/<name>).
config_layer_kinds
2026-09-29: The layer kinds a config.json declares, from layers_block_type (mamba / moe / attention) or layer_types (linear_attention / full_attention).
report_text
2026-09-29: Build and render the report args asks for. checkpoint, when the target was given as a checkpoint directory, is that directory’s config.json text and, if present, its hf_quant_config.json text.
resolve
2026-09-29: The instance spec names: a recipe id, or an arch that exactly one instance serves, or a checkpoint id.