step 6
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user