追红(远端 run 95 两条红转绿·修复车道): 红因1=判定级——能力审计 G 道「oracle 注记函数 401·红项 1」, 红项原文「game/probe/probe_coverage_recorder.gd:201 验证函数 dump_js 缺 # oracle 注记」(dump_js 体内三处 push_error( 命中 capability_audit.py:341 VERDICT_RE → 属须注记的验证函数, :386 判红); 上一批「判据出处注记 402 函数全库铺开」的跑绿读数靠主工作区一行未提交注记撑过, 未随批 commit, 故本地 strict 绿而远端干净检出必红; 本批在该文件补同一行注记(放法照仓内既有形态——函数定义行下一行顶格, 样本 camp_scene_layout_test.gd:13/:18, 指针 design/engineering/test-conventions.md:30 与主区工作稿逐字节同, cmp 已核)。红因2=非判定级但在日志里成串报红——tools 四处五 sites 用 Path.write_text(..., newline="\n"), 该关键字 Python 3.13+ 才有(本机 3.13.14 绿), Mac runner 的 python3 更老 → TypeError("write_text() got an unexpected keyword argument 'newline'") → 六层明细回执在远端一件未落盘, run 93/95 日志同报此错(挂点按设计是观测件不翻闸判, 故它不是 run 95 的失败主因, 但等于覆盖总览面板的六层明细一直是空的); 五处改 open(str(p), "w", encoding="utf-8", newline="\n") 写法(newline 形参 builtin open 自 3.0 起有, LF 纪律不丢), 覆盖面=coverage_enum.py:148/coverage_receipts.py:160/:179/extract_capability_list.py:104/extract_checks.py:588; 注: tools/t17_fanout2_rebuild.py:140 与 t5_build_templates.py:237 本来就是 open(..., newline=) 形态, 不属坏件未动。本步凭据(全部区内实跑): ①修复前在干净检出复现红——capability_audit --strict 出「401 注记·红项 1」并打出上述红项原文; ②修复后同件 exit=0「402 注记·红项 0」; ③四件 py_compile OK 且 grep 全仓 write_text(.*newline= 零残留; ④runner 语义实证——把 Path.write_text 垫片成 3.12 行为(newline 一律 TypeError)再跑 coverage_receipts.main(), 六层与 probe_manifest 全部正常落盘、无一行「[receipts] 红」, 产物字节核对 gate_probe/gate_render/gate_smoke.js 均 CRLF=0 LF=14(行尾纪律未破); ⑤run_all_gates --docs 验收通过无新增红(基线 9e81408e)。引擎层本地未跑: 区内 --premerge 被素材齐盘预检拦在冷检出态(缺 .godot/uid_cache.bin 与字体 .import 边车, 处置需从主区拷素材再 --editor --quit 刷导入), 本批五处改动零游戏行为面, 引擎全套件由主区合回时的 pre-merge-commit 前置检查跑, 全量档归合回后远端 CI

This commit is contained in:
DKChan committed 2026-11-06 23:47:28 +08:00
1 parent 9e81408efc
commit 8b09b2c952
5 files changed
+12 -5

No files matched your search

+1
View File
@@ -199,6 +199,7 @@ func _seen_into(node: Node, keys: Array[String]) -> void:
# ---- 落盘(JSONP 式 .js——file:// 页面 <script src> 直载)----
func dump_js() -> void:
# oracle: design/engineering/test-conventions.md:30 (覆盖登记落盘守卫——判定上报通道组)
var dir := DirAccess.open("res://")
if dir == null:
push_error("[coverage] res:// 打不开,登记未落盘")
+2 -1
View File
@@ -145,7 +145,8 @@ def main() -> int:
js = "/* 本体对账清单——coverage_enum.py 随跑重生成,人工核销走豁免清单(coverage_exemptions.js),不落本文件。 */\n"
js += "window.__QA_COVERAGE__ = window.__QA_COVERAGE__ || {};\n"
js += "window.__QA_COVERAGE__.ontology = %s;\n" % json.dumps(payload, ensure_ascii=False, indent=2)
out.write_text(js, encoding="utf-8", newline="\n")
with open(str(out), "w", encoding="utf-8", newline="\n") as fh:
fh.write(js)
gap_total = sum(len(c["gaps"]) for c in payload["categories"])
print("[ontology] 本体实体 %d / 断言文料行 %d / 缺口 %d(%d 类)→ %s" % (
len(entities), len(_rows), gap_total, len(payload["categories"]), out))
+4 -2
View File
@@ -157,7 +157,8 @@ def main() -> int:
js += "window.__QA_COVERAGE__.gate_receipts = window.__QA_COVERAGE__.gate_receipts || {};\n"
js += "window.__QA_COVERAGE__.gate_receipts[%s] = %s;\n" % (
json.dumps(key), json.dumps(payload, ensure_ascii=False, indent=2))
(out_dir / ("gate_%s.js" % key)).write_text(js, encoding="utf-8", newline="\n")
with open(str(out_dir / ("gate_%s.js" % key)), "w", encoding="utf-8", newline="\n") as fh:
fh.write(js)
wrote += 1
print("[receipts] %s(%s)=%s" % (label, log_name, detail.get("result", "?")))
except Exception as exc: # noqa: BLE001 —— 观测件逐层容错,红字可见不静默
@@ -175,7 +176,8 @@ def main() -> int:
mjs = "/* 探针登记清单——coverage_receipts.py 随跑批按现存文件覆写,勿手编。 */\n"
mjs += "window.__QA_COVERAGE__ = window.__QA_COVERAGE__ || {};\n"
mjs += "window.__QA_COVERAGE__.probe_manifest = %s;\n" % json.dumps(manifest, ensure_ascii=False)
(out_dir / "probe_manifest.js").write_text(mjs, encoding="utf-8", newline="\n")
with open(str(out_dir / "probe_manifest.js"), "w", encoding="utf-8", newline="\n") as fh:
fh.write(mjs)
print("[receipts] 探针登记清单 %d 件 → probe_manifest.js" % len(probe_files))
return 1 if failed else 0
+2 -1
View File
@@ -101,7 +101,8 @@ def dump_js(payload: dict, out: Path) -> None:
js = "/* 能力清单义务层投影——由 extract_capability_list.py 生成,随 README 变更重跑;人工修订无效(义务源=README 能力清单)。 */\n"
js += "window.__QA_COVERAGE__ = window.__QA_COVERAGE__ || {};\n"
js += "window.__QA_COVERAGE__.capability_list = %s;\n" % json.dumps(payload, ensure_ascii=False, indent=2)
out.write_text(js, encoding="utf-8", newline="\n")
with open(str(out), "w", encoding="utf-8", newline="\n") as fh:
fh.write(js)
def main() -> int:
+3 -1
View File
@@ -585,7 +585,9 @@ def main() -> int:
carry = carry_cells(old_rows)
print("[extract_checks] 旧清单 %d 行 → 承接指纹 %d 个" % (len(old_rows), len(carry)))
entries, funcs_by_src = extract_all(src_paths)
out.write_text(render_list(entries, funcs_by_src, [p.name for p in src_paths], carry), encoding="utf-8", newline="\n")
listing = render_list(entries, funcs_by_src, [p.name for p in src_paths], carry)
with open(str(out), "w", encoding="utf-8", newline="\n") as fh:
fh.write(listing)
hitn = sum(1 for e in entries
if (fold(e["cond"]), e["label_literal"], fold(e["label_suffix"])) in carry)
print("[extract_checks] 已生成 %s(%d 个源文件、%d 个调用点、承接回填 %d 行)"