3.5 KiB
3.5 KiB
| id | ticket | title | status | created | ref_decisions | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0051 | system-os-service-ownership-and-module-layout | Move VM Runtime Into Services | done | 2026-05-14 |
|
|
Briefing
Implement the mechanical module relocation required by DEC-0024: move
VirtualMachineRuntime from the prometeu-system crate root into the services
tree at services/vm_runtime.
This plan is intentionally behavior-preserving. It prepares the service layout for later ownership plans without moving logging, filesystem, or memcard state.
Source Decisions
DEC-0024:VirtualMachineRuntimeSHALL move toservices/vm_runtime; old root paths MUST NOT remain available through compatibility reexports.
Target
Make VirtualMachineRuntime a service module while keeping the public type name
unchanged and preserving current VM behavior.
The canonical implementation path after this plan is:
crates/console/prometeu-system/src/services/vm_runtime/
Dependencies
- Source decision:
DEC-0024. - No prior plan is required.
- This plan should run before
PLN-0052,PLN-0053, andPLN-0054.
Scope
- Move
crates/console/prometeu-system/src/virtual_machine_runtime.rstocrates/console/prometeu-system/src/services/vm_runtime.rsor equivalent module root underservices/vm_runtime. - Move the existing
virtual_machine_runtime/child modules underservices/vm_runtime/. - Update
crates/console/prometeu-system/src/services/mod.rsto exposevm_runtime. - Update
crates/console/prometeu-system/src/lib.rsto exportVirtualMachineRuntimefromservices::vm_runtime. - Update internal module paths and tests directly.
Out of Scope
- Do not move
LogServiceownership. - Do not move
VirtualFSorMemcardServiceownership. - Do not move
WindowManager. - Do not introduce reexports or aliases for the old root module path.
- Do not change VM runtime behavior, syscalls, telemetry, logging semantics, or cartridge execution behavior.
Execution Plan
- Move the VM runtime module files into
src/services/vm_runtime/. - Register
pub mod vm_runtime;fromsrc/services/mod.rs. - Remove the root
mod virtual_machine_runtime;declaration fromsrc/lib.rs. - Export
VirtualMachineRuntimethrough the services path. - Update
SystemOS, tests, and any internal imports to use the new module location. - Run formatting and the affected Rust tests.
Acceptance Criteria
VirtualMachineRuntimeimplementation lives underservices/vm_runtime.- No root
virtual_machine_runtimemodule remains inprometeu-system. - No compatibility reexport preserves the old root module path.
- Public type name
VirtualMachineRuntimeremains available where the crate API intentionally exposes it. - Runtime behavior remains unchanged.
Tests / Validation
- Run
cargo test -p prometeu-system. - If workspace constraints make that too broad, run the narrowest available
prometeu-systemtest target and record the exact command in implementation evidence.
Risks
- Module move churn can hide accidental import compatibility. Review must check that no old root module remains.
- Test modules may need path updates because they currently live under the VM runtime module tree.
Affected Artifacts
crates/console/prometeu-system/src/lib.rscrates/console/prometeu-system/src/services/mod.rscrates/console/prometeu-system/src/services/vm_runtime/**- Existing VM runtime tests moved with the module