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
64
65
66
67
68
//! `bb::Bootstrap` — optional Component initialization phase.
//!
//! Components override `Bootstrap::bootstrap()` to record one-shot
//! setup logic the framework fires before any body-phase op invokes
//! their Contract methods. Backends use this to wire backend-native
//! tensor pools; indexes use it to mmap their on-disk state; codecs
//! that need a calibration pass use it to drain a sample buffer.
//!
//! The trait default is a no-op so existing Components (Backend,
//! Codec, Index, Aggregator, …) need no change. Authors opt in by
//! implementing the trait alongside their primary Contract — the
//! framework drives Bootstrap ahead of body ops when any of the
//! Component's other Contract methods is reachable from a queued
//! target.
//!
//! Today the trait ships with its types only; F5 wires the Component
//! bootstrap dispatch path (registration + per-poll seeding).
//! Sibling tests assert the default no-op + override observability.
use crateComponentRef;
/// Per-dispatch context handed to a Component bootstrap. F5 will
/// extend this with `RuntimeResourceRef`-style accessors so impls
/// can stage outputs, allocate resources, or surface
/// `CompletionHandle`s for async work. Today the struct only
/// carries the dispatching Component's reference so impls have a
/// stable identifier they can log against.
///
/// Held by-mut so the F5 plumbing can mutate per-dispatch staging
/// state without exposing the framework's internal sequencing to
/// the impl.
/// User-facing Contract trait for Component bootstrap. Default no-op
/// means existing Components opt in by implementing the trait — the
/// framework treats every Component as implicitly bootstrap-capable.
///
/// Sized to keep the trait usable as a regular bound; the framework
/// invokes the impl through the engine's component table where each
/// entry already carries the concrete type.