prometeu-runtime/discussion/workflow/plans/PLN-0109-remove-hardwarebridge-and-update-specs.md

92 lines
2.6 KiB
Markdown

---
id: PLN-0109
ticket: real-render-worker-establishment
title: Remove HardwareBridge and Update Specs
status: done
created: 2026-06-06
completed:
ref_decisions: [DEC-0032]
tags: [platform, cleanup, specs, hal]
---
## Objective
Remove `HardwareBridge` from the codebase and publish the new platform layer contract in specs.
## Background
`DEC-0032` explicitly forbids preserving `HardwareBridge` as final compatibility. After all domains and tests migrate, the bridge must be deleted.
## Scope
### Included
- Delete `HardwareBridge`.
- Remove exports/imports and adapters that only preserve bridge compatibility.
- Update canonical specs in English.
- Run validation and broad tests.
### Excluded
- Do not implement the real render worker.
- Do not change platform service semantics beyond cleanup.
## Execution Steps
### Step 1 - Delete bridge
**What:** Remove `HardwareBridge` trait and module.
**How:** Delete source file and remove exports/imports.
**File(s):** `crates/console/prometeu-hal/src/hardware_bridge.rs`, `crates/console/prometeu-hal/src/lib.rs`, all remaining imports.
### Step 2 - Remove compatibility adapters
**What:** Delete migration-only adapters.
**How:** Replace final references with direct platform services or remove dead code.
**File(s):** HAL, drivers, system, firmware, host modules touched by previous plans.
### Step 3 - Update specs
**What:** Document platform layer and removal of monolithic hardware bridge.
**How:** Update runtime/host/render specs in English.
**File(s):** `docs/specs/runtime/*.md` and related canonical specs.
### Step 4 - Validate and test
**What:** Run discussion validation and broad test suite.
**How:** Use `discussion validate` and cargo tests for affected crates.
**File(s):** repository root.
## Test Requirements
### Unit Tests
- HAL, drivers, firmware, system tests pass.
### Integration Tests
- Host desktop crate compiles/tests.
- Stress cartridge still runs through local platform path.
### Manual Verification
- `rg "HardwareBridge"` returns no production references.
- `rg "Hardware::new\\("` returns no runtime-facing dependency; any remaining use is local implementation detail or removed.
## Acceptance Criteria
- [ ] `HardwareBridge` is deleted.
- [ ] No production/runtime dependencies remain.
- [ ] Specs describe platform services/facades.
- [ ] Tests pass.
- [ ] `AGD-0043` can proceed without needing `&mut Hardware`, `&mut Gfx`, live `FrameComposer`, or mutable VM state in the worker.
## Dependencies
- `PLN-0107`.
- `PLN-0108`.
## Risks
- Removing the bridge too early will cause broad breakage. Only execute after dependency searches show all call sites have migrated.