Skip to main content

validate_binding_registry

Function validate_binding_registry 

Source
pub fn validate_binding_registry(registry: &BindingRegistry) -> Vec<Violation>
Expand description

Validate a binding registry’s OWN shape (rules BINDING-001..006).

§Why pv validates its own artifact

contracts/binding.yaml and contracts/aprender/binding.yaml are pv’s output and pv’s input: pv audit --binding reports coverage from them and pv probar --binding generates property tests that call the functions they name. Until now pv validate could not read either — both failed with missing field `metadata` , because the single-file surface parsed everything as a Contract while is_contract_yaml had already excluded them BY NAME from the directory surface. The tool’s own manifest was the one file it could not check.

The rules below are the ones a registry can be wrong about in a way that silently degrades a downstream gate: an unnamed target crate, an entry that binds nothing, two entries claiming the same equation, and — the one that matters most — a binding that says implemented while naming nothing a reader could go and look at.