CultLib/tests/GameCult.Caching.Tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens fd9bbaf4a4 Tests: the ref-list gate compares schema ids after one write at both trees; the C2a writer takes a fixed clock
The 1.0.60 ref-list summary is taken after attach, an upsert of alpha, beta and the list reversed, and a flush, at 2.0.1 and at
head, and names records by schema id (the restamp-on-write ruling makes them equal). C2aGateWriter stamps every record with one
instant and compares the committed vectors byte for byte, the directory store as relative path and bytes with lock files left out.
The committed vectors are regenerated in the next commit, so TheCommittedVectorsAreWhatC2aWrites is red at this commit; it builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 07:57:29 +01:00
..
Fixtures CultMath tests: legacy CultPhasor JSON fixture written by the 86cd84a3 encoder 2026-10-17 19:25:20 +02:00
AssemblyInfo.cs UnionArmGuardTests: a later resolver's claim on a type the standard formatter already answered is never asked 2026-10-15 00:35:57 +02:00
BackingStoreTests.cs Public DeserializeSnapshot parses any stamp as in 1.0.61; stores judge the v1/v2 stamp in their own read paths; flush prose states the exact rule; the I/O refusal test asserts no write was reached 2026-10-22 18:34:15 +02:00
C2aGateWriter.cs Tests: the ref-list gate compares schema ids after one write at both trees; the C2a writer takes a fixed clock 2026-10-27 07:57:29 +01:00
CachelessSingleFileTests.cs Tests: three gates are reached by a stale guess followed by a settled cache, ordered with the store's hooks 2026-10-27 03:54:12 +01:00
CompatibleSchemaIdTests.cs Tests: a record a type reads but no type declares is read-only on every cache write path 2026-10-03 12:34:58 +02:00
ConditionalCommitTests.cs Land fixes: ported conditional-commit pins state C2a's identity, not main's (storedAt, message text) 2026-10-22 21:06:10 +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
CultCacheClockTests.cs Union golden: the store's clock is an internal seam, the writer pins it, the gate test runs under any switch 2026-10-11 02:58:54 +02:00
CultCacheJournalTests.cs Journal registration counts as disposed only once removal succeeds; a throwing hold body surfaces journal failures 2026-09-29 20:35:50 +02:00
CultCacheObserverTests.cs Keep the test frame from holding the subscription it checks the cache released 2026-09-29 20:03:08 +02:00
CultCacheProjectionTests.cs Kill the Stryker survivors in the projection and observer cuts 2026-09-29 17:46:36 +02:00
CultDocumentRegistryTests.cs CultCache: a second type for one schema is refused, typed 2026-09-30 16:15:57 +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 Cover valid surrogate pairs and a second unpaired surrogate in node ids 2026-09-29 15:49:51 +02:00
CultMathExprSerializationTests.cs ExprGraph resolver: nil is nil, decode refuses non-canonical encodings, pin nested shape, nil-name and depth rules 2026-10-14 07:54:32 +02:00
CultMathExprVariantTests.cs Caching.Tests: an ExprGraph record survives a cache, is inherited or overridden whole by variants, and follows its base 2026-10-14 20:31:44 +02:00
CultMathJsonTests.cs CultMathJson tests: legacy phasor names under Disallow, and a third occurrence is a duplicate 2026-10-17 20:33:44 +02:00
CultMathSerializationTests.cs Caching: MessagePack and JSON shapes for CultSiteCells, pinned 2026-10-16 18:16:37 +02:00
DirectoryStoreDurabilityTests.cs Public DeserializeSnapshot parses any stamp as in 1.0.61; stores judge the v1/v2 stamp in their own read paths; flush prose states the exact rule; the I/O refusal test asserts no write was reached 2026-10-22 18:34:15 +02:00
DocumentShapeTests.cs Persist get-only and readonly members the way MessagePack does 2026-09-14 00:21:21 +02:00
ElementIdEngineTests.cs Element ids: pin the inherited string key that makes a type one whole value 2026-10-16 02:27:52 +02:00
ElementIdTests.cs Restamp on write: one ownership rule, Owns, under which a type that reads a stored record whole may write it 2026-10-27 03:39:02 +01:00
EmittedDocumentTypes.cs C#: a type listing an id registers beside the type that owns it; the owner wins 2026-09-30 15:26:06 +02:00
ForeignRecordTests.cs Tests: fixtures that were read-only because their type read the record whole now lose a slot; restamp tests fixed 2026-10-27 03:46:27 +01:00
GameCult.Caching.Tests.csproj Delete the CultCache MessagePack source generator 2026-09-13 23:38:08 +02:00
NumericLeafVectorTests.cs Caching.Tests fixtures: element ids are 12-hex literals, the form the id rule accepts 2026-10-14 19:41:50 +02:00
PayloadDepthTests.cs Payload depth tests: the largest fixmap and a container header cut short at the limit 2026-10-11 08:58:50 +02:00
PreCut2FixtureDocuments.cs Mark every Cult document [MessagePackObject] 2026-09-13 23:38:08 +02:00
PreCut2StoreFormatTests.cs Cacheless single-file API: WriteDocument encodes the declared type, the registry is the call's argument, DecodeDocument moves to CultCodec, ReadStoreSnapshot's gate is pinned 2026-10-23 01:38:16 +02:00
PythonWrittenStoreTests.cs Tests: the Mesh test's unmarked file holds ids of a type defined in the Mesh assembly (a persisted layout is matched by CLR type name); the appended python record brings its catalog entry beside the cache's 2026-10-14 23:39:50 +02:00
README.md Delete the CultCache MessagePack source generator 2026-09-13 23:38:08 +02:00
RefListDriftTests.cs Tests: the ref-list gate compares schema ids after one write at both trees; the C2a writer takes a fixed clock 2026-10-27 07:57:29 +01:00
RestampOnWriteTests.cs Tests: a record under an id its entry only lists is published by that entry 2026-10-27 07:46:17 +01:00
SerializationOptionsTests.cs Write an unset CultRecordRef as "" in every position 2026-09-14 21:34:23 +02:00
SlotNilVectorTests.cs Caching and cultcache-ts tests: slot-nil rows for a four-byte UTF-8 character in a string slot and in a byte[] slot 2026-10-12 00:08:23 +02:00
StoreReadabilityTests.cs Tests: version identity (rewrite at the same storedAt, pull arrival, ExpectUnchanged, staleness check, own-write version, in-memory, SHA-256 definition) 2026-10-03 08:23:31 +02:00
StoreRoutingTests.cs Mark the three share-mode tests Windows-only 2026-09-29 04:17:31 +02:00
StoreSlices.cs CultCache: the store owns a file's bytes, not the record object 2026-10-03 10:47:30 +02:00
UnionArmGuardTests.cs Tests: inherited attributes, AllowPrivate subclass, null-formatter reason 2026-10-16 01:28:00 +02:00
UnionParityVectorTests.cs UnionParityVectorTests: a unit arm on a union no list reaches is pinned against the reference; comments no longer call id arms unit arms 2026-10-14 20:31:44 +02:00
VariantTests.cs Land fixes: ported conditional-commit pins state C2a's identity, not main's (storedAt, message text) 2026-10-22 21:06:10 +02:00
WriteSetTests.cs Tests: a staged record's catalog entry is the writer's encoding, not the file's slice 2026-10-03 12:08:21 +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