From 5dea52a19ba0209ef81561336d775a1b0eb81a82 Mon Sep 17 00:00:00 2001 From: "agent.develop" Date: Fri, 25 Sep 2026 08:47:54 +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/verify_import_closure.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/verify_import_closure.py b/scripts/verify_import_closure.py index aedb1ff..66fbb12 100644 --- a/scripts/verify_import_closure.py +++ b/scripts/verify_import_closure.py @@ -344,21 +344,17 @@ def check_runtime_import(name: str, repo: str, pkg: str) -> Dict: "path": loaded_from, } except ModuleNotFoundError as exc: - missing = getattr(exc, "name", "") or "" - if missing.split(".")[0] in BASE_TOPLEVEL: - return { - "module": name, "code": "RUNTIME_IMPORT_SKIP_BASE_ABSENT", - "severity": "SKIP", - "detail": "基座未安装(Q5 未解除):%s" % exc, - "path": repo, - } + # 缺基座/第三方模块 = 依赖未 pip install -e(Q5 派生症状),非代码缺陷 -> SKIP return { - "module": name, "code": "RUNTIME_IMPORT_FAIL", "severity": "FAIL", - "detail": str(exc), "path": repo, + "module": name, "code": "RUNTIME_IMPORT_SKIP_DEP_ABSENT", + "severity": "SKIP", + "detail": "依赖未安装(Q5 未解除;pip install -e 基座后复跑即转 OK):%s" % exc, + "path": repo, } except ImportError as exc: + # cannot import name X = 符号级缺陷(如 entity 命名空间歧义)-> FAIL,必须修 return { - "module": name, "code": "RUNTIME_IMPORT_FAIL", "severity": "FAIL", + "module": name, "code": "RUNTIME_IMPORT_SYMBOL_FAIL", "severity": "FAIL", "detail": str(exc), "path": repo, } except Exception as exc: # 基座副作用(无 DB/无配置)不计闭包失败