mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
docs(workflow): 更新构建告警检查约定
- 更新 AGENTS.md,明确使用 plain dotnet build 作为默认构建告警检查入口 - 归档 analyzer warning reduction 在 RP-042 至 RP-048 的晚期 active 文档细节 - 压缩 active todo 与 trace,只保留当前分支目标所需的恢复真值
This commit is contained in:
parent
a98d1cb8d0
commit
b710f31b86
@ -29,6 +29,9 @@ All AI agents and contributors must follow these rules when writing, reviewing,
|
||||
## Git Workflow Rules
|
||||
|
||||
- Every completed task MUST pass at least one build validation before it is considered done.
|
||||
- When the goal is to inspect or reduce warnings printed during project build, contributors MUST start from a plain
|
||||
`dotnet build` at the repository root and treat that output as the default warning inspection entrypoint before
|
||||
adding extra build parameters or switching to narrower commands.
|
||||
- If the task changes multiple projects or shared abstractions, prefer a solution-level or affected-project
|
||||
`dotnet build ... -c Release`; otherwise use the smallest build command that still proves the result compiles.
|
||||
- When a task adds a feature or modifies code, contributors MUST run a Release build for every directly affected
|
||||
@ -233,6 +236,9 @@ All generated or modified code MUST include clear and meaningful comments where
|
||||
Use the smallest command set that proves the change, then expand if the change is cross-cutting.
|
||||
|
||||
```bash
|
||||
# Check warnings from the default repository build entrypoint
|
||||
dotnet build
|
||||
|
||||
# Build the full solution
|
||||
dotnet build GFramework.sln -c Release
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
# Analyzer Warning Reduction 跟踪历史(RP-042 至 RP-048)
|
||||
|
||||
## 范围说明
|
||||
|
||||
本归档承接 `RP-042` 至 `RP-048` 的晚期 active todo 内容,保留当时围绕 warning-reduction batch、baseline 与构建入口讨论的阶段性结论。
|
||||
|
||||
## 归档摘要
|
||||
|
||||
- 曾记录 `origin/main` baseline、branch diff 文件数与行数,用于 `$gframework-batch-boot 75` 的批处理停点判断
|
||||
- 曾记录 `UnifiedSettingsFile`、`UnifiedSettingsDataRepository`、`LocalizationMap` 与 `CqrsHandlerRegistryGeneratorTests` 的 warning-reduction 切片已提交到当前分支
|
||||
- 曾记录 RP-048 时在仓库根目录执行 plain `dotnet build` 成功,结果为 `0 Warning(s)` / `0 Error(s)`
|
||||
- 这些内容在 RP-049 之后不再保留在 active todo 中,因为当前恢复入口应只聚焦“plain `dotnet build` 是否打印 warning”这个真值
|
||||
|
||||
## superseded by
|
||||
|
||||
- [analyzer-warning-reduction-tracking.md](../../todos/analyzer-warning-reduction-tracking.md)
|
||||
@ -0,0 +1,16 @@
|
||||
# Analyzer Warning Reduction 追踪历史(RP-042 至 RP-048)
|
||||
|
||||
## 范围说明
|
||||
|
||||
本归档承接 `RP-042` 至 `RP-048` 的 late-stage trace,保留 active trace 在被 RP-049 压缩前的关键执行背景。
|
||||
|
||||
## 归档摘要
|
||||
|
||||
- 记录了 warning-reduction batch 在 `origin/main` 基线上的 diff 指标与“接近 75 个文件时停止”的批处理语境
|
||||
- 记录了对 plain `dotnet build` 与带参数构建命令的比较,以及当时对 warning 检查入口的整理过程
|
||||
- 记录了 RP-048 已确认默认 `dotnet build` 成功且当前工作树无活动代码修改
|
||||
- RP-049 之后,这些内容不再作为默认恢复入口,而改为保存在 archive 供历史追溯
|
||||
|
||||
## superseded by
|
||||
|
||||
- [analyzer-warning-reduction-trace.md](../../traces/analyzer-warning-reduction-trace.md)
|
||||
@ -2,49 +2,49 @@
|
||||
|
||||
## 目标
|
||||
|
||||
继续以“低风险、可审查、可恢复”为原则收敛 analyzer warning,并保持 active recovery 文档只保留当前真值。
|
||||
继续以“直接看构建输出、直接修构建 warning”为原则推进当前分支,并保持 active recovery 文档只保留当前真值。
|
||||
|
||||
## 当前恢复点
|
||||
|
||||
- 恢复点编号:`ANALYZER-WARNING-REDUCTION-RP-048`
|
||||
- 当前阶段:`Phase 48`
|
||||
- 恢复点编号:`ANALYZER-WARNING-REDUCTION-RP-049`
|
||||
- 当前阶段:`Phase 49`
|
||||
- 当前焦点:
|
||||
- 当前 baseline 为 `origin/main`(`a8447a6`, `2026-04-24 12:53:39 +0800`),batch stop condition 仍为 branch diff 接近 `75` 个文件
|
||||
- 当前 branch diff 为 `6` 个文件、`1566` 行(相对 `origin/main...HEAD`),距离 stop condition 仍有空间
|
||||
- 当前 warning-reduction 代码切片已经提交到 `77e332f`(`fix(analyzer): 收口当前批次警告切片`)
|
||||
- 默认 warning 检查入口已统一为仓库根目录直接执行 `dotnet build`
|
||||
- `2026-04-24` 最新一次 plain `dotnet build` 结果为 `Build succeeded.`、`0 Warning(s)`、`0 Error(s)`
|
||||
- 当前分支仍为 `fix/analyzer-warning-reduction-batch`,最近相关提交包括 `77e332f` 与 `a98d1cb`
|
||||
- 当前工作树除未跟踪的 `.codex` 目录外无活动代码修改
|
||||
|
||||
## 当前活跃事实
|
||||
|
||||
- `UnifiedSettingsFile.Sections` 已抽象为 `IDictionary<string, string>`;`UnifiedSettingsDataRepository.CloneFile` 会在底层仍是 `Dictionary` 时保留 comparer,避免改变既有键比较语义
|
||||
- `LocalizationMap` 通过私有 `Dictionary` 字段配合 `IReadOnlyDictionary` 暴露映射,继续避免把可变集合直接暴露给调用方
|
||||
- `CqrsHandlerRegistryGeneratorTests.cs` 已把一批大型 fixture 提升到类级常量,以更低噪音方式消化 `MA0051`
|
||||
- 通过仓库根目录直接执行 `dotnet build` 已再次确认当前 solution 默认构建成功
|
||||
- 本地当前没有新的低风险 warning hotspot;继续扩展 batch 会先增加 branch 体积,而不是继续降低 warning
|
||||
- 需要修复的对象是 plain `dotnet build` 实际打印出来的 warning,而不是不同 logger / 参数组合下的命令行为差异
|
||||
- 截至当前恢复点,默认 solution 构建入口没有打印 warning,因此没有可立即切分的 warning-fix 代码切片
|
||||
- `UnifiedSettingsFile`、`UnifiedSettingsDataRepository`、`LocalizationMap` 与 `CqrsHandlerRegistryGeneratorTests` 的上一轮 warning-reduction 修改已经提交在当前分支历史中
|
||||
|
||||
## 当前风险
|
||||
|
||||
- active todo / trace 在 RP-047 之后一度滞后于仓库真值,曾错误保留“工作树仍有未提交切片”的描述
|
||||
- 缓解措施:已在 RP-048 回写提交状态、默认 build 验证结果与最新 baseline
|
||||
- 当前 solution warning 已为 `0`,若继续按 warning-reduction 名义扩展分支,reviewability 收益会快速下降
|
||||
- 缓解措施:将本轮 batch 视为自然停点;仅在出现新的 warning hotspot 或明确新切片目标后再继续
|
||||
- active 文档此前过度记录了 batch 停点、构建参数与旧 baseline 细节,容易把恢复重点带偏到“如何检查 warning”而不是“修 warning 本身”
|
||||
- 缓解措施:active 文档只保留 plain `dotnet build` 的最新结果与下一步动作,把被替换的细节移入 archive
|
||||
- 如果后续代码修改重新引入 warning,但没有先从 plain `dotnet build` 输出确认,就容易再次偏离当前分支目标
|
||||
- 缓解措施:后续每一轮都先跑 plain `dotnet build`,再按实际打印的 warning 逐项处理
|
||||
|
||||
## 活跃文档
|
||||
|
||||
- 当前轮次归档:
|
||||
- [analyzer-warning-reduction-history-rp042-rp048.md](../archive/todos/analyzer-warning-reduction-history-rp042-rp048.md)
|
||||
- 历史跟踪归档:
|
||||
- [analyzer-warning-reduction-history-rp001.md](../archive/todos/analyzer-warning-reduction-history-rp001.md)
|
||||
- [analyzer-warning-reduction-history-rp002-rp041.md](../archive/todos/analyzer-warning-reduction-history-rp002-rp041.md)
|
||||
- 历史 trace 归档:
|
||||
- [analyzer-warning-reduction-history-rp001.md](../archive/traces/analyzer-warning-reduction-history-rp001.md)
|
||||
- [analyzer-warning-reduction-history-rp002-rp041.md](../archive/traces/analyzer-warning-reduction-history-rp002-rp041.md)
|
||||
- [analyzer-warning-reduction-history-rp042-rp048.md](../archive/traces/analyzer-warning-reduction-history-rp042-rp048.md)
|
||||
|
||||
## 验证说明
|
||||
|
||||
- `dotnet build`
|
||||
- 结果:成功;solution 默认构建通过,`Build succeeded in 16.2s`
|
||||
- 结果:成功;`0 Warning(s)`、`0 Error(s)`、`Time Elapsed 00:00:14.97`
|
||||
|
||||
## 下一步建议
|
||||
|
||||
1. 将当前 warning-reduction batch 视为已到自然停点,不再为了“凑批次”继续扩大 branch diff
|
||||
2. 若后续仍要继续 warning work,先重新定位新的 warning hotspot 或回归来源,再开启下一轮批处理
|
||||
3. 继续下一轮前优先保持与 `origin/main` 的基线同步,避免在已清零 warning 的前提下无收益扩分支
|
||||
1. 后续继续当前分支目标时,先跑 plain `dotnet build`,只处理它实际打印出来的 warning
|
||||
2. 如果下一轮 plain `dotnet build` 仍然保持 `0 Warning(s)`,则当前分支的 build-warning 目标可视为已完成
|
||||
|
||||
@ -1,27 +1,28 @@
|
||||
# Analyzer Warning Reduction 追踪
|
||||
|
||||
## 2026-04-24 — RP-048
|
||||
## 2026-04-24 — RP-049
|
||||
|
||||
### 阶段:plain `dotnet build` 复核与 batch 停点确认
|
||||
### 阶段:plain `dotnet build` 入口固化与 active 文档归档压缩
|
||||
|
||||
- 触发背景:
|
||||
- 用户继续按 `$gframework-batch-boot 75` 恢复 analyzer warning reduction
|
||||
- 启动后发现 active todo 仍描述“工作树有未提交 warning 切片”,需要先核对仓库真值
|
||||
- 用户随后明确要求“用 `dotnet build` 不用加其它参数试试”
|
||||
- 用户要求把“执行 `dotnet build` 来检查警告”写入 `AGENTS.md`
|
||||
- 用户要求清理或归档 `analyzer-warning-reduction` 的 active todo / trace 内容
|
||||
- 用户明确要求继续当前分支的真实目标:修复项目构建时打印的 warning,而不是继续纠结 warning 检查命令本身
|
||||
- 主线程实施:
|
||||
- 读取 `AGENTS.md`、`.ai/environment/tools.ai.yaml`、`ai-plan/public/README.md` 以及 `analyzer-warning-reduction` 的 active todo / trace
|
||||
- 使用显式 `git --git-dir/--work-tree` 绑定确认当前分支为 `fix/analyzer-warning-reduction-batch`
|
||||
- 重新选择 batch baseline 为 `origin/main`,并记录最新可用 ref:`a8447a6`(`2026-04-24 12:53:39 +0800`);不再使用落后的本地 `main`(`84b40a2`)
|
||||
- 复核 `origin/main...HEAD` 指标,当前 branch diff 为 `6` 个文件、`1566` 行
|
||||
- 复核最近提交,确认 warning-reduction 代码切片已经在 `77e332f`(`fix(analyzer): 收口当前批次警告切片`)落地,工作树当前除 `.codex` 外无活动修改
|
||||
- 按用户要求在仓库根目录直接执行 `dotnet build`,默认选中 solution 并成功完成,结果为 `Build succeeded in 16.2s`
|
||||
- 直接在仓库根目录执行 plain `dotnet build`
|
||||
- 构建结果为 `Build succeeded.`、`0 Warning(s)`、`0 Error(s)`、`Time Elapsed 00:00:14.97`
|
||||
- 更新 `AGENTS.md`,明确 plain `dotnet build` 是当前仓库默认的 build-warning 检查入口
|
||||
- 将 RP-048 之前 active 文档中关于旧 baseline、batch 停点与构建参数形态的细节移入新的 archive 文件
|
||||
- 重写 active todo / trace,只保留当前恢复点需要的真值
|
||||
- 当前结论:
|
||||
- 当前 solution 在默认 `dotnet build` 路径下可正常通过,RP-047 中“需要额外构建参数才能稳定验证”的假设不应继续作为 active 真值
|
||||
- 当前 warning-reduction branch 已没有新的低风险 warning hotspot;继续推进 batch 只会增加 branch 体积,不会继续降低 warning
|
||||
- 因此本轮批处理应在 `6 / 75` 文件阈值处主动停止,而不是机械地继续扩展
|
||||
- 当前分支在默认 solution 构建入口下没有打印 warning,因此此刻没有新的 warning-fix 代码切片可继续实施
|
||||
- 当前分支目标没有改变:后续只要 plain `dotnet build` 再次打印 warning,就以该输出为唯一切片来源继续修复
|
||||
|
||||
## Archive Context
|
||||
|
||||
- 当前轮次归档:
|
||||
- [analyzer-warning-reduction-history-rp042-rp048.md](../archive/todos/analyzer-warning-reduction-history-rp042-rp048.md)
|
||||
- [analyzer-warning-reduction-history-rp042-rp048.md](../archive/traces/analyzer-warning-reduction-history-rp042-rp048.md)
|
||||
- 历史跟踪归档:
|
||||
- [analyzer-warning-reduction-history-rp001.md](../archive/todos/analyzer-warning-reduction-history-rp001.md)
|
||||
- [analyzer-warning-reduction-history-rp002-rp041.md](../archive/todos/analyzer-warning-reduction-history-rp002-rp041.md)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user