Land fixes: directory flush records the schema id it wrote; ported drift and variant tests meet C2a's write set and typed refusal

Directory store now sets StoredSchemaId with StoredVersion after a page write (found by main's OwnPushOfALoadedDriftedEntryKeepsExpectHolding). RecordRewrittenUnderAnotherSchema stages the record, since a flush writes only the write set. Variant conflict test expects CultWriteConflictException.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-22 20:59:54 +02:00
commit f2cdb7897d
3 changed files with 6 additions and 2 deletions

View file

@ -90,7 +90,10 @@ namespace GameCult.Caching.Tests
var observed = cache.Get(DriftKey)!;
var storedAt = cache.GetStored(DriftKey)!.StoredAt;
using (var other = Drift(false, ReusedDrift).Open())
{
other.BackingStores[0].Push(other.GetStored(DriftKey)!);
other.BackingStores[0].PushAll();
}
using (var reader = Drift(false, ReusedDrift).Open())
Assert.That(reader.GetStored(DriftKey)!.StoredAt, Is.EqualTo(storedAt), "the rewrite kept storedAt");