Phase 6.1 Stream D - LiteDB generation-sealed cache + ResilientConfigReader + UsingStaleConfig flag #81
Reference in New Issue
Block a user
Delete Branch "phase-6-1-stream-d-litedb-sealed-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes Stream D per docs/v2/implementation/phase-6-1-resilience-and-observability.md.
Summary
GenerationSealedCachewrites<cache-root>/<clusterId>/<generationId>.dbas a read-only LiteDB file per generation. AtomicCURRENTpointer via temp-file +File.Replace. Prior generations preserved on disk for audit.ResilientConfigReaderwraps a central-DB fetch with timeout 2s → retry N× jittered → fallback to sealed cache. Cancellation never retried. Write-path is expected to bypass this wrapper + fail hard.StaleConfigFlag(Volatile.Read/Write bool). MarkStale on cache fallback, MarkFresh on central-DB success. Surface hook already wired into /healthz body in Stream C; Admin /hosts wires in Stream E.GenerationCacheUnavailableException; mixed-generation reads are structurally impossible.Test plan
dotnet test: 1033 passing (baseline 906, +127 for Phase 6.1).ResilientConfigReader+ sealed-cache write hook into the real Configuration read paths +sp_PublishGeneration— lands in Stream E / Admin refresh.🤖 Generated with Claude Code