feat(sitecall-audit): add SourceNode to SiteCallOperational + SiteCall entity

This commit is contained in:
Joseph Doherty
2026-05-23 15:53:44 -04:00
parent 354f8792bf
commit 990eb02fe0
10 changed files with 123 additions and 0 deletions

View File

@@ -30,6 +30,15 @@ public sealed record SiteCall
/// <summary>Site id that submitted the cached call.</summary>
public required string SourceSite { get; init; }
/// <summary>
/// The cluster node on which the cached call was emitted — <c>node-a</c> /
/// <c>node-b</c> for site rows (qualified by <see cref="SourceSite"/>),
/// <c>central-a</c> / <c>central-b</c> for central-originated rows. Stamped
/// by the emitting node from <c>INodeIdentityProvider</c>; nullable so
/// reconciled rows from a node that has since been retired don't block ingest.
/// </summary>
public string? SourceNode { get; init; }
/// <summary>
/// Lifecycle status — string form of
/// <see cref="ScadaLink.Commons.Types.Enums.AuditStatus"/>. Monotonic: later rank

View File

@@ -21,6 +21,13 @@ namespace ScadaLink.Commons.Types;
/// </param>
/// <param name="Target">Human-readable target (e.g. <c>"ERP.GetOrder"</c>).</param>
/// <param name="SourceSite">Site id that submitted the cached call.</param>
/// <param name="SourceNode">
/// The cluster node on which the cached call was emitted — <c>node-a</c> / <c>node-b</c>
/// for site rows (qualified by <paramref name="SourceSite"/>), <c>central-a</c> /
/// <c>central-b</c> for central-originated rows. Stamped by the emitting node from
/// <c>INodeIdentityProvider</c>; nullable so reconciled rows from a node that has since
/// been retired don't block ingest.
/// </param>
/// <param name="Status">
/// Lifecycle status — string form of <see cref="ScadaLink.Commons.Types.Enums.AuditStatus"/>:
/// <c>Submitted</c>, <c>Retrying</c>, <c>Attempted</c>, <c>Delivered</c>,
@@ -37,6 +44,7 @@ public sealed record SiteCallOperational(
string Channel,
string Target,
string SourceSite,
string? SourceNode,
string Status,
int RetryCount,
string? LastError,