prometeu-runtime/discussion/workflow/plans/PLN-0121-final-worker-path-validation-and-hardening.md

3.3 KiB

id ticket title status created completed ref_decisions tags
PLN-0121 real-render-worker-establishment Final Worker Path Validation and Hardening open 2026-06-15
DEC-0033
runtime
renderer
worker
validation
hardening

Briefing

DEC-0033 is complete only when the worker functions on the real host path and the contract is proven end to end. This plan performs final validation, residue scans, and hardening before housekeeping.

Decisions de Origem

  • DEC-0033: Real Render Worker Contract.

Alvo

Prove the real render worker path satisfies DEC-0033 across HAL, system, drivers, firmware, host, specs, and tests.

Escopo

  • Run broad test suites.
  • Add missing edge tests found during validation.
  • Scan for forbidden coupling.
  • Verify host real path uses worker.
  • Verify local fallback still works.
  • Prepare evidence for discussion housekeeping.

Fora de Escopo

  • No new worker architecture.
  • No SDL migration.
  • No unrelated performance tuning.

Plano de Execucao

Step 1 - Run full affected test suite

What: Validate all touched crates. How: Run workspace tests and focused worker/host tests. File(s): repository root.

Step 2 - Run coupling residue scans

What: Enforce DEC-0033 boundaries. How: Search worker/system/HAL code for native window dependencies, mutable hardware/GFX/composer leaks, bank copying/snapshot terminology, and sleeps in concurrency tests. File(s): repository root.

Step 3 - Add missing hardening tests

What: Close any discovered gaps. How: Add focused tests for missing telemetry/error/shutdown/host-path cases. File(s): affected test modules.

Step 4 - Verify host path

What: Prove desktop host uses worker output. How: Run host tests and a manual/simple cartridge path with worker enabled; record evidence in final summary. File(s): host runner and runtime integration.

Step 5 - Prepare housekeeping evidence

What: Make DSC-0042 ready for final lesson/housekeeping. How: Record completed plan state and validation evidence for later discussion-housekeep. File(s): discussion artifacts if needed.

Criterios de Aceite

  • cargo test --workspace passes.
  • Focused worker, system, drivers, firmware, and host tests pass.
  • Residue scans show worker code does not depend on native window APIs.
  • Residue scans show worker boundary does not expose &mut Hardware, &mut Gfx, live FrameComposer, or mutable VM state.
  • Desktop host path uses the real worker output.
  • Local fallback still works.
  • discussion validate passes.

Tests / Validacao

  • cargo test --workspace
  • cargo test -p prometeu-system -p prometeu-drivers -p prometeu-hal -p prometeu-firmware -p prometeu-host-desktop-winit
  • discussion validate
  • rg "winit|pixels|SDL|swapchain|native texture" crates/console/prometeu-system crates/console/prometeu-hal -n
  • rg "&mut Hardware|&mut Gfx|FrameComposer" crates/console/prometeu-system/src/services/vm_runtime crates/console/prometeu-hal -n
  • rg "thread::sleep|sleep\\(" crates/console/prometeu-system/src/services/vm_runtime -n

Riscos

  • Final validation may expose earlier plan gaps; fix them in the narrowest affected plan/module.
  • Manual host evidence can be flaky if tied to native window availability; keep automated host-unit evidence as the primary gate.