| Filename | Latest commit message | Latest commit date |
|---|---|---|
The CultInspector* attributes move from the Unity-only GameCult.Unity.Caching runtime assembly into GameCult.Caching, so headless shared models carry them. CultInspectorAssetPath keeps a System.Type the consumer names. CultInspectorDrawer claims either a value type (open generic definitions claim every closed form) or an Attribute subclass. CultInspectorModel owns what an inspector shows and which edits it may make, with no engine reference: - members: registry catalog slots for documents, [Key] slots for other MessagePack objects, public fields for unkeyed structs; Label, Hidden, ReadOnly, Order, Range, TextArea and AssetPath metadata; assignability by the rule the registry persists by. - shapes: string, integer, float, bool, enum, composite (an unkeyed value type rebuilt through the constructor whose parameters match its members, which covers the CultMath vectors, rect and Color32 without naming them), CultRecordRef<T> with candidate records, rank-1 list or array, dictionary, union limited to declared [Union] subtypes, nested, and unsupported with a reason (multi-dimensional arrays included). - CultInspectorDrawerClaims: attribute claims, then type claims, then built-in; invalid drawers and contested claims are errors and draw nothing. - dictionary keys by serialized identity (a record reference by its key string, null and "" alike), refusal of null, empty-reference and duplicate keys, fresh keys, and collections rebuilt as new instances. - CultInspectorEdit: a codec clone of the stored document; Commit upserts the copy, so a refused upsert leaves the cached object unchanged. ICultRecordRef exposes CultRecordRef<T>.Key without T, replacing the Studio's by-name GetProperty lookup. Tests (CultInspectorModelTests): member list and metadata, claim resolution order, declared-only union choices, record-reference candidates, dictionary key refusal, refused commit leaving the cached document unchanged, and shape classification. 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