feat: add Manual Task Gate pattern#455
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
Adds the Manual Task Gate application architecture pattern for tracking human-owned tasks (approve/reject/cancel/complete) that block workflows. The implementation closely mirrors the existing TimeoutManager<TKey> and ActivityTracker patterns and integrates fully across runtime, generator, examples, DI, docs, catalogs, and benchmarks.
Changes:
- New
ManualTaskGate<TKey>runtime with Pending/Approved/Rejected/Canceled states, lock-protected dictionary storage, builder withWithClock/WithKeyComparer, andGetGateState/Snapshotordering. - New
ManualTaskGateGenerator(PKMTG001/PKMTG002) and[GenerateManualTaskGate]abstraction attribute mirroringTimeoutManagerGenerator. - Order approval example, DI extension, aggregate registration, catalog entries, docs/TOCs, benchmark class, and TinyBDD coverage; pattern count bumped 107→108 (Application Architecture 22→23) with benchmark route totals updated to 432.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/PatternKit.Core/Application/ManualTaskGates/ManualTaskGate.cs | New runtime gate, record, state, and builder |
| src/PatternKit.Generators/ManualTaskGates/ManualTaskGateGenerator.cs | New incremental generator for typed factories |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers PKMTG001/PKMTG002 |
| src/PatternKit.Generators.Abstractions/ManualTaskGates/ManualTaskGateAttributes.cs | New [GenerateManualTaskGate] attribute |
| src/PatternKit.Examples/ManualTaskGateDemo/OrderApprovalManualTaskGateDemo.cs | Fluent/generated/service/runner/DI demo |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Aggregate example registration |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Adds catalog entry |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Adds example descriptor |
| benchmarks/PatternKit.Benchmarks/Application/ManualTaskGateBenchmarks.cs | Scenario benchmark class |
| test/PatternKit.Tests/Application/ManualTaskGates/ManualTaskGateTests.cs | Runtime TinyBDD coverage |
| test/PatternKit.Generators.Tests/ManualTaskGateGeneratorTests.cs | Generator TinyBDD coverage |
| test/PatternKit.Generators.Tests/AbstractionsTests.cs | Attribute reflection tests |
| test/PatternKit.Examples.Tests/ManualTaskGateDemo/OrderApprovalManualTaskGateDemoTests.cs | Example + DI integration tests |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Family count 22→23 + new pattern |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs | Updates published route total to 432 |
| README.md, docs/index.md, docs/guides/pattern-coverage.md, docs/guides/benchmarks.md, docs/guides/benchmark-results.md | Pattern count/category and benchmark matrix updates |
| docs/patterns/toc.yml, docs/patterns/application/manual-task-gate.md | Pattern docs + TOC |
| docs/generators/toc.yml, docs/generators/index.md, docs/generators/manual-task-gate.md | Generator docs + TOC |
| docs/examples/toc.yml, docs/examples/order-approval-manual-task-gate.md | Example docs + TOC |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 8m 27s ⏱️ Results for commit 6c414c3. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
==========================================
+ Coverage 96.62% 96.79% +0.16%
==========================================
Files 555 559 +4
Lines 45224 45502 +278
Branches 2980 6555 +3575
==========================================
+ Hits 43697 44042 +345
+ Misses 1527 1460 -67
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. |
Code Coverage |
Summary
Closes #448
Verification
ManualTaskGateGeneratorTests|FullyQualifiedNameAbstractionsTests" -p:TestTfmsInParallel=false --logger "console;verbosity=minimal"ManualTaskGateDemo|FullyQualifiedNameProductionReadiness|FullyQualifiedName~DependencyInjection" -p:TestTfmsInParallel=false --logger "console;verbosity=minimal"