feat(audit-log): surface partition-purge failure as health event + counter

This commit is contained in:
Joseph Doherty
2026-07-09 06:49:28 -04:00
parent b59aa2d717
commit 14c4df54f9
9 changed files with 202 additions and 5 deletions
@@ -0,0 +1,21 @@
namespace ZB.MOM.WW.ScadaBridge.AuditLog.Central;
/// <summary>
/// Counter sink invoked by <see cref="AuditLogPurgeActor"/> every time a purge
/// step throws (partition switch-out, per-channel override DELETE, or the pre-purge
/// boundary enumeration). Mirrors <see cref="ICentralAuditWriteFailureCounter"/>
/// one-for-one — same one-method contract, same NoOp default, same
/// never-abort-the-tick invariant (the purge actor swallows the failure per
/// boundary and continues).
/// </summary>
/// <remarks>
/// A NoOp default is the safe fallback for site/test composition roots that do not
/// wire the central health surface; <see cref="AuditCentralHealthSnapshot"/> is the
/// production binding that routes increments into the aggregated central health
/// snapshot's <see cref="IAuditCentralHealthSnapshot.PurgeFailures"/> read surface.
/// </remarks>
public interface IAuditPurgeFailureCounter
{
/// <summary>Increment the central AuditLog purge-failure counter by one.</summary>
void Increment();
}