C#: the directory store's loaded id is its manifest's; the variant fixture names itself

A directory-store record's identity on disk is its manifest entry, which is what
a commit condition compares; the page holds its own copy of the id. A load now
takes StoredSchemaId from the manifest, so a manifest rewritten under an older
id (AConditionOnARecordUnderADeclaredOldIdHoldsInTheDirectoryStore) is the id
the condition expects. Canonicalisation had hidden the page and manifest
disagreeing in that fixture.

The whole-view test's variant overrides its name: a variant may not share its
base's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 12:52:15 +02:00
commit 5607d9703d
2 changed files with 5 additions and 2 deletions

View file

@ -354,7 +354,7 @@ namespace GameCult.Caching.Tests
using (var cache = Open(path, Declaring))
{
cache.Commit(batch => batch.Upsert(typeof(DeclaringDeck), new DeclaringDeck { Name = "b" }, b));
cache.Commit(batch => batch.UpsertVariant(v, b));
cache.Commit(batch => batch.UpsertVariant(v, b, new[] { cache.Override(typeof(DeclaringDeck), nameof(DeclaringDeck.Name), "v") }));
}
Rewrite(path, snapshot =>