Skip to main content

haematite_cli/install/
mod.rs

1//! A verified bundle of the operator, configured workers and local plugin.
2//!
3//! Publication stages an exclusive sibling under the canonical parent. Each
4//! payload and the manifest sync before the stage's child directories and root.
5//! The complete verified stage is renamed once, then its parent syncs. A failed
6//! unpublished stage is removed and its parent syncs; a published bundle is kept
7//! when its final parent sync fails. Identical repeats verify first, then sync
8//! every existing payload, manifest, child directory, root and parent in order.
9//! No sync site is hidden in the payload copy or in cleanup.
10//!
11//! Refusals retain their original code: `bundle_arguments_invalid`,
12//! `bundle_path_invalid`, `bundle_destination_invalid`, `bundle_config_invalid`,
13//! `bundle_source_invalid`, `bundle_test_worker_refused`, `bundle_plugin_invalid`,
14//! `bundle_plan_invalid`, `bundle_encoding_failed`, `bundle_read_failed`,
15//! `bundle_size_overflow`, `bundle_source_changed`, `bundle_write_failed`,
16//! `bundle_sync_failed`, `bundle_publish_failed`, `bundle_manifest_invalid`,
17//! `bundle_payload_invalid`, `bundle_inventory_invalid` and
18//! `bundle_report_write_failed`. A cleanup failure adds `bundle_cleanup_failed`
19//! beside the original failure. `bundle_partial` is a separate marker, with the
20//! completed staged payload names and publication state, only after a prior
21//! payload completed. It never replaces a refusal code.
22//!
23//! Matching stage siblings are reported before a fresh stage is created, on
24//! success and failure; they may belong to a live install and are never removed.
25//! Names carry no destination, so a concurrent install in the same parent is
26//! listed too. A non-UTF-8 path is listed with `[lossy]` and replacement characters
27//! rather than refusing another install in that parent.
28//! Publication may replace an empty directory created at the destination after
29//! preflight, but the renamed stage is complete and cannot expose a partial bundle.
30//! Verification read failures retain `bundle_read_failed` rather than becoming
31//! a generic payload refusal.
32//!
33//! The configuration is a snapshot. Changed socket or data settings require a
34//! fresh bundle destination; a changed repeat is `bundle_conflict` and preserves
35//! the existing complete bundle.
36
37mod agent;
38mod bundle;
39mod cli;
40mod files;
41mod plan;
42mod publication;
43mod types;
44
45pub use bundle::install;
46pub use cli::run;
47pub use types::{Error, Partial, Report};
48
49#[cfg(test)]
50mod tests;
51
52#[cfg(test)]
53mod fixtures;
54
55#[cfg(test)]
56mod publication_tests;
57
58#[cfg(test)]
59mod agent_tests;