1.5 KiB
1.5 KiB
ADR 0001: Kernel subsystem boundaries (booter vs image)
- Status: Accepted
- Date: 2026-04-04
- Context: The booter (
packages/bare-os-booter) grew a largeindex.jswhile also owning VFS, swarm, IPC, identity, andctxconstruction. Contributors need a stable mental model for where new code belongs. - Decision:
- Treat boot (peer wait, MBR, replication, kernel bytes load, teardown ordering) as distinct from executeKernel (
ctxassembly + REPL + initd). - Centralize stock kernel capability word construction and seed strict rows in
bare-os-capability-registry.js. - Centralize network/offline kernel loading (seed RPC wave, MBR iteration) in
bare-os-kernel-loader.js. - Centralize Pear-safe teardown (HDMS → swarm → drives → store) in
bare-os-lifecycle-manager.js. - Document the full subsystem map in
docs/architecture/kernel-subsystems.md.
- Treat boot (peer wait, MBR, replication, kernel bytes load, teardown ordering) as distinct from executeKernel (
- Consequences:
index.jsremains the orchestration root but delegates loader/capability/teardown modules.- Future refactors should move
executeKernelinto a dedicated module when ready, without changing publicctxcontracts. - ADRs for larger changes should cross-link this boundary map.