Expand description
Boot-composition: the BootContext — the host’s generic-primitive surface.
editor_boot.rs was a ~1700-line god-function where every async subsystem
hand-wired the same six things: mode registration, command registration,
service registration, an async_landed wake, a per-tick drain, and a
deferred install for late handles. BootContext is that surface made
explicit — the typed bundle a subsystem’s install(boot) receives, exposing
the easy-to-get-wrong operations as primitives that cannot be wired without
their safety property.
Design fragment: docs/dev/architecture/boot-composition.md.
Slice plan: docs/dev/operations/slice-plans/boot-composition.md.
§Status
- BC.1 ✅ — the skeleton + the two wake-robustness primitives below.
- BC.3a ✅ —
editor_boot::Editor::bootnow builds aBootContextin a Phase-A block and routes all command / mode / service registration through it (commands_mut/modes_mut/register_service), freezing each registry into theArctheEditorliteral seats. Therender_statecell /BufferStore/DiagnosticsQueryHandleare fields here (built in Phase A); the §5 “forwardable cell” worry did not match the code (both are default-init / early-seeded Arc-shared cells — see the design fragment §5 re-assessment), so the hoist preserved Arc identity by movingletbindings, never reconstructing. - BC.3b+ 🚧 — per-subsystem
install(boot)migrations (claude-code first), collapsing each subsystem’s scattered wiring into one call.
§Wake-robustness primitives
BootContext::inbound— the bundled inbound primitive. A channel whosesendwakesasync_landed(the wake is inside the sender, so it is structurally impossible to forget) and whose items are drained per-tick via the tick-callback registry through a handler. Generalizes the I3ClaudeCodeInboundBusand LSP’s hand-rolled inbound buses. (Not yet consumed byeditor_boot— BC.3b is its first caller.)BootContext::wake_on_event— subscribe a typed event and wakeasync_landedwhenever one is published. Generalizes theMultibufferExcerptsReady/ L1cwake_onforwarder tasks.BootContext::tick_callback— register a raw per-tick drain (the I1 registry), retaining the RAII token for boot lifetime.
Structs§
- Boot
Context - The host’s generic-primitive surface, handed to per-subsystem wiring.