Skip to main content

Module build_cache

Module build_cache 

Source
Expand description

Content-addressed build cache — V12-Spike-2.

Maps body_hash (SHA-256 of source text) to compiled artifacts. If a CodeNode’s body hasn’t changed, its compiled output is reusable.

§Architecture

CodeNode.body_hash ──► BuildCache lookup
                           ├── hit  → return cached artifact (skip compilation)
                           └── miss → compile → store artifact → return

The cache is backed by an Arrow RecordBatch, persisted to Parquet. This is a spike — validating that content addressing gives >90% cache hits on real NuSy development before committing to the full V13 build.

Modules§

artifact_col
Column indices for the build artifacts table.

Structs§

BuildCache
Content-addressed build cache backed by Arrow.
CacheEntry
A single cached build artifact.
CacheStats
Cache performance statistics.
CommitPairMeasurement
Measurement between two consecutive commits.
CrateDeps
Crate dependency graph for transitive invalidation analysis.
DepAwareMeasurement
Per-commit dependency-aware measurement.
DependencyAwareReport
Result of dependency-aware cache analysis.
HashStabilityReport
Result of measuring hash stability across git commits.

Functions§

build_artifacts_schema
Schema for the build artifacts cache table.
collect_file_hashes
Collect file hashes for a single git commit.
measure_dep_aware_stability
Measure dependency-aware cache hit rates across git history.
measure_hash_stability
Measure hash stability across recent git commits.
recent_commits
Get the last N commit hashes from git log.