R4.3: measured idle-state GetStoreForwardStatusAsync over gRPC
Route GetStoreForwardStatusAsync to a gRPC path that actually contacts the server (StatusService.GetHistorianConsoleStatus) instead of synthesizing an all-false result blind. On a reachable/normal server it returns the not-storing baseline but MEASURED; when the server is unreachable or the console-status call fails it reports ErrorOccurred with the underlying error (the old synthesis never contacted the server). The active-SF buffer magnitude (Storing/Pending/DataStored) stays false because it lives behind the D2 storage-engine console wall. Non-gRPC transports keep the synthesized fallback. Live-verified against the 2023 R2 server; gated integration test GetStoreForwardStatusAsync_OverGrpc_ReturnsMeasuredIdleState added. README operation table updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B6mcaT2PjRFKcogzp9UkfC
This commit is contained in:
@@ -83,6 +83,31 @@ public sealed class HistorianGrpcIntegrationTests
|
||||
Assert.False(string.IsNullOrWhiteSpace(zone));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetStoreForwardStatusAsync_OverGrpc_ReturnsMeasuredIdleState()
|
||||
{
|
||||
string? host = Environment.GetEnvironmentVariable("HISTORIAN_GRPC_HOST");
|
||||
if (string.IsNullOrWhiteSpace(host) || string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HISTORIAN_USER")))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// R4.3 measured idle-state: over gRPC, GetStoreForwardStatusAsync actually contacts the server
|
||||
// (StatusService.GetHistorianConsoleStatus) rather than synthesizing. On an idle/normal server
|
||||
// it reports the not-storing baseline WITHOUT ErrorOccurred. The active-SF buffer magnitude
|
||||
// lives behind the D2 storage-engine console wall and is intentionally not surfaced (stays
|
||||
// false). See docs/plans/store-forward-cache-reverse-engineering.md §9.7.
|
||||
HistorianClient client = new(BuildOptions(host));
|
||||
HistorianStoreForwardStatus status = await client.GetStoreForwardStatusAsync(CancellationToken.None);
|
||||
|
||||
Assert.Equal(host, status.ServerName);
|
||||
Assert.False(status.ErrorOccurred, $"reachable server should not report an error: {status.Error}");
|
||||
Assert.Null(status.Error);
|
||||
Assert.False(status.Storing);
|
||||
Assert.False(status.Pending);
|
||||
Assert.False(status.DataStored);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetTagMetadataAsync_OverGrpc_ReturnsRequestedTag()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user