mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-12 22:03:30 +08:00
- 修复 schema 正则校验缺少超时边界导致的 analyzer 风险 - 更新字符串等值比较为 ordinal 语义 - 补充 warning reduction 批处理恢复状态与验证结果
8.3 KiB
8.3 KiB
Analyzer Warning Reduction 追踪
2026-04-29 — RP-093
阶段:按 $gframework-batch-boot 50 从 clean build warning 基线分批清理
- 触发背景:
- 用户要求先拿构建 warning,再分批指派 subagent 加快处理;停止条件解析为分支相对
origin/main接近50个变更文件
- 用户要求先拿构建 warning,再分批指派 subagent 加快处理;停止条件解析为分支相对
- 基线与环境:
- 当前
origin/main为0e32dab(2026-04-28T17:15:47+08:00) - 标准
dotnet clean在当前 WSL 环境仍被 Windows NuGet fallback package folder 阻塞;按既有环境口径先执行dotnet restore GFramework.sln -p:RestoreFallbackFolders= --disable-parallel后,使用-p:RestoreFallbackFolders=完成 clean / build - clean 后 warning 基线:
236warnings、0errors
- 当前
- 已接受的 worker 范围:
ed269d4:GFramework.Cqrs.Tests/Mediator/MediatorArchitectureIntegrationTests.cs,清理MA0048/MA0004/MA0016121df44:GFramework.Cqrs.Tests/Mediator/MediatorAdvancedFeaturesTests.cs,清理MA0048/MA0004/MA00159109eec:GFramework.Cqrs.Tests/Mediator/MediatorComprehensiveTests.cs,清理MA0048/MA0004/MA0016/MA0002/MA0015
- 主线程实施:
- 在
GFramework.Game/Config/YamlConfigSchemaValidator.cs为固定格式正则与 schemapattern正则补充 timeout,避免运行时正则输入继续触发MA0009 - 将三处字符串等值比较改为 ordinal
string.Equals,清理MA0006
- 在
- 验证里程碑:
dotnet build GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj -c Release -p:RestoreFallbackFolders= -m:1 -nodeReuse:false -clp:Summary- 结果:成功;
0 Warning(s)、0 Error(s)
- 结果:成功;
dotnet test GFramework.Cqrs.Tests/GFramework.Cqrs.Tests.csproj -c Release --no-build -p:RestoreFallbackFolders= -m:1 -nodeReuse:false --filter "FullyQualifiedName~Mediator"- 结果:成功;
45通过、0失败
- 结果:成功;
dotnet build GFramework.Game/GFramework.Game.csproj -c Release -p:RestoreFallbackFolders= -m:1 -nodeReuse:false -clp:Summary- 结果:成功;
75 Warning(s)、0 Error(s)
- 结果:成功;
dotnet test GFramework.Game.Tests/GFramework.Game.Tests.csproj -c Release -p:RestoreFallbackFolders= -m:1 -nodeReuse:false --filter "FullyQualifiedName~YamlConfigLoaderTests|FullyQualifiedName~YamlConfigSchemaValidatorTests"- 结果:成功;
80通过、0失败
- 结果:成功;
dotnet clean -p:RestoreFallbackFolders= -v:quiet- 结果:成功
dotnet build -p:RestoreFallbackFolders= -clp:WarningsOnly -v:minimal -m:1 -nodeReuse:false- 结果:成功;
75warnings、0errors
- 结果:成功;
git diff --check- 结果:成功;无新增 whitespace / conflict-marker 问题
- 当前指标:
- warning 总数:
236->75 - 剩余 warning 分布:
GFramework.Game/Config/YamlConfigSchemaValidator.cs60条,GFramework.Game/Config/YamlConfigSchemaValidator.ObjectKeywords.cs15条;规则为MA004845条、MA005130条 - 已提交分支 diff:
3个文件;主线程待提交后预计约6个文件,低于50个文件阈值
- warning 总数:
- 下一步:
- 提交主线程 Game / ai-plan 同步后,继续
YamlConfigSchemaValidator.cs末尾 schema model 类型拆文件,优先清理MA0048
- 提交主线程 Game / ai-plan 同步后,继续
2026-04-28 — RP-092
阶段:复核 PR #300 的 open threads,并只修正当前分支仍然成立的 ai-plan 漂移
- 触发背景:
- 用户要求恢复当前
$gframework-pr-review任务,继续以 PR head 上的开放线程为准做 triage
- 用户要求恢复当前
- 主线程实施:
- 重新读取
fetch_current_pr_review.py --json-output /tmp/current-pr-review.json的 latest head open threads - 逐条对照本地文件后确认:
TestArchitectureContextBehaviorTests、TestArchitectureWithRegistry、TestResourceLoader、PartialGeneratedNotificationHandlerRegistry相关 CodeRabbit 线程在当前工作树上都已匹配修复,仅线程状态尚未随新 head 折叠 - 继续核对
RegistryInitializationHookBaseTests.OnPhase_Should_Not_Throw_When_Registry_Not_Found,确认当前实现RegistryInitializationHookBase.OnPhase已在缺少注册表时保持 no-op,定向回归测试通过 - 修正
analyzer-warning-reduction-tracking.md中仍然成立的两处漂移:- 将文件计数更新为相对
6cc87a9...HEAD的实际规模:18个已修改文件、38个新增文件、合计56个变更文件 - 将验证口径统一为 trace 已记录的
dotnet build、定向dotnet test、git diff --check
- 将文件计数更新为相对
- 重新读取
- 验证里程碑:
dotnet test GFramework.Core.Tests/GFramework.Core.Tests.csproj -c Release --filter "FullyQualifiedName~RegistryInitializationHookBaseTests.OnPhase_Should_Not_Throw_When_Registry_Not_Found|FullyQualifiedName~TestArchitectureContextBehaviorTests"- 结果:成功;
10通过、0失败
- 结果:成功;
git diff --check- 结果:成功;无新增 whitespace / conflict-marker 问题
2026-04-28 — RP-091
阶段:收口 PR #300 的共享测试基础设施 nitpick,并升级 PR-review triage 规则
- 触发背景:
- 用户追问
TestArchitectureContext/TestArchitectureContextV3的共享基础设施 nitpick 是否已经处理完成 - 同时要求把“本地验证后仍然成立的 nitpick 不能默认降级为可选项”写入
AGENTS.md或$gframework-pr-review
- 用户追问
- 主线程实施:
- 新增
TestArchitectureContextBase,把容器解析、共享EventBus行为,以及 legacy / CQRS 失败契约统一收敛到一处 - 将
TestArchitectureContext与TestArchitectureContextV3收窄为薄包装类型,只保留各自的命名入口与Id差异 - 更新
.agents/skills/gframework-pr-review/SKILL.md,明确要求:latest-headNitpick comment一旦本地验证仍成立且指向真实漂移/回归风险,就必须作为 actionable review input 处理,而不是默认视作可选
- 新增
- 验证里程碑:
dotnet build GFramework.Core.Tests/GFramework.Core.Tests.csproj -c Release- 结果:成功;
0 Warning(s)、0 Error(s)
- 结果:成功;
dotnet test GFramework.Core.Tests/GFramework.Core.Tests.csproj -c Release --no-build --filter "FullyQualifiedName~ArchitectureServicesTests|FullyQualifiedName~ContextAwareServiceExtensionsTests|FullyQualifiedName~TestArchitectureContextBehaviorTests|FullyQualifiedName~RegistryInitializationHookBaseTests|FullyQualifiedName~ArchitectureContextTests"- 结果:成功;
67通过、0失败
- 结果:成功;
git diff --check- 结果:成功;无新增 whitespace / conflict-marker 问题
活跃风险
- GitHub PR 上的 open threads 在本地提交前仍可能显示为未关闭。
- 缓解措施:以当前工作树和定向验证作为真值,推送后再让 PR 线程重新比对最新 head。
GFramework.Core.Tests项目当前存在独立于本轮改动的dotnet format基线。- 缓解措施:保持为后续单独格式治理切片,不在当前 PR review follow-up 中扩写。
下一步
- 提交本轮
ai-plan同步修复,使 PR head 能重新折叠文档相关线程。 - 推送后重新执行
$gframework-pr-review,确认剩余 open threads 是否已经下降。
历史归档指针
- 最新 trace 归档:
- 历史 todo 归档:
- 早期归档: