prometeu-runtime/discussion/workflow/plans/PLN-0052-promote-window-manager-to-systemos-service.md
2026-05-14 18:27:25 +01:00

2.9 KiB

id ticket title status created ref_decisions tags
PLN-0052 system-os-service-ownership-and-module-layout Promote Window Manager To SystemOS Service done 2026-05-14
DEC-0024
runtime
os
services
module-layout
vm
window-manager
logging

Briefing

Promote WindowManager from a PrometeuHub private module into an OS service owned or mediated by SystemOS, as required by DEC-0024.

Source Decisions

  • DEC-0024: WindowManager SHALL move to the services tree and SHALL be owned or mediated by SystemOS; PrometeuHub MUST NOT own it as an OS service.

Target

Make WindowManager part of the services tree and stop treating PrometeuHub as the owner of window management.

Dependencies

  • Source decision: DEC-0024.
  • Depends on PLN-0051 only for the general service layout convention.

Scope

  • Move crates/console/prometeu-system/src/programs/prometeu_hub/window_manager.rs into the services tree.
  • Expose the service from crates/console/prometeu-system/src/services/mod.rs.
  • Add a WindowManager field or OS-mediated access path on SystemOS.
  • Remove window_manager ownership from PrometeuHub.
  • Update PrometeuHub to access window management through SystemOS.
  • Update tests and imports directly.

Out of Scope

  • Do not implement new windowing behavior.
  • Do not define surface/window lifecycle beyond the existing minimal behavior.
  • Do not introduce old-path compatibility reexports.
  • Do not change task/process lifecycle semantics.

Execution Plan

  1. Move the WindowManager module into src/services/.
  2. Register the new service module in services/mod.rs.
  3. Add WindowManager initialization to SystemOS::new.
  4. Remove WindowManager storage from PrometeuHub.
  5. Update Hub methods so their window manager access is mediated by SystemOS.
  6. Update tests for the new module path and ownership location.
  7. Run formatting and the affected tests.

Acceptance Criteria

  • WindowManager no longer lives under programs/prometeu_hub.
  • PrometeuHub does not own a WindowManager field.
  • SystemOS owns or mediates access to WindowManager.
  • No old programs::prometeu_hub::window_manager path remains available.
  • Existing Hub behavior remains unchanged.

Tests / Validation

  • Run cargo test -p prometeu-system.
  • Include any focused tests for WindowManager after the move.

Risks

  • PrometeuHub currently owns its WindowManager; moving ownership may require method signatures to pass through SystemOS cleanly.
  • The implementation must not accidentally introduce new window/surface semantics while moving ownership.

Affected Artifacts

  • crates/console/prometeu-system/src/programs/prometeu_hub/mod.rs
  • crates/console/prometeu-system/src/programs/prometeu_hub/prometeu_hub.rs
  • crates/console/prometeu-system/src/services/mod.rs
  • crates/console/prometeu-system/src/services/window_manager.rs or equivalent
  • crates/console/prometeu-system/src/os/system_os.rs