docs: 固化 HWLAB 基线承接 SPEC

This commit is contained in:
Codex
2026-06-01 13:07:11 +08:00
parent 6d1fe9b2cf
commit 4efae91e42
6 changed files with 117 additions and 1 deletions
+17
View File
@@ -90,6 +90,23 @@ RESTful API 交互联调必须满足:
CLI 与 RESTful API 可以复用同一个真实 run 做联调。若两者观察到的 run id、command id、state、terminal_status、failureKind、event seq 或 redaction 结果不一致,综合联调不通过。
## HWLAB v0.2 基线承接验收
涉及 HWLAB v0.2 Code Agent 承接的变更,验收目标不是复刻 HWLAB adapter,而是证明 AgentRun 自身已经具备 HWLAB 原有 Code Agent 所依赖的执行元语。验收时直接使用 AgentRun API/CLI,不经过 HWLAB `/v1/agent/chat`
| HWLAB 原有能力 | AgentRun 验收口径 | 通过标准 |
| --- | --- | --- |
| 短连接 submit + 后台执行 | 创建 run、command、runner job 均 60 秒内返回 JSON | 返回 runId、commandId、attemptId、job identity 和后续 poll 入口。 |
| result 终态判断 | 轮询 command/run result | 只有 terminal completed 且 reply 非空才算成功;failed/blocked/cancelled 均有 failureKind/blocker。 |
| trace 可见性 | 分页读取 events | event seq 单调,包含 backend_status、assistant 或 error、terminal_statuspayload 有界且 redacted。 |
| cancel | 对 pending/running/terminal 分别调用 cancel | cancel 幂等,pending 不再启动 runnerrunning 收敛为 cancelled 或既有 terminalevents/result 可见。 |
| SessionRef | 连续两轮使用同一 sessionRef 或 conversation/session/thread 摘要 | 第二轮可 resume backend threadsession 不包含 credential 文件或完整 CODEX_HOME。 |
| ResourceBundleRef | 使用 `repoUrl + full commitId` 启动 runner | runner checkout 到允许 workspaceevent/result 能回答 repo、commit、workspace 摘要;不使用 branch/tag/HEAD 或 host path。 |
| ProfileRef/SecretRef | 分别验证 `codex``deepseek` profile | 只使用当前 profile SecretRef;缺失时 `secret-unavailable`,不 fallback,不泄露 Secret 值。 |
| bounded output | 触发工具/命令输出摘要 | result/event 只含摘要、字节数、截断标记和必要引用,不把大 stdout/stderr 塞入单个 JSON 响应。 |
这组验收吸收 HWLAB v0.2 的成熟判定口径,但不验证 HWLAB 用户鉴权、device-pod 授权、Workbench UI、`traceId -> runId` 业务映射或 HWLAB result/trace schema 转换。
## 发布判定
`v0.1` 发布通过必须同时满足: