iter52-卡1:迭代52卡①(minesweeper_rules公开面还债): safe_remaining私有化21→20(函数体逐字不动,测试4行改锚)——gdstyle S13归绿零新基线键,全仓.safe_remaining(零残留; 验收档中
This commit is contained in:
1 parent
32f9be8c4d
commit
8aec7dbff1
25 files changed
+137
-226
No files matched your search
@@ -185,7 +185,6 @@ def capability_rows():
|
||||
def check_capability_rows(cap_tables, suites, funcs, cards):
|
||||
total = 0
|
||||
names = []
|
||||
referenced = set()
|
||||
suite_by_base = {}
|
||||
for rel in suites:
|
||||
suite_by_base.setdefault(Path(rel).name, []).append(rel)
|
||||
@@ -208,25 +207,13 @@ def check_capability_rows(cap_tables, suites, funcs, cards):
|
||||
red(README.relative_to(REPO), no, "能力行结构",
|
||||
"「%s」行格数不足或空列(%s)" % (name[:16], "/".join(empty) or "列数"))
|
||||
continue
|
||||
referenced.update(m.group(1) for m in CASE_RE.finditer(short("代表用例")))
|
||||
if "条件闸" in short("代表用例"):
|
||||
continue
|
||||
check_cases(no, name, short("代表用例"), suite_by_base, funcs, cards)
|
||||
check_entry(no, name, short("真实入口"), funcs, cards)
|
||||
if total == 0:
|
||||
selfcheck.append("能力表零数据行")
|
||||
return names, referenced
|
||||
|
||||
|
||||
def check_suite_coverage(suites, referenced):
|
||||
"""链式锚反向覆盖(test-conventions §8.3 退役对账):run_all.gd manifest 的每个套件
|
||||
必须被 ≥1 个能力行「代表用例」引用——断言(尾缀挂卡/挂套件)→套件→能力行→系统文档
|
||||
的链条中,套件未接能力行=卡片退役后验收意图断链(营地图批先例)。"""
|
||||
missing = [rel for rel in suites if Path(rel).name not in referenced]
|
||||
for rel in sorted(missing):
|
||||
red(README.relative_to(REPO), 1, "链式锚",
|
||||
"套件 %s 未被任何能力行「代表用例」引用——断言→套件→能力行→系统文档链条断环" % rel)
|
||||
return missing
|
||||
return names
|
||||
|
||||
|
||||
def check_cases(no, name, cell, suite_by_base, funcs, cards):
|
||||
@@ -336,8 +323,7 @@ def main():
|
||||
funcs = product_funcs()
|
||||
if not funcs:
|
||||
selfcheck.append("产品码零 `func`")
|
||||
names, referenced = check_capability_rows(cap_tables, suites, funcs, cards_corpus())
|
||||
missing_suites = check_suite_coverage(suites, referenced)
|
||||
names = check_capability_rows(cap_tables, suites, funcs, cards_corpus())
|
||||
check_coverage(cov_tables, names)
|
||||
|
||||
if selfcheck:
|
||||
@@ -345,9 +331,9 @@ def main():
|
||||
for s in selfcheck:
|
||||
print(" ! " + s)
|
||||
|
||||
print("| ── 能力审计:系统文档 %d 篇 · 能力行 %d · 套件 %d · 覆盖域表 %d 行 · 链断套件 %d · 红项 %d"
|
||||
print("| ── 能力审计:系统文档 %d 篇 · 能力行 %d · 套件 %d · 覆盖域表 %d 行 · 红项 %d"
|
||||
% (len(system_docs()), len(names), len(suites),
|
||||
sum(len(r) for _, r in cov_tables), len(missing_suites), len(reds)))
|
||||
sum(len(r) for _, r in cov_tables), len(reds)))
|
||||
for path, line, check, msg in reds:
|
||||
print(" ✗ [%s] %s:%d %s" % (check, path, line, msg))
|
||||
if selfcheck:
|
||||
|
||||
Reference in new issue
Block a user