ic_backup/lib.rs
1//! Host-side snapshot backup and same-release recovery for Internet Computer canisters.
2//!
3//! The library provides artifact checksums, no-follow traversal and staging,
4//! verified durable directory publication, bounded JSON persistence and journal
5//! locking, layout lifetime exclusion, durable restore dependencies and
6//! inherited command custody. Local download journals retain exact snapshot
7//! identity and verified publication progress. Local attempt journals bind exact
8//! declared identity and finite mutation/observation allowances, retaining durable
9//! reservations and qualified receipts. These mechanisms do not authorize canister
10//! effects.
11//! Explicit fresh download integrity checks bind the retained original plan and
12//! exact selected set to published directory bytes without changing journals,
13//! replenishing allowances or releasing dependencies. Stable byte custody and
14//! backend transfer completeness remain integration-owned.
15//! Immutable local download manifests reuse that exact v1 journal schema after
16//! fresh byte verification. Exact replay reads original retained records only,
17//! preserving snapshot/checksum provenance even when artifact trees are absent.
18//! Explicit local restore-source verification joins both original plans, retained
19//! safety requirement and exact local manifest before checking every source tree.
20//! Borrowed same-ID selection views grant no upload/load, application or release authority.
21//! Private operation-bound artifact copies check original and copied checksums;
22//! explicit retained-copy verification recovers without re-reading source trees.
23//! Failed copies and drop retain evidence, spending and source references without cleanup.
24//! Bounded physical inventories retain canonical declared parent forests; pure
25//! selection policy expands exact principals without live discovery or authority.
26//! Explicit effect graphs retain validated operation dependencies and project
27//! deterministic planning order/readiness without authorizing dispatch.
28//! Immutable operation plans bind these declarations to exact target/request digests
29//! and original attempt allowances, deriving journal authority under the full plan digest.
30//! Pure execution progress joins exact retained journals to the original plan and
31//! projects causal Applied evidence, pending attempts and exhaustion without dispatch.
32//! The IC request boundary encodes closed host-ingress management operations and
33//! binds exact method/routing/Candid bytes to original mutation or observation digests.
34//! Codec qualification does not establish IC effects or fresh execution authority.
35//! Bounded capture/inventory reply decoding preserves raw snapshot identity and
36//! exact request/reply evidence without authenticating origin or settling effects.
37//! Pure inventory comparison exposes new candidates and rejects baseline drift;
38//! candidate cardinality never attributes or settles a lost capture.
39//! Bounded lifecycle replies retain exact empty acknowledgements and required
40//! status/controller projections without converting them into fresh authority.
41//! Exact IC mutation envelopes bind already reserved original updates; a single-call
42//! provider contract and bounded passive reply association preserve pending spending.
43//! Existing codecs decode replies without automatic settlement, retries or release.
44//! Exact reserved status/list observations also retain both original attempt identities;
45//! passive association leaves lost observations pending and proves no effect outcome.
46//! A separate membership port binds ephemeral provider results to original intent,
47//! exact current context/full inventory and an integration-owned challenge.
48//! Pure matching views grant neither controller authority nor application continuity.
49//! The separate control port checks direct caller-controller evidence for exact
50//! IC mutation payloads; its matching views still grant no dispatch or restore safety.
51//! A separate snapshot-read port checks current snapshot-list visibility and exact
52//! caller read paths, without granting mutation control or settling lost replies.
53//! Immutable consistency requirements retain the original requested guarantee;
54//! current target/fence checks acquire or release no application obligations.
55//! Immutable restore safety requirements bind exact original source and same-release
56//! targets; fresh application evidence checks load/start safety without effects,
57//! lost-load settlement or fence/reference release.
58//! Immutable fence obligations retain original scope and acquisition identity;
59//! recovery joins their exact original attempt journals without new accounting,
60//! automatic release or a claim of current Active custody.
61//! Reserved fence-acquisition reconciliation matches original-request attribution
62//! under exact pending mutation and observation identities. Passive claims and
63//! late-reply admission perform no automatic settlement, redispatch or release;
64//! authenticated providers and actual application effects remain integration-owned.
65//! Exact application acquisition envelopes bind receiver, update mode, method and
66//! opaque bytes to already reserved original mutations. Passive acknowledgement
67//! association establishes no acquisition outcome or fresh dispatch permission.
68//! Immutable execution settlement checkpoints bind complete original Applied
69//! journals and their exact chronological histories for local replay. They prove
70//! no full backup/restore completion, command quiescence or fence/reference release.
71//!
72//! Applications own membership, release identity, control routing, quiescence
73//! and external-effect settlement. Capture/restore runners and an IC transport
74//! have not been extracted yet. Filesystem access and credentials remain on the
75//! operator host.
76
77mod hash;
78pub mod model;
79pub mod ops;
80pub mod policy;
81pub mod ports;
82
83#[cfg(test)]
84mod test_support;