fix: address prior copilot review issues#492
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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.
Test Results 12 files 12 suites 11m 2s ⏱️ Results for commit d82a452. ♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is ❌ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
d099cff to
d82a452
Compare
Code Coverage |
Summary
Validation
DynamicRouter|FullyQualifiedNameMessageChannel|FullyQualifiedNameDurableSubscriber|FullyQualifiedNameActivityTracker" --no-restoreCompositeGeneratorTests|FullyQualifiedNameDecoratorGeneratorTests|FullyQualifiedNameMementoGeneratorTests|FullyQualifiedNamePrototypeGeneratorTests|FullyQualifiedNameCacheAsidePolicyGeneratorTests|FullyQualifiedNameCircuitBreakerPolicyGeneratorTests|FullyQualifiedNameRetryPolicyGeneratorTests|FullyQualifiedNameSagaGeneratorTests" --no-restore