-
Notifications
You must be signed in to change notification settings - Fork 0
⭐ IntegrationEventLogEF
Terrence Daniels edited this page Aug 20, 2026
·
2 revisions
Done. All 7 source files added and reviewed; tests/IntegrationEventLogEF.UnitTests covers all 5 applicable files, 17 passing tests.
IntegrationEventLogEF is the EF Core-backed transactional outbox for integration events — persisted alongside the business write in the same database transaction, then published separately. Notable findings across the full review:
-
EventStateEnumrenamed toEventState— Microsoft's own .NET naming guidelines say not to suffix enum type names withEnum, a guideline this file violated in Microsoft's own sample. Its explicit integer values are pinned by a dedicated test, since they're persisted to a Postgres column through the outbox pattern. - The exact
as-cast-can-return-null bug already fixed once inRabbitMQEventBus.DeserializeMessagerecurred inIntegrationEventLogEntry.cs's own JSON deserialization — caught the second time because the first fix was still fresh. -
Services/IntegrationEventLogService.cs(added after a deliberate pause to build out the testing strategy first): the interface's method got renamed/retyped to match a fork-internal-consistency fix made whenIIntegrationEventLogServicewas first reviewed,Assembly.GetEntryAssembly()got null-checked, and a genuinely pointlessAssembly.Load(assembly.FullName)re-resolution got removed. -
IntegrationEventTypeResolverextracted from that service while writing its tests: the event-type-resolution logic (reflection-scan the entry assembly, match by short type name) wasprivate staticinside a generic class, recomputing per closed generic type despite not depending on the type parameter at all — and its hard dependency onAssembly.GetEntryAssembly()made a new collision-detection branch (two event types sharing a short name) untestable in isolation. Split into its own pure, non-generic class; closes a real silent-collision bug in the process (two colliding event types would have silently picked the first match). - A real dependency conflict surfaced trying to restore
Identity.APIlater:Duende.IdentityServer.EntityFramework.Storagewas pinned below what a sibling package required — unrelated to this project directly, but found becauseIntegrationEventLogEF's EF Core packages share the same central version file.
Full detail and commit hashes in todo.md's IntegrationEventLogEF and IntegrationEventLogEF.UnitTests sections.