Build daemon commands through typed operations

This commit is contained in:
Meta Vens 2026-06-21 12:35:16 +01:00
commit b8179c6093
2 changed files with 228 additions and 242 deletions

View file

@ -6017,6 +6017,22 @@ static void RequireTypedDaemonCommandPayloads(string root)
string.Join(", ", publicDocumentSubmitHits));
}
var forbiddenClientDocumentBuilderSymbols = new[]
{
"Action<AetheriaRuntimeDaemonCommandDocument>",
"configure?.Invoke(command)",
"Send(AetheriaRuntimeDaemonCommandKinds"
};
var clientDocumentBuilderHits = forbiddenClientDocumentBuilderSymbols
.Where(symbol => daemonClient.Contains(symbol, StringComparison.Ordinal))
.ToArray();
if (clientDocumentBuilderHits.Length > 0)
{
throw new InvalidOperationException(
"Daemon operation client still routes typed operations through mutable document builder callbacks: " +
string.Join(", ", clientDocumentBuilderHits));
}
if (tests.Contains("AetheriaRuntimeDaemonCommandLog.", StringComparison.Ordinal))
{
throw new InvalidOperationException(