Skip to main content

Module exportstamp

Module exportstamp 

Source
Expand description

Export provenance stamp (REQ-EXPORT-SYNC-001).

An export adapter materialises offline byte sources (a Cargo local registry, a cargo-vendor tree, a Bazel distdir) from a verified layer. Left unmarked, a committed export goes silently stale the moment the project’s pin moves to a new layer — it keeps serving the old crates. To make that loud, every export writes a .varve-export.json stamp binding its bytes to the layer that produced them: {layer, manifest_digest, kind}, where manifest_digest is the sha256 of the DSSE-signed layer manifest — the same join key the rest of varve uses. varve verify --export <DIR> re-derives the current pin’s manifest digest and fails when a stamped export diverges from it.

Structs§

ExportStamp
The recorded provenance of an export: which layer produced it, that layer’s signed-manifest digest (the join key), and which export shape it is.

Enums§

ExportStampError
Why an export stamp could not be read or trusted.
ExportStatus
The drift verdict for a stamped export against the current pin.

Constants§

STAMP_FILE
The stamp file written into an export directory’s root.

Functions§

read_stamp
Read and parse the stamp from dir. A missing file is Missing; unparseable JSON is Malformed — both are failures for a directory claimed to be an export.
status
Compare a stamp against the current pin’s manifest digest.
write_stamp
Write the stamp into dir, creating dir if needed.