| Filename | Latest commit message | Latest commit date |
|---|---|---|
BeginEdit cloned Document eagerly but Record lazily from record.Document, so a cache change in place before Record's first read made the two copies come from different states. BeginEdit now serializes the document once and deserializes Document from those bytes; Record deserializes the same bytes on first read. Record is the state the edit began from, and costs one deserialize only when a drawer reads it, with no second serialize. Each commit still spends the edit, so a slider drag begins an edit per frame; that serialize was already paid for Document, and Record adds a deserialize only in frames where a drawer reads it. The new test mutates the cached document between BeginEdit and the first Record read; it fails on the lazy clone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
| .. | ||
| Fixtures | ||
| AssemblyInfo.cs | ||
| BackingStoreTests.cs | ||
| ConditionalCommitTests.cs | ||
| CultDocumentRegistryTests.cs | ||
| CultInspectorModelTests.cs | ||
| DirectoryStoreDurabilityTests.cs | ||
| DocumentShapeTests.cs | ||
| GameCult.Caching.Tests.csproj | ||
| PreCut2FixtureDocuments.cs | ||
| PreCut2StoreFormatTests.cs | ||
| README.md | ||
| SerializationOptionsTests.cs | ||
| StoreRoutingTests.cs | ||
GameCult.Caching.Tests
GameCult.Caching.Tests contains NUnit tests for the caching library and its
MessagePack persistence stores.
Scope
The tests currently cover:
SingleFileMessagePackBackingStoreround-trips, external pulls, and the dirty-pull guardDirectoryMessagePackBackingStorewith thecultcache.store.v4.directory-content-addressed-pagesmanifest: page writes, clean flushes, concurrent writers under the commit lease, external deltas, unflushed local keys, orphaned pages, and observers running after the lease is releasedCultCacheMessagePack.OpenAsync, persisted globals, dirty state, and flush on dispose- cache lookups (
Get,GetAll, runtime-type upserts) CultCache.Commitbatches on a directory store: visibility after the store commits, abandoned stages, sealed batches, observers committing again- Cult document payloads, registry shape rejections, canonical schema fixtures, and schema drift reports
- hand-written MessagePack snapshot and record serialization
StoreRoutingTests: the store-composition contract (routing, attachment is hydration, read-only stores, global singletons, assignable lookups, batches, all-or-nothing loads)ConditionalCommitTests:Expect,ExpectUnchanged,TryCommit, the single-file lock, strictly increasingstoredAt, and the same conditions on a directory storeDirectoryStoreDurabilityTests: failed manifest replace, content-addressed pages, the commit lease, orphan pages and tampered pages, with faults from real file locksPreCut2StoreFormatTests: stores written before Cut 2 still open
Selective hydration, the directory store's stage probes, pre-v4 directory
formats, and the SoA table are no longer in the tree; the SoA table is parked
at parked/cultcache-soa (docs/parked-features.md).
Run
dotnet test tests\GameCult.Caching.Tests\GameCult.Caching.Tests.csproj