1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Action execution framework.
//!
//! Stage 5a of M3B wires the surface through which any
//! [`crate::pack::Action`] is consumed at run time. The [`ActionExecutor`]
//! trait is the uniform boundary:
//!
//! * [`PlanExecutor`] — produces [`ExecStep`] records describing what a
//! wet-run _would_ do without mutating state. Safe to call over any pack.
//! * [`FsExecutor`] (slice 5b) performs the side effects and returns the
//! same [`ExecStep`] shape with [`ExecResult::PerformedChange`].
//!
//! Keeping the trait narrow (one `execute` method, read-only [`ExecCtx`])
//! means implementations can be tested in isolation and swapped freely.
//!
//! # Scope (5a)
//!
//! The planner applies variable expansion, evaluates predicates, reads the
//! filesystem for idempotency (`path.exists()`, symlink target), but never
//! writes. `RegKey` and `PsVersion` predicates probe the Windows registry
//! and PowerShell on Windows (M4-C) and surface
//! [`ExecError::PredicateNotSupported`] on other platforms.
use crateAction;
pub use ;
pub use ;
pub use FsExecutor;
pub use PlanExecutor;
pub use ;
/// Uniform surface for anything that consumes an [`Action`].
///
/// Implementations MUST treat [`ExecCtx`] as read-only and MUST return a
/// [`ExecStep`] on success even for no-op paths (e.g. a predicate that was
/// not satisfied under `on_fail: skip`). A [`ExecStep`] with
/// [`ExecResult::NoOp`] is NOT an error — errors are reserved for
/// authoring bugs (bad var expansion, exec shape invariants, hard predicate
/// failure under `on_fail: error`).