fix: --check输出区分能力注册 vs 规则覆盖, 不再误导
ValidateRuleCompliance 新增3项检查: - 鸡胡缺失警告 (fan_types 应配鸡胡兜底) - base_fan=0 番型警告 (标记番型需更高番型覆盖) - 番型识别率统计 (DSL中有多少引擎能识别) 输出变更: - 'DSL适配率' → '能力注册' (准确描述含义) - 新增 '规则合规检查通过' (warnings=0时显示) - --check末尾加警告: 能力注册≠完整规则覆盖
This commit is contained in:
@ -40,15 +40,19 @@ try
|
||||
rules = loader.Load(dslPath);
|
||||
var (r, m, pct) = caps.ComputeCoverage(rules.Requires);
|
||||
string status = pct == 100 ? "✅" : "⚠";
|
||||
Console.WriteLine($"{status} DSL 适配率: {m}/{r} ({pct}%) — {rules.Game.Name}");
|
||||
Console.WriteLine($"{status} 能力注册: {m}/{r} ({pct}%) — {rules.Game.Name}");
|
||||
|
||||
// Rule-level compliance check (finer granularity than capability check)
|
||||
var warnings = caps.ValidateRuleCompliance(rules);
|
||||
if (warnings.Count > 0)
|
||||
{
|
||||
Console.WriteLine($" ⚠ {warnings.Count} 条规则引擎无法完全执行:");
|
||||
Console.WriteLine($" ⚠ {warnings.Count} 条规则警告:");
|
||||
foreach (var w in warnings)
|
||||
Console.WriteLine($" • {w}");
|
||||
Console.WriteLine($"{w}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($" ✅ 规则合规检查通过");
|
||||
}
|
||||
|
||||
if (pct < 100)
|
||||
@ -67,7 +71,7 @@ catch (Exception ex)
|
||||
|
||||
if (checkOnly)
|
||||
{
|
||||
Console.WriteLine($"✅ 仅验证模式 — 未运行牌局");
|
||||
Console.WriteLine($"\n✅ 仅验证模式 — 未运行牌局\n 注意: 能力注册≠完整规则覆盖, 需逐条验证玩法规则");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user