test(generators): cover state transfer and scheduler#443
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
Hardens two source generators (Event-Carried State Transfer and Scheduler Agent Supervisor) so they emit correct partial wrappers for nested host types, and expands TinyBDD generator test scenarios to cover defaults, escaped names, malformed type arguments, invalid signatures/configuration, and nested hosts. This advances issue #413's push toward 99% generator coverage.
Changes:
- Add nested containing-type wrapper emission (GetContainingTypes / AppendTypeDeclaration) to both generators, with indentation-aware brace handling.
- Refactor existing diagnostic test into parameterized [Theory] cases covering more invalid signatures/configurations.
- Add new scenarios for default-name/host-shape emission, nested host wrappers, and malformed (null) typeof arguments.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/PatternKit.Generators/SchedulerAgentSupervisor/SchedulerAgentSupervisorGenerator.cs | Emit containing partial type wrappers around the generated supervisor with proper indentation. |
| src/PatternKit.Generators/EventCarriedStateTransfer/EventCarriedStateTransferGenerator.cs | Emit containing partial type wrappers around the generated transfer factory with proper indentation. |
| test/PatternKit.Generators.Tests/SchedulerAgentSupervisorGeneratorTests.cs | Expand scenarios for diagnostics, defaults/host shapes, nested hosts, and malformed type arguments. |
| test/PatternKit.Generators.Tests/EventCarriedStateTransferGeneratorTests.cs | Expand scenarios for diagnostics, defaults/host shapes, nested hosts, and malformed type arguments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 10m 10s ⏱️ Results for commit a4f56d5. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #443 +/- ##
==========================================
+ Coverage 91.41% 96.71% +5.29%
==========================================
Files 551 551
Lines 44860 44900 +40
Branches 6464 6470 +6
==========================================
+ Hits 41008 43424 +2416
+ Misses 1570 1476 -94
+ Partials 2282 0 -2282
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
Validation
Refs #413