fix(grpc-data): H2 review 8 - history timeout rides the artifact, not the trust-scope fingerprint

DataConnectionScopeRevision covers consumer/connection/secret scope only; limits (TimeoutMilliseconds and now
HistoryTimeoutMilliseconds) reach DB-less nodes and the LocalDb cache in the artifact's entity JSON. Dropping the field
also avoids a one-time scope-version bump on upgrade. Plan 6 corrected.
This commit is contained in:
Joseph Doherty
2026-11-23 21:53:58 -05:00
parent e0956a55d6
commit 6a621423f4
3 changed files with 9 additions and 9 deletions
@@ -15,9 +15,7 @@ public static class DataConnectionScopeRevision
var entries = connections.Where(c => c.Enabled).SelectMany(c => c.ConsumerNodeIds.Select(node => new
{
Owner = c.ClusterId.ToUpperInvariant(), Consumer = node.ToUpperInvariant(),
Connection = c.DataConnectionId.ToUpperInvariant(), SecretOwner = c.SecretScopeClusterId.ToUpperInvariant(), Secret = c.SecretReference,
// H2 (plan §6): new connection fields are part of the scope so DB-less nodes and the LocalDb cache re-scope on a change.
c.HistoryTimeoutMilliseconds
Connection = c.DataConnectionId.ToUpperInvariant(), SecretOwner = c.SecretScopeClusterId.ToUpperInvariant(), Secret = c.SecretReference
})).OrderBy(x => x.Owner, StringComparer.Ordinal).ThenBy(x => x.Consumer, StringComparer.Ordinal)
.ThenBy(x => x.Connection, StringComparer.Ordinal).ThenBy(x => x.SecretOwner, StringComparer.Ordinal).ThenBy(x => x.Secret, StringComparer.Ordinal).ToArray();
var fingerprint = Convert.ToHexString(SHA256.HashData(JsonSerializer.SerializeToUtf8Bytes(entries)));