feat(auditlog): NotifyDeliver rows carry the originating ExecutionId

This commit is contained in:
Joseph Doherty
2026-05-21 15:35:40 -04:00
parent 705ae95404
commit 85bb61a1f3
16 changed files with 2020 additions and 8 deletions

View File

@@ -21,6 +21,21 @@ public class NotificationEntityTests
Assert.Equal("SiteA", n.SourceSiteId);
}
[Fact]
public void OriginExecutionId_DefaultsToNull_AndIsSettable()
{
// Audit Log #23: OriginExecutionId carries the originating script
// execution's id from the site so the dispatcher can echo it onto
// NotifyDeliver rows. Null for notifications submitted before the
// column existed; settable from the NotificationSubmit message.
var n = new Notification("id-1", NotificationType.Email, "ops-team", "subj", "body", "SiteA");
Assert.Null(n.OriginExecutionId);
var executionId = Guid.NewGuid();
n.OriginExecutionId = executionId;
Assert.Equal(executionId, n.OriginExecutionId);
}
[Fact]
public void Constructor_NullArguments_Throw()
{