perf(comms+audit): close phase-2 residuals — direct ingest path, monotonic timeouts, synthetic probe, not-reporting set, cursor-exact audit pull

This commit is contained in:
Joseph Doherty
2026-08-14 21:38:23 -04:00
parent 4cd1441984
commit a5882753dd
38 changed files with 1254 additions and 443 deletions
@@ -62,4 +62,29 @@ public interface ISiteAlarmLiveCache
/// <param name="siteId">The numeric site id.</param>
/// <returns><c>true</c> while a <b>living</b> aggregator has seeded and published; reverts to false if the aggregator terminates (R2 N6) — a frozen snapshot is never reported as live.</returns>
bool IsLive(int siteId);
/// <summary>
/// The Enabled instances on the site that failed to answer the aggregator's most recent
/// snapshot fan-out (seed or reconcile) — i.e. that reported <c>InstanceNotFound</c>, timed
/// out, or faulted. Deterministically ordered by instance name, and empty when the site has
/// no aggregator or has not yet completed a fan-out.
/// </summary>
/// <remarks>
/// <para>
/// Published alongside the alarm snapshot on every fan-out, because the aggregator already
/// knows it: the seed/reconcile is the SAME per-instance debug-snapshot fan-out the Alarm
/// Summary poll used to run a second time purely to compute this list. Exposing it here lets
/// the UI-side poll be skipped entirely while <see cref="IsLive"/> is true, which is the
/// whole point — one fan-out per site per reconcile window, not two.
/// </para>
/// <para>
/// It is refreshed at the aggregator's fan-out cadence (seed, then each reconcile), NOT on
/// every stream delta: an instance going silent is precisely what the stream cannot tell you.
/// Callers must therefore treat it as reconcile-fresh, not delta-fresh — which matches the
/// poll's own 15 s freshness, so nothing on screen changes.
/// </para>
/// </remarks>
/// <param name="siteId">The numeric site id.</param>
/// <returns>The not-reporting instance unique names (possibly empty), never <c>null</c>.</returns>
IReadOnlyList<string> GetNotReportingInstances(int siteId);
}