fix: address copilot review cleanup#491
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
There was a problem hiding this comment.
Pull request overview
This PR tightens ObjectPool disposal/rent/return behavior and cleans up test, documentation, and diagnostic wording around prior review feedback.
Changes:
- Synchronizes
ObjectPool<T>rent/return/dispose paths and adds regression coverage for returning a lease after disposal. - Updates facade and transaction pipeline scenario display names and culture-sensitive facade expectations.
- Revises Composer/Proxy async generation documentation and Composer diagnostic wording.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/PatternKit.Core/Creational/ObjectPool/ObjectPool.cs |
Adds locking around pool disposal, renting, returning, and draining retained items. |
test/PatternKit.Tests/Creational/ObjectPool/ObjectPoolTests.cs |
Adds regression coverage for disposing a pool before returning a disposable leased item. |
test/PatternKit.Examples.Tests/Generators/FacadeSpecsTests.cs |
Updates scenario names and makes quote expectation culture-aware. |
test/PatternKit.Examples.Tests/Chain/MediatedTransactionPipelineDemoTests.cs |
Updates several scenario display names. |
src/PatternKit.Generators/ComposerGenerator.cs |
Revises PKCOM009 diagnostic title/message. |
src/PatternKit.Generators.Abstractions/Proxy/GenerateProxyAttribute.cs |
Clarifies GenerateAsync inference remarks. |
src/PatternKit.Generators.Abstractions/Composer/ComposerAttribute.cs |
Clarifies GenerateAsync inference remarks. |
docs/generators/composer.md |
Documents optional async cancellation token behavior and updates PKCOM009 wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| title: "CancellationToken parameter required", | ||
| messageFormat: "Method '{0}' is async but missing CancellationToken parameter. Async methods should have a CancellationToken parameter.", | ||
| title: "CancellationToken parameter is invalid", | ||
| messageFormat: "Method '{0}' is async and declares an optional cancellation parameter, but it is not System.Threading.CancellationToken", |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #491 +/- ##
=========================================
Coverage 97.42% 97.42%
=========================================
Files 583 583
Lines 47419 47456 +37
Branches 3086 34 -3052
=========================================
+ Hits 46198 46236 +38
+ Misses 1221 1220 -1
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:
|
Test Results 12 files 12 suites 10m 54s ⏱️ Results for commit 3acf6ba. ♻️ This comment has been updated with latest results. |
🔍 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. |
a41ea0f to
2ab50d9
Compare
2ab50d9 to
4ab28c5
Compare
| _onReturn?.Invoke(value); | ||
| if (_shouldReturn is not null && !_shouldReturn(value)) |
| /// <summary> | ||
| /// Gets or sets whether async interceptor hooks should be generated. | ||
| /// If not specified, async support is inferred from the contract | ||
| /// Attribute usage that omits this named property is inferred by the generator from the contract |
| /// Gets or sets whether to generate async methods. | ||
| /// When omitted, async generation is inferred from the presence of async steps or terminal. | ||
| /// Set to true/false explicitly to control async generation. | ||
| /// Attribute usage that omits this named property is inferred by the generator from async steps or terminal. |
4ab28c5 to
cebefb2
Compare
Synchronizes ObjectPool rent/return/dispose paths to avoid post-disposal retention, adds a regression scenario, and cleans up older Copilot review nits around culture-sensitive facade assertions, scenario titles, and Composer/Proxy async docs.
cebefb2 to
3acf6ba
Compare
Code Coverage |
Summary
Validation
FacadeSpecsTests|FullyQualifiedNameMediatedTransactionPipelineCoverageTests" --no-restore