90 lines
2.6 KiB
Markdown
90 lines
2.6 KiB
Markdown
---
|
|
id: PLN-0107
|
|
ticket: real-render-worker-establishment
|
|
title: Migrate Remaining Platform Domains
|
|
status: done
|
|
created: 2026-06-06
|
|
completed:
|
|
ref_decisions: [DEC-0032]
|
|
tags: [platform, audio, input, assets, clock, telemetry]
|
|
---
|
|
|
|
## Objective
|
|
|
|
Migrate non-render domains out of `HardwareBridge` into explicit platform services.
|
|
|
|
## Background
|
|
|
|
`DEC-0032` permits render to migrate first but requires the full migration to cover audio, input/touch, assets/storage, clock/pacing, and telemetry where applicable.
|
|
|
|
## Scope
|
|
|
|
### Included
|
|
|
|
- Audio service/facade migration.
|
|
- Input/touch service/facade migration.
|
|
- Assets/storage service/facade migration.
|
|
- Clock/pacing and telemetry surface migration where currently coupled.
|
|
|
|
### Excluded
|
|
|
|
- Do not change domain semantics.
|
|
- Do not implement async IO unless already supported by existing services.
|
|
|
|
## Execution Steps
|
|
|
|
### Step 1 - Migrate audio
|
|
|
|
**What:** Replace `hw.audio()`/`hw.audio_mut()` production dependencies.
|
|
**How:** Route through explicit audio platform service.
|
|
**File(s):** `crates/console/prometeu-system/src/services/vm_runtime/dispatch.rs`, firmware/host integration files.
|
|
|
|
### Step 2 - Migrate input and touch
|
|
|
|
**What:** Replace `hw.pad()`/`hw.touch()` dependencies.
|
|
**How:** Expose input snapshots through platform input service.
|
|
**File(s):** `crates/console/prometeu-system`, `crates/console/prometeu-firmware`, host input modules.
|
|
|
|
### Step 3 - Migrate assets/storage
|
|
|
|
**What:** Replace `hw.assets()`/`hw.assets_mut()` dependencies.
|
|
**How:** Route through asset/storage services while preserving commit and bank visibility semantics.
|
|
**File(s):** `crates/console/prometeu-system/src/services/vm_runtime`, `crates/console/prometeu-firmware`.
|
|
|
|
### Step 4 - Migrate clock/pacing/telemetry coupling
|
|
|
|
**What:** Move any platform-facing clock or telemetry coupling out of `HardwareBridge`.
|
|
**How:** Use explicit runtime/platform services.
|
|
**File(s):** `crates/console/prometeu-system/src/services/vm_runtime`, HAL telemetry modules.
|
|
|
|
## Test Requirements
|
|
|
|
### Unit Tests
|
|
|
|
- Audio/input/asset syscall tests pass.
|
|
|
|
### Integration Tests
|
|
|
|
- `cargo test -p prometeu-system -p prometeu-firmware -p prometeu-drivers`.
|
|
|
|
### Manual Verification
|
|
|
|
- `rg "audio_mut|pad_mut|touch_mut|assets_mut" crates/console` does not show production bridge dependencies.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- [ ] Audio migrated to platform service.
|
|
- [ ] Input/touch migrated to platform service.
|
|
- [ ] Assets/storage migrated to platform service.
|
|
- [ ] Clock/pacing/telemetry bridge coupling removed where applicable.
|
|
|
|
## Dependencies
|
|
|
|
- `PLN-0104`.
|
|
- `PLN-0105`.
|
|
- `PLN-0106`.
|
|
|
|
## Risks
|
|
|
|
- Asset visibility semantics are high risk. Keep behavior-preserving tests broad.
|