feat: cloud 门禁/超时/成本/沙箱收敛为单一判定源
- 新增标准库叶子层 timeouts/gates/quota/sandbox_policy: 审批 3600 与单轮 600 各有名常量与环境覆盖层,已建项 expires_at 永不重算;目录/控制/合并状态门禁统一判定, 目录违规无任何覆盖参数;配额取数与比较唯一来源 (USD 先于无价、命中均为 >=、无价只计 actual 行); /tmp 隔离矩阵与失联清理判定纯函数化。 - 调用点委托:server/worker/automations/auto_memory 的 配额 SQL 与比较、server/tree/marker 的目录解析、 marker 的控制门、sandbox 的任务容器名正则、两处 300 秒 陈旧阈值默认值均收敛,别名与错误文案不变。 - 统一两个 P0 口径分歧:服务端无价计数由全部 usd IS NULL 行改为 actual-only;显式不限额用户在服务端准入亦不受 无价上限约束(与 worker 运行时一致)。 - 不新增门禁种类与 record 模式(主线无此实现);不改 skill_seed/skills/SKILL.md;不改 v1.1 契约与分支保护。 - 新增 test_arch_converge.py 18 项。
This commit is contained in:
1 parent
2720acef46
commit
41e8c98512
16 files changed
+1068
-301
No files matched your search
+5
-12
@@ -28,6 +28,8 @@ max_depth 从请求根算起:1 只列根的直接条目,2 再列一层
|
||||
|
||||
import os
|
||||
|
||||
from cloud.gates import resolve_inside as _resolve_inside
|
||||
|
||||
__all__ = [
|
||||
"DEFAULT_IGNORE",
|
||||
"DEFAULT_MAX_DEPTH",
|
||||
@@ -64,19 +66,10 @@ def resolve_tree_path(root, rel):
|
||||
放行到其真实位置——调用方仍只拿到 worktree 内的内容,
|
||||
但 build_tree 遇到链接本身时不跟进(见下),所以这条
|
||||
放行只影响“显式 path 指向内部链接目录”时的根解析。
|
||||
判定收敛到 cloud/gates.py(与服务端、marker_tools
|
||||
同款,目录违规无任何覆盖通道)。
|
||||
"""
|
||||
if not rel:
|
||||
return root
|
||||
if os.path.isabs(rel):
|
||||
return None
|
||||
base = os.path.realpath(root)
|
||||
target = os.path.realpath(os.path.join(base, rel))
|
||||
try:
|
||||
if os.path.commonpath([base, target]) != base:
|
||||
return None
|
||||
except ValueError:
|
||||
return None
|
||||
return target
|
||||
return _resolve_inside(root, rel)
|
||||
|
||||
|
||||
def build_tree(root, path="", max_depth=DEFAULT_MAX_DEPTH,
|
||||
|
||||
Reference in new issue
Block a user