torchcell.provenance
Schema-dependency tracking, which decides when a built dataset must be rebuilt because the schema changed. schema_impact diffs the working-tree schema against a git ref, classifies each change as breaking or stale, and names the loaders that must rebuild (it runs as a pre-commit hook). build_manifest stores, next to each built LMDB, the contract fingerprints of the schema symbols its loader depends on, and its check reports which built datasets are stale. A fingerprint hashes a symbol’s contract (field shape and validators), not its source text, so a docstring edit flags nothing. schema_deps is the shared AST analysis.
Classes
The contract-relevant surface of one schema class. |
|
A single pydantic field's contract-relevant shape. |
|
All record-contract classes across the schema-surface modules, with their graph. |
|
Severity of a schema-symbol change for its dependent datasets. |
|
The full result of diffing a schema change: changed symbols and impacted loaders. |
|
A dataset loader whose closure contains one or more changed symbols. |
|
A schema symbol that changed contract between two surfaces, with its severity. |
|
Records the schema contract a built LMDB was produced against. |
|
Per-dataset outcome of a fleet-wide staleness scan. |
|
Result of checking one manifest against the current schema surface. |
|
One schema symbol whose contract fingerprint no longer matches the manifest. |
Functions
Extract the contract-relevant surface of a schema class from its AST. |
|
Contract fingerprint of a schema class AST node. |
|
All symbols reachable from |
|
Load the default torchcell schema surface ( |
|
Parse the schema-surface modules on disk into a |
|
Build a |
|
Transitive closure of a loader's schema imports -- the symbols it actually depends on. |
|
Surface symbols a loader imports directly from any |
|
Diff the working-tree schema surface against |
|
Classify a fingerprint-changed symbol into breaking/stale with human-readable reasons. |
|
Every symbol whose contract changed between two surfaces, classified. |
|
Check every built dataset under DATA_ROOT for schema staleness. |
|
Compare a manifest's stored fingerprints against the current local schema surface. |
|
Build a |
|
Compute and write |