Complete legacy operator UI and playout migration

This commit is contained in:
2026-07-12 02:05:49 +09:00
parent d2e16bf0c2
commit ffb8f43c19
131 changed files with 48473 additions and 228 deletions

View File

@@ -32,6 +32,11 @@ try
}
await VerifyOracleServerVersionAsync(runtime.Executor, cancellation.Token);
await VerifyStockSearchAsync(runtime.Executor, cancellation.Token);
await VerifyOverseasSelectorsAsync(runtime.Executor, cancellation.Token);
await VerifyExpertSelectorAsync(runtime.Executor, cancellation.Token);
await VerifyTradingHaltSelectorAsync(runtime.Executor, cancellation.Token);
await VerifyOperatorCatalogSchemaAsync(runtime.Executor, cancellation.Token);
var service = new LegacyMarketDataService(runtime.Executor);
await VerifySnapshotAsync(service, MarketDataView.Kospi, cancellation.Token);
@@ -64,10 +69,15 @@ catch (DatabaseInfrastructureException)
"No provider details were printed.");
return 1;
}
catch
catch (OverseasIndustryIndexSearchDataException exception)
{
Console.Error.WriteLine($"REAL_DB_SMOKE: FAIL - {exception.Message}");
return 1;
}
catch (Exception exception)
{
Console.Error.WriteLine(
"REAL_DB_SMOKE: FAIL - An unexpected error occurred. No provider details were printed.");
$"REAL_DB_SMOKE: FAIL - {exception.GetType().Name}. No provider details were printed.");
return 1;
}
@@ -188,3 +198,110 @@ static async Task VerifySnapshotAsync(
$"{table.TotalRowCount.ToString(CultureInfo.InvariantCulture)} rows");
}
}
static async Task VerifyOperatorCatalogSchemaAsync(
IDataQueryExecutor executor,
CancellationToken cancellationToken)
{
var result = await new LegacyOperatorCatalogSchemaValidationService(executor)
.ValidateAsync(cancellationToken);
var themePersistence = new LegacyThemeCatalogPersistenceService(executor);
_ = await themePersistence.SuggestNextCodeAsync(
ThemeMarket.Krx,
cancellationToken);
_ = await themePersistence.SuggestNextCodeAsync(
ThemeMarket.Nxt,
cancellationToken);
_ = await new LegacyExpertCatalogPersistenceService(executor)
.SuggestNextCodeAsync(cancellationToken);
Console.WriteLine(
"Operator catalog schema: " +
string.Join(
",",
result.ValidatedSources.Select(static source => source.ToString())) +
" (read-only zero-row preflight and code-range validation)");
}
static async Task VerifyStockSearchAsync(
IDataQueryExecutor executor,
CancellationToken cancellationToken)
{
var result = await new LegacyStockSearchService(executor).SearchAsync(
"삼성",
maximumResults: 100,
cancellationToken);
if (result.Items.Count == 0 ||
!result.Items.Any(item =>
item.Name.Contains("삼성", StringComparison.OrdinalIgnoreCase)))
{
throw new DatabaseConfigurationException(
"The production stock search returned no matching rows for the smoke selector.");
}
var counts = result.Items
.GroupBy(item => item.Market)
.OrderBy(group => group.Key)
.Select(group => $"{group.Key}={group.Count().ToString(CultureInfo.InvariantCulture)}");
Console.WriteLine(
$"StockSearch: {result.Items.Count.ToString(CultureInfo.InvariantCulture)} rows " +
$"({string.Join(", ", counts)})");
}
static async Task VerifyOverseasSelectorsAsync(
IDataQueryExecutor executor,
CancellationToken cancellationToken)
{
Console.WriteLine("OverseasIndustrySelector: BEGIN");
var industries = await new LegacyOverseasIndustryIndexSearchService(executor)
.SearchAsync(string.Empty, maximumResults: 100, cancellationToken);
Console.WriteLine("WorldStockSelector: BEGIN");
var stocks = await new LegacyWorldStockSearchService(executor)
.SearchAsync(string.Empty, maximumResults: 100, cancellationToken);
if (industries.Items.Count == 0 || stocks.Items.Count == 0)
{
throw new DatabaseConfigurationException(
"The production overseas selectors returned no rows.");
}
Console.WriteLine(
$"OverseasSelectors: industries={industries.Items.Count.ToString(CultureInfo.InvariantCulture)}, " +
$"stocks={stocks.Items.Count.ToString(CultureInfo.InvariantCulture)}");
}
static async Task VerifyExpertSelectorAsync(
IDataQueryExecutor executor,
CancellationToken cancellationToken)
{
Console.WriteLine("ExpertSelector: BEGIN");
var service = new LegacyExpertSelectionService(executor);
var experts = await service.SearchAsync(
string.Empty,
maximumResults: 100,
cancellationToken);
if (experts.Items.Count == 0)
{
throw new DatabaseConfigurationException(
"The production expert selector returned no rows.");
}
var preview = await service.PreviewAsync(
experts.Items[0].Identity,
maximumItems: 100,
cancellationToken);
Console.WriteLine(
$"ExpertSelector: experts={experts.Items.Count.ToString(CultureInfo.InvariantCulture)}, " +
$"preview={preview.Items.Count.ToString(CultureInfo.InvariantCulture)}");
}
static async Task VerifyTradingHaltSelectorAsync(
IDataQueryExecutor executor,
CancellationToken cancellationToken)
{
Console.WriteLine("TradingHaltSelector: BEGIN");
var result = await new LegacyTradingHaltSelectionService(executor).SearchAsync(
string.Empty,
maximumResults: 500,
cancellationToken);
Console.WriteLine(
$"TradingHaltSelector: {result.Items.Count.ToString(CultureInfo.InvariantCulture)} rows");
}