feat(host): StartupValidator warns when a clustered central keeps per-node inbound API keys; rejects an unknown ApiKeyStore:Provider at boot; Program.cs logs CollectWarnings once Serilog is up

Claude-Session: https://claude.ai/code/session_013L3XdmVii9i5sY4FChU8pB
This commit is contained in:
Joseph Doherty
2026-09-02 23:26:34 -04:00
parent 06be0b9e64
commit d6fd8c400c
3 changed files with 123 additions and 1 deletions
@@ -162,6 +162,12 @@ try
{
Log.Information("Starting ScadaBridge host as {Role} on {Hostname}", nodeRole, nodeHostname);
// Non-fatal preflight findings (StartupValidator.CollectWarnings) are logged here rather than
// inside Validate because the validator runs before Serilog exists. Today: a clustered Central
// still on the per-node SQLite inbound API key store (design 2026-09-02, register row 108).
foreach (var warning in StartupValidator.CollectWarnings(configuration))
Log.Warning("Startup configuration warning: {Warning}", warning);
if (nodeRole.Equals("Central", StringComparison.OrdinalIgnoreCase))
{
var builder = WebApplication.CreateBuilder(args);