step 6
Some checks failed
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m44s
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
Aiden
2026-05-11 20:06:14 +10:00
parent 0d57920bc1
commit 1d08dec5fe
7 changed files with 138 additions and 6 deletions

View File

@@ -6,8 +6,8 @@ Phases 1-5 separate durable state, coordination policy, render-facing snapshots,
## Status
- Phase 6 design package: proposed.
- Phase 6 implementation: Step 5 complete.
- Phase 6 design package: complete.
- Phase 6 implementation: Step 6 complete.
- Current alignment: `RuntimeStore` owns durable serialization, config, package metadata, preset IO, and persistence request execution; `CommittedLiveState` owns the current committed/session layer state; and `RuntimeCoordinator` publishes typed persistence requests for persisted mutations. Runtime-state persistence is now requested through the coordinator/event path and executed by the background writer.
Current persistence footholds:
@@ -270,9 +270,16 @@ Make app shutdown persistence behavior deterministic.
Initial target:
- stop accepting new requests
- flush latest pending snapshot with bounded wait
- report failure if flush fails
- [x] stop accepting new requests
- [x] flush latest pending snapshot with bounded wait
- [x] report failure if flush fails
Current implementation:
- `PersistenceWriter::StopAndFlush(timeout, error)` stops accepting new snapshots, forces debounced snapshots ready, drains pending work, and reports timeout/failure to the caller.
- `RuntimeStore::FlushPersistenceForShutdown(...)` provides the runtime-level shutdown API and records flush failures in `HealthTelemetry`.
- `OpenGLComposite::Stop()` and the destructor explicitly flush persistence after control services/backend/render-thread shutdown.
- `PersistenceWriterTests` cover shutdown draining, request rejection after shutdown, and timeout/retry behavior without rendering or DeckLink.
## Testing Strategy
@@ -320,7 +327,7 @@ Phase 6 can be considered complete once the project can say:
- [x] writes use temp-file/replace or equivalent atomic policy
- [x] persistence failures are reported through structured health/events
- [x] transient/live-only mutations do not request persistence
- [ ] shutdown flush behavior is explicit and tested
- [x] shutdown flush behavior is explicit and tested
- [x] `RuntimeStore` remains durable-state/serialization owner, not worker policy owner
- [x] persistence behavior has focused non-render tests