fix(auditlog): truncate over-width SiteCalls.LastError on the cached-telemetry dual-write and the reconciliation pull (review 2026-10-21 follow-up)

This commit is contained in:
Joseph Doherty
2026-10-22 09:52:17 -04:00
parent 89d8568fdf
commit 7be22d2ac2
6 changed files with 121 additions and 4 deletions
@@ -141,7 +141,9 @@ public sealed class GrpcPullSiteCallsClient : IPullSiteCallsClient
{
try
{
var sc = SiteCallDtoMapper.FromDto(dto) with { SourceSite = siteId };
// Fit LastError to the central column so the reconciliation upsert cannot fail
// with SQL 8152 (review 2026-10-21 follow-up — see SiteCallColumnBounds).
var sc = SiteCallColumnBounds.Clamp(SiteCallDtoMapper.FromDto(dto)) with { SourceSite = siteId };
siteCalls.Add(sc);
}
catch (Exception ex)