Expand description
Engine bootstrap state — consolidated owner of every bootstrap field the engine reads during install + poll.
Host-driven: install records targets on install_order +
module_bootstraps but leaves pending disarmed. The host arms
the queue via crate::node::Node::run_bootstrap (empty slice)
to drive every install-order target, or supplies one or more
BootstrapInputs to fire named targets with staged inputs.
§Field roles
install_order— append-only target-name sequence the install path stamps when amodule_phase = bootstrapFunctionProto lands. Drives the seeder front-to-back so multi-target installs surface one BootstrapComplete per target in the order the host supplied tobytesandbrains::install.module_bootstraps— per-target metadata (function key) keyed on the target name. Install stamps each entry as themodule_phase = bootstrapFunctionProto lands; the engine reads it to resolve target → FunctionKey at seed time.current_exec_id—Some(ExecId)while a bootstrap body is in-flight;Noneotherwise. Single-target body gate — the collapsed shape replaces the prior per-Component touch-set conflict queue.next_idx— seed pointer intoinstall_order. Bumps each timeEngine::maybe_complete_bootstrapobserves a phase drained.Engine::seed_bootstrap_callreads it to pick the next target once the host kicks the queue (empty-slicerun_bootstrap).pending— single body-op gate. Armed by [Self::arm_install_order] (empty-slice host kick) or by the engine’s per-target staging path (non-emptyrun_bootstrap). Cleared once every queued phase drains.
Structs§
- Bootstrap
Input - Host-supplied bootstrap input staging request — borrowed shape.
The host hands the engine a
targetname plus an ordered(input_name, value_bytes)slice; the engine validates against the target’s declared formal input ports and runs the Principle 1a copy (cap-check →try_reserve_exact→extend_from_slice) so the caller’s borrowed buffers can drop the momentcrate::node::Node::run_bootstrapreturns. - Module
Bootstrap - Per-target Module bootstrap metadata. Stamped into the engine
bootstrap state when the install path sees a
module_phase = bootstrapFunctionProto. - Owned
Bootstrap Input - Owned-form mirror of
BootstrapInput. Kept around because callers (and tests) may want an owned shape, but the new flatrun_bootstrappath stages each entry directly without parking it on a queue.
Enums§
- Bootstrap
Kind - Discriminator carried over from earlier shapes. Module is the
only kind today; the enum is kept so external introspection that
matched on
BootstrapKind::Modulekeeps compiling. - Bootstrap
Status - Host-facing bootstrap lifecycle status. Returned by
Node::bootstrap_statusso the caller can decide whether to keep polling or surface a “wait for input” prompt.