优化:未分类连续维护与柏拉图预汇总,同步已发布修复

This commit is contained in:
2026-11-01 12:40:50 +08:00
parent 572873c6b8
commit 38290f5fec
135 changed files with 17613 additions and 663 deletions
+9 -1
View File
@@ -99,8 +99,16 @@ def repair_summary(value, context):
candidate, repairs = copy.deepcopy(value), []
for key, union in unions.items():
old = value.get(key, [])
# A combined ranking explicitly declares an empty output stage on both
# the node and dimension. The two source stages sometimes leak into the
# redundant root list; retain the actual declared combined work.
combined_sources = (key == 'stages' and not union and set(old or []) == {'black','bright'}
and all(node.get('purpose') == 'ranking' and node.get('stages') == []
and 'scrapWeight' in node.get('fields',[]) and set(node['fields']) <= {'rate','scrapWeight'}
for node in nodes)
and all(value.get('dimensionStages',{}).get(node.get('dimension')) == [] for node in nodes))
if (not isinstance(old, list) or any(not isinstance(item, str) for item in old)
or not set(old) <= union or not union <= set(allowed[key])):
or not set(old) <= union and not combined_sources or not union <= set(allowed[key])):
return None
desired = [item for item in allowed[key] if item in union]
if set(old) != union: