Repository navigation
feat(test): 新增 GameFrameX 自定义修复回归测试 - #22
Conversation
Rust:RustDeclaringTypeNameVisitor.Accept(TBean) 退回了官方 crate::{FullName.Replace} 写法,
导致 bean 引用生成 crate::Battle::Pos 而模块声明为 pub mod battle(大小写不符),
Rust 编译失败;恢复走 RustCommonTemplateExtension.FullName(命名空间小写,与 TEnum 一致)。
DefAssembly:不同模块短表名重复由抛 LubanException 恢复为只记 Fatal 日志不中断生成,
与 fork 74d27f6 语义一致;消息改走 MessageCatalog.Format 保留官方本地化。
Linear: GFX-996
上游同步后 fork 修复缺少断言保护,新增 GameFrameXRegressionTests 共 12 条用例覆盖:cs-dotnet-json 自持 _loadFunc 与 TryGet 取值、 cs-dotnet-bin LoadAsync override 与 LongDataMaps.Clear、 TranslateText 继承修饰符、cs-bin-split 无 SimpleJSON、 0x 十六进制字面量、内联本地化增量写入、短表名重复不中断、 Rust bean 小写模块路径。Luban.Tests 补充引用 Luban.Rust 以注册 rust-bin 目标。 Linear: GFX-996
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
生成与数据处理回归覆盖 src/Luban.Tests/Integration/GameFrameXRegressionTests.cs, tests/fixtures/gameframex-regression/*, tests/fixtures/gameframex-inline-l10n/* |
新增测试,覆盖 C# JSON/bin 生成、继承声明、bin-split、十六进制解析及内联本地化更新。 |
重复短表名处理与回归验证 src/Luban.Core/Defs/DefAssembly.cs, src/Luban.Tests/Integration/GameFrameXRegressionTests.cs, tests/fixtures/gameframex-duplicate-table/* |
重复短表名时记录 Fatal 日志,并继续执行;测试验证生成成功且两个模块均输出数据文件。完整名称重复仍由既有检查抛出异常。 |
Rust bean 模块路径与回归验证 src/Luban.Rust/TypeVisitors/RustDeclaringTypeNameVisitor.cs, src/Luban.Tests/Integration/GameFrameXRegressionTests.cs, src/Luban.Tests/Luban.Tests.csproj, tests/fixtures/gameframex-rust/* |
非抽象 bean 的类型映射缺失时使用 FullName;新增测试验证生成的 bean 引用使用小写模块路径。 |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Possibly related issues
- GameFrameX/luban issue 12:本次重复短表名和 Rust 模块路径调整涉及该 issue 提到的 fork 行为保留;本次变更未执行其 v5.1.0 合并目标。
Suggested reviewers: pirunxi, kdletters
Merge Risk: 
Minimal · up to d5096
-
No concrete merge-blocking issue is established. Run the integration suite and Release build before merging.
Pre-merge checks: 
3 · 
1 · 
1
-
Failed checks: 1 warning · 1 inconclusive Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
当前变更均与 issue
#16的目标有直接联系。GameFrameXRegressionTests和新增 fixtures 支持回归验证;Luban.Tests对Luban.Rust的引用支持 Rust 测试注册;DefAssembly改动对应重复短表名修复;RustDeclaringTypeNameVisitor改动对应 Rust bean 模块路径修复。未发现与该 issue 无关的变更。
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 56.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 3 files. (17 skipped: 17 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Linked Issues check
-
Explanation
直接关联的开放 issue
#16包含编码和自动化验证要求。当前证据支持部分必测项:GameFrameXRegressionTests覆盖 JSON、bin、l10n、bin-split、十六进制、内联本地化、重复短表名和 Rust 模块路径;源代码改动也实现了重复短表名日志处理和 Rust 模块路径处理。当前证据不能确认以下要求:git log official/main..HEAD中其余自定义提交均已验证;tests/官方集成测试和 CI 全绿;基于真实 GameFrameX 定义和数据的完整 Golden 前后对比及差异登记;Releasedotnet build没有新增警告。两个被排除的 CSV 夹具也不能作为本次审查的独立证据。Resolution
需要提供或确认
#16要求的完整验证记录:其余自定义提交的逐项结果、官方tests/和 CI 结果、真实 GameFrameX 数据的 Golden 差异清单及解释、Releasedotnet build警告对比。还需要提供被排除 CSV 夹具相关测试结果,或其他可审查的独立证据。
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
Fixes GFX-996
Closes #16
Summary by CodeRabbit
改进
测试