CultLib/tests/GameCult.Caching.Tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens f01c0b6112 R-AL/R-AM/R-AO: C# regression tests for the fix batch
- R-AL: DataMemberNameCollidingWithAReferenceMembersAliasIsRefusedAtRegistration
  pins D10b's registration refusal. ReferenceMembersExcludesADataMember...
  pins the restored evaluator guard directly (hand-built descriptor via
  reflection, since D10b now closes the registry door this shape used to
  slip through).
- R-AM: CultNetDatabaseServer_SnapshotV1Handler_CatchesAnUntypedFault... and
  RudpCultNetSchemaServer_DispatchBackstop_LogsEveryUntypedHandlerFault pin
  the handler's catch and the backstop's logging, each against a real
  untyped fault.
- R-AO: Evaluator_CitedWithTwoInTargetCandidates_ResolvesToWhicheverThe-
  CallerListedFirst pins "first row in the caller's order wins" when two
  in-target rows share a key, in both row orders.

Every test in this commit was checked against a hand-reverted mutation of
its own production fix and confirmed to fail before being confirmed to pass
against the real fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 07:17:21 +02:00
..
Fixtures Mark pre-Cut 2 store fixtures binary 2026-09-13 17:17:49 +02:00
AssemblyInfo.cs Generate derived documents' members and require [Key] on every one 2026-09-13 21:19:08 +02:00
BackingStoreTests.cs Re-read the manifest outside the unleased load's exception filter 2026-09-14 14:51:37 +02:00
ConditionalCommitTests.cs Mark every Cult document [MessagePackObject] 2026-09-13 23:38:08 +02:00
CultAssetGuidKeyTests.cs Studio: refuse built-ins by asset identity, not GUID digits; add Clear for stale keys 2026-09-17 20:09:53 +02:00
CultDocumentRegistryTests.cs Delete the CultCache MessagePack source generator 2026-09-13 23:38:08 +02:00
CultDocumentSelectionSurfaceTests.cs R-AL/R-AM/R-AO: C# regression tests for the fix batch 2026-09-23 07:17:21 +02:00
CultInspectorModelTests.cs Replace the asset path attribute with a stable GUID identity 2026-09-17 18:43:03 +02:00
DirectoryStoreDurabilityTests.cs Mark every Cult document [MessagePackObject] 2026-09-13 23:38:08 +02:00
DocumentShapeTests.cs Persist get-only and readonly members the way MessagePack does 2026-09-14 00:21:21 +02:00
GameCult.Caching.Tests.csproj Delete the CultCache MessagePack source generator 2026-09-13 23:38:08 +02:00
PreCut2FixtureDocuments.cs Mark every Cult document [MessagePackObject] 2026-09-13 23:38:08 +02:00
PreCut2StoreFormatTests.cs Route each document type to one home store; attach hydrates; commit explicit batches 2026-09-13 17:57:58 +02:00
README.md Delete the CultCache MessagePack source generator 2026-09-13 23:38:08 +02:00
SerializationOptionsTests.cs Write an unset CultRecordRef as "" in every position 2026-09-14 21:34:23 +02:00
StoreRoutingTests.cs Cover GetByIndex resolving through assignable types 2026-09-14 13:43:45 +02:00

GameCult.Caching.Tests

GameCult.Caching.Tests contains NUnit tests for the caching library and its MessagePack persistence stores.

Scope

The tests currently cover:

  • SingleFileMessagePackBackingStore round-trips, external pulls, and the dirty-pull guard
  • DirectoryMessagePackBackingStore with the cultcache.store.v4.directory-content-addressed-pages manifest: page writes, clean flushes, concurrent writers under the commit lease, external deltas, unflushed local keys, orphaned pages, and observers running after the lease is released
  • CultCacheMessagePack.OpenAsync, persisted globals, dirty state, and flush on dispose
  • cache lookups (Get, GetAll, runtime-type upserts)
  • CultCache.Commit batches 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 increasing storedAt, and the same conditions on a directory store
  • DirectoryStoreDurabilityTests: failed manifest replace, content-addressed pages, the commit lease, orphan pages and tampered pages, with faults from real file locks
  • PreCut2StoreFormatTests: 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