modify: S3对象存储
This commit is contained in:
@@ -31,6 +31,7 @@ import chongming_worker.contracts as con_mod # noqa: E402
|
||||
import chongming_worker.process as proc_mod # noqa: E402
|
||||
import chongming_worker.route_config as rc_mod # noqa: E402
|
||||
import chongming_worker.routes_publisher as pub_mod # noqa: E402
|
||||
import chongming_worker.storage as sto_mod # noqa: E402
|
||||
|
||||
check("worker SDK 导入(阻断 chongming 后成功)", True)
|
||||
|
||||
@@ -48,10 +49,11 @@ check(
|
||||
import workers.demo # noqa: E402,F401 触发 @rpc_method 注册
|
||||
|
||||
routes = con_mod.validate_worker_contracts("demo")
|
||||
subjects = [r["subject"] for r in routes]
|
||||
check(
|
||||
"进程内契约校验通过(TOML ↔ 注册表 ↔ 模型)",
|
||||
len(routes) == 1 and routes[0]["subject"] == "demo.hello",
|
||||
f"routes={[r['subject'] for r in routes]}",
|
||||
len(routes) == 5 and "demo.hello" in subjects,
|
||||
f"routes={subjects}",
|
||||
)
|
||||
|
||||
# ========== 4. 代码级双重保险:SDK 无对网关包的 import 语句(AST 精确检查) ==========
|
||||
@@ -76,7 +78,7 @@ def _imports_gateway(mod) -> list:
|
||||
return found
|
||||
|
||||
|
||||
for mod in (proc_mod, con_mod, pub_mod, rc_mod):
|
||||
for mod in (proc_mod, con_mod, pub_mod, rc_mod, sto_mod):
|
||||
bad = _imports_gateway(mod)
|
||||
if bad:
|
||||
check(f"{mod.__name__} import 了网关包: {bad}", False)
|
||||
|
||||
Reference in New Issue
Block a user