Resolve all high-severity architecture review findings

This commit is contained in:
Joseph Doherty
2026-09-09 16:13:58 -04:00
parent 8bfe65512e
commit 146a13238f
192 changed files with 3160 additions and 753 deletions
@@ -260,6 +260,7 @@ public class SiteAuditTelemetryActor : ReceiveActor
}
var batch = new CachedTelemetryBatch();
var wireBytes = AuditWireBudget.InitialBytes;
var emittedEventIds = new List<Guid>(pending.Count);
// Rows whose operational half can never be built. They are marked
// Forwarded so they LEAVE this queue — see AbandonUnresolvableAsync
@@ -326,7 +327,7 @@ public class SiteAuditTelemetryActor : ReceiveActor
}
var packet = BuildCachedPacket(auditRow, snapshot);
batch.Packets.Add(packet);
if (!AuditWireBudget.TryAppend(batch.Packets, packet, ref wireBytes, auditRow.EventId.ToString())) break;
emittedEventIds.Add(auditRow.EventId);
}
@@ -452,9 +453,10 @@ public class SiteAuditTelemetryActor : ReceiveActor
private static AuditEventBatch BuildBatch(IReadOnlyList<AuditEvent> events)
{
var batch = new AuditEventBatch();
var wireBytes = AuditWireBudget.InitialBytes;
foreach (var e in events)
{
batch.Events.Add(AuditEventDtoMapper.ToDto(e));
if (!AuditWireBudget.TryAppend(batch.Events, AuditEventDtoMapper.ToDto(e), ref wireBytes, e.EventId.ToString())) break;
}
return batch;
}