prometeu-runtime/discussion/workflow/plans/PLN-0092-add-render-epoch-ownership-transitions.md
2026-06-05 09:44:29 +01:00

65 lines
2.1 KiB
Markdown

---
id: PLN-0092
ticket: vm-render-parallel-execution-boundary
title: Add Render Epoch Ownership Transitions
status: done
created: 2026-06-05
ref_decisions: [DEC-0031]
tags: [runtime, lifecycle, render-epoch, ownership]
---
## Briefing
`DEC-0031` requires foreground visual-owner transitions to invalidate stale render work using epoch/generation and owner identity.
## Objective
Add render epoch/ownership metadata and transition APIs so stale submissions cannot be presented after mode, app, crash, cartridge, or shutdown transitions.
## Dependencies
- Source decision: `DEC-0031`.
- `PLN-0089` provides the handoff abstraction.
## Scope
- Add epoch/generation and owner identity to render submission metadata.
- Add central `RenderManager` API for applying ownership transitions.
- Integrate lifecycle transitions that change visual owner.
- Reject stale pending/current submissions before present.
## Non-Goals
- Do not implement smooth visual transitions.
- Do not define Game pause/resume stack semantics from `DSC-0041`.
- Do not give host/HAL authority to decide ownership.
## Execution Method
1. Define render owner metadata shape: epoch/generation plus mode/app/surface owner as needed.
2. Extend `RenderSubmission` metadata and constructors.
3. Add `RenderManager` transition API that increments/applies epoch.
4. Call the API from SystemOS/firmware lifecycle transition points.
5. Update render consumption to check ownership before present.
6. Add discard telemetry hook for stale epoch.
## Acceptance Criteria
- Game -> Shell, Shell -> Game, crash, splash, cartridge/app swap, and shutdown can invalidate stale render work.
- Worker/current consumer cannot present a submission with stale epoch/owner.
- Host/HAL does not decide semantic ownership.
- Same physical surface can be reused with distinct logical ownership.
## Tests
- Unit test stale epoch discard before present.
- Integration test mode transition with pending Game submission.
- Test cartridge/app swap increments ownership even when AppMode remains unchanged.
## Affected Artifacts
- `RenderSubmission` metadata.
- `RenderManager`.
- Firmware/SystemOS transition code.
- Render publication path.