prometeu-runtime/discussion/workflow/plans/PLN-0105-migrate-firmware-and-hub-to-platform-services.md

82 lines
2.2 KiB
Markdown

---
id: PLN-0105
ticket: real-render-worker-establishment
title: Migrate Firmware and Hub to Platform Services
status: open
created: 2026-06-06
completed:
ref_decisions: [DEC-0032]
tags: [firmware, hub, platform, render]
---
## Objective
Move firmware screens and Hub UI away from `HardwareBridge` and onto explicit platform services.
## Background
Firmware splash/crash and Hub currently receive `&mut dyn HardwareBridge` and publish Shell UI directly through it. `DEC-0032` requires migration to platform facades.
## Scope
### Included
- Firmware context uses platform services.
- Splash/crash screens publish via render sink.
- Hub input/render uses input/render facades.
### Excluded
- Do not implement worker.
- Do not change Hub UX or firmware state machine semantics.
## Execution Steps
### Step 1 - Update firmware context
**What:** Replace `PrometeuContext` hardware bridge field with platform services.
**How:** Expose only the services firmware needs: input, assets, render sink.
**File(s):** `crates/console/prometeu-firmware/src/firmware/prometeu_context.rs`, `firmware.rs`.
### Step 2 - Migrate firmware screens
**What:** Splash and crash screens publish through `RenderSubmissionSink`.
**How:** Build Shell UI packet and submit owned submission.
**File(s):** `crates/console/prometeu-firmware/src/firmware_step_splash_screen.rs`, `firmware_step_crash_screen.rs`.
### Step 3 - Migrate Hub
**What:** Hub uses platform input/render services instead of `HardwareBridge`.
**How:** Replace activation input and render publication dependencies.
**File(s):** `crates/console/prometeu-system/src/programs/prometeu_hub/prometeu_hub.rs`.
## Test Requirements
### Unit Tests
- Firmware state tests pass.
- Hub UI tests pass.
### Integration Tests
- `cargo test -p prometeu-firmware -p prometeu-system`.
### Manual Verification
- Firmware/Hub no longer call `publish_render_submission` on `HardwareBridge`.
## Acceptance Criteria
- [ ] Firmware context no longer exposes the monolithic bridge.
- [ ] Splash/crash/Hub render via render sink.
- [ ] Hub input uses platform/input facade.
## Dependencies
- `PLN-0103`.
- `PLN-0104`.
## Risks
- Firmware code is lifecycle-sensitive. Keep behavior changes out of scope.