Keep runtime command port typed at the public edge
This commit is contained in:
parent
4846b8fad4
commit
266c33324e
3 changed files with 21 additions and 4 deletions
|
|
@ -6774,7 +6774,7 @@ static void RequireDaemonVersePublication(string root)
|
|||
"Queues are an implementation detail.",
|
||||
"Eve commands and daemon commands are typed `gamecult.eve.command.v1` and `gamecult.aetheria.daemon_command.v1` records in the Aetheria state graph",
|
||||
"`AetheriaCommandPort` is the neutral command submission implementation for typed command records.",
|
||||
"Unity-side command lowerers may use `AetheriaRuntimeCommandPort` as a facade over that same port.",
|
||||
"Client-side command lowerers may use typed runtime clients over that same port.",
|
||||
"`CommandLog`, `Inbox`, `mailbox`, `.eve.commands`, `.daemon.commands`, `.cc.pending`, or `" + "Pending" + "CultCacheStore` in Unity-facing daemon/Eve command code",
|
||||
"Do not add a private HTTP dashboard, Unity-only inspector, JSON status blob, or agent-specific daemon wrapper as canonical truth."
|
||||
};
|
||||
|
|
@ -6872,6 +6872,8 @@ static void RequireTypedEveCommandBodies(string root)
|
|||
"global::Aetheria.State.AetheriaCommandPort",
|
||||
"public const string DefaultRuntimeId = \"aetheria-command-client\"",
|
||||
"string.IsNullOrWhiteSpace(runtimeId) ? DefaultRuntimeId : runtimeId",
|
||||
"internal Task<AetheriaRuntimeDaemonCommandEnvelope> SubmitDaemonCommandAsync(",
|
||||
"internal Task<AetheriaRuntimeEveCommandEnvelope> SubmitEveCommandAsync(",
|
||||
"internal static class AetheriaRuntimeCommandSubmitter",
|
||||
"TrySubmitEveCommand(",
|
||||
"TrySubmitDaemonCommand(",
|
||||
|
|
@ -6982,6 +6984,21 @@ static void RequireTypedEveCommandBodies(string root)
|
|||
"Shared command runtime still exposes the generic transport submitter publicly instead of routing callers through typed clients.");
|
||||
}
|
||||
|
||||
var forbiddenRuntimePortSubmitMethods = new[]
|
||||
{
|
||||
"public Task<AetheriaRuntimeDaemonCommandEnvelope> SubmitDaemonCommandAsync(",
|
||||
"public Task<AetheriaRuntimeEveCommandEnvelope> SubmitEveCommandAsync("
|
||||
};
|
||||
var publicRuntimePortSubmitHits = forbiddenRuntimePortSubmitMethods
|
||||
.Where(symbol => runtimeCommandPort.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (publicRuntimePortSubmitHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Runtime command port still exposes raw document submission publicly instead of routing callers through typed clients: " +
|
||||
string.Join(", ", publicRuntimePortSubmitHits));
|
||||
}
|
||||
|
||||
var forbiddenUnitySubmitterSymbols = new[]
|
||||
{
|
||||
"AetheriaRuntimeCommandSubmitter.TrySubmitEveCommand(",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ The bridge layer must point at daemon-owned witnesses instead of becoming a seco
|
|||
|
||||
Queues are an implementation detail. Eve commands and daemon commands are typed `gamecult.eve.command.v1` and `gamecult.aetheria.daemon_command.v1` records in the Aetheria state graph; the old `.pending` runtime commit outbox is gone. None of those folders are the public API, daemon identity, or a substitute for CultNet/CultMesh command ports. Anything still named `Queue*`, `CommandLog`, `Inbox`, `mailbox`, `.eve.commands`, `.daemon.commands`, `.cc.pending`, or `PendingCultCacheStore` in Unity-facing daemon/Eve command code should lower to typed command documents and be demoted behind typed operation methods as the CultNet command boundaries come online.
|
||||
|
||||
`AetheriaCommandPort` is the neutral command submission implementation for typed command records. Unity-side command lowerers may use `AetheriaRuntimeCommandPort` as a facade over that same port. They must not drain those records or mutate state in response; ownership stays with the daemon Verse member.
|
||||
`AetheriaCommandPort` is the neutral command submission implementation for typed command records. Client-side command lowerers may use typed runtime clients over that same port. They must not drain those records or mutate state in response; ownership stays with the daemon Verse member.
|
||||
|
||||
Migration rule: do not expose string command names and payload maps as public Aetheria APIs. Compatibility adapters may decode external Eve requests at the edge, but persisted Aetheria command documents and Unity gameplay calls should use typed command bodies and typed operation methods.
|
||||
|
||||
|
|
|
|||
|
|
@ -167,13 +167,13 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return new AetheriaRuntimeCommandPort(port);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonCommandEnvelope> SubmitDaemonCommandAsync(
|
||||
internal Task<AetheriaRuntimeDaemonCommandEnvelope> SubmitDaemonCommandAsync(
|
||||
AetheriaRuntimeDaemonCommandDocument command)
|
||||
{
|
||||
return _port.SubmitDaemonCommandAsync(command);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeEveCommandEnvelope> SubmitEveCommandAsync(
|
||||
internal Task<AetheriaRuntimeEveCommandEnvelope> SubmitEveCommandAsync(
|
||||
AetheriaRuntimeEveCommandDocument command)
|
||||
{
|
||||
return _port.SubmitEveCommandAsync(command);
|
||||
|
|
|
|||
Loading…
Reference in a new issue