HEL-892: correct five source-history citations and validate original fetch records

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-11-02 02:19:16 +08:00
co-authored by multica-agent
parent fa5863349e
commit 0d38671f17
187 changed files with 302299 additions and 1055 deletions
@@ -51,7 +51,7 @@ def main():
old_blocks = {
p: r["fixed_version_document"]
for (p, r) in previous.items()
if "fixed_version_document" in r
if "fixed_version_document" in r and p not in PATHS
}
assert len(old_blocks) == 144
assert all((rebuilt[p]["fixed_version_document"] == b for (p, b) in old_blocks.items()))
@@ -67,8 +67,8 @@ def main():
"old_blocks_unchanged": 144,
"old_saved": 9985,
"old_notes": 282,
"new_saved": 230,
"new_notes": 5,
"new_saved": 0,
"new_notes": 0,
"total_documents": 145,
"total_saved": 10215,
"total_notes": 287,
@@ -123,14 +123,7 @@ def main():
(first, _) = run("historical", True)
before = rows()
assert first["counts"] == {"imported": 155, "user_excluded": 1}
assert all(
(
"fixed_version" in json.loads(before[p]["doc_json"])
if BASE.startswith("3c307e0")
else "fixed_version" not in json.loads(before[p]["doc_json"])
for p in PATHS
)
)
assert all(json.loads(before[p]["doc_json"])["fixed_version"]["matched"] for p in PATHS)
assert all(
(
json.loads(before[p]["doc_json"])["fixed_version"]["matched"]
@@ -178,19 +171,7 @@ def main():
assert d["fixed_version"]["matched"]
old_doc = json.loads(before[p]["doc_json"])
without = dict(d)
fixed = without.pop("fixed_version")
generic = [
f"打开源工作流 {p},逐项核对下列源节点与注释。",
"补齐节点定义、模型来源及所需素材;完成输入输出映射核对。",
"明确触发真实测试后核对产物;本批未提交生成任务。",
]
offset = old_doc["steps"].index(generic[0])
assert old_doc["steps"][offset : offset + 3] == generic
assert (
without["steps"]
== old_doc["steps"][:offset] + fixed["steps"] + old_doc["steps"][offset + 3 :]
)
without["steps"] = old_doc["steps"]
without.pop("fixed_version")
assert without.pop("source_review_sha") != old_doc.pop("source_review_sha")
old_doc.pop("fixed_version", None)
assert without == old_doc
@@ -249,8 +230,8 @@ def main():
"source_named_fields": 1217,
"positional_widgets": 3660,
"companion_values": companion,
"new_saved": 230,
"new_notes": 5,
"new_saved": 0,
"new_notes": 0,
"old_saved": 9985,
"old_notes": 282,
"overviews": 145,