torchcell.provenance.SchemaSurface

class SchemaSurface(specs: dict[str, ~torchcell.provenance.schema_deps.ContractSpec], fingerprints: dict[str, str], module_of: dict[str, str], ref_graph: dict[str, set[str]], bindings: dict[str, ~torchcell.provenance.schema_deps.ModuleBinding] = <factory>)[source]

Bases: object

All record-contract classes across the schema-surface modules, with their graph.

specs is keyed by class name (assumed globally unique across the surface, which holds in torchcell). bindings holds the module-level non-class names (#734). fingerprints covers both, so a closure is one symbol -> fingerprint map. ref_graph maps a class to the classes and bindings it references (by base class, field annotation, or any Name in its body) and a binding to the bindings its source names – the edges used for the transitive closure.

property names: set[str]

The set of all surface class names (bindings are in bindings).