3.5 KiB
3.5 KiB
| id | ticket | title | status | created | ref_decisions | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0157 | system-os-cartridge-switch-orchestrator | Introduce SystemOS Game Switch Target Contract | open | 2026-07-05 |
|
|
Briefing
DEC-0039 requires Game-to-Game switching under Home/Hub to be owned by SystemOS. Before destructive replacement can be implemented, Hub/Firmware/SystemOS need a small explicit contract for "launch this resolved Game target as a replacement" that is separate from direct boot and from loader internals.
Objective
Introduce a SystemOS-owned Game switch request/target abstraction that can carry a resolved cartridge path or game-library entry from Hub/Home into the switch orchestrator without making the loader or userland the lifecycle authority.
Dependencies
- Source decision: DEC-0039.
- Builds on DEC-0037 and DEC-0038 as already implemented.
- Must be implemented before PLN-0158, PLN-0159, and PLN-0161.
Scope
- Define a minimal Game switch target type, such as
GameSwitchTargetorCartridgeLaunchTarget, in the SystemOS/Firmware boundary. - Route Hub game-library launch actions through that target contract instead of treating a path as an implicit lifecycle operation.
- Keep direct boot/debug boot paths separate from SystemOS Game switching.
- Add tests proving the target preserves cartridge identity/path without starting lifecycle replacement by itself.
Non-Goals
- Do not implement destructive replacement in this plan.
- Do not add
.pmc, final catalog UX, or a new launcher UI. - Do not change direct CLI/debug boot behavior.
- Do not add background execution.
Execution Method
- Inspect
crates/console/prometeu-system/src/services/game_library.rs,crates/console/prometeu-system/src/programs/prometeu_hub/prometeu_hub.rs, andcrates/console/prometeu-firmware/src/firmware/firmware_step_hub_home.rs. - Add a minimal launch target model at the SystemOS/Firmware boundary:
- resolved cartridge path;
- optional app_id/title metadata if already available;
- no loader-owned lifecycle policy.
- Update Hub action plumbing so
SystemProfileAction::LaunchGamecarries the resolved target type or maps immediately into it at the firmware boundary. - Add a placeholder SystemOS/Firmware entry point for Game switching that accepts the target but still delegates to the existing load path until PLN-0158 changes replacement behavior.
- Add unit tests for target construction and path propagation.
- Keep direct
BootTarget::Cartridgebehavior unchanged.
Acceptance Criteria
- There is an explicit type or function contract representing a resolved SystemOS Game switch target.
- Hub/Home no longer treats a raw path as lifecycle authority.
- The loader remains a materialization step, not the switch orchestrator.
- Direct boot/debug boot code paths remain separate and behaviorally unchanged.
- Tests prove target identity is carried without implicitly closing or loading a Game.
Tests
cargo test -p prometeu-systemcargo test -p prometeu-firmwarecargo test -p prometeu-host-desktop-winitcargo clippy -p prometeu-system -p prometeu-firmware -p prometeu-host-desktop-winit --all-targets -- -D warnings
Affected Artifacts
crates/console/prometeu-system/src/services/game_library.rscrates/console/prometeu-system/src/programs/prometeu_hub/prometeu_hub.rscrates/console/prometeu-firmware/src/firmware/firmware_step_hub_home.rscrates/console/prometeu-firmware/src/firmware/firmware.rs