docs: 强化 Codex 长程任务空闲超时规格
Pipelines as Code CI / agentrun-nc01-v02-ci-a1cb17024103ba9c64bdf362d0270ea78d886bc9 Success

This commit is contained in:
AgentRun Codex
2026-07-19 19:15:55 +02:00
parent 7bdd93e642
commit a1cb170241
+5
View File
@@ -96,6 +96,7 @@ Kubernetes Secret 的创建、轮换和权限控制属于集群密钥管理流
- Codex 运行时必须使用被投影的 `.codex` 目录;不得 fallback 到镜像内默认凭据或节点宿主机 `~/.codex`
- Codex stdio backend 不得设置 turn/session/conversation 的总时长 timeout`executionPolicy.timeoutMs` 只能作为无 app-server 响应、无 notification、无 assistant/tool/event activity 的 idle timeout。长程任务只要持续产生可见 activity,就必须继续等待 `turn/completed`、取消或真实 transport failure。
- idle timeout 的活动源至少包括 Codex app-server notification、assistant/message delta、tool call 状态、command output、stderr/diagnostic event 和 backend status event;这些活动必须刷新 `lastActivityAt/lastActivitySeq`。只有超过 idle budget 没有任何活动时,才允许把当前 command 归为 idle timeoutresult/session 仍必须标记 `timeoutKind="idle"``hardTimeout=false`,避免调用方把它误判成固定 wall-clock backend-timeout。
- backend 实现不得创建与 turn 起始时间绑定的 hard timer,也不得保留 `turn:hard-timeout``total budget` 或等价终态路径;外层 HTTP、runner lease 和 observer timeout 只能结束各自等待或租约,不能把仍有活动的业务 turn 写成 timeout。
- 普通 turn command 失败只终结当前 command,不得把 reusable run/session 置为 terminal;后续 command 必须仍可进入同一个 run/runner。只有显式 cancel、runner lease/claim 失效、资源装配不可恢复或运行面退出才允许终结 run。
-`config.toml` 指向 hyueapi 或其他 OpenAI-compatible upstreamrunner/backend Pod 的 proxy 与 `NO_PROXY` 必须保持该配置可用;不得在日志中打印完整 auth/config 内容。
- 模型名、provider profile、upstream host 可以作为 redacted metadata 输出;provider credential、token、Authorization header 和文件内容不得输出。
@@ -129,6 +130,10 @@ Run 的 `executionPolicy.secretScope` 应引用与 `backendProfile` 匹配的 pr
阅读本文、[spec-v01-provider-profile-management.md](spec-v01-provider-profile-management.md) 和 [spec-v01-validation.md](spec-v01-validation.md),然后用 `backendProfile=dsflash-go` 创建真实 run 并提交一个最短 `turn` command。确认 runner 仍调用 `codex app-server --listen stdio://`,但使用 `agentrun-v01-provider-dsflash-go` 的 profile SecretRef、独立 `CODEX_HOME``model-catalog.json`manager 可查询 profile 为 `dsflash-go`、model 为 `deepseek-v4-flash`、context window 为 1M 的 backend_status、assistant 或 error event、terminal_status,且 Secret value 未泄露。
### T2e 长程活跃 turn 只按静默时间超时
使用 fake app-server 创建一个总耗时明确超过 `executionPolicy.timeoutMs` 的 turn,并在每个 idle budget 到期前持续发送 notification、assistant delta、tool 状态或 command output。确认 turn 继续运行并最终完成,events 中不存在 `turn:hard-timeout``total budget``hardTimeout=true`。随后构造一个超过相同 idle budget 完全没有活动的 turn,确认它只以 `turn:idle-timeout` 失败;每次有效活动都必须把下一次 idle deadline 从该活动时刻重新计算。
### T3 Missing auth/config failure
阅读本文,然后分别移除或改名 Secret 中的 `auth.json``config.toml` key,启动真实 run。确认 adapter 在调用 provider 前失败为 `secret-unavailable`failure response 为 JSON,日志不包含 Secret value。