3.2 KiB
3.2 KiB
| id | ticket | title | status | created | ref_decisions | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0161 | system-os-cartridge-switch-orchestrator | Validate Stress To Dummy Boy Game Switch End To End | done | 2026-07-05 |
|
|
Briefing
DEC-0039 requires proof that Game A -> Home -> Game B creates a fresh Game
session and does not present stale state from Game A. The minimum evidence is
switching from Stress to Dummy Boy.
Objective
Add end-to-end validation for Stress -> Home -> Dummy Boy through the real
Hub/Home flow, proving lifecycle, VM session, cartridge identity, and render
ownership switch correctly.
Dependencies
- Source decision: DEC-0039.
- Requires PLN-0157 target contract.
- Requires PLN-0158 destructive replacement.
- Requires PLN-0159 failed-switch recovery for negative path assertions.
- Requires PLN-0160 Dummy Boy cartridge.
Scope
- Add firmware/system tests that drive:
- launch Stress from games root;
- request Home;
- launch Dummy Boy;
- assert Stress session is gone;
- assert Dummy Boy session is active;
- assert cartridge identity and render ownership belong to Dummy Boy.
- Add a negative end-to-end test for broken Game B returning to Home if not already covered by PLN-0159.
- Use existing test platform/render submission inspection where possible.
Non-Goals
- Do not require final launcher UX.
- Do not add screenshot-based host automation unless existing test utilities make it cheap and deterministic.
- Do not implement additional Game-to-Game variants beyond Stress to Dummy Boy.
Execution Method
- Inspect existing firmware tests in
crates/console/prometeu-firmware/src/firmware/firmware.rs. - Reuse existing
TestGameRootor games-root helpers to expose Stress and Dummy Boy. - Drive input through Hub/Home selection rather than calling cartridge load directly when possible.
- Assert lifecycle/session invariants:
- old task closed/stopped;
- old VM session removed;
- new VM session created;
- foreground owner is new Game;
- current cartridge identity is Dummy Boy.
- Assert render invariants:
- render ownership epoch belongs to Dummy Boy app identity;
- stale Stress submissions are not accepted after switch;
- latest observable Game frame comes from Dummy Boy when render inspection is available.
- Add a focused test for failure path if missing after PLN-0159.
Acceptance Criteria
- End-to-end test proves Stress can be replaced by Dummy Boy from Home.
- Stress is not resumable after switching to Dummy Boy.
- Dummy Boy receives a fresh VM session.
- Cartridge identity and active render ownership are Dummy Boy after switch.
- Failure path returns Home and does not restore Stress.
- Tests are deterministic and do not rely on manual host interaction.
Tests
cargo test -p prometeu-firmwarecargo test -p prometeu-systemcargo 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-firmware/src/firmware/firmware.rscrates/console/prometeu-system/src/services/game_library.rstest-cartridges/dummy-boy- Host/render test utilities if needed