Crate capability_skeleton_mock

Crate capability_skeleton_mock 

Source

Functions§

build_large_skeleton
Builds a skeleton with the specified number of aggregator, dispatch, and leaf nodes. The root node’s kind is determined automatically. If aggregator_count>0, the root is aggregator, etc. Then we SUBTRACT 1 from that category’s count (so we don’t double‐count the root).
build_random_skeleton
A random skeleton generator for “stress” tests. The BFS might only produce 1 or 2 levels, so it’s not guaranteed to have early leaves, etc.—that’s a random approach.
make_aggregate_node
Helper to build a single aggregator node, ensuring name is set.
make_bfs_friendly_skeleton_ok
BFS with aggregator at level0, giving each aggregator 2 children at next level, etc. If depth=0, empty. If final level => leaf_count = density.
make_dispatch_node
Helper to build a single dispatch node, ensuring name is set.
make_general_bfs_skeleton
A BFS for advanced usage, letting a closure decide how many children at each level.
make_leaf_node
Helper to build a leaf node, ensuring name is set.
make_missing_root_skeleton
A skeleton with no root (root_id(None)) => BFS is empty => used by tests that want “no root”.
root_with_children
Root => id=0 => dispatch => children => leaf_count
single_node_skeleton
A single node skeleton with leaf_count.
three_level_chain
Three-level chain => 0->1->2 => BFS => depth=3