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
17fa493da7
commit
facc2a249a
16 files changed
+1070
-301
No files matched your search
+3
-1
@@ -22,6 +22,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
from cloud.sandbox_policy import TASK_CONTAINER_RE as _POLICY_TASK_RE
|
||||
from cloud.marker_tools import extract_quota_status as _extract_quota_status
|
||||
from cloud.marker_tools import extract_automation_creates as \
|
||||
_extract_automation_creates
|
||||
@@ -1341,7 +1342,8 @@ class DockerExecutor(Executor):
|
||||
# 容器也叫 codex-*(例如 codex-postgres),按前缀删会把数据库
|
||||
# 容器当成残留任务容器杀掉(2026-10-26 实测:worker 重启时
|
||||
# codex-postgres 就是这样被删掉,导致控制面连不上 Postgres)。
|
||||
_TASK_CONTAINER_RE = re.compile(r"^codex-[0-9a-f]{32}$")
|
||||
# 正则收敛到 cloud/sandbox_policy.py(类属性别名保留)。
|
||||
_TASK_CONTAINER_RE = _POLICY_TASK_RE
|
||||
|
||||
def cleanup_stale_containers(self, prefix="codex-"):
|
||||
"""清理上一轮残留的任务容器:只删 codex-<32 位 hex 任务 id>。
|
||||
|
||||
Reference in new issue
Block a user