fix: 改进 PaC 首次接入诊断
This commit is contained in:
@@ -60,6 +60,7 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
|
||||
- CI/CD 只读等待:
|
||||
- 默认使用 `closeout --wait --timeout 120s` 观察 Tekton、Argo 和 runtime 收敛;已处于成功或失败终态时立即返回。
|
||||
- 未完成时由目标控制面的 Kubernetes watch 持有单次等待,不得在调用侧每 `1s`、`5s` 重复执行 `status`。
|
||||
- delivery 只有 source commit、GitOps exact/descendant ancestry、Argo 与 runtime sha256 digest 全部一致时才 ready;`no-runtime-change` 使用独立保留合同。
|
||||
- timeout 必须保留当前状态、`timedOut=true`、耗时、稳定 identity/cursor 与 `next.wait`;零变化也必须有输出。
|
||||
- `--timeout` 只接受严格 `<正整数>ms|s|m`,测试使用短 timeout 或虚拟时钟,不真实等待 `120s`。
|
||||
- watch 断连或后端错误必须显式失败,不能折叠为 timeout;该入口固定 `mutation=false`,不触发 PipelineRun、Argo refresh、GitOps 或 rollout。
|
||||
@@ -164,6 +165,7 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
|
||||
- desired 只来自 owning YAML 与共享 renderer,禁止从 live Pipeline/PipelineRun 反向导出;
|
||||
- `verify-runtime` 使用干净且 `HEAD` 等于完整 source commit 的独立 worktree;
|
||||
- 未声明 owner、worktree 证据不成立或运行面证据冲突时 fail-closed;
|
||||
- `plan|check|write` 必须检查内联 Pipeline 的 `command`、`args` 和 shell `script` 实际执行的仓库相对源码入口;入口缺失时在 source PR 前 fail-closed,不读取仓库外路径;
|
||||
- 错误和 drift 在默认、`--json`、`--full` 中都只能披露路径、类型、长度、SHA-256 或 URL fingerprint;
|
||||
- 禁止回显脚本、URL 凭据、查询参数、Authorization、Secret 和远端 stderr。
|
||||
- PaC source-only closeout 必须使用目标侧结构化证据:
|
||||
@@ -184,6 +186,7 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
|
||||
- PaC `debug-step --id <pipelinerun>` 必须读取目标侧真实 PipelineRun、TaskRun condition/result 与合同 Task 日志:
|
||||
- 默认输出每个 terminal role 的 presence、status、source 与首个断点;
|
||||
- 同时披露 artifact catalog、digest、GitOps commit 和 collector 读错;
|
||||
- 默认一次返回失败 TaskRun、step、container、exit code、termination reason 和脱敏有界日志尾,不再要求操作者另行拼接 `trans logs`;
|
||||
- 该入口只读且 `mutation=false`,不能创建 PipelineRun 或写 GitOps/runtime;
|
||||
- 未带 `--id` 时才只运行 evaluator fixture。
|
||||
- PaC `diagnose-regression` 必须保持只读、轻量和有界:
|
||||
@@ -232,6 +235,10 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
|
||||
- 显式 `--json` 的 stdout 只允许一个合法 JSON 文档,progress 写入 stderr。
|
||||
- 触发或验收 rollout 时必须绑定 lane、source commit、PipelineRun/GitOps revision、runtime ready 和 `/health` 端点验证结果;web-probe/Playwright 结果只能作为单独的 post-deploy 证据。
|
||||
- CI/CD 状态、日志和事件查询必须减少 trans/SSH 传输:能在目标 NODE/k8s 内解析、聚合、裁剪的内容,必须在目标侧计算成短 JSON/table 摘要后再回传;禁止为了本地解析而把完整 ConfigMap、大对象、长日志或原始 API payload 透传回来。
|
||||
- PaC history 范围必须显式且高效:
|
||||
- 未指定 `--consumer` 时汇总 target 全部 consumer,并按 namespace 复用 PipelineRun/TaskRun 读取;
|
||||
- 指定 `--consumer` 或可唯一归属的 `--id` 时只读取单 consumer 快路径;
|
||||
- 输出 `config.scope=target-summary|single-consumer`,不得静默退回默认 consumer。
|
||||
- 退役 branch-follower 排障只允许使用 `state-read|controller-source|status-read|decide`、`status|events|logs` 等只读边界;`state-write`、gate、`run-once` 和自动 loop 不再是当前 PaC consumer 的修复或验收入口。
|
||||
- 自动链单步测不通时,应在 Git-backed YAML、controller 或源码中修复根因,并由修复 PR 合并产生的新正常 webhook/PaC 事件复测;不得用 branch-follower 写状态或补跑当前交付。
|
||||
- CI/CD 排障中再次踩到已暴露的运行面坑、工具误用、镜像假设或状态可见性缺口时,必须先把长期规则写入本 skill/reference,再继续只读定位。
|
||||
|
||||
Reference in New Issue
Block a user