Skip to content

fix: address prior copilot review issues#492

Merged
JerrettDavis merged 1 commit into
mainfrom
cleanup/previous-copilot-comments
Jun 1, 2026
Merged

fix: address prior copilot review issues#492
JerrettDavis merged 1 commit into
mainfrom
cleanup/previous-copilot-comments

Conversation

@JerrettDavis
Copy link
Copy Markdown
Owner

Summary

  • address prior Copilot runtime correctness notes for dynamic router publication, activity tracker snapshots, durable subscriber continue checkpointing, and channel purge/drain locking
  • harden generator output for cache-aside/circuit-breaker/retry nested accessibility variants with emit assertions
  • fix older generator edge cases for composite abstract-class properties, decorator floating-point defaults, memento record copy constructors, and prototype immutable type-argument detection
  • tighten generator tests called out by prior Copilot reviews

Validation

  • dotnet test test\PatternKit.Tests\PatternKit.Tests.csproj --framework net8.0 --filter "FullyQualifiedNameDynamicRouter|FullyQualifiedNameMessageChannel|FullyQualifiedNameDurableSubscriber|FullyQualifiedNameActivityTracker" --no-restore
  • dotnet test test\PatternKit.Generators.Tests\PatternKit.Generators.Tests.csproj --framework net8.0 --filter "FullyQualifiedNameCompositeGeneratorTests|FullyQualifiedNameDecoratorGeneratorTests|FullyQualifiedNameMementoGeneratorTests|FullyQualifiedNamePrototypeGeneratorTests|FullyQualifiedNameCacheAsidePolicyGeneratorTests|FullyQualifiedNameCircuitBreakerPolicyGeneratorTests|FullyQualifiedNameRetryPolicyGeneratorTests|FullyQualifiedNameSagaGeneratorTests" --no-restore
  • dotnet build PatternKit.slnx --no-restore
  • git diff --check

Copilot AI review requested due to automatic review settings June 1, 2026 01:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

⚠️ 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses prior runtime correctness and source-generator edge cases across messaging, activity tracking, and several policy/pattern generators.

Changes:

  • Improves runtime synchronization/checkpoint behavior for dynamic routing, activity snapshots, durable subscribers, and channel draining/purging.
  • Hardens generator output for nested policy hosts and fixes specific generator edge cases for composite, decorator, memento, and prototype generation.
  • Adds focused regression tests and stronger emit/diagnostic assertions.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/PatternKit.Core/Application/ActivityTracking/ActivityTracker.cs Builds gate state from one locked snapshot.
src/PatternKit.Core/Messaging/Channels/MessageChannel.cs Moves drain predicate evaluation outside the channel lock and returns purge state.
src/PatternKit.Core/Messaging/Consumers/DurableSubscriber.cs Stops catch-up after any failed message before checkpointing.
src/PatternKit.Core/Messaging/Routing/DynamicRouter.cs Uses volatile route table reads/writes.
src/PatternKit.Generators/CacheAside/CacheAsidePolicyGenerator.cs Adds nested containing type emission.
src/PatternKit.Generators/CircuitBreaker/CircuitBreakerPolicyGenerator.cs Adds nested containing type emission.
src/PatternKit.Generators/Composite/CompositeGenerator.cs Skips non-overridable abstract-class properties.
src/PatternKit.Generators/DecoratorGenerator.cs Emits valid floating-point default literals.
src/PatternKit.Generators/MementoGenerator.cs Excludes record copy constructors from fallback construction.
src/PatternKit.Generators/PrototypeGenerator.cs Narrows immutable collection namespace detection.
src/PatternKit.Generators/Retry/RetryPolicyGenerator.cs Adds nested containing type emission.
test/PatternKit.Generators.Tests/CacheAsidePolicyGeneratorTests.cs Adds emit assertion for nested accessibility variants.
test/PatternKit.Generators.Tests/CircuitBreakerPolicyGeneratorTests.cs Adds emit assertion for nested accessibility variants.
test/PatternKit.Generators.Tests/CompositeGeneratorTests.cs Adds regression test for concrete properties on abstract components.
test/PatternKit.Generators.Tests/DecoratorGeneratorTests.cs Adds regression test for floating-point defaults.
test/PatternKit.Generators.Tests/MementoGeneratorTests.cs Adds regression test for record copy constructor exclusion.
test/PatternKit.Generators.Tests/PrototypeGeneratorTests.cs Adds regression test for mutable generic type with immutable argument.
test/PatternKit.Generators.Tests/RetryPolicyGeneratorTests.cs Adds emit assertion for nested accessibility variants.
test/PatternKit.Generators.Tests/SagaGeneratorTests.cs Tightens invalid step diagnostic assertions.
test/PatternKit.Tests/Messaging/Channels/MessageChannelTests.cs Adds drain/purger regression coverage.
test/PatternKit.Tests/Messaging/Consumers/DurableSubscriberTests.cs Adds continue-policy checkpoint regression coverage.

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

Comment thread src/PatternKit.Core/Messaging/Channels/MessageChannel.cs
Comment thread src/PatternKit.Generators/PrototypeGenerator.cs
Comment thread src/PatternKit.Generators/CacheAside/CacheAsidePolicyGenerator.cs Outdated
Comment thread src/PatternKit.Generators/CircuitBreaker/CircuitBreakerPolicyGenerator.cs Outdated
Comment thread src/PatternKit.Generators/Retry/RetryPolicyGenerator.cs Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Test Results

    12 files      12 suites   11m 2s ⏱️
 4 071 tests  4 071 ✅ 0 💤 0 ❌
12 644 runs  12 644 ✅ 0 💤 0 ❌

Results for commit d82a452.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 93.83260% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.40%. Comparing base (ead24a8) to head (d82a452).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/PatternKit.Generators/DecoratorGenerator.cs 75.00% 4 Missing ⚠️
...Generators/CacheAside/CacheAsidePolicyGenerator.cs 94.23% 3 Missing ⚠️
...rs/CircuitBreaker/CircuitBreakerPolicyGenerator.cs 94.33% 3 Missing ⚠️
...atternKit.Generators/Retry/RetryPolicyGenerator.cs 94.44% 3 Missing ⚠️
...tternKit.Core/Messaging/Channels/MessageChannel.cs 96.55% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (93.83%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #492      +/-   ##
==========================================
- Coverage   97.42%   97.40%   -0.02%     
==========================================
  Files         583      583              
  Lines       47456    47614     +158     
  Branches     3093       34    -3059     
==========================================
+ Hits        46235    46380     +145     
- Misses       1221     1234      +13     
Flag Coverage Δ
unittests 97.40% <93.83%> (-0.02%) ⬇️

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

🔍 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.

@JerrettDavis JerrettDavis force-pushed the cleanup/previous-copilot-comments branch from d099cff to d82a452 Compare June 1, 2026 01:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Code Coverage

Summary
  Generated on: 06/01/2026 - 01:55:57
  Coverage date: 06/01/2026 - 01:53:45 - 06/01/2026 - 01:55:46
  Parser: MultiReport (12x Cobertura)
  Assemblies: 5
  Classes: 1728
  Files: 583
  Line coverage: 97.4%
  Covered lines: 46378
  Uncovered lines: 1236
  Coverable lines: 47614
  Total lines: 101553
  Branch coverage: 84.3% (14738 of 17471)
  Covered branches: 14738
  Total branches: 17471
  Method coverage: 97.2% (9041 of 9296)
  Full method coverage: 91.5% (8510 of 9296)
  Covered methods: 9041
  Fully covered methods: 8510
  Total methods: 9296

PatternKit.Core                                                                                                       96%
  PatternKit.Application.ActivityTracking.ActivityGateState                                                          100%
  PatternKit.Application.ActivityTracking.ActivityLease                                                              100%
  PatternKit.Application.ActivityTracking.ActivityRecord                                                             100%
  PatternKit.Application.ActivityTracking.ActivityTracker                                                            100%
  PatternKit.Application.Aggregates.AggregateCommandHandler<T1, T2, T3>                                              100%
  PatternKit.Application.Aggregates.AggregateCommandResult<T>                                                        100%
  PatternKit.Application.Aggregates.AggregateRoot<T1, T2>                                                            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.BoundedContexts.BoundedContextAdapter                                                       100%
  PatternKit.Application.BoundedContexts.BoundedContextCapability                                                   83.3%
  PatternKit.Application.BoundedContexts.BoundedContextDescriptor                                                   95.4%
  PatternKit.Application.ContextMaps.ContextMapDescriptor                                                           96.8%
  PatternKit.Application.ContextMaps.ContextMapRelationship                                                          100%
  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.DomainServices.DomainServiceOperation<T1, T2>                                               100%
  PatternKit.Application.DomainServices.DomainServiceRegistry<T1, T2>                                                100%
  PatternKit.Application.EventSourcing.EventStoreAppendResult                                                        100%
  PatternKit.Application.EventSourcing.InMemoryEventStore<T1, T2>                                                   97.9%
  PatternKit.Application.EventSourcing.StoredEvent<T1, T2>                                                            80%
  PatternKit.Application.EventualConsistency.EventualConsistencyEvaluation<T>                                       92.3%
  PatternKit.Application.EventualConsistency.EventualConsistencyMonitor<T>                                          97.2%
  PatternKit.Application.EventualConsistency.EventualConsistencyMonitorState<T>                                      100%
  PatternKit.Application.EventualConsistency.EventualConsistencyWatermarks<T>                                       96.7%
  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.ManualTaskGates.ManualTaskGate<T>                                                          98.5%
  PatternKit.Application.ManualTaskGates.ManualTaskGateState<T>                                                      100%
  PatternKit.Application.ManualTaskGates.ManualTaskRecord<T>                                                        96.9%

@JerrettDavis JerrettDavis merged commit 88a5711 into main Jun 1, 2026
10 checks passed
@JerrettDavis JerrettDavis deleted the cleanup/previous-copilot-comments branch June 1, 2026 02:02
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.

2 participants