Expand description
Pure bundle operations shared by the CLI and admin API: structural diff and
delta-chain application. These functions take parsed Bundles and return
data structures — no printing, no filesystem, no std::process::exit. The
CLI formats the result for a terminal; the server serializes it to JSON.
Structs§
- Apply
Result - Result of materializing a base bundle plus an ordered chain of deltas.
- Delta
Stat - Per-delta application statistics.
- Diff
Result - Structural difference between two bundles (A → B), computed over
(entry_key, discriminator)pairs. “Changed” means the key exists in both but the response bytes differ. - Entry
Ref - A single entry identified by its key plus algorithm discriminator. Dual-algorithm
bundles hold the same
entry_keyunder different discriminators, so both fields are needed to name an entry uniquely.
Constants§
- MAX_
CHAIN_ LENGTH - Recommended maximum delta-chain length before a full re-base is advised.
Functions§
- apply
- Apply an ordered chain of delta bundles onto a full base bundle, producing a
materialized full bundle. Verifies the continuity chain (base digest, then
prev_manifest_digestlinks) and rejects type mismatches. Callers are responsible for authenticating inputs against their configured trust policy. Output is an UNSIGNED INTERMEDIATE, with an empty seal; it must be sealed before installation on an authenticated responder. - apply_
sealed - Materialize a delta chain and authenticate its final manifest using
seal_fn. The caller must authenticate every input and authorize the output signer. - diff
- Compute the structural diff of two bundles. Never fails: it only reads the already-parsed index and data sections.