Skip to content

feat(messaging): add guaranteed delivery pattern#388

Merged
JerrettDavis merged 1 commit into
mainfrom
feature/guaranteed-delivery-pattern
May 27, 2026
Merged

feat(messaging): add guaranteed delivery pattern#388
JerrettDavis merged 1 commit into
mainfrom
feature/guaranteed-delivery-pattern

Conversation

@JerrettDavis

Copy link
Copy Markdown
Owner

Closes #387

Summary

  • Adds the Guaranteed Delivery enterprise integration runtime, source generator, and attribute surface.
  • Adds shipment DI examples, production-readiness catalog coverage, docs, TOCs, README/docs pattern tables, and benchmark result rows.
  • Adds TinyBDD coverage for runtime behavior, generator diagnostics/output, attribute configuration, example DI flows, and benchmark/catalog matrix validation.

Validation

  • dotnet build PatternKit.slnx --configuration Release --no-restore -m:1
  • dotnet test PatternKit.slnx --configuration Release --no-build --logger "console;verbosity=minimal" -p:TestTfmsInParallel=false
  • dotnet run -c Release --framework net10.0 --project benchmarks\PatternKit.Benchmarks -- --filter PatternKit.Benchmarks.Messaging.GuaranteedDeliveryBenchmarks* --artifacts artifacts\benchmarks-guaranteeddelivery --join
  • git diff --check

Copilot AI review requested due to automatic review settings May 27, 2026 13:33
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Test Results

    1 files      1 suites   1m 2s ⏱️
1 063 tests 1 063 ✅ 0 💤 0 ❌
1 068 runs  1 068 ✅ 0 💤 0 ❌

Results for commit 9781e33.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the Guaranteed Delivery enterprise integration pattern: a GuaranteedDeliveryQueue<TPayload> runtime with a pluggable store, a Roslyn incremental generator + attribute surface, a shipment DI example, benchmarks, catalog entries, docs, TOC updates, and TinyBDD coverage across all surfaces.

Changes:

  • New GuaranteedDeliveryQueue<TPayload> + InMemoryGuaranteedDeliveryStore<TPayload> runtime with lease/ack/release/dead-letter semantics, plus GenerateGuaranteedDeliveryAttribute and GuaranteedDeliveryGenerator (diagnostics PKMGD001/002).
  • Shipment DI example, focused + aggregate IServiceCollection registrations, catalog + example-catalog entries, and GuaranteedDeliveryBenchmarks.
  • Documentation/TOC additions and benchmark-results, README, pattern-coverage, and benchmark coverage test updates (404 routes, 41 enterprise integration patterns).

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/PatternKit.Core/Messaging/Reliability/GuaranteedDelivery.cs New runtime types, store, queue facade, and builder.
src/PatternKit.Generators.Abstractions/Messaging/GuaranteedDeliveryAttributes.cs New [GenerateGuaranteedDelivery] attribute.
src/PatternKit.Generators/Messaging/GuaranteedDeliveryGenerator.cs Incremental generator emitting Create() factory and diagnostics.
src/PatternKit.Generators/AnalyzerReleases.Unshipped.md Tracks PKMGD001/PKMGD002.
src/PatternKit.Examples/Messaging/ShipmentGuaranteedDeliveryExample.cs Shipment domain, service, fluent + generated queues, runner, DI helper.
src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs Focused + aggregate DI registration and example service record.
src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs Adds Guaranteed Delivery catalog entry.
src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs Adds shipment example descriptor.
benchmarks/PatternKit.Benchmarks/Messaging/GuaranteedDeliveryBenchmarks.cs Fluent vs generated construction/execution benchmarks.
test/PatternKit.Tests/Messaging/Reliability/GuaranteedDeliveryTests.cs Runtime behavior and validation tests.
test/PatternKit.Generators.Tests/GuaranteedDeliveryGeneratorTests.cs Generator output + diagnostic tests.
test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs Attribute defaults/configuration test.
test/PatternKit.Examples.Tests/Messaging/ShipmentGuaranteedDeliveryExampleTests.cs Example runner and DI integration tests.
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs Adds pattern name and 41 EI count.
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs Updates published route count to 404.
README.md, docs/index.md, docs/guides/{pattern-coverage,benchmarks,benchmark-results}.md, docs/generators/{index.md,toc.yml,guaranteed-delivery.md}, docs/patterns/{toc.yml,messaging/guaranteed-delivery.md}, docs/examples/{toc.yml,shipment-guaranteed-delivery.md} Pattern table, TOC, benchmark, and example documentation updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/generators/toc.yml Outdated
Comment on lines +158 to +164
href: message-expiration.md

- name: Guaranteed Delivery
href: guaranteed-delivery.md

- name: Message Store
href: message-store.md
href: message-store.md
Comment thread docs/examples/toc.yml Outdated
Comment on lines +119 to +125
href: order-message-expiration.md

- name: Shipment Guaranteed Delivery
href: shipment-guaranteed-delivery.md

- name: Order Message Store
href: order-message-store.md
href: order-message-store.md
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation Results

Version: ``

✅ Validation Steps

  • Build solution
  • Run tests
  • Build documentation
  • Dry-run NuGet packaging

📊 Artifacts

Dry-run artifacts have been uploaded and will be available for 7 days.


This comment was automatically generated by the PR validation workflow.

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.24138% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.63%. Comparing base (15172ed) to head (9781e33).

Files with missing lines Patch % Lines
...t.Core/Messaging/Reliability/GuaranteedDelivery.cs 95.91% 6 Missing ⚠️
...les/Messaging/ShipmentGuaranteedDeliveryExample.cs 97.05% 1 Missing ⚠️
...enerators/Messaging/GuaranteedDeliveryGenerator.cs 98.63% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
+ Coverage   89.57%   95.63%   +6.06%     
==========================================
  Files         525      529       +4     
  Lines       42511    42801     +290     
  Branches     6142     6182      +40     
==========================================
+ Hits        38080    40934    +2854     
+ Misses       2011     1867     -144     
+ Partials     2420        0    -2420     
Flag Coverage Δ
unittests 95.63% <97.24%> (+6.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JerrettDavis
JerrettDavis force-pushed the feature/guaranteed-delivery-pattern branch from a2b03ec to 9781e33 Compare May 27, 2026 13:48
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 05/27/2026 - 13:53:40
  Coverage date: 05/27/2026 - 13:51:35 - 05/27/2026 - 13:53:28
  Parser: MultiReport (9x Cobertura)
  Assemblies: 4
  Classes: 1612
  Files: 648
  Line coverage: 94.6%
  Covered lines: 41969
  Uncovered lines: 2382
  Coverable lines: 44351
  Total lines: 96913
  Branch coverage: 75.5% (12346 of 16336)
  Covered branches: 12346
  Total branches: 16336
  Method coverage: 96% (8411 of 8760)
  Full method coverage: 88.1% (7726 of 8760)
  Covered methods: 8411
  Fully covered methods: 7726
  Total methods: 8760

PatternKit.Core                                                                                                     95.4%
  PatternKit.Application.ActivityTracking.ActivityGateState                                                          100%
  PatternKit.Application.ActivityTracking.ActivityLease                                                              100%
  PatternKit.Application.ActivityTracking.ActivityRecord                                                             100%
  PatternKit.Application.ActivityTracking.ActivityTracker                                                            100%
  PatternKit.Application.AntiCorruption.AntiCorruptionLayer<T1, T2>                                                 90.4%
  PatternKit.Application.AntiCorruption.AntiCorruptionResult<T>                                                      100%
  PatternKit.Application.AuditLog.AuditLogAppendResult<T>                                                           85.7%
  PatternKit.Application.AuditLog.InMemoryAuditLog<T1, T2>                                                          95.4%
  PatternKit.Application.DataMapping.DataMapper<T1, T2>                                                             94.6%
  PatternKit.Application.DataMapping.DataMapperError                                                                  90%
  PatternKit.Application.DataMapping.DataMapperResult<T>                                                            84.6%
  PatternKit.Application.DomainEvents.DomainEventDispatcher<T>                                                      95.4%
  PatternKit.Application.DomainEvents.DomainEventDispatchResult                                                      100%
  PatternKit.Application.EventSourcing.EventStoreAppendResult                                                        100%
  PatternKit.Application.EventSourcing.InMemoryEventStore<T1, T2>                                                   97.9%
  PatternKit.Application.EventSourcing.StoredEvent<T1, T2>                                                            80%
  PatternKit.Application.FeatureToggles.FeatureToggleDecision                                                       87.5%
  PatternKit.Application.FeatureToggles.FeatureToggleRule<T>                                                         100%
  PatternKit.Application.FeatureToggles.FeatureToggleSet<T>                                                         96.9%
  PatternKit.Application.IdentityMap.IdentityMap<T1, T2>                                                             100%
  PatternKit.Application.IdentityMap.IdentityMapResult<T>                                                           92.8%
  PatternKit.Application.MaterializedViews.MaterializedView<T1, T2>                                                 98.4%
  PatternKit.Application.Repository.InMemoryRepository<T1, T2>                                                      92.8%
  PatternKit.Application.Repository.RepositoryResult<T>                                                             93.3%
  PatternKit.Application.ServiceLayer.ServiceLayerOperation<T1, T2>                                                 96.7%
  PatternKit.Application.ServiceLayer.ServiceLayerResult<T>                                                         94.7%
  PatternKit.Application.ServiceLayer.ServiceLayerRule<T>                                                            100%
  PatternKit.Application.Specification.Specification<T>                                                              100%
  PatternKit.Application.Specification.SpecificationRegistry<T>                                                     93.3%
  PatternKit.Application.TableDataGateway.InMemoryTableDataGateway<T1, T2>                                            86%
  PatternKit.Application.TableDataGateway.TableGatewayResult<T>                                                     82.3%
  PatternKit.Application.TransactionScript.TransactionScript<T1, T2>                                                  97%
  PatternKit.Application.TransactionScript.TransactionScriptError                                                     90%
  PatternKit.Application.TransactionScript.TransactionScriptResult<T>                                                100%
  PatternKit.Application.UnitOfWork.UnitOfWork                                                                      90.9%
  PatternKit.Application.UnitOfWork.UnitOfWorkResult                                                                94.7%
  PatternKit.Application.UnitOfWork.UnitOfWorkRollbackResult                                                         100%
  PatternKit.Application.UnitOfWork.UnitOfWorkStep                                                                   100%

@JerrettDavis
JerrettDavis merged commit a51749d into main May 27, 2026
12 checks passed
@JerrettDavis
JerrettDavis deleted the feature/guaranteed-delivery-pattern branch May 27, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Guaranteed Delivery enterprise integration pattern

2 participants