Feat/Add stream invoker provider support to CQRS handler registry generator#307
Conversation
- 更新 CQRS runtime 与生成器文档,补充 generated stream invoker provider / descriptor 的并列表述。 - 说明 runtime 优先消费 generated request / stream invoker 元数据,未命中时回退到既有反射 binding。 - 调整 request-only 措辞,使 reader-facing 文案与现有 generated request invoker 语义保持一致。
- 新增 stream invoker provider runtime fixture,复用 request provider 测试风格锁定 descriptor 和静态 invoker 形状 - 补充 Phase 8 stream invoker provider 回归测试骨架,并暂时以 Ignore 挂起等待主线程生成实现落地
- 新增 stream invoker provider、descriptor 与 dispatcher/registrar 接线 - 更新 source generator 与回归测试,覆盖 generated stream invoker 发射和消费语义 - 更新 CQRS 文档与 ai-plan 恢复点,补充 stream invoker 的接入与验证记录
- 新增 hidden implementation 但 visible handler interface 的 request provider 生成断言 - 新增 hidden implementation 但 visible handler interface 的 stream provider 生成断言
- 扩大 request 与 stream invoker 发射范围到 reflected-implementation 注册场景 - 补充 hidden implementation 回归测试并更新 CQRS ai-plan 恢复点
- 新增 hidden implementation request provider runtime 集成回归,验证 registrar 与 dispatcher 会继续消费 generated metadata - 新增 hidden implementation stream provider runtime 集成回归,覆盖可见 handler interface 下的流式 dispatch 路径 - 补充对应测试替身 registry 与隐藏 handler 容器,保持现有 generated invoker 测试风格
- 更新 CQRS 重写跟踪到 RP-070,补充 hidden-implementation generated invoker runtime 回归说明 - 补充本轮定向验证结果与当前相对 origin/main 的 branch diff 指标
- 新增 request 与 stream generator 回归,明确 precise reflected 注册不会发射 invoker provider 元数据 - 更新 CQRS 重写恢复点到 RP-071,并记录本轮验证与边界结论
- 新增 request 与 stream gate 回归,锁定 runtime 合同不完整时不会发射 invoker provider 元数据 - 更新 CQRS 重写恢复点到 RP-072,并记录定向验证与 helper 收敛
- 修复 request 与 stream generated invoker 签名不兼容时冒出 ArgumentException 的行为,统一包装为 InvalidOperationException - 补充对应 runtime 回归测试并更新 CQRS 重写恢复点到 RP-073
- 新增 non-enumerating request 与 stream provider 回归,锁定 dispatcher 会继续回退到反射路径 - 更新 CQRS 重写恢复点到 RP-074,并记录定向验证结果
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (2)ai-plan/public/*/todos/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
ai-plan/public/*/traces/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (11)📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-26T03:16:48.230ZApplied to files:
📚 Learning: 2026-04-17T11:35:08.762ZApplied to files:
🪛 LanguageToolai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md[uncategorized] ~15-~15: 您的意思是“"不"齐”? (BU) [uncategorized] ~44-~44: 您的意思是“"不"同”? (BU) 🔇 Additional comments (2)
📝 WalkthroughWalkthrough在源生成器与运行时中并行引入“流式调用程序”支持:新增流描述符/条目与提供者/枚举契约,生成器可发射静态桥接方法与描述符数组;注册器/调度器在激活阶段预热并优先使用这些生成的流调用程序元数据;测试与文档同步更新。 Changes
Sequence Diagram(s)sequenceDiagram
participant Generator as 源代码生成器
participant GeneratedRegistry as 生成的注册表
participant Registrar as CqrsHandlerRegistrar
participant DI as 容器/服务
participant Dispatcher as CqrsDispatcher
participant Consumer as 调用端
Generator->>GeneratedRegistry: 生成注册表类并注入流描述符数组\n与静态 InvokeStreamHandler 方法
Registrar->>GeneratedRegistry: 激活并调用 Register(services, logger)
GeneratedRegistry->>DI: 注册处理程序服务
GeneratedRegistry-->>Registrar: 返回流描述符枚举 (GetDescriptors)
Registrar->>Dispatcher: 预热并注册生成的流描述符
Consumer->>Dispatcher: CreateStream(requestType, responseType)
alt 生成描述符命中
Dispatcher->>Dispatcher: TryGetGeneratedStreamInvokerDescriptor -> 构建 StreamInvoker 委托
Dispatcher-->>Consumer: 返回由生成静态方法驱动的 IAsyncEnumerable<T>
else 未命中
Dispatcher->>Dispatcher: 使用反射创建流调用程序描述符
Dispatcher-->>Consumer: 返回反射路径生成的 IAsyncEnumerable<T>
end
代码审查工作量估计🎯 4 (Complex) | ⏱️ ~60 分钟 可能相关的 PR
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Summary
Test ResultsDetails
Insights
build-and-test: Run #1021
🎉 All tests passed!Slowest Tests
± Comparison with run #1018 at 7437bda | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 18 runs. Github Test Reporter by CTRF 💚 |
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| dotnet-format | yes | 1 | no | 5.45s | ||
| ✅ REPOSITORY | gitleaks | yes | no | no | 7.7s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 6.21s |
Detailed Issues
⚠️ CSHARP / dotnet-format - 1 error
Welcome to .NET 9.0!
---------------------
SDK Version: 9.0.114
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Unhandled exception: System.Exception: Restore operation failed.
at Microsoft.CodeAnalysis.Tools.CodeFormatter.OpenMSBuildWorkspaceAsync(String solutionOrProjectPath, WorkspaceType workspaceType, Boolean noRestore, Boolean requiresSemantics, String binaryLogPath, Boolean logWorkspaceWarnings, ILogger logger, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, String binaryLogPath)
at Microsoft.CodeAnalysis.Tools.FormatCommandCommon.FormatAsync(FormatOptions formatOptions, ILogger`1 logger, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Tools.Commands.RootFormatCommand.FormatCommandDefaultHandler.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Show us your support by starring ⭐ the repository
|
| Filename | Overview |
|---|---|
| GFramework.Cqrs/Internal/CqrsDispatcher.cs | Adds static GeneratedStreamInvokers cache and CreateStreamDispatchBinding fast-path that consumes pre-registered stream invoker metadata; mirrors the existing request invoker pattern cleanly with proper fallback logic. |
| GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs | Adds RegisterGeneratedStreamInvokerProvider and RegisterGeneratedStreamInvokerDescriptors following the established request invoker provider pattern. |
| GFramework.Cqrs/CqrsStreamInvokerDescriptor.cs | New descriptor type mirroring CqrsRequestInvokerDescriptor; validates non-null and static constraint on invokerMethod at construction time. |
| GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.cs | Adds CreateStreamInvokerEmissions and AppendStreamInvokerProviderMembers emitting InvokeStreamHandlerN methods matching the StreamInvoker delegate signature. |
| GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs | Two test fixtures construct descriptor objects with non-static methods, which the new constructor validation throws on, causing RegisterHandlers to fail before fallback is attempted. |
| GFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.cs | Well-structured test registry; InvokeGenerated is correctly static and matches the StreamInvoker delegate. |
Sequence Diagram
sequenceDiagram
participant App
participant Registrar as CqrsHandlerRegistrar
participant Registry as GeneratedRegistry
participant Dispatcher as CqrsDispatcher
participant Cache as GeneratedStreamInvokers
participant StreamCache as StreamDispatchBindings
Note over App,StreamCache: Registration phase
App->>Registrar: RegisterHandlers(services, assembly)
Registrar->>Registry: registry.Register(services, logger)
Registrar->>Registry: GetDescriptors()
Registry-->>Registrar: [CqrsStreamInvokerDescriptorEntry]
loop each descriptor entry
Registrar->>Dispatcher: RegisterGeneratedStreamInvokerDescriptor
Dispatcher->>Cache: GetOrAdd(reqType, respType, metadata)
end
Note over App,StreamCache: Dispatch phase
App->>Dispatcher: CreateStream(context, request)
Dispatcher->>StreamCache: GetOrAdd(reqType, respType, factory)
StreamCache-->>Dispatcher: miss
Dispatcher->>Cache: TryGetValue(reqType, respType)
alt Generated metadata found
Cache-->>Dispatcher: GeneratedStreamInvokerMetadata
Dispatcher-->>StreamCache: StreamDispatchBinding(generatedInvoker)
else Not found
Dispatcher->>Dispatcher: CreateStreamInvoker (reflection)
Dispatcher-->>StreamCache: StreamDispatchBinding(reflectionInvoker)
end
Dispatcher->>App: IAsyncEnumerable
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs:394-414
**Non-static invoker test fixture will throw during `RegisterHandlers`**
`NonStaticRequestInvokerProviderRegistry.GetDescriptors()` constructs `new CqrsRequestInvokerDescriptor(…, instanceMethod)`. The new `ValidateInvokerMethod` guard added to `CqrsRequestInvokerDescriptor` in this PR throws `ArgumentException` when `!invokerMethod.IsStatic`. This exception propagates from `GetDescriptors()` → `RegisterGeneratedRequestInvokerDescriptors` → `RegisterHandlers` with no surrounding try-catch, so the test `SendAsync_Should_Fall_Back_To_Runtime_Path_When_Generated_Request_Invoker_Is_Not_Static` crashes at `CqrsTestRuntime.RegisterHandlers(...)` before the dispatch even runs, rather than falling back gracefully to the runtime path. The same problem exists for `NonStaticStreamInvokerProviderRegistry.GetDescriptors()` and the corresponding stream test.
### Issue 2 of 2
GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs:518-537
**Same non-static constructor throw for stream non-static fixture**
`NonStaticStreamInvokerProviderRegistry.GetDescriptors()` creates `new CqrsStreamInvokerDescriptor(…, instanceMethod)`. `CqrsStreamInvokerDescriptor.ValidateInvokerMethod` throws `ArgumentException` for non-static methods, propagating through `RegisterHandlers`. The test `CreateStream_Should_Fall_Back_To_Runtime_Path_When_Generated_Stream_Invoker_Is_Not_Static` would fail at the `RegisterHandlers` call with an unhandled exception instead of demonstrating the expected fallback.
Reviews (4): Last reviewed commit: "docs(cqrs-rewrite): 收敛恢复入口文档" | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md`:
- Line 10: Update the migration tracking so the active facts and recovery anchor
reflect the new PR state: add a concise entry noting PR `#307`’s current status,
validation conclusions, any newly discovered issues, completed work, and the
next recommended recovery point (replacing the outdated PR `#305` reference);
specifically edit the section that mentions "恢复点编号:`CQRS-REWRITE-RP-074`" and
the "active 事实区" to include PR `#307` verification results and recommended next
steps so the tracking follows the rule to record completed work, discovered
issues, validation results, and next recovery point.
- Around line 271-318: The active migration-tracking document currently contains
an extended sequence of per-command validation logs (e.g. the repeated "dotnet
build GFramework.Cqrs.SourceGenerators..." and many "dotnet test
GFramework.SourceGenerators.Tests..." / "dotnet test GFramework.Cqrs.Tests..."
entries); trim this active section down to a single concise "latest
authoritative validation batch" entry plus a short conclusion sentence, then
move the full command-level history into a separate archive file (or an
"Archive" subsection) and replace the removed content with a clear archive
pointer (one-line path or link) and a one-line summary of overall results;
preserve the final pass/fail counts and any critical notes (e.g. MSB3026 noise)
in the archive so the active document remains a compact recovery entrypoint.
In `@docs/zh-CN/core/cqrs.md`:
- Around line 168-170: Update the doc text to reflect actual behavior: explain
that CqrsDispatcher.CreateRequestInvokerDescriptor and
CreateStreamInvokerDescriptor will throw InvalidOperationException on
incompatible generated metadata rather than silently falling back, so change the
phrase “生成注册器不可用或元数据异常时记录告警并回退到反射路径” to indicate that only when a generated
descriptor is not found (未命中 generated descriptor) will the runtime fall back to
reflection, and note that incompatible metadata causes an exception
(InvalidOperationException) instead of a silent downgrade.
- Line 239: Replace the table's first-column text that currently exposes the raw
path "GFramework.Cqrs 根入口与 Internal/" with a semantic label such as
"运行时入口与内部协作层" (or similar reader-facing phrase), leaving the second column
unchanged so it still lists the concrete types CqrsRuntimeFactory,
ICqrsHandlerRegistry, CqrsHandlerRegistryAttribute,
CqrsReflectionFallbackAttribute, ICqrsRequestInvokerProvider, and
ICqrsStreamInvokerProvider; update the table row that mentions GFramework.Cqrs
and Internal/ so the first cell is the semantic navigation label and the second
cell retains the type names (ensuring the reader sees friendly navigation text
while concrete types remain in the details column).
In `@GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs`:
- Around line 188-226: Add two negative-regression tests that cover the case
where the enumerating provider interfaces exist but return an empty collection
from GetDescriptors(): create tests
SendAsync_Should_Fall_Back_To_Runtime_Path_When_Request_Provider_Returns_Empty_Descriptors
and
CreateStream_Should_Fall_Back_To_Runtime_Path_When_Stream_Provider_Returns_Empty_Descriptors
that mirror the existing NonEnumerating* tests but use generated registries
whose GetDescriptors() returns an empty enumerable (i.e., implements
IEnumeratesCqrsRequestInvokerDescriptors /
IEnumeratesCqrsStreamInvokerDescriptors and yields no descriptors), then
register handlers via CqrsTestRuntime.RegisterHandlers, Freeze the container,
send the GeneratedRequestInvokerRequest and drain the
GeneratedStreamInvokerRequest and assert the responses are the runtime fallbacks
("runtime:payload" and [3,4]) to ensure dispatcher falls back to the
runtime/reflective path when descriptors are present but empty.
In
`@GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs`:
- Around line 35-67: Register and TryGetDescriptor are public and can throw on
null inputs but lack <exception> XML comments; add <exception> tags to both
method XML docs: for Register(...) document ArgumentNullException thrown when
services or logger is null (matching the ArgumentNullException.ThrowIfNull
calls), and for TryGetDescriptor(...) document ArgumentNullException for null
requestType/responseType (or explicitly state no exceptions if you choose not to
validate), and include any other runtime exceptions that may be observable so
the XML docs for Register and TryGetDescriptor accurately reflect thrown
exceptions.
In `@GFramework.Cqrs/CqrsStreamInvokerDescriptor.cs`:
- Around line 18-30: The constructor of CqrsStreamInvokerDescriptor currently
only null-checks invokerMethod; update the descriptor to validate that the
provided MethodInfo (InvokerMethod) is a static method and fail fast if it is
not by throwing an ArgumentException (or similar) with a clear message;
specifically, inside the CqrsStreamInvokerDescriptor(...) constructor check
invokerMethod.IsStatic and throw when false so invalid instance methods cannot
enter the registration pipeline.
In `@GFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.cs`:
- Around line 9-12: The public record CqrsStreamInvokerDescriptorEntry currently
allows nulls to be passed and defers failures; add immediate null checks in the
record's primary constructor so callers get ArgumentNullException at
construction time. In the record CqrsStreamInvokerDescriptorEntry (parameters
RequestType, ResponseType, Descriptor) validate RequestType, ResponseType and
Descriptor and throw ArgumentNullException for any that are null (use nameof for
parameter names) to make the type null-safe and respect nullable annotations.
In `@GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs`:
- Around line 3109-3157: The generator gating (supportsStreamInvokerProvider in
CqrsHandlerRegistryGenerator.cs) also depends on CqrsStreamInvokerDescriptor and
CqrsStreamInvokerDescriptorEntry, so add two more unit tests in
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs that
mirror the existing tests but RemoveBlock the descriptor types: one RemoveBlock
that deletes the "public sealed class CqrsStreamInvokerDescriptor" block and
another that deletes the "public sealed class CqrsStreamInvokerDescriptorEntry"
block; ensure each new test asserts the generatedSource still contains the
generated registry class and does NOT contain ICqrsStreamInvokerProvider,
IEnumeratesCqrsStreamInvokerDescriptors, CqrsStreamInvokerDescriptorEntry(, or
InvokeStreamHandler0 (use the same Assert.Multiple pattern and naming consistent
with the existing tests).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 34fca0dc-2689-4739-a724-4c59b18e7d43
📒 Files selected for processing (24)
GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.csGFramework.Cqrs.SourceGenerators/README.mdGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequest.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequestHandler.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationRequestInvokerContainer.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationStreamInvokerContainer.csGFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.csGFramework.Cqrs/ICqrsStreamInvokerProvider.csGFramework.Cqrs/IEnumeratesCqrsStreamInvokerDescriptors.csGFramework.Cqrs/Internal/CqrsDispatcher.csGFramework.Cqrs/Internal/CqrsHandlerRegistrar.csGFramework.Cqrs/README.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.mddocs/zh-CN/core/cqrs.mddocs/zh-CN/source-generators/cqrs-handler-registry-generator.md
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build and Test
- GitHub Check: Code Quality & Security
- GitHub Check: Analyze (C#)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.cs: Apply [Log] attribute for automatic logging field and logging helper method generation
Apply [Priority] attribute for automatic priority comparison implementation generation
Apply [GenerateEnumExtensions] attribute to generate enumeration extension capabilities
Apply [ContextAware] attribute to automatically implement IContextAware boilerplate logic
**/*.cs: All public, protected, and internal types and members MUST include XML documentation comments (///) with<summary>,<param>,<returns>,<exception>, and<remarks>where applicable
Add inline comments for non-trivial logic, concurrency/threading behavior, performance-sensitive paths, workarounds, edge cases, registration order, lifecycle sequencing, and generated code assumptions
Core framework components such as Architecture, Module, System, Context, Registry, Service Module, and Lifecycle types MUST include high-level explanations of responsibilities, lifecycle, interactions, why the abstraction exists, and when to use it
Generated logic and generator pipelines MUST explain what is generated, why it is generated, semantic assumptions, and diagnostics or fallback behavior
Methods with non-trivial logic MUST document the core idea, key decisions, and edge case handling
Do not rely on implicit imports; declare every requiredusingexplicitly in C# files
Write null-safe code that respects nullable annotations instead of suppressing warnings by default
Use the namespace patternGFramework.{Module}.{Feature}with PascalCase segments in C# files
Follow standard C# naming: types/methods/properties/events/constants in PascalCase, interfaces withIprefix, parameters and locals in camelCase, private fields in_camelCase
Use 4 spaces for indentation in C# files; do not use tabs
Use Allman braces in C# files
Keepusingdirectives at the top of C# files and sort them consistently
Prefer one primary type per C# file unless the surrounding project already uses a different local pattern
Keep...
Files:
GFramework.Cqrs/IEnumeratesCqrsStreamInvokerDescriptors.csGFramework.Cqrs/ICqrsStreamInvokerProvider.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.csGFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.csGFramework.Cqrs/Internal/CqrsHandlerRegistrar.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequest.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationStreamInvokerContainer.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequestHandler.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationRequestInvokerContainer.csGFramework.Cqrs/Internal/CqrsDispatcher.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
**/Cqrs/**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Files:
GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequest.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationStreamInvokerContainer.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequestHandler.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationRequestInvokerContainer.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
**/README.md
📄 CodeRabbit inference engine (AGENTS.md)
**/README.md: Use the canonical filenameREADME.mdfor module documentation; do not introduce variants likeReadMe.md
A module README MUST describe: the module's purpose, relationship to adjacent runtime/abstractions/generator packages, major subdirectories or subsystems, minimum adoption path, and correspondingdocs/zh-CN/entry points
If a module's responsibilities, setup, public API surface, generator inputs, or adoption path change, update that module'sREADME.mdin the same change
Files:
GFramework.Cqrs/README.mdGFramework.Cqrs.SourceGenerators/README.md
docs/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Documentation should be organized with Chinese content in docs/zh-CN/ and structured to include getting started, module-specific capabilities (Core, Game, Godot, ECS), source generator usage, tutorials, best practices, and troubleshooting
Files:
docs/zh-CN/source-generators/cqrs-handler-registry-generator.mddocs/zh-CN/core/cqrs.md
{README.md,docs/**}
📄 CodeRabbit inference engine (AGENTS.md)
{README.md,docs/**}: Update the relevantREADME.mdordocs/page when behavior, setup steps, architecture guidance, or user-facing examples change
Public documentation MUST NOT include governance-only content such as inventory tables, coverage baselines, review queues, batch metrics, recovery points, trace summaries, or 'this still needs a later audit wave' notes
Public documentation MUST use semantic section titles and link labels; do not surface raw filenames or paths as reader-facing navigation text when a meaningful destination label is available
Public documentation MUST avoid rhetorical, self-referential, or AI-sounding headings and prompts; prefer neutral labels like '公开入口'、'模块与包关系'、'栏目覆盖范围' and '相关主题'
Public documentation MUST present limitations, suitability, and migration boundaries as adoption guidance; do not publish internal-governance or product-roadmap wording
Keep code samples, package names, and command examples aligned with the current repository state in documentation
Prefer documenting behavior and design intent, not only API surface in user documentation
When a public page references XML docs or API coverage, convert that evidence into reader-facing guidance by explaining which types/namespaces/entry points readers should inspect and why, instead of exposing audit counts or governance terminology
If an existing documentation page no longer reflects the current implementation, fixing the code without fixing the documentation is considered incomplete work
Do not rely on 'the code is self-explanatory' for framework features that consumers need to adopt; write the adoption path down so future users do not need to rediscover it from source
When examples are rewritten, preserve only the parts that remain true; delete or replace speculative examples instead of lightly editing them into another inaccurate form
Files:
docs/zh-CN/source-generators/cqrs-handler-registry-generator.mddocs/zh-CN/core/cqrs.md
docs/zh-CN/**
📄 CodeRabbit inference engine (AGENTS.md)
docs/zh-CN/**: When a feature is added, removed, renamed, or substantially refactored, contributors MUST update or create the corresponding user-facing integration documentation indocs/zh-CN/in the same change
For integration-oriented features such as the AI-First config system, documentation MUST cover: project directory layout and file conventions, required project or package wiring, minimal working usage example, and migration or compatibility notes
Files:
docs/zh-CN/source-generators/cqrs-handler-registry-generator.mddocs/zh-CN/core/cqrs.md
docs/**
📄 CodeRabbit inference engine (AGENTS.md)
If a docs category appears in VitePress navigation or sidebar, it MUST have a real landing page or be removed from navigation in the same change
Files:
docs/zh-CN/source-generators/cqrs-handler-registry-generator.mddocs/zh-CN/core/cqrs.md
ai-plan/public/*/todos/**
📄 CodeRabbit inference engine (AGENTS.md)
ai-plan/public/*/todos/**: When working from a tracked implementation plan, contributors MUST update the corresponding tracking document underai-plan/public/<topic>/todos/in the same change
Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough forbootto locate the current recovery point quickly
Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the activetodos/andtraces/entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files
When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in the active recovery document or trace before continuing implementation
Files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
ai-plan/public/*/traces/**
📄 CodeRabbit inference engine (AGENTS.md)
Contributors MUST maintain a matching execution trace under
ai-plan/public/<topic>/traces/for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
🧠 Learnings (23)
📚 Learning: 2026-04-06T12:45:43.921Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 190
File: GFramework.Game/Config/GameConfigBootstrap.cs:1-3
Timestamp: 2026-04-06T12:45:43.921Z
Learning: In the GeWuYou/GFramework repository, C# files may omit explicit `using System*` imports because the project-wide `GlobalUsings.cs` (referenced via manual global `using` directives) supplies common namespaces (e.g., `System`, `System.Threading`, `System.Threading.Tasks`). During code review, do not flag missing `using System...` directives in `.cs` files as long as `GlobalUsings.cs` is present/used to provide those namespaces.
Applied to files:
GFramework.Cqrs/IEnumeratesCqrsStreamInvokerDescriptors.csGFramework.Cqrs/ICqrsStreamInvokerProvider.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.csGFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.csGFramework.Cqrs/Internal/CqrsHandlerRegistrar.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequest.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationStreamInvokerContainer.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequestHandler.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationRequestInvokerContainer.csGFramework.Cqrs/Internal/CqrsDispatcher.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/*{Startup,Init,Register,Setup,Configure}*.cs : CQRS handler registration should use generated products from CqrsHandlerRegistryGenerator at runtime, falling back to reflection scanning when generation cannot cover cases; explicitly register handlers from non-default assemblies using RegisterCqrsHandlersFromAssembly(...) or RegisterCqrsHandlersFromAssemblies(...)
Applied to files:
GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.csGFramework.Cqrs/Internal/CqrsHandlerRegistrar.csGFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs/README.mddocs/zh-CN/source-generators/cqrs-handler-registry-generator.mdGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csdocs/zh-CN/core/cqrs.mdGFramework.Cqrs/Internal/CqrsDispatcher.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs.SourceGenerators/README.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.SourceEmission.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Service modules should use IServiceModule pattern to register built-in services (EventBus, CommandExecutor, QueryExecutor, etc.) and handle infrastructure capability assembly
Applied to files:
GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/Cqrs/**/*.cs : Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Applied to files:
GFramework.Cqrs/README.mddocs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Source generator changes MUST be covered by generator tests
Applied to files:
GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdGFramework.Cqrs.SourceGenerators/README.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : When generator behavior changes intentionally, update snapshots together with the implementation
Applied to files:
GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.csGFramework.Cqrs.SourceGenerators/README.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.mdGFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: For any multi-step refactor, migration, or cross-module task, contributors MUST create or adopt a dedicated recovery document under `ai-plan/public/<topic>/todos/` before making substantive code changes
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough for `boot` to locate the current recovery point quickly
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When working from a tracked implementation plan, contributors MUST update the corresponding tracking document under `ai-plan/public/<topic>/todos/` in the same change
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Preserve snapshot-based verification patterns already used in the repository for source generator tests
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/README.md : If a module's responsibilities, setup, public API surface, generator inputs, or adoption path change, update that module's `README.md` in the same change
Applied to files:
GFramework.Cqrs.SourceGenerators/README.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Generated logic and generator pipelines MUST explain what is generated, why it is generated, semantic assumptions, and diagnostics or fallback behavior
Applied to files:
GFramework.Cqrs.SourceGenerators/README.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Keep source generators deterministic and free of hidden environment or network dependencies
Applied to files:
GFramework.Cqrs.SourceGenerators/README.mdGFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : When a public C# API defines multiple contract branches, tests MUST cover the meaningful variants including null, empty, default, and filtered inputs when those branches change behavior
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Public API changes must be covered by unit or integration tests in C#
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Keep tests focused on observable behavior, not implementation trivia
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csGFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Regression fixes should include a test that fails before the fix and passes after it
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Preserve deterministic behavior in registries, lifecycle orchestration, and generated outputs
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-16T13:25:59.124Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 235
File: GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs:1-3
Timestamp: 2026-04-16T13:25:59.124Z
Learning: In the GeWuYou/GFramework repo, treat `global using NUnit.Framework;` as provided project-wide by `GFramework.SourceGenerators.Tests/GlobalUsings.cs` (via GlobalUsings.cs). Do not require or flag missing per-file `using NUnit.Framework;` directives in test `.cs` files under `GFramework.SourceGenerators.Tests/`, since the project-wide global usings already include NUnit (along with other common namespaces).
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/traces/** : Contributors MUST maintain a matching execution trace under `ai-plan/public/<topic>/traces/` for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Applied to files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
🪛 LanguageTool
GFramework.Cqrs/README.md
[uncategorized] ~23-~23: 您的意思是“"不"齐”?
Context: ...;运行时会优先消费这些编译期元数据,只有缺失、不适用,或 fallback 仍需补齐剩余 handler 时,才继续进入反射路径。 - `GFramework.C...
(BU)
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
[grammar] ~55-~55: Ensure spelling is correct
Context: ...erRegistrar` 现会在激活 registry 后把 provider 注册进容器, 并把 provider 枚举出的 stream invoker 描述符写入 disp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~61-~61: Ensure spelling is correct
Context: ...er 方法 - GFramework.Cqrs/README.md、GFramework.Cqrs.SourceGenerators/README.md、`docs/zh-CN...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~309-~309: Ensure spelling is correct
Context: ...26 输出文件竞争噪音;当前已确认没有新增 analyzer warning,GFramework.Cqrs.Tests仍能完成 Release 构建 -dotnet test G...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
[style] ~142-~142: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mework.Cqrs/Internal/CqrsDispatcher.cs、GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs`、 ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[grammar] ~143-~143: Ensure spelling is correct
Context: ...mework.Cqrs/.cs 新增 stream provider 契约、GFramework.Cqrs.SourceGenerators/Cqrs/、 GFramewo...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (14)
GFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequest.cs (1)
5-9: 实现清晰,测试意图明确。该请求模型足够精简,且文档注释与用途一致,便于后续生成流式 invoker 用例阅读与维护。
GFramework.Cqrs.Tests/Cqrs/GeneratedStreamInvokerRequestHandler.cs (1)
16-33: 流式处理实现符合契约且可测试性好。
Handle与私有异步迭代器的拆分、取消令牌传递和固定输出序列都很稳,适合做 generated/runtime 路径区分验证。GFramework.Cqrs.Tests/Cqrs/HiddenImplementationStreamInvokerContainer.cs (1)
16-50: 隐藏实现场景建模到位。“可见请求 + 私有处理器类型 + 类型暴露入口”的组合设计清晰,能有效覆盖 hidden implementation 的注册与分发路径。
GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs (1)
243-355: stream invoker 接线扩展与现有 request 路径保持一致。新增注册流程(provider 注册 + 描述符灌入 dispatcher 缓存)结构清晰,且与现有 generated registry 激活流程衔接自然。
GFramework.Cqrs/IEnumeratesCqrsStreamInvokerDescriptors.cs (1)
11-18: 接口边界简洁且职责单一。
GetDescriptors()的契约定义足够直接,便于 registrar 在激活阶段统一消费生成描述符。GFramework.Cqrs.SourceGenerators/README.md (1)
18-19: 文档更新及时,覆盖了新增生成路径与运行时语义。新增的 request/stream invoker provider 描述、命中优先级与回退语义都已补齐,和本次能力扩展保持一致。
Also applies to: 38-39, 61-62
GFramework.Cqrs/ICqrsStreamInvokerProvider.cs (1)
5-33: 接口契约与回退语义表达清晰,适合作为 stream invoker provider 的稳定扩展点。这段改动把 provider 的职责边界、默认 runtime 的接线方式和反射回退路径都说明得很完整,可维护性很好。
docs/zh-CN/source-generators/cqrs-handler-registry-generator.md (1)
31-42: 文档已与本次 request/stream invoker provider 能力同步,接入与回退边界描述到位。尤其是 registrar/dispatcher 的消费顺序和“未命中即回退反射”的行为,读者能直接据此判断是否需要安装生成器。
Also applies to: 84-93, 103-104, 140-142
GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.Models.cs (1)
12-53: 模型层扩展保持了 request/stream 对称性,gate 信号也收敛得很干净。
SupportsStreamInvokerProvider与HasStreamInvokerProvider的拆分让后续发射阶段判断更直接。Also applies to: 61-66, 343-349
GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedRequestInvokerProviderRegistry.cs (1)
12-93: 这个测试 registry 设计合理,能有效锁定“隐藏实现 + 可见接口”下的 generated invoker 行为。
TryGetDescriptor、GetDescriptors()和静态桥接方法三者配合完整,覆盖目标场景充分。GFramework.Cqrs.Tests/Cqrs/HiddenImplementationRequestInvokerContainer.cs (1)
5-38: 测试容器抽象清晰,能稳定支撑 hidden implementation 回归场景。
VisibleRequest与HiddenHandlerType的暴露粒度恰当,没有额外泄漏测试细节。GFramework.Cqrs/README.md (1)
23-23: README 已同步本次 provider 元数据优先级与 fallback 语义,信息更新及时。对 request/stream 两条路径的描述保持一致,便于使用方快速建立正确预期。
Also applies to: 123-124, 131-131, 145-145
GFramework.Cqrs.SourceGenerators/Cqrs/CqrsHandlerRegistryGenerator.cs (1)
25-31: stream invoker 的生成门控与规格提取实现完整,且与 request 路径保持良好对称。这能显著降低后续两条路径语义漂移的概率。
Also applies to: 88-114, 243-267, 306-332
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md (1)
3-217: 迁移追踪记录完整,已覆盖日期、关键决策、验证结果和下一步动作。这份 trace 能作为后续批次恢复点直接使用。
- 修复 request 与 stream generated invoker 描述符的静态方法与空值防御,提前拒绝非法元数据 - 补充 provider 空描述符枚举与非静态 invoker 回退回归,更新相关 XML 注释与中文文档语义 - 更新 cqrs-rewrite 活跃跟踪、执行 trace 与验证归档,记录 PR #307 的当前验证结论
Summary
Test ResultsDetails
Insights
build-and-test: Run #1023
🎉 All tests passed!Slowest Tests
± Comparison with run #1021 at f62cf5c | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 19 runs. Github Test Reporter by CTRF 💚 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md`:
- Around line 52-90: The active tracking entry in
cqrs-rewrite-migration-tracking.md is too verbose and should be trimmed: move
the step-by-step implementation/test details currently listed (each bullet under
the "已完成" sections) into an archive file (e.g.,
archive/todos/cqrs-rewrite-validation-history-...md) and in this active file
leave only the current recovery point summary, active risks, immediate next
step, and a short pointer/link to the archive; update the lead paragraph and any
sections that reference detailed items so they instead reference the archive
file and remove per-change bullets (retain only the high-level conclusion,
"活跃风险", "下一步", and the archive pointer).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5506ab2d-54ef-4b6a-8215-7bb01a8b6859
📒 Files selected for processing (10)
GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.csGFramework.Cqrs/CqrsRequestInvokerDescriptor.csGFramework.Cqrs/CqrsRequestInvokerDescriptorEntry.csGFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.csai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.mdai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.mddocs/zh-CN/core/cqrs.md
✅ Files skipped from review due to trivial changes (1)
- GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
🚧 Files skipped from review as they are similar to previous changes (1)
- GFramework.Cqrs/CqrsStreamInvokerDescriptorEntry.cs
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (C#)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.cs: Apply [Log] attribute for automatic logging field and logging helper method generation
Apply [Priority] attribute for automatic priority comparison implementation generation
Apply [GenerateEnumExtensions] attribute to generate enumeration extension capabilities
Apply [ContextAware] attribute to automatically implement IContextAware boilerplate logic
**/*.cs: All public, protected, and internal types and members MUST include XML documentation comments (///) with<summary>,<param>,<returns>,<exception>, and<remarks>where applicable
Add inline comments for non-trivial logic, concurrency/threading behavior, performance-sensitive paths, workarounds, edge cases, registration order, lifecycle sequencing, and generated code assumptions
Core framework components such as Architecture, Module, System, Context, Registry, Service Module, and Lifecycle types MUST include high-level explanations of responsibilities, lifecycle, interactions, why the abstraction exists, and when to use it
Generated logic and generator pipelines MUST explain what is generated, why it is generated, semantic assumptions, and diagnostics or fallback behavior
Methods with non-trivial logic MUST document the core idea, key decisions, and edge case handling
Do not rely on implicit imports; declare every requiredusingexplicitly in C# files
Write null-safe code that respects nullable annotations instead of suppressing warnings by default
Use the namespace patternGFramework.{Module}.{Feature}with PascalCase segments in C# files
Follow standard C# naming: types/methods/properties/events/constants in PascalCase, interfaces withIprefix, parameters and locals in camelCase, private fields in_camelCase
Use 4 spaces for indentation in C# files; do not use tabs
Use Allman braces in C# files
Keepusingdirectives at the top of C# files and sort them consistently
Prefer one primary type per C# file unless the surrounding project already uses a different local pattern
Keep...
Files:
GFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsRequestInvokerDescriptor.csGFramework.Cqrs/CqrsRequestInvokerDescriptorEntry.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs
ai-plan/public/*/traces/**
📄 CodeRabbit inference engine (AGENTS.md)
Contributors MUST maintain a matching execution trace under
ai-plan/public/<topic>/traces/for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
docs/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Documentation should be organized with Chinese content in docs/zh-CN/ and structured to include getting started, module-specific capabilities (Core, Game, Godot, ECS), source generator usage, tutorials, best practices, and troubleshooting
Files:
docs/zh-CN/core/cqrs.md
{README.md,docs/**}
📄 CodeRabbit inference engine (AGENTS.md)
{README.md,docs/**}: Update the relevantREADME.mdordocs/page when behavior, setup steps, architecture guidance, or user-facing examples change
Public documentation MUST NOT include governance-only content such as inventory tables, coverage baselines, review queues, batch metrics, recovery points, trace summaries, or 'this still needs a later audit wave' notes
Public documentation MUST use semantic section titles and link labels; do not surface raw filenames or paths as reader-facing navigation text when a meaningful destination label is available
Public documentation MUST avoid rhetorical, self-referential, or AI-sounding headings and prompts; prefer neutral labels like '公开入口'、'模块与包关系'、'栏目覆盖范围' and '相关主题'
Public documentation MUST present limitations, suitability, and migration boundaries as adoption guidance; do not publish internal-governance or product-roadmap wording
Keep code samples, package names, and command examples aligned with the current repository state in documentation
Prefer documenting behavior and design intent, not only API surface in user documentation
When a public page references XML docs or API coverage, convert that evidence into reader-facing guidance by explaining which types/namespaces/entry points readers should inspect and why, instead of exposing audit counts or governance terminology
If an existing documentation page no longer reflects the current implementation, fixing the code without fixing the documentation is considered incomplete work
Do not rely on 'the code is self-explanatory' for framework features that consumers need to adopt; write the adoption path down so future users do not need to rediscover it from source
When examples are rewritten, preserve only the parts that remain true; delete or replace speculative examples instead of lightly editing them into another inaccurate form
Files:
docs/zh-CN/core/cqrs.md
docs/zh-CN/**
📄 CodeRabbit inference engine (AGENTS.md)
docs/zh-CN/**: When a feature is added, removed, renamed, or substantially refactored, contributors MUST update or create the corresponding user-facing integration documentation indocs/zh-CN/in the same change
For integration-oriented features such as the AI-First config system, documentation MUST cover: project directory layout and file conventions, required project or package wiring, minimal working usage example, and migration or compatibility notes
Files:
docs/zh-CN/core/cqrs.md
docs/**
📄 CodeRabbit inference engine (AGENTS.md)
If a docs category appears in VitePress navigation or sidebar, it MUST have a real landing page or be removed from navigation in the same change
Files:
docs/zh-CN/core/cqrs.md
ai-plan/public/*/todos/**
📄 CodeRabbit inference engine (AGENTS.md)
ai-plan/public/*/todos/**: When working from a tracked implementation plan, contributors MUST update the corresponding tracking document underai-plan/public/<topic>/todos/in the same change
Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough forbootto locate the current recovery point quickly
Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the activetodos/andtraces/entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files
When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in the active recovery document or trace before continuing implementation
Files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
**/Cqrs/**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Files:
GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs
🧠 Learnings (22)
📚 Learning: 2026-04-06T12:45:43.921Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 190
File: GFramework.Game/Config/GameConfigBootstrap.cs:1-3
Timestamp: 2026-04-06T12:45:43.921Z
Learning: In the GeWuYou/GFramework repository, C# files may omit explicit `using System*` imports because the project-wide `GlobalUsings.cs` (referenced via manual global `using` directives) supplies common namespaces (e.g., `System`, `System.Threading`, `System.Threading.Tasks`). During code review, do not flag missing `using System...` directives in `.cs` files as long as `GlobalUsings.cs` is present/used to provide those namespaces.
Applied to files:
GFramework.Cqrs/CqrsStreamInvokerDescriptor.csGFramework.Cqrs/CqrsRequestInvokerDescriptor.csGFramework.Cqrs/CqrsRequestInvokerDescriptorEntry.csGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/traces/** : Contributors MUST maintain a matching execution trace under `ai-plan/public/<topic>/traces/` for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Applied to files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/*{Startup,Init,Register,Setup,Configure}*.cs : CQRS handler registration should use generated products from CqrsHandlerRegistryGenerator at runtime, falling back to reflection scanning when generation cannot cover cases; explicitly register handlers from non-default assemblies using RegisterCqrsHandlersFromAssembly(...) or RegisterCqrsHandlersFromAssemblies(...)
Applied to files:
docs/zh-CN/core/cqrs.mdGFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to {README.md,docs/**} : Public documentation MUST avoid rhetorical, self-referential, or AI-sounding headings and prompts; prefer neutral labels like '公开入口'、'模块与包关系'、'栏目覆盖范围' and '相关主题'
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to docs/zh-CN/** : For integration-oriented features such as the AI-First config system, documentation MUST cover: project directory layout and file conventions, required project or package wiring, minimal working usage example, and migration or compatibility notes
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to {README.md,docs/**} : Public documentation MUST use semantic section titles and link labels; do not surface raw filenames or paths as reader-facing navigation text when a meaningful destination label is available
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to {README.md,docs/**} : When a public page references XML docs or API coverage, convert that evidence into reader-facing guidance by explaining which types/namespaces/entry points readers should inspect and why, instead of exposing audit counts or governance terminology
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to docs/zh-CN/** : When a feature is added, removed, renamed, or substantially refactored, contributors MUST update or create the corresponding user-facing integration documentation in `docs/zh-CN/` in the same change
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/README.md : A module README MUST describe: the module's purpose, relationship to adjacent runtime/abstractions/generator packages, major subdirectories or subsystems, minimum adoption path, and corresponding `docs/zh-CN/` entry points
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to docs/**/*.md : Documentation should be organized with Chinese content in docs/zh-CN/ and structured to include getting started, module-specific capabilities (Core, Game, Godot, ECS), source generator usage, tutorials, best practices, and troubleshooting
Applied to files:
docs/zh-CN/core/cqrs.md
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/Cqrs/**/*.cs : Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Applied to files:
docs/zh-CN/core/cqrs.mdai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough for `boot` to locate the current recovery point quickly
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the active `todos/` and `traces/` entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in the active recovery document or trace before continuing implementation
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: For any multi-step refactor, migration, or cross-module task, contributors MUST create or adopt a dedicated recovery document under `ai-plan/public/<topic>/todos/` before making substantive code changes
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When working from a tracked implementation plan, contributors MUST update the corresponding tracking document under `ai-plan/public/<topic>/todos/` in the same change
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Add inline comments for non-trivial logic, concurrency/threading behavior, performance-sensitive paths, workarounds, edge cases, registration order, lifecycle sequencing, and generated code assumptions
Applied to files:
GFramework.Cqrs.Tests/Cqrs/HiddenImplementationGeneratedStreamInvokerProviderRegistry.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Governance-only material such as XML audit snapshots, documentation remediation baselines, backlog status, and recovery metadata belongs in `ai-plan/**`, not in public docs
Applied to files:
ai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Any change to public API, lifecycle semantics, module behavior, or extension points MUST update the related XML docs
Applied to files:
ai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
🪛 LanguageTool
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
[style] ~171-~171: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mework.Cqrs/Internal/CqrsDispatcher.cs、GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs`、 ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[grammar] ~172-~172: Ensure spelling is correct
Context: ...mework.Cqrs/.cs 新增 stream provider 契约、GFramework.Cqrs.SourceGenerators/Cqrs/、 GFramewo...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/zh-CN/core/cqrs.md
[grammar] ~170-~170: Ensure spelling is correct
Context: ... 生成注册器不可用时记录告警并回退到反射路径;只有“未命中 generated descriptor”才会走反射绑定,已命中的不兼容元数据会直接抛出异常 6. 当生成注册器携带 `CqrsReflectionFallbackAttr...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
[grammar] ~55-~55: Ensure spelling is correct
Context: ...erRegistrar` 现会在激活 registry 后把 provider 注册进容器, 并把 provider 枚举出的 stream invoker 描述符写入 disp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~61-~61: Ensure spelling is correct
Context: ...er 方法 - GFramework.Cqrs/README.md、GFramework.Cqrs.SourceGenerators/README.md、`docs/zh-CN...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
ai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md
[grammar] ~72-~72: Ensure spelling is correct
Context: ...26 输出文件竞争噪音;当前已确认没有新增 analyzer warning,GFramework.Cqrs.Tests仍能完成 Release 构建 -dotnet test G...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (7)
ai-plan/public/cqrs-rewrite/archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md (1)
5-7: 归档定位清晰,符合恢复入口收敛目标。这段说明把“active 仅保留权威批次、明细进 archive”的边界写得很明确,便于后续接手。
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md (1)
5-33: RP-075 追踪信息完整,可直接作为交接入口。本段已覆盖关键决策、验证里程碑与“当前下一步”,可恢复性很好。
GFramework.Cqrs/CqrsRequestInvokerDescriptor.cs (1)
22-50: 构造阶段前移 invoker 合约校验的实现很稳妥。这里把
null与“非静态方法”拦截提前到描述符创建时,能更早暴露无效元数据并减少运行时分发阶段的不确定性,方向正确。GFramework.Cqrs/CqrsRequestInvokerDescriptorEntry.cs (1)
6-41: 显式构造器改造后的一致性和防御性都不错。对三个入参的空值校验明确,属性保持只读,整体契约表达比之前更直观。
docs/zh-CN/core/cqrs.md (2)
168-186: 文档更新准确描述了双轨调度模型。这几段变更清晰地说明了:
- Request invoker provider 和 stream invoker provider 的预接线机制
- 生成元数据优先、未命中时反射兜底的两阶段查找
- 不兼容元数据时的异常抛出行为(而非静默降级)
技术描述与提供的代码片段(
CreateRequestDispatchBinding、CreateStreamDispatchBinding、RegisterGeneratedRequestInvokerDescriptors等)一致,且已修正此前评审中指出的回退语义问题。
239-239: 表格首列改用语义标签,符合文档规范。这里已经把原先暴露的
"GFramework.Cqrs 根入口与 Internal/"路径替换成面向读者的导航文案"运行时入口与内部协作层",具体类型保留在第二列,满足"Public documentation MUST use semantic section titles and link labels"的要求。As per coding guidelines: Public documentation MUST use semantic section titles and link labels; do not surface raw filenames or paths as reader-facing navigation text when a meaningful destination label is available.
GFramework.Cqrs/CqrsStreamInvokerDescriptor.cs (1)
18-50: 实现方向正确:描述符在构造期做了前置校验,能有效减少运行时延迟失败。
handlerType与invokerMethod的校验边界清晰,且异常语义与用途匹配,整体可维护性不错。
- 补充 stream invoker descriptor 与 descriptor entry 缺失时整体跳过 provider 元数据的生成器回归 - 优化测试辅助重命名逻辑,精确模拟 metadata name 缺失而不破坏其余合同编译 - 更新 cqrs-rewrite 跟踪与追踪,记录 PR #307 follow-up 的恢复点和验证结果
Summary
Test ResultsDetails
Insights
build-and-test: Run #1024
🎉 All tests passed!Slowest Tests
± Comparison with run #1023 at 72b7e2e | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 20 runs. Github Test Reporter by CTRF 💚 |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md (2)
52-93:⚠️ Potential issue | 🟠 Major | ⚡ Quick winactive 跟踪段仍偏历史堆叠,建议继续归档瘦身为“恢复入口视图”。
这段仍包含大量实现/测试明细,建议仅保留:当前恢复点结论、活跃风险、最近权威验证、下一步,以及归档指针;其余命令级与阶段级细节继续下沉 archive。
As per coding guidelines "Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough for
bootto locate the current recovery point quickly" and "When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the activetodos/andtraces/entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md` around lines 52 - 93, The active-tracking section is too detailed and must be slimmed to a recovery-entry view: edit the "active 跟踪段" content in cqrs-rewrite-migration-tracking.md to remove the long implementation/test bullet list and retain only (1) a concise current recovery-point conclusion, (2) active risks, (3) the most recent authoritative validation(s), (4) the immediate next step, and (5) a pointer to the archived detailed history (e.g. archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md); move all command-/stage-level details and test-by-test items into that archive file and update any in-document references (RP-063..RP-074, CqrsHandlerRegistryGeneratorTests, CqrsDispatcher, CqrsGeneratedRequestInvokerProviderTests, etc.) to point readers to the archive.
10-10:⚠️ Potential issue | 🟠 Major | ⚡ Quick win恢复点已更新,但活跃事实区仍保留旧 PR 锚点,建议同步收敛。
RP-076已是当前恢复点,但文档后文仍并列PR#261/#302/#305的“当前活跃事实”表述,和本轮PR#307`` 权威验证容易形成双锚点。建议把旧 PR 状态下沉到 archive,只在 active 区保留当前 PR 锚点与恢复结论。As per coding guidelines "Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point" and "Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md` at line 10, Update the migration-tracking doc so the active facts section only references the current recovery point and authoritative PR: replace the parallel anchors `PR `#261/`#302/#305` with the single active anchor `PR `#307`` and ensure the recovery point identifier `CQRS-REWRITE-RP-076` is shown as the current RP; move the older PR entries into an "archive" or "historical" subsection with their status and any outstanding risks, and ensure the document records the current phase, known risks, validation result, and next recommended resume step per the tracking guidelines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md`:
- Around line 52-93: The active-tracking section is too detailed and must be
slimmed to a recovery-entry view: edit the "active 跟踪段" content in
cqrs-rewrite-migration-tracking.md to remove the long implementation/test bullet
list and retain only (1) a concise current recovery-point conclusion, (2) active
risks, (3) the most recent authoritative validation(s), (4) the immediate next
step, and (5) a pointer to the archived detailed history (e.g.
archive/todos/cqrs-rewrite-validation-history-rp063-through-rp074.md); move all
command-/stage-level details and test-by-test items into that archive file and
update any in-document references (RP-063..RP-074,
CqrsHandlerRegistryGeneratorTests, CqrsDispatcher,
CqrsGeneratedRequestInvokerProviderTests, etc.) to point readers to the archive.
- Line 10: Update the migration-tracking doc so the active facts section only
references the current recovery point and authoritative PR: replace the parallel
anchors `PR `#261/`#302/#305` with the single active anchor `PR `#307`` and ensure
the recovery point identifier `CQRS-REWRITE-RP-076` is shown as the current RP;
move the older PR entries into an "archive" or "historical" subsection with
their status and any outstanding risks, and ensure the document records the
current phase, known risks, validation result, and next recommended resume step
per the tracking guidelines.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 813a49c7-8c2f-403b-a3ff-246b7c9db937
📒 Files selected for processing (3)
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Code Quality & Security
- GitHub Check: Build and Test
- GitHub Check: Analyze (C#)
🧰 Additional context used
📓 Path-based instructions (4)
**/Cqrs/**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
**/*.cs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.cs: Apply [Log] attribute for automatic logging field and logging helper method generation
Apply [Priority] attribute for automatic priority comparison implementation generation
Apply [GenerateEnumExtensions] attribute to generate enumeration extension capabilities
Apply [ContextAware] attribute to automatically implement IContextAware boilerplate logic
**/*.cs: All public, protected, and internal types and members MUST include XML documentation comments (///) with<summary>,<param>,<returns>,<exception>, and<remarks>where applicable
Add inline comments for non-trivial logic, concurrency/threading behavior, performance-sensitive paths, workarounds, edge cases, registration order, lifecycle sequencing, and generated code assumptions
Core framework components such as Architecture, Module, System, Context, Registry, Service Module, and Lifecycle types MUST include high-level explanations of responsibilities, lifecycle, interactions, why the abstraction exists, and when to use it
Generated logic and generator pipelines MUST explain what is generated, why it is generated, semantic assumptions, and diagnostics or fallback behavior
Methods with non-trivial logic MUST document the core idea, key decisions, and edge case handling
Do not rely on implicit imports; declare every requiredusingexplicitly in C# files
Write null-safe code that respects nullable annotations instead of suppressing warnings by default
Use the namespace patternGFramework.{Module}.{Feature}with PascalCase segments in C# files
Follow standard C# naming: types/methods/properties/events/constants in PascalCase, interfaces withIprefix, parameters and locals in camelCase, private fields in_camelCase
Use 4 spaces for indentation in C# files; do not use tabs
Use Allman braces in C# files
Keepusingdirectives at the top of C# files and sort them consistently
Prefer one primary type per C# file unless the surrounding project already uses a different local pattern
Keep...
Files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
ai-plan/public/*/todos/**
📄 CodeRabbit inference engine (AGENTS.md)
ai-plan/public/*/todos/**: When working from a tracked implementation plan, contributors MUST update the corresponding tracking document underai-plan/public/<topic>/todos/in the same change
Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough forbootto locate the current recovery point quickly
Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the activetodos/andtraces/entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files
When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in the active recovery document or trace before continuing implementation
Files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
ai-plan/public/*/traces/**
📄 CodeRabbit inference engine (AGENTS.md)
Contributors MUST maintain a matching execution trace under
ai-plan/public/<topic>/traces/for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
🧠 Learnings (24)
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Source generator changes MUST be covered by generator tests
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Preserve snapshot-based verification patterns already used in the repository for source generator tests
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : When a public C# API defines multiple contract branches, tests MUST cover the meaningful variants including null, empty, default, and filtered inputs when those branches change behavior
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/*{Startup,Init,Register,Setup,Configure}*.cs : CQRS handler registration should use generated products from CqrsHandlerRegistryGenerator at runtime, falling back to reflection scanning when generation cannot cover cases; explicitly register handlers from non-default assemblies using RegisterCqrsHandlersFromAssembly(...) or RegisterCqrsHandlersFromAssemblies(...)
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : When generator behavior changes intentionally, update snapshots together with the implementation
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.csai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Keep tests focused on observable behavior, not implementation trivia
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Public API changes must be covered by unit or integration tests in C#
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-16T13:25:59.124Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 235
File: GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs:1-3
Timestamp: 2026-04-16T13:25:59.124Z
Learning: In the GeWuYou/GFramework repo, treat `global using NUnit.Framework;` as provided project-wide by `GFramework.SourceGenerators.Tests/GlobalUsings.cs` (via GlobalUsings.cs). Do not require or flag missing per-file `using NUnit.Framework;` directives in test `.cs` files under `GFramework.SourceGenerators.Tests/`, since the project-wide global usings already include NUnit (along with other common namespaces).
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Keep source generators deterministic and free of hidden environment or network dependencies
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.cs : Add inline comments for non-trivial logic, concurrency/threading behavior, performance-sensitive paths, workarounds, edge cases, registration order, lifecycle sequencing, and generated code assumptions
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to **/*.Tests.cs : Regression fixes should include a test that fails before the fix and passes after it
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-06T12:45:43.921Z
Learnt from: GeWuYou
Repo: GeWuYou/GFramework PR: 190
File: GFramework.Game/Config/GameConfigBootstrap.cs:1-3
Timestamp: 2026-04-06T12:45:43.921Z
Learning: In the GeWuYou/GFramework repository, C# files may omit explicit `using System*` imports because the project-wide `GlobalUsings.cs` (referenced via manual global `using` directives) supplies common namespaces (e.g., `System`, `System.Threading`, `System.Threading.Tasks`). During code review, do not flag missing `using System...` directives in `.cs` files as long as `GlobalUsings.cs` is present/used to provide those namespaces.
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Preserve deterministic behavior in registries, lifecycle orchestration, and generated outputs
Applied to files:
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Tracking updates MUST reflect completed work, newly discovered issues, validation results, and the next recommended recovery point
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: For any multi-step refactor, migration, or cross-module task, contributors MUST create or adopt a dedicated recovery document under `ai-plan/public/<topic>/todos/` before making substantive code changes
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Active tracking and trace files are recovery entrypoints, not append-only changelogs; they MUST stay concise enough for `boot` to locate the current recovery point quickly
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : Recovery documents MUST record the current phase, the active recovery point identifier, known risks, and the next recommended resume step so another contributor or subagent can continue the work safely
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When a task spans multiple commits or is likely to exceed a single agent context window, update both the recovery document and the trace at each meaningful milestone before pausing or handing work off
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When completed and validated stages begin to accumulate, contributors MUST archive their detailed history out of the active `todos/` and `traces/` entry files in the same change, keeping only the current recovery point, active facts, active risks, immediate next step, and pointers to archive files
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : If subagents are used on a complex task, the main agent MUST capture the delegated scope and any accepted findings in the active recovery document or trace before continuing implementation
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/todos/** : When working from a tracked implementation plan, contributors MUST update the corresponding tracking document under `ai-plan/public/<topic>/todos/` in the same change
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to {README.md,docs/**} : Public documentation MUST avoid rhetorical, self-referential, or AI-sounding headings and prompts; prefer neutral labels like '公开入口'、'模块与包关系'、'栏目覆盖范围' and '相关主题'
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-17T11:35:08.762Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-17T11:35:08.762Z
Learning: Applies to **/Cqrs/**/*.cs : Use CQRS (Command Query Responsibility Segregation) pattern with the Cqrs naming entry point instead of the historical Mediator alias
Applied to files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
📚 Learning: 2026-04-26T03:16:48.230Z
Learnt from: CR
Repo: GeWuYou/GFramework PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T03:16:48.230Z
Learning: Applies to ai-plan/public/*/traces/** : Contributors MUST maintain a matching execution trace under `ai-plan/public/<topic>/traces/` for complex work, recording the current date, key decisions, validation milestones, and the immediate next step
Applied to files:
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
🪛 LanguageTool
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md
[grammar] ~55-~55: Ensure spelling is correct
Context: ...erRegistrar` 现会在激活 registry 后把 provider 注册进容器, 并把 provider 枚举出的 stream invoker 描述符写入 disp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~61-~61: Ensure spelling is correct
Context: ...er 方法 - GFramework.Cqrs/README.md、GFramework.Cqrs.SourceGenerators/README.md、`docs/zh-CN...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
[style] ~195-~195: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mework.Cqrs/Internal/CqrsDispatcher.cs、GFramework.Cqrs/Internal/CqrsHandlerRegistrar.cs`、 ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[grammar] ~196-~196: Ensure spelling is correct
Context: ...mework.Cqrs/.cs 新增 stream provider 契约、GFramework.Cqrs.SourceGenerators/Cqrs/、 GFramewo...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (2)
GFramework.SourceGenerators.Tests/Cqrs/CqrsHandlerRegistryGeneratorTests.cs (2)
3159-3209: 这两条缺失描述符分支的回归用例补齐了。这里把
CqrsStreamInvokerDescriptor和CqrsStreamInvokerDescriptorEntry两条 gating 分支都锁住了,断言也保持在可观察生成结果这一层,方向正确。
Based on learnings: Applies to **/.cs : Source generator changes MUST be covered by generator tests; Applies to **/.Tests.cs : Keep tests focused on observable behavior, not implementation trivia
3284-3371: 这组测试辅助方法设计得很稳。
RemoveBlock降低了用例对原始三引号缩进的耦合,RenameTypeIdentifier配合IsIdentifierBoundary也避免了共享前缀类型名的误替换,适合这类生成器回归场景。
- 更新 active tracking,仅保留 RP-076、PR #307、活跃风险、权威验证与下一推荐步骤 - 重构 active trace,仅保留当前阶段决策、验证结果与后续恢复方向 - 补充 RP-062 至 RP-076 的 trace 归档,承接迁出的历史阶段上下文
Summary
Test ResultsDetails
Insights
build-and-test: Run #1026
🎉 All tests passed!Slowest Tests
± Comparison with run #1024 at d7c1455 | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 21 runs. Github Test Reporter by CTRF 💚 |
| /// <inheritdoc /> | ||
| public IReadOnlyList<CqrsRequestInvokerDescriptorEntry> GetDescriptors() | ||
| { | ||
| return | ||
| [ | ||
| new CqrsRequestInvokerDescriptorEntry( | ||
| typeof(GeneratedRequestInvokerRequest), | ||
| typeof(string), | ||
| new CqrsRequestInvokerDescriptor( | ||
| typeof(IRequestHandler<GeneratedRequestInvokerRequest, string>), | ||
| typeof(NonStaticRequestInvokerProviderRegistry).GetMethod( | ||
| nameof(InvokeGenerated), | ||
| BindingFlags.NonPublic | BindingFlags.Instance)!)) | ||
| ]; | ||
| } | ||
|
|
||
| private ValueTask<string> InvokeGenerated(object handler, object request, CancellationToken cancellationToken) | ||
| { | ||
| return ValueTask.FromResult(string.Empty); | ||
| } | ||
| } |
There was a problem hiding this comment.
Non-static invoker test fixture will throw during
RegisterHandlers
NonStaticRequestInvokerProviderRegistry.GetDescriptors() constructs new CqrsRequestInvokerDescriptor(…, instanceMethod). The new ValidateInvokerMethod guard added to CqrsRequestInvokerDescriptor in this PR throws ArgumentException when !invokerMethod.IsStatic. This exception propagates from GetDescriptors() → RegisterGeneratedRequestInvokerDescriptors → RegisterHandlers with no surrounding try-catch, so the test SendAsync_Should_Fall_Back_To_Runtime_Path_When_Generated_Request_Invoker_Is_Not_Static crashes at CqrsTestRuntime.RegisterHandlers(...) before the dispatch even runs, rather than falling back gracefully to the runtime path. The same problem exists for NonStaticStreamInvokerProviderRegistry.GetDescriptors() and the corresponding stream test.
Prompt To Fix With AI
This is a comment left during a code review.
Path: GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
Line: 394-414
Comment:
**Non-static invoker test fixture will throw during `RegisterHandlers`**
`NonStaticRequestInvokerProviderRegistry.GetDescriptors()` constructs `new CqrsRequestInvokerDescriptor(…, instanceMethod)`. The new `ValidateInvokerMethod` guard added to `CqrsRequestInvokerDescriptor` in this PR throws `ArgumentException` when `!invokerMethod.IsStatic`. This exception propagates from `GetDescriptors()` → `RegisterGeneratedRequestInvokerDescriptors` → `RegisterHandlers` with no surrounding try-catch, so the test `SendAsync_Should_Fall_Back_To_Runtime_Path_When_Generated_Request_Invoker_Is_Not_Static` crashes at `CqrsTestRuntime.RegisterHandlers(...)` before the dispatch even runs, rather than falling back gracefully to the runtime path. The same problem exists for `NonStaticStreamInvokerProviderRegistry.GetDescriptors()` and the corresponding stream test.
How can I resolve this? If you propose a fix, please make it concise.| public IReadOnlyList<CqrsStreamInvokerDescriptorEntry> GetDescriptors() | ||
| { | ||
| return | ||
| [ | ||
| new CqrsStreamInvokerDescriptorEntry( | ||
| typeof(GeneratedStreamInvokerRequest), | ||
| typeof(int), | ||
| new CqrsStreamInvokerDescriptor( | ||
| typeof(IStreamRequestHandler<GeneratedStreamInvokerRequest, int>), | ||
| typeof(NonStaticStreamInvokerProviderRegistry).GetMethod( | ||
| nameof(InvokeGenerated), | ||
| BindingFlags.NonPublic | BindingFlags.Instance)!)) | ||
| ]; | ||
| } | ||
|
|
||
| private object InvokeGenerated(object handler, object request, CancellationToken cancellationToken) | ||
| { | ||
| return Array.Empty<int>().ToAsyncEnumerable(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Same non-static constructor throw for stream non-static fixture
NonStaticStreamInvokerProviderRegistry.GetDescriptors() creates new CqrsStreamInvokerDescriptor(…, instanceMethod). CqrsStreamInvokerDescriptor.ValidateInvokerMethod throws ArgumentException for non-static methods, propagating through RegisterHandlers. The test CreateStream_Should_Fall_Back_To_Runtime_Path_When_Generated_Stream_Invoker_Is_Not_Static would fail at the RegisterHandlers call with an unhandled exception instead of demonstrating the expected fallback.
Prompt To Fix With AI
This is a comment left during a code review.
Path: GFramework.Cqrs.Tests/Cqrs/CqrsGeneratedRequestInvokerProviderTests.cs
Line: 518-537
Comment:
**Same non-static constructor throw for stream non-static fixture**
`NonStaticStreamInvokerProviderRegistry.GetDescriptors()` creates `new CqrsStreamInvokerDescriptor(…, instanceMethod)`. `CqrsStreamInvokerDescriptor.ValidateInvokerMethod` throws `ArgumentException` for non-static methods, propagating through `RegisterHandlers`. The test `CreateStream_Should_Fall_Back_To_Runtime_Path_When_Generated_Stream_Invoker_Is_Not_Static` would fail at the `RegisterHandlers` call with an unhandled exception instead of demonstrating the expected fallback.
How can I resolve this? If you propose a fix, please make it concise.|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary by CodeRabbit
发布说明
新功能
修复与改进
文档
测试