Real Render Worker Establishment
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
-198
@@ -1,198 +0,0 @@
|
||||
---
|
||||
id: DEC-0032
|
||||
ticket: real-render-worker-establishment
|
||||
title: Platform Layer and HardwareBridge Elimination
|
||||
status: accepted
|
||||
created: 2026-06-06
|
||||
accepted:
|
||||
agenda: AGD-0042
|
||||
plans: [PLN-0098, PLN-0099, PLN-0100, PLN-0101, PLN-0102, PLN-0103, PLN-0104, PLN-0105, PLN-0106, PLN-0107, PLN-0108, PLN-0109]
|
||||
tags: [runtime, platform, hardware, host, hal, renderer, architecture]
|
||||
---
|
||||
|
||||
## Status
|
||||
|
||||
Decision draft emitted from accepted agenda `AGD-0042`.
|
||||
|
||||
This decision is ready for review. Once accepted, it becomes the normative contract for plans that prepare Prometeu's platform layer before the real render worker work in `AGD-0043`.
|
||||
|
||||
## Contexto
|
||||
|
||||
`DEC-0031` established the VM/render boundary: closed render submissions, single-slot handoff, frame pacing, AppMode policy, ownership epoch, and render telemetry.
|
||||
|
||||
The current implementation still depends on `HardwareBridge`, a monolithic trait that exposes render, composer, `Gfx`, audio, input, touch, assets, frame begin, and presentation through one runtime-facing object. That bridge was useful as an early abstraction, but it is no longer sufficient for a high-quality handheld-style runtime.
|
||||
|
||||
The goal is no longer to make `HardwareBridge` the permanent host-implemented interface. The goal is to replace it with an explicit platform layer made of domain services/facades. Runtime code should depend on stable platform contracts; host/board code should provide concrete implementations.
|
||||
|
||||
This decision prepares the platform boundary. It does not implement the real render worker. Worker establishment remains scoped to `AGD-0043`.
|
||||
|
||||
## Decisao
|
||||
|
||||
Prometeu SHALL replace the monolithic `HardwareBridge` model with a platform layer composed of explicit domain services/facades.
|
||||
|
||||
`HardwareBridge` SHALL NOT survive as a final compatibility contract. It MAY exist only as temporary migration scaffold. The end state MUST remove `HardwareBridge` and all production/runtime dependencies on it.
|
||||
|
||||
The migration MAY begin with render, because render blocks the real worker path, but it MUST NOT stop there. The migration MUST cover every domain currently coupled through `HardwareBridge`: render, Game2D frame composition, audio, input/touch, assets/storage, clock/pacing, and telemetry where applicable.
|
||||
|
||||
The first implementation wave SHALL prepare render-worker-safe boundaries without introducing the real worker yet:
|
||||
|
||||
- introduce an owned `RenderSubmissionSink`;
|
||||
- introduce minimal typed render submission errors;
|
||||
- remove immediate framebuffer writes from `gfx2d` and `gfxui` syscalls;
|
||||
- move Game2D frame composition into a logical-side `Game2DFrameComposer` service/facade;
|
||||
- replace test fixtures centered on `Hardware::new()` with `TestPlatform`.
|
||||
|
||||
## Rationale
|
||||
|
||||
A handheld-quality runtime needs clear separation between platform policy and board/host implementation.
|
||||
|
||||
The runtime/OS owns:
|
||||
|
||||
- lifecycle and AppMode policy;
|
||||
- VM execution;
|
||||
- frame pacing;
|
||||
- render ownership and handoff;
|
||||
- logical frame composition;
|
||||
- command buffers;
|
||||
- resource visibility policy;
|
||||
- telemetry semantics.
|
||||
|
||||
The host/board implementation owns:
|
||||
|
||||
- window/surface or physical framebuffer;
|
||||
- concrete present implementation;
|
||||
- physical input events;
|
||||
- audio backend;
|
||||
- IO/storage backend;
|
||||
- host threads, cores, DMA, or coprocessor mapping.
|
||||
|
||||
A single `HardwareBridge` encourages accidental coupling. It lets VM syscalls, firmware, Hub, renderer, audio, input, assets, and present share the same mutable object. That model makes it too easy for future worker work to pass `&mut Hardware`, `&mut Gfx`, or live `FrameComposer` state across the render boundary.
|
||||
|
||||
Explicit facades make dependencies visible and testable. They also let each domain evolve with the lifecycle, threading, and error semantics it actually needs.
|
||||
|
||||
## Invariantes / Contrato
|
||||
|
||||
### 1. No final `HardwareBridge`
|
||||
|
||||
`HardwareBridge` MUST be removed from the final architecture of this migration.
|
||||
|
||||
During migration, code MAY use adapters or temporary accessors to bridge old and new APIs. Those adapters MUST be treated as implementation scaffolding, not as new public/runtime architecture.
|
||||
|
||||
`HardwareBridge` MUST NOT inherit the new facades as a way to preserve itself as a permanent aggregate contract.
|
||||
|
||||
### 2. Facades live at the right layer
|
||||
|
||||
Contracts/facades SHALL live in `prometeu-hal`.
|
||||
|
||||
Local/default and test implementations SHALL live in `prometeu-drivers` unless a domain has a stronger existing home.
|
||||
|
||||
Operational integration and ownership orchestration SHALL live in `prometeu-system` and host crates.
|
||||
|
||||
### 3. Render submission is owned
|
||||
|
||||
`RenderSubmissionSink` SHALL accept owned `RenderSubmission` values.
|
||||
|
||||
The owned contract is required because asynchronous handoff transfers ownership to a consumer. Local/synchronous paths MAY adapt internally, but the facade MUST be compatible with future worker handoff.
|
||||
|
||||
### 4. Render submission errors are typed
|
||||
|
||||
The preparation work SHALL introduce a minimal typed error surface for submission/render publication.
|
||||
|
||||
The API MUST NOT be born infallible if the next worker stage will immediately need typed failure. Panic containment may remain as a safety net, but normal backend failure should have an explicit result type.
|
||||
|
||||
### 5. `gfx2d` and `gfxui` syscalls buffer commands only
|
||||
|
||||
`gfx2d.*` and `gfxui.*` syscalls MUST NOT mutate the framebuffer immediately.
|
||||
|
||||
Those syscalls SHALL record commands into the appropriate logical command buffer. Pixels change only when a closed render submission is consumed/published by the render path.
|
||||
|
||||
The first regression tests MUST include `gfx2d.clear` and `gfx2d.draw_text` proving that syscalls buffer commands and presentation happens only after frame closure/publication.
|
||||
|
||||
### 6. Game2D composition is logical-side state
|
||||
|
||||
`bind_scene`, `set_camera`, `emit_sprite`, and `close_game2d_packet` are logical frame preparation, not physical backend behavior.
|
||||
|
||||
The migration SHALL introduce `Game2DFrameComposer` as the logical-side service/facade for Game2D frame composition. Its implementation may move in phases, but it MUST NOT remain conceptually part of a physical render backend.
|
||||
|
||||
### 7. Tests use `TestPlatform`
|
||||
|
||||
Tests that need a full local platform fixture SHALL migrate toward `TestPlatform`.
|
||||
|
||||
`TestPlatform` SHOULD keep tests ergonomic while making dependencies explicit through the new facades. It MUST NOT preserve `HardwareBridge` as hidden compatibility.
|
||||
|
||||
### 8. Render may migrate first, but the migration is complete only when every domain is moved
|
||||
|
||||
The render path MAY be migrated first.
|
||||
|
||||
The architecture is not complete until audio, input/touch, assets/storage, clock/pacing, telemetry where applicable, firmware, Hub, runtime, host desktop, and tests no longer depend on `HardwareBridge`.
|
||||
|
||||
## Impactos
|
||||
|
||||
### Spec
|
||||
|
||||
Specs need to describe the platform layer as explicit services/facades rather than a monolithic hardware bridge.
|
||||
|
||||
Render specifications must state that `gfx2d`/`gfxui` syscalls buffer commands and that framebuffer mutation occurs through render submission consumption/publication.
|
||||
|
||||
### Runtime
|
||||
|
||||
Runtime code must stop depending on `&mut dyn HardwareBridge`.
|
||||
|
||||
VM dispatch must stop using `hw.gfx_mut()` for immediate drawing. Runtime frame closure must depend on logical services such as `Game2DFrameComposer` and publication facades such as `RenderSubmissionSink`.
|
||||
|
||||
### HAL
|
||||
|
||||
`prometeu-hal` must define the stable contracts for the platform layer.
|
||||
|
||||
At minimum, the first wave needs `RenderSubmissionSink` and its typed error. Later waves should define or refine composer, audio, input/touch, assets/storage, clock/pacing, and telemetry facades.
|
||||
|
||||
### Drivers
|
||||
|
||||
`prometeu-drivers` should provide local/default implementations and `TestPlatform`.
|
||||
|
||||
The existing `prometeu_drivers::Hardware` may be used as a migration source, but it must not remain the final runtime-facing architecture.
|
||||
|
||||
### Host
|
||||
|
||||
Host crates must move from directly owning and exposing `Hardware` as the runtime's universal bridge toward implementing platform services.
|
||||
|
||||
The desktop host may remain the first concrete integration, but the contracts must remain portable to handheld board support, emulator, web, or coprocessor/DMA implementations.
|
||||
|
||||
### Firmware / Hub
|
||||
|
||||
Firmware and Hub must migrate away from `publish_render_submission` on `HardwareBridge` and toward explicit render submission publication/platform services.
|
||||
|
||||
### Tests
|
||||
|
||||
Tests must migrate from direct `Hardware::new()` dependence to `TestPlatform` or narrower facade-specific fixtures.
|
||||
|
||||
Tests must be updated where they assume immediate framebuffer mutation from `gfx2d`/`gfxui` syscalls.
|
||||
|
||||
## Referencias
|
||||
|
||||
- `AGD-0042`: Host Hardware and Render Boundary Preparation.
|
||||
- `AGD-0043`: Real Render Worker Establishment.
|
||||
- `DEC-0031`: VM and Render Parallel Execution Boundary.
|
||||
- `LSN-0048`: Render Workers Need a Closed Packet Contract.
|
||||
|
||||
## Propagacao Necessaria
|
||||
|
||||
Create implementation plans before editing specs or code.
|
||||
|
||||
Recommended plan sequence:
|
||||
|
||||
1. introduce `RenderSubmissionSink` and minimal typed submit error;
|
||||
2. migrate local render publication away from `HardwareBridge`;
|
||||
3. remove immediate framebuffer writes from `gfx2d`/`gfxui` syscalls and update tests;
|
||||
4. introduce `Game2DFrameComposer` as logical-side service/facade;
|
||||
5. introduce `RuntimePlatform`/`Platform` and `TestPlatform`;
|
||||
6. migrate firmware, Hub, runtime, host desktop, and tests to explicit facades;
|
||||
7. migrate remaining domains: audio, input/touch, assets/storage, clock/pacing, telemetry as needed;
|
||||
8. remove `HardwareBridge`;
|
||||
9. update specs and lessons after implementation publishes the new structure.
|
||||
|
||||
`AGD-0043` SHOULD NOT move to implementation until this decision has produced enough platform boundary work that a render worker can be built without `&mut Hardware`, `&mut Gfx`, live `FrameComposer`, or mutable VM state crossing into the worker.
|
||||
|
||||
## Revision Log
|
||||
|
||||
- 2026-06-06: Initial decision draft generated from accepted `AGD-0042`.
|
||||
@@ -1,296 +0,0 @@
|
||||
---
|
||||
id: DEC-0033
|
||||
ticket: real-render-worker-establishment
|
||||
title: Real Render Worker Contract
|
||||
status: accepted
|
||||
created: 2026-06-15
|
||||
accepted:
|
||||
agenda: AGD-0043
|
||||
plans: [PLN-0110, PLN-0111, PLN-0112, PLN-0113, PLN-0114, PLN-0115, PLN-0116, PLN-0117, PLN-0118, PLN-0119, PLN-0120, PLN-0121]
|
||||
tags: [runtime, renderer, worker, concurrency, host, hal, architecture]
|
||||
---
|
||||
|
||||
## Status
|
||||
|
||||
Decision accepted from agenda `AGD-0043`.
|
||||
|
||||
This is the normative contract for implementation plans that establish the real render worker for Prometeu.
|
||||
|
||||
## Contexto
|
||||
|
||||
`DEC-0031` established the VM/render boundary around closed render submissions, single-slot handoff, frame pacing, AppMode policy, ownership epoch, and render telemetry.
|
||||
|
||||
`DEC-0032` and plans `PLN-0098` through `PLN-0109` prepared the platform boundary required for a real worker:
|
||||
|
||||
- `HardwareBridge` was removed from production/runtime contracts;
|
||||
- `RuntimePlatform` became the runtime-facing platform service boundary;
|
||||
- `RenderSubmissionSink` accepts owned render submissions;
|
||||
- `Game2DFrameComposer` separates logical Game 2D frame closure from backend rendering;
|
||||
- `gfx2d.*` and `gfxui.*` syscalls buffer commands instead of mutating `Gfx` immediately;
|
||||
- firmware, Hub, runtime, host desktop, and tests moved to platform services;
|
||||
- specs now state that worker/render consumers must not depend on `&mut Hardware`, `&mut Gfx`, live `FrameComposer`, or mutable VM state.
|
||||
|
||||
The remaining work is to replace the cooperative/local `LocalRenderWorker` proof with a real worker that drains render submissions without blocking VM progress and publishes complete RGBA8888 frames for host presentation.
|
||||
|
||||
## Decisao
|
||||
|
||||
Prometeu SHALL implement the real render worker as a runtime-owned worker controller with host-provided backend integration.
|
||||
|
||||
The worker controller SHALL live in `prometeu-system`, near `RenderManager`, because `RenderManager` owns AppMode policy, ownership/epoch, latest-wins handoff semantics, and render telemetry.
|
||||
|
||||
Shared contract types and traits SHALL live in `prometeu-hal` when they cross runtime/host/driver boundaries. Local/default and test implementations SHALL live in `prometeu-drivers` or host crates as appropriate.
|
||||
|
||||
The worker SHALL consume owned `RenderSubmission` values through a thread-safe single-slot latest-wins handoff. The VM producer MUST NOT block on rasterization, publication, presentation, or worker completion.
|
||||
|
||||
The worker SHALL publish owned RGBA8888 frames, not native window/swapchain objects. The initial shared frame type SHALL be `OwnedRgba8888Frame` in `prometeu-hal`.
|
||||
|
||||
The host event loop SHALL remain responsible for native window upload/present. The worker MUST NOT depend on winit, pixels, SDL, swapchain handles, native textures, or host window APIs.
|
||||
|
||||
The agenda may be implemented through multiple plans, but `AGD-0043` is complete only when the worker functions on the real host path, not merely in fake/local tests.
|
||||
|
||||
## Rationale
|
||||
|
||||
The real worker must prove the architecture promised by `DEC-0031`: VM execution and render consumption can proceed independently without crossing mutable runtime state into the renderer.
|
||||
|
||||
Putting the controller in `prometeu-system` keeps render policy in the same layer that already owns frame lifecycle, ownership epochs, latest-wins behavior, and telemetry. Putting it only in the host would make the contract desktop-specific and harder to test without a window.
|
||||
|
||||
Publishing an owned RGBA8888 frame keeps the worker host-agnostic. The host can upload that frame to any native presentation backend while the worker stays testable through ordinary memory comparisons.
|
||||
|
||||
Using a single explicit pending slot directly models the accepted backpressure rule. Channels or queues can accidentally preserve history or block producers. The runtime contract is not "render every produced frame"; it is "the latest complete submission wins and the VM does not wait for the consumer."
|
||||
|
||||
Read-only bank access by id preserves the no-copy resource boundary. Banks are render resources, not payloads to duplicate into each submission. The worker should resolve resource ids through a compact read-only interface without taking `&mut Hardware`, `&mut Gfx`, a live `FrameComposer`, or VM state.
|
||||
|
||||
## Invariantes / Contrato
|
||||
|
||||
### 1. Runtime controller ownership
|
||||
|
||||
The worker controller MUST live in `prometeu-system`.
|
||||
|
||||
`RenderManager` SHALL remain the authority for:
|
||||
|
||||
- AppMode render policy;
|
||||
- ownership/epoch;
|
||||
- latest-wins handoff semantics;
|
||||
- render telemetry;
|
||||
- stale submission discard;
|
||||
- shutdown/request-stop coordination visible to runtime policy.
|
||||
|
||||
Host crates MAY instantiate or wire the controller, but they MUST NOT redefine worker semantics.
|
||||
|
||||
### 2. Shared HAL contracts
|
||||
|
||||
`prometeu-hal` SHALL define shared types/traits that cross the runtime/host/driver boundary.
|
||||
|
||||
At minimum, the worker work SHALL introduce:
|
||||
|
||||
- `OwnedRgba8888Frame`;
|
||||
- compact read-only render resource access contracts for bank lookup by id;
|
||||
- typed worker/backend error contracts where they are shared across crates.
|
||||
|
||||
### 3. Owned RGBA8888 frame publication
|
||||
|
||||
`OwnedRgba8888Frame` SHALL represent a completed logical frame ready for host upload/present.
|
||||
|
||||
It MUST include:
|
||||
|
||||
- `FrameId`;
|
||||
- render ownership/epoch metadata;
|
||||
- width;
|
||||
- height;
|
||||
- `stride_pixels`;
|
||||
- owned RGBA8888 pixel data as `Vec<u32>`.
|
||||
|
||||
The pixel data MUST use the canonical RGBA8888 raw value contract already used by the runtime specs. It MUST NOT be described as native-endian host pixels, native texture data, or backend-specific surface memory.
|
||||
|
||||
Repeating the last valid frame SHALL mean reusing the last published `OwnedRgba8888Frame`, not recomposing from VM state or live composer state.
|
||||
|
||||
### 4. Thread-safe latest-wins handoff
|
||||
|
||||
The real handoff SHALL be a thread-safe single-slot latest-wins structure.
|
||||
|
||||
The initial implementation SHOULD use an explicit slot based on `Mutex<Option<RenderSubmission>> + Condvar`.
|
||||
|
||||
Producer behavior:
|
||||
|
||||
- publish replaces the pending submission if one already exists;
|
||||
- replacement increments drop/replacement telemetry;
|
||||
- publish MUST NOT wait for rasterization or present;
|
||||
- publish MUST wake the consumer when needed.
|
||||
|
||||
Consumer behavior:
|
||||
|
||||
- wait for pending submission or shutdown;
|
||||
- take ownership of the latest pending submission;
|
||||
- leave the pending slot empty while work is in flight;
|
||||
- discard stale work before publication if ownership/epoch no longer matches.
|
||||
|
||||
### 5. Pending and in-flight are separate
|
||||
|
||||
The worker MUST distinguish pending submissions from in-flight work.
|
||||
|
||||
Once the worker takes a submission, that submission is in flight. New producer submissions may replace the pending slot while the worker is still rasterizing the previous in-flight submission.
|
||||
|
||||
Before publishing an in-flight frame, the worker MUST check:
|
||||
|
||||
- stop/shutdown state;
|
||||
- render owner;
|
||||
- render epoch/generation.
|
||||
|
||||
If the frame is stale, the worker MUST discard it and update telemetry. It MUST NOT publish stale pixels.
|
||||
|
||||
### 6. Shutdown is bounded
|
||||
|
||||
Worker shutdown MUST be bounded and observable.
|
||||
|
||||
The shutdown timeout MUST be configurable. The initial default SHOULD be `250ms`.
|
||||
|
||||
On shutdown:
|
||||
|
||||
- stop state MUST be signaled;
|
||||
- the worker MUST be woken if it is waiting;
|
||||
- join MUST complete within the configured bound or return/report a `ShutdownTimeout` failure;
|
||||
- in-flight work MAY finish rasterization, but MUST NOT publish after stop/epoch invalidation says it is stale.
|
||||
|
||||
### 7. Read-only bank access by id
|
||||
|
||||
The render backend SHALL resolve render resources through a compact read-only interface by stable ids.
|
||||
|
||||
Banks are read-only by definition during render consumption. The worker MUST NOT copy entire banks into submissions. The worker MUST NOT require bank snapshots. The worker MUST NOT require `Arc` as part of the public contract.
|
||||
|
||||
Implementation may use any internal storage strategy that satisfies the public contract, but the render worker contract is ids plus read-only access.
|
||||
|
||||
Resource installation, mutation, and residency changes remain outside in-flight render consumption.
|
||||
|
||||
### 8. Backend and host presentation split
|
||||
|
||||
The worker backend SHALL consume `RenderSubmission` plus read-only resource access and produce `OwnedRgba8888Frame`.
|
||||
|
||||
The host event loop SHALL upload/present the latest published frame through its native API.
|
||||
|
||||
The worker MUST NOT call native window present directly unless a future decision revises the host presentation model.
|
||||
|
||||
### 9. Typed error model
|
||||
|
||||
The worker work SHALL introduce a minimal typed error model, such as `RenderWorkerError`.
|
||||
|
||||
The error model MUST cover at least:
|
||||
|
||||
- backend unavailable;
|
||||
- render failed;
|
||||
- publish/present handoff failed;
|
||||
- shutdown timeout;
|
||||
- stale submission discarded;
|
||||
- worker panic captured as internal failure.
|
||||
|
||||
Panic containment MAY remain as a safety net. Ordinary worker/backend failure MUST NOT rely on panic as the normal reporting path.
|
||||
|
||||
### 10. Telemetry
|
||||
|
||||
Worker telemetry SHALL preserve and extend the existing render telemetry model.
|
||||
|
||||
At minimum, telemetry SHOULD include:
|
||||
|
||||
- submissions produced;
|
||||
- pending submissions replaced/dropped;
|
||||
- submissions consumed;
|
||||
- frames published/presented;
|
||||
- stale submissions discarded;
|
||||
- render failures;
|
||||
- repeated-frame count;
|
||||
- shutdown timeout count.
|
||||
|
||||
Telemetry MUST NOT change VM semantics.
|
||||
|
||||
### 11. Test contract
|
||||
|
||||
The worker contract MUST be proven without a native window.
|
||||
|
||||
Tests SHALL use deterministic synchronization primitives such as barriers and condvars, not timing sleeps as the primary proof mechanism.
|
||||
|
||||
The test matrix MUST prove:
|
||||
|
||||
- VM producer does not block when worker rasterization is held;
|
||||
- latest-wins replacement occurs while a frame is in flight;
|
||||
- stale owner/epoch prevents publication;
|
||||
- shutdown is bounded;
|
||||
- typed errors and telemetry are emitted;
|
||||
- repeat uses the last published `OwnedRgba8888Frame`;
|
||||
- fake/local backend behavior matches the contract before desktop integration.
|
||||
|
||||
### 12. Final scope
|
||||
|
||||
The implementation MAY be split into multiple plans.
|
||||
|
||||
However, the agenda is not complete until the real host path uses the worker. A fake/local backend is required for contract tests, but it is not sufficient as the final state of `AGD-0043`.
|
||||
|
||||
## Impactos
|
||||
|
||||
### Spec
|
||||
|
||||
Runtime specs must document:
|
||||
|
||||
- `OwnedRgba8888Frame`;
|
||||
- the thread-safe single-slot latest-wins worker handoff;
|
||||
- the worker/host presentation split;
|
||||
- read-only bank access by id;
|
||||
- shutdown and typed error behavior;
|
||||
- telemetry expectations.
|
||||
|
||||
### Runtime
|
||||
|
||||
`prometeu-system` must add the worker controller and integrate it with `RenderManager`.
|
||||
|
||||
The VM tick path must submit render work without blocking on worker consumption.
|
||||
|
||||
### HAL
|
||||
|
||||
`prometeu-hal` must expose shared worker contracts:
|
||||
|
||||
- owned RGBA8888 frame type;
|
||||
- render resource read-only access traits;
|
||||
- worker/backend error types as needed.
|
||||
|
||||
### Drivers
|
||||
|
||||
`prometeu-drivers` must provide fake/local implementations suitable for deterministic tests and non-window integration.
|
||||
|
||||
Concrete local rendering may continue to use existing GFX machinery internally, but must expose the worker-facing contract without leaking `&mut Hardware`, `&mut Gfx`, or live `FrameComposer`.
|
||||
|
||||
### Host
|
||||
|
||||
The desktop host must integrate the real worker path and upload/present the latest published `OwnedRgba8888Frame` through its native window backend.
|
||||
|
||||
The host owns native presentation; the worker owns render consumption and frame publication.
|
||||
|
||||
### Tests
|
||||
|
||||
Tests must cover concurrency behavior deterministically and must include final host-path integration evidence.
|
||||
|
||||
## Referencias
|
||||
|
||||
- `AGD-0043`: Real Render Worker Establishment.
|
||||
- `AGD-0042`: Host Hardware and Render Boundary Preparation.
|
||||
- `DEC-0031`: VM and Render Parallel Execution Boundary.
|
||||
- `DEC-0032`: Platform Layer and HardwareBridge Elimination.
|
||||
- `LSN-0048`: Render Workers Need a Closed Packet Contract.
|
||||
- `docs/specs/runtime/04-gfx-peripheral.md`.
|
||||
- `docs/specs/runtime/11-portability-and-cross-platform-execution.md`.
|
||||
|
||||
## Propagacao Necessaria
|
||||
|
||||
Create implementation plans before editing specs or code.
|
||||
|
||||
Recommended plan sequence:
|
||||
|
||||
1. define `OwnedRgba8888Frame`, read-only bank access contracts, and worker error types in HAL;
|
||||
2. introduce the thread-safe latest-wins handoff and deterministic fake/local worker tests;
|
||||
3. implement worker controller lifecycle, stop token, bounded shutdown, pending/in-flight separation, and telemetry in `prometeu-system`;
|
||||
4. implement fake/local backend that consumes `RenderSubmission` and produces `OwnedRgba8888Frame`;
|
||||
5. integrate runtime render submission path with the worker without blocking VM ticks;
|
||||
6. add stale owner/epoch discard and repeat-last-published-frame behavior;
|
||||
7. integrate desktop host upload/present from the latest published `OwnedRgba8888Frame`;
|
||||
8. update specs and final validation tests.
|
||||
|
||||
## Revision Log
|
||||
|
||||
- 2026-06-15: Initial decision draft generated from accepted `AGD-0043`.
|
||||
Reference in New Issue
Block a user