deliver: 交付收口(引擎代为提交)

This commit is contained in:
agent.develop 2026-09-22 17:37:35 +08:00
parent d1e2ad0ee5
commit 7515a8a255

View File

@ -211,6 +211,17 @@ def _load_module_paths(mod):
finally:
globals()['DEFAULT_ROLE'] = DEFAULT_ROLE
# 去重:模块同时提供扁平 PATHS 与分层常量时(如 pbl_common)会重复采集,
# 同一 path 保留更严格的 role,避免计数虚高。
seen, deduped = {}, []
for p, r in out:
if p in seen:
deduped[seen[p]] = (p, _stricter(deduped[seen[p]][1], r))
continue
seen[p] = len(deduped)
deduped.append((p, r))
out = deduped
if not out:
if bad:
return [], 'all entries malformed -> ' + '; '.join(bad), True