fix(release): 前移发布包清单校验#331
Conversation
- 修复 benchmark 项目误入发布面的风险,明确 GFramework.Cqrs.Benchmarks 保持不可打包。 - 新增共享 packed modules 校验脚本,并让 publish 与 CI 工作流复用同一份发布包名单规则。 - 更新 CQRS active tracking 与 trace,记录本轮发布校验前移的恢复点与验证结果。
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 Walkthrough演练此PR引入包验证脚本并将打包验证从发布工作流的内联逻辑提取到共享脚本中,同时在CI流程中添加打包步骤,并配置基准项目排除打包。包括文档更新以记录迁移进度。 变更包验证基础设施与打包控制
预估代码审查工作量🎯 3 (中等) | ⏱️ ~20 分钟 可能相关的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. Comment |
Summary
Test ResultsDetails
Insights
build-and-test: Run #1070
🎉 All tests passed!Slowest Tests
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 |
|
| Filename | Overview |
|---|---|
| scripts/validate-packed-modules.sh | New shared validation script extracting inline publish.yml logic; uses POSIX-compatible basename instead of GNU find -printf, but actual_file is written without an explicit sort (works because the pipeline already pipes through sort -u, though slightly fragile) |
| .github/workflows/ci.yml | Adds Pack + Validate steps to the PR workflow; dotnet pack correctly includes --no-build to avoid re-compiling after the preceding explicit Build step |
| .github/workflows/publish.yml | Replaces 35-line inline validation block with a single call to the shared script, keeping publish and CI workflows in sync |
| GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj | Explicitly marks project as non-packable with both IsPackable=false and GeneratePackageOnBuild=false to prevent it from entering the NuGet release set |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
scripts/validate-packed-modules.sh:44
The `actual_file` is written without an explicit `sort`, whereas `expected_file` uses `| sort`. Today this is safe because the `mapfile` pipeline already ends with `sort -u`, so the array arrives pre-sorted. However, if the pipeline is ever modified (e.g., the `sort -u` is dropped or replaced with a different filter), `diff -u` will silently produce incorrect output — false positives or negatives — without any obvious error. Adding an explicit `sort` at the write site makes the invariant self-documenting and resilient to future pipeline changes.
```suggestion
printf '%s\n' "${actual_packages[@]}" | sort > "$actual_file"
```
Reviews (2): Last reviewed commit: "fix(release): 修复发布校验链路的审查遗留问题" | Re-trigger Greptile
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.md`:
- Line 12: Update the PR anchor text in the migration tracking markdown by
replacing the literal string "当前 PR 锚点:`待创建`" with the actual PR identifier
(e.g., "当前 PR 锚点:`PR `#331``") and optionally add the PR link; ensure the markdown
line that currently contains `待创建` is updated so the document reflects the real
PR number and link for traceability.
🪄 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: 93fa777d-087a-43f1-b0d1-219b168852f0
📒 Files selected for processing (6)
.github/workflows/ci.yml.github/workflows/publish.ymlGFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csprojai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.mdscripts/validate-packed-modules.sh
📜 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)
**/*[!.]*
📄 CodeRabbit inference engine (AGENTS.md)
For files with shebang lines, keep shebang as first line and place license header immediately after it
Files:
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csprojscripts/validate-packed-modules.shai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
**/*.{xml,csproj,props,targets}
📄 CodeRabbit inference engine (AGENTS.md)
For XML/MSBuild files with XML declaration, keep XML declaration as first node and place license header immediately after it
Files:
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj
**/*.csproj
📄 CodeRabbit inference engine (AGENTS.md)
**/*.csproj: Follow repository defaults:ImplicitUsingsdisabled,Nullableenabled,GenerateDocumentationFileenabled for shipped libraries,LangVersiongenerallypreviewin main libraries and abstractions
Minimize new package dependencies. Add them only when necessary and keep scope narrow
Files:
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj
**/*.{csproj,cs}
📄 CodeRabbit inference engine (AGENTS.md)
Framework runtime, abstractions, and meta-package projects MUST NOT reference
*.SourceGenerators*projects or packages, and MUST NOT use source-generator attributes
Files:
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj
**/*.{cs,ts,tsx,js,jsx,py,sh,xml,csproj,props,targets}
📄 CodeRabbit inference engine (AGENTS.md)
Use 4 spaces for indentation. Do not use tabs
Files:
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csprojscripts/validate-packed-modules.sh
**/*.{cs,ts,tsx,js,jsx,py,sh}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{cs,ts,tsx,js,jsx,py,sh}: All generated or modified code MUST include clear and meaningful comments where required by documentation rules
Comments MUST NOT be trivial, redundant, or misleading. Prefer explainingwhyandwhen, not justwhat. Code should remain understandable without requiring external context
Avoid obvious comments such as// increment i
Files:
scripts/validate-packed-modules.sh
**/*.{cs,ts,tsx,js,jsx,py,sh,xml}
📄 CodeRabbit inference engine (AGENTS.md)
Keep line length readable. Around 120 characters is preferred upper bound
Files:
scripts/validate-packed-modules.sh
**/*.{md,mdx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{md,mdx}: Keep code samples, package names, and command examples aligned with current repository state in documentation
When public page references XML docs or API coverage, convert evidence into reader-facing guidance: explain which types/namespaces/entry points readers should inspect and why
For integration-oriented features such as AI-First config system, documentation MUST cover: project directory layout/file conventions, required project/package wiring, minimal working example, migration/compatibility notes
When examples are rewritten, preserve only parts that remain true. Delete or replace speculative examples instead of lightly editing into another inaccurate form
Files:
ai-plan/public/cqrs-rewrite/todos/cqrs-rewrite-migration-tracking.mdai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md
🔇 Additional comments (5)
GFramework.Cqrs.Benchmarks/GFramework.Cqrs.Benchmarks.csproj (1)
14-16: 发布边界控制到位。
IsPackable=false与GeneratePackageOnBuild=false在 Line 15-16 明确把 benchmark 项目排除出发布面,和本次包清单前移校验目标一致。scripts/validate-packed-modules.sh (1)
7-51: 共享校验脚本实现清晰,复用价值高。参数化包目录、临时目录清理、expected/actual 集合对比都完整,能稳定支撑 CI 与 publish 复用同一规则。
.github/workflows/publish.yml (1)
85-85: 发布流程改为调用共享脚本是正确收敛。Line 85 消除了发布流内联校验逻辑,降低了规则漂移风险。
.github/workflows/ci.yml (1)
158-168: PR 阶段前移包清单校验,方向正确。新增
dotnet pack+validate-packed-modules.sh能在合并前暴露发布面异常,和发布工作流形成一致约束。ai-plan/public/cqrs-rewrite/traces/cqrs-rewrite-migration-trace.md (1)
5-20: RP-091 追踪记录完整且可执行。阶段背景、决策、落地文件与预期结果在同一段闭环,作为恢复点信息质量很好。
- 修复 PR workflow 中 dotnet pack 重复构建整个 solution 的问题 - 优化 packed modules 校验脚本的 find 实现以兼容 BSD 环境 - 更新 cqrs-rewrite 活跃跟踪与追踪文档中的当前 PR 锚点和审查结论
Summary
Test ResultsDetails
Insights
build-and-test: Run #1071
🎉 All tests passed!Slowest Tests
± Comparison with run #1070 at 1b9e18e | 🎉 No failed tests detected across all runs. | 🍂 No flaky tests detected across all runs. | ⏱️ Measured over 2 runs. Github Test Reporter by CTRF 💚 |

修复 benchmark 项目误入发布面的风险,明确 GFramework.Cqrs.Benchmarks 保持不可打包。
新增共享 packed modules 校验脚本,并让 publish 与 CI 工作流复用同一份发布包名单规则。
更新 CQRS active tracking 与 trace,记录本轮发布校验前移的恢复点与验证结果。
Summary by CodeRabbit
发布说明
新功能
改进