3.3 KiB
3.3 KiB
| id | ticket | title | status | created | ref_decisions | tags | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0165 | hub-suspended-game-kill-affordance | Validate Hub Kill Flow End To End | done | 2026-07-05 |
|
|
Briefing
DEC-0040 requires that the Hub kill affordance fully terminates the suspended game and prevents resume. PLN-0164 and PLN-0163 provide the operation and UI; this plan validates the full flow end to end.
Objective
Add deterministic tests that exercise Home -> suspended game indicator -> Hub kill -> no resume/no residue.
Dependencies
- Source decision: DEC-0040.
- Depends on PLN-0164 for the termination operation.
- Depends on PLN-0163 for Hub UI and click behavior.
Scope
- Cover a real game launch, Home/ESC return to Hub, indicator visibility, click-to-kill, and post-kill cleanup.
- Verify task/session/resident state are gone.
- Verify render ownership and Hub state are correct.
- Verify assets/composer cleanup where observable.
- Verify log emission.
Non-Goals
- Do not test OS-native window manager shell app closure here.
- Do not create new cartridges unless existing Stress/Dummy cartridges cannot cover the scenario.
- Do not use timing sleeps or visual/manual assertions as primary evidence.
Execution Method
-
Extend firmware/SystemOS end-to-end tests.
- Primary file:
crates/console/prometeu-firmware/src/firmware/firmware.rsor a focused SystemOS runtime test if the existing test harness fits better. - Launch
Stress Consoleor a simple test cartridge. - Return to Hub through the real Home path.
- Assert the resident game remains suspended before kill.
- Primary file:
-
Simulate Hub click on the bottom-right kill control.
- Use deterministic coordinates from the Hub layout.
- Avoid hard-coded magic numbers if the Hub exposes layout constants/helpers.
-
Assert lifecycle cleanup.
- Resident game task is closed.
- Process is stopped.
- VM session lookup returns none.
- Resident game state returns none.
- Foreground owner remains Hub/Shell.
- Render owner is Shell/Hub.
-
Assert resource cleanup.
- Composer is unbound.
- Cartridge asset slots and physical banks are cleared where existing platform test access permits.
- Audio lifecycle pause is not active.
-
Assert no resume path remains.
- Clicking the old resume area or querying resident state must not restore the killed game.
- The Hub control must be absent on the next frame.
-
Assert log evidence.
- Recent logs contain an INFO event equivalent to
Resident game killed from Hub: <title>.
- Recent logs contain an INFO event equivalent to
Acceptance Criteria
- End-to-end test launches a game and returns to Hub with resident game suspended.
- Test confirms the kill control is present before click.
- Test clicks the control and remains in Hub.
- Test proves the game cannot be resumed after kill.
- Test proves task/session/resident/render/audio/assets/composer cleanup.
- Test proves the explicit INFO log exists.
- Existing cartridge switch tests still pass.
Tests
cargo test -p prometeu-firmwarecargo test -p prometeu-systemcargo test -p prometeu-host-desktop-winitif host presentation behavior is touched by implementation.cargo clippy -p prometeu-system -p prometeu-firmware --all-targets -- -D warnings
Affected Artifacts
- Firmware/SystemOS end-to-end tests
- Hub tests
- Lifecycle/runtime tests