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

@ -341,6 +341,7 @@ public sealed class DirectoryMessagePackBackingStore : CacheBackingStore
var pagePayload = CultDocumentMessagePackSerialization.SerializePersistedRecord(record);
var indexRecord = ToContentAddressedIndexRecord(record, pagePayload);
stored.StoredVersion = VersionOf(indexRecord.Payload);
stored.StoredSchemaId = stored.Descriptor.SchemaId;
currentIndex[key] = indexRecord;
WriteFileAtomically(
ContentAddressedRecordPath(indexRecord),