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
61
62
63
//! ChannelsSpec: collection of `ChannelSpec` entries under one version (schema v1).
//!
//! # Semantics
//! * Represents intent for multiple channels declared together sharing a version.
//! * Order of insertion is preserved (stable iteration order).
//! * Does not enforce uniqueness or non-empty ids (delegated to builders).
//! * `ChannelsSpec::default()` now yields version=1 (matches parser expectations) and an empty channel list.
//!
//! # Construction Patterns
//! * Immutable-style chaining via `add` (returns Self for fluent building).
//! * Mutable push via `push` when incremental assembly is preferred.
//!
//! # Example
//! ```rust
//! use allora_runtime::spec::{ChannelsSpec, ChannelSpec};
//! let spec = ChannelsSpec::new(1)
//! .add(ChannelSpec::queue().id("orders"))
//! .add(ChannelSpec::queue().id("payments"));
//! assert_eq!(spec.channels().len(), 2);
//! ```
//!
//! # Deferred Validation
//! Structural and kind validation occur during YAML parsing (`channels_spec_yaml.rs`). Uniqueness
//! and deterministic id generation for missing ids occur during runtime build (`build_channels_from_spec`).
use crateChannelSpec;
// Explicit Default to avoid version=0 (parser requires version==1)