Pin released Unity runtime and prove durable catalog import

This commit is contained in:
Meta Vens 2026-07-18 23:32:12 +01:00
commit 67c8f6a201
6 changed files with 32 additions and 14 deletions

View file

@ -373,6 +373,24 @@ await node.CatalogSurface().LatestAsync().ConfigureAwait(false);
await node.FlushAsync();
await using (var reopenedNode = await AetheriaStateNode.OpenAsync(
statePath,
"aetheria-legacy-catalog-import-reopen-proof",
useDirectoryStore: true))
{
var reopenedCatalog = await reopenedNode.RuntimeCatalog().LatestAsync().ConfigureAwait(false);
var reopenedCorporationKeys = reopenedCatalog.Corporations
.Select(corporation => corporation.CorporationKey)
.Where(key => !string.IsNullOrWhiteSpace(key))
.Distinct(StringComparer.Ordinal)
.ToArray();
if (reopenedCorporationKeys.Length != importedCorporationKeys.Length)
{
throw new InvalidDataException(
$"Reopened runtime catalog projected {reopenedCorporationKeys.Length} corporation keys after the importer flushed {importedCorporationKeys.Length}.");
}
}
Console.WriteLine($"Aetheria legacy catalog mapped into typed state: {statePath}");
Console.WriteLine($"Catalog: {catalog.RelativePath} {catalog.Bytes} bytes {catalog.Fingerprint}");
Console.WriteLine($"Name files: {nameFiles.Length}");