From 73a19c6f02b59c7250218c97439e968742575eee Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 20 May 2026 15:39:10 -0400 Subject: [PATCH] refactor(auditlog): remove dead-code ternary in CachedCallLifecycleBridge (#23 M3 final-review fix) --- .../Site/Telemetry/CachedCallLifecycleBridge.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ScadaLink.AuditLog/Site/Telemetry/CachedCallLifecycleBridge.cs b/src/ScadaLink.AuditLog/Site/Telemetry/CachedCallLifecycleBridge.cs index d61c3fb..cc6a975 100644 --- a/src/ScadaLink.AuditLog/Site/Telemetry/CachedCallLifecycleBridge.cs +++ b/src/ScadaLink.AuditLog/Site/Telemetry/CachedCallLifecycleBridge.cs @@ -75,16 +75,13 @@ public sealed class CachedCallLifecycleBridge : ICachedCallLifecycleObserver private async Task EmitAttemptedAsync(CachedCallAttemptContext context, CancellationToken ct) { - // Per-attempt row: kind discriminates channel, status carries the - // per-attempt result. + // Per-attempt row: kind discriminates channel; status is always + // Attempted regardless of outcome (success vs. failure is captured + // by the companion HttpStatus / ErrorMessage fields, NOT by flipping + // the status — CachedResolve carries the terminal Status). Per the + // M3 brief and alog.md §4. var kind = ChannelToAttemptKind(context.Channel); - var status = context.Outcome == CachedCallAttemptOutcome.Delivered - ? AuditStatus.Attempted - : AuditStatus.Attempted; - // (Note: per the M3 brief and alog.md §4 the per-attempt row always - // carries Status=Attempted; success vs. failure is captured by the - // companion HttpStatus / ErrorMessage fields, NOT by flipping the - // status. CachedResolve carries the terminal Status.) + var status = AuditStatus.Attempted; var packet = BuildPacket( context,