Use managed catalog for Starbridge summary
This commit is contained in:
parent
1d60c150ac
commit
91548a8fc3
2 changed files with 24 additions and 1 deletions
|
|
@ -9338,6 +9338,8 @@ static void RequireAetheriaRuntimeVerseClientContract(string root)
|
|||
"state.Daemon.Health.LatestAsync()",
|
||||
"state.Daemon.CommandBoundary.LatestAsync()",
|
||||
"AetheriaRuntimeLoadoutTemplatesDocument",
|
||||
"ProjectStarbridgeSummaryAsync",
|
||||
"var catalog = await catalogDocument.LatestAsync().ConfigureAwait(false);",
|
||||
"ReadRuntimeCatalogSnapshot()",
|
||||
"ReadLoadoutTemplatesDocument()",
|
||||
"ReadPlayerSettingsDocument()",
|
||||
|
|
@ -9383,6 +9385,26 @@ static void RequireAetheriaRuntimeVerseClientContract(string root)
|
|||
"AetheriaRuntimeVerseClient still routes Eve state-ref resolution through the file-backed compatibility reader.");
|
||||
}
|
||||
|
||||
var starbridgeSummaryStart = client.IndexOf(
|
||||
"async Task<AetheriaRuntimeStarbridgeSessionSummaryDocument> ProjectStarbridgeSummaryAsync",
|
||||
StringComparison.Ordinal);
|
||||
if (starbridgeSummaryStart < 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaRuntimeVerseClient no longer exposes the managed Starbridge summary projection.");
|
||||
}
|
||||
|
||||
var indexedDocumentStart = client.IndexOf("static string IndexedDocumentId", starbridgeSummaryStart, StringComparison.Ordinal);
|
||||
var starbridgeSummaryBlock = indexedDocumentStart > starbridgeSummaryStart
|
||||
? client.Substring(starbridgeSummaryStart, indexedDocumentStart - starbridgeSummaryStart)
|
||||
: client.Substring(starbridgeSummaryStart);
|
||||
if (!starbridgeSummaryBlock.Contains("var catalog = await catalogDocument.LatestAsync().ConfigureAwait(false);", StringComparison.Ordinal) ||
|
||||
starbridgeSummaryBlock.Contains("ReadRuntimeCatalogSnapshot()", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Starbridge summary projection must use the managed runtime catalog document instead of reopening the catalog store.");
|
||||
}
|
||||
|
||||
var forbiddenClientCompatibilityStoreBypasses = new[]
|
||||
{
|
||||
"return Task.FromResult(AetheriaRuntimeCatalogStore.ReadPlayerSettings(StatePath));",
|
||||
|
|
|
|||
|
|
@ -831,11 +831,12 @@ namespace GameCult.Aetheria.State.Verse
|
|||
{
|
||||
var scenario = await starbridgeScenarioDocument.LatestAsync().ConfigureAwait(false);
|
||||
var session = await starbridgeSessionDocument.LatestAsync().ConfigureAwait(false);
|
||||
var catalog = await catalogDocument.LatestAsync().ConfigureAwait(false);
|
||||
return AetheriaRuntimeStarbridgeProjection.ProjectSessionSummary(
|
||||
frame,
|
||||
scenario,
|
||||
session,
|
||||
ReadRuntimeCatalogSnapshot());
|
||||
catalog);
|
||||
}
|
||||
|
||||
static string IndexedDocumentId(string prefix, int index)
|
||||
|
|
|
|||
Loading…
Reference in a new issue