| Filename | Latest commit message | Latest commit date |
|---|---|---|
The reflective registry now decides persistence from the same two facts
MessagePack 3.1.7's DynamicObjectResolver uses: whether it can assign a keyed
member after construction, and which constructor it picks.
- Every keyed public member is discovered, get-only properties included.
MessagePack writes them all; the registry used to leave a get-only property
out of the catalog and schema id even when a constructor filled it.
- MessagePack picks the [SerializationConstructor] if marked, otherwise the
longest visible constructor whose parameters take the keyed members by
position (probed: a longer non-matching constructor falls back to a shorter
one). A member it cannot assign is read back only when its slot is below
that constructor's parameter count.
- A readonly field is assignable under AllowPrivate (probed: round-trips with
only a parameterless constructor), and otherwise only through the picked
constructor. Keyed readonly fields that constructor fills are accepted.
- A keyed member MessagePack writes but never reads back is refused with a
message naming the constructor position: a get-only property, a readonly
field without AllowPrivate, or a non-public setter without AllowPrivate,
when the picked constructor does not fill it (probed: loaded as default).
- An unkeyed public get-only property is refused; MessagePack throws "all
public members must mark KeyAttribute or IgnoreMemberAttribute". The unkeyed
message now names both fixes.
Schema ids change for five GameCult.Eve.Surface documents, whose keyed members
are all get-only properties filled by a [SerializationConstructor]:
gamecult.eve.surface, gamecult.eve.asset_catalog,
gamecult.eve.command_invocation, gamecult.eve.command_receipt and
gamecult.eve.provider_advertisement (EveProviderAdvertisementDocument). Their
catalogs gain those members. No .cc store under F:\Projects holds records of
these schemas: the gamecult.eve.provider_advertisement catalog in Gjallar's
scratch smoke stores belongs to GjallarProviderAdvertisementRecord, which has
no get-only members, and every other hit is prose or a git tree listing.
Consumer registration scan (CultLib src/tests/tools/samples, Ymir.Core,
Gjallar, AquaSynth Core/Faust, Mimir): 148 types register; the two rejections
(CounterState string key, BenchItem without [MessagePackObject]) are rejected
on
|
||
| .. | ||
| Fixtures | ||
| AssemblyInfo.cs | ||
| BackingStoreTests.cs | ||
| ConditionalCommitTests.cs | ||
| CultDocumentRegistryTests.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