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
//! [`CommitRequest`]: the one filesystem commit language, before planning.
use CommitId;
/// The operation language a commit is written in, owned by `loonfs-api` and
/// used here unchanged.
///
/// There is one spelling of a pre-planning operation across the workspace:
/// what a client sends is what the planner matches on, so no surface
/// translates between two versions of the same language. The durable
/// fingerprint preimage is a separate, frozen spelling, and the planner's
/// `operation_fingerprint_input` is the only place this one is renamed
/// into it.
pub use FilesystemOperation;
/// One logical filesystem commit: an idempotency key, an optional caller
/// annotation, and an ordered, non-empty list of operations.
///
/// The whole request is one commit. Operations resolve in order, each seeing
/// the effects of the ones before it, and either all of them commit or none
/// of them do. A convenience one-operation request is this same type with a
/// single-element list, so it plans, fingerprints, and replays identically.
///
/// This is the wire [`CommitRequest`](loonfs_api::CommitRequest) minus the
/// content tokens: proofs are checked at the surface that accepts them, and
/// what reaches the planner is the commit itself.
///
/// Paths are parsed once at the surface that accepts the raw string
/// ([`parse_mutation_path`]); a request always carries validated, normalized
/// paths.
///
/// [`parse_mutation_path`]: crate::path::parse_mutation_path