From 7515a8a25582de95d80464d1bfb02959a33adec7 Mon Sep 17 00:00:00 2001 From: "agent.develop" Date: Tue, 22 Sep 2026 17:37:35 +0800 Subject: [PATCH] =?UTF-8?q?deliver:=20=E4=BA=A4=E4=BB=98=E6=94=B6=E5=8F=A3?= =?UTF-8?q?=EF=BC=88=E5=BC=95=E6=93=8E=E4=BB=A3=E4=B8=BA=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/load_path.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/load_path.py b/scripts/load_path.py index 01c11a6..58137f0 100644 --- a/scripts/load_path.py +++ b/scripts/load_path.py @@ -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