docs: clarify AgentRun lane rollout closeout
This commit is contained in:
@@ -98,6 +98,10 @@ bun scripts/cli.ts agentrun control-plane status --node D601 --lane v02 --full
|
||||
|
||||
YAML-only lane 的 `trigger-current --confirm` 是受控长流程入口;source bootstrap、image build、GitOps publish、git-mirror sync 和 PipelineRun 创建必须拆成短提交与状态轮询,不得把 clone、build、push 或长时间 polling 放进一个顶层 `trans` 长连接。`trigger-current` 返回异步 job 时,先用 `bun scripts/cli.ts job status <jobId> --tail-bytes 12000` 观察 `agentrun-yaml-lane-trigger` progress,再用 `agentrun control-plane status --node <node> --lane <lane> --pipeline-run <name>` 观察 Tekton、GitOps 和 Argo 对齐。后台步骤的 `status` 与 `ok` 必须共同判定,`status=succeeded` 但 `ok=false` 是终态失败,不能继续轮询到超时。GitOps publish 必须使用隔离临时 clone/worktree,不能切换或污染 YAML 声明的固定 source workspace;如果历史失败 publish 已让固定 workspace dirty、detached 或停在 GitOps 分支,只清理已知生成产物/失败发布残留并恢复到 lane source branch 后再重试。
|
||||
|
||||
AgentRun YAML-only lane 发布收口必须以当前 source branch truth 为准。`trigger-current` 期间若 lane source branch 被并行 PR 推进,`status --pipeline-run <name>` 可能同时显示当前 branch tip、被观察的 PipelineRun、GitOps revision 和 manager source;如果当前 branch tip 已经不是该 PipelineRun 的 pinned commit,必须确认最新 tip 包含本次修复,再按最新 tip 重新 `trigger-current`,最后用最新 PipelineRun 的 `status` 证明 `aligned=true`、`blockers=[]`、`argoSyncedToGitops=true` 和 `managerSourceMatchesExpected=true`。不要用已经被更新 source supersede 的中间 PipelineRun 作为最终 closeout。
|
||||
|
||||
`trigger-current` 的 source bootstrap 可能为 commit-pinned 构建短暂检出精确 commit;每次发布、失败恢复或上下文恢复后,都要重新检查 YAML 声明的固定 source workspace 是 lane source branch 且 clean。如果固定 workspace 停在 detached HEAD,先切回 lane source branch 并 `pull --ff-only` 到 remote,再继续创建 worktree、触发发布或写 closeout;不要把 detached 固定 workspace 当作下一轮开发或部署的 source truth。
|
||||
|
||||
YAML-only lane 的 `trigger-current` 会先确保目标 source workspace/branch 存在,再从 UniDesk YAML 声明的 image build、GitOps branch/path、runtime namespace、Secret、数据库和 manager env 渲染 artifact catalog 与 GitOps desired state。该路径会删除新 lane source branch 中的 `deploy/deploy.json`,因为部署真相已经迁入 UniDesk YAML;旧 `v0.1` branch 中历史文件只作为迁移前遗留产物存在,不能作为新 lane 的事实来源。Secret export 格式或外部数据库连接参数变化时,先用 `platform-db postgres export-secrets --confirm` 物化本地 Secret source,再用 `agentrun control-plane secret-sync --node <node> --lane <lane> --confirm` 下发,最后用 `agentrun control-plane restart --node <node> --lane <lane> --confirm` 让 manager Deployment 通过 rollout 读取新 Secret;不要手工删除 Pod 或直接 patch Secret。
|
||||
|
||||
Provider credential Secret 的 `auth.json` 和 `config.toml` 也必须按 lane 的 YAML `sourceRef` 下发,不能把指挥机全局 Codex 配置当成所有 lane 的运行真相。HWLAB 通过 D601 `agentrun-v02` 使用 Codex profile 时,`config.toml` 应只携带该 lane 需要的 Codex CLI runtime options,例如 model、reasoning、context window、auto compact、storage 和 network 相关键;除非对应 `auth.json` / API key source 也由同一 lane 明确拥有并已验证,否则不要在 lane config 中覆盖 provider endpoint、`base_url`、`model_provider` 或其他 endpoint 绑定。常见回归有两类:同步到 runner 的 config 缺少 `model_context_window` / `model_auto_compact_token_limit`,导致多轮 tool/webSearch 后报 context-window failure;或者为了补参数误加不匹配的 provider endpoint,导致 provider auth failure。修复必须走 `agentrun control-plane secret-sync --node <node> --lane <lane>` 的 dry-run/confirm,再用 `restart` 生效,并通过 HWLAB `hwlab-cli client agent send|trace|result` 原入口验证;不要从 Kubernetes Secret 反解配置内容或在 issue/trace 中打印 payload。
|
||||
|
||||
Reference in New Issue
Block a user