Build State
The record of the previous build, stored under the build directory, that holds entries, fingerprints, dependencies, and output changes.
Location and content
Stored at .riebeckite/build/content-state.json.
Holds entries, fingerprints, dependencies, pipeline fingerprint, manifest entries, outputs, external dependencies, and the manifest hook cache.
The next build reads it to compute an incremental change set.
Version and validity
Version is CONTENT_BUILD_STATE_VERSION (currently 19). A missing, incompatible, or malformed state causes a full build path. State is updated only after a successful build; a failed build never corrupts the previous good state. Changing the stored shape raises the version, so a state written by an older version is ignored and the build falls back to the full path.
Build State Structure
ContentBuildState type at packages/core/src/content/content_build_state.ts contains:
version: number (currently 19)entries:Readonly<Record<string, ContentBuildEntry>>— per-entry state including fingerprint, aliases, dependencies, link targets, and processed content cache fingerprintcontentIndex:Readonly<Record<string, string>>— content slug to path mappingpipelineFingerprint: string | undefined — pipeline fingerprint for incremental validity checksmanifestEntries:readonly ContentManifestEntry[]— snapshot of manifest entries from the previous buildoutputs:readonly OutputDescriptor[]— output descriptors from the previous buildexternalDependencies:readonly PersistedExternalDependency[]— external dependency snapshotsmanifestHookCache:readonly ManifestHookCacheEntry[]— one entry per manifest hook in execution order. A cacheable hook stores only the manifest entries it changed against its input, plus anorderlist when the entry order changed; a hook that also mutates non-entry manifest state stores no snapshot and always reruns.
ContentBuildEntry (packages/core/src/content/content_build_state.ts) holds:
fingerprint: string — content fingerprint including source, frontmatter, pipeline, and plugin cache versionaliases:readonly string[]— entry aliases from frontmatterdependencies:readonly ContentBuildDependency[]— content and file dependencies with stable identitieslinkTargets?:readonly string[]— resolved link target slugsprocessedContentCacheFingerprint?:string— fingerprint of the processed content cache contract
ContentBuildDependency (packages/core/src/content/content_build_state.ts) records:
kind:"content"or"file"id: string — content slug or file path
On a later build, the previous state is read to compute an incremental change set. The pipeline fingerprint comparison (previousState.pipelineFingerprint !== pipelineFingerprint) triggers a full rebuild if the pipeline configuration has changed. State is saved only after a successful build; a failed build never corrupts the previous good state.