docs: 固化 PaC 分层验收与缓存判定
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success

This commit is contained in:
Codex
2026-07-17 09:59:51 +02:00
parent 4ba9dd2ca3
commit 361c5c4744
2 changed files with 21 additions and 0 deletions
+10
View File
@@ -168,6 +168,8 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
- PaC source artifact 必须遵循以下边界:
-`config/platform-infra/pipelines-as-code.yaml#consumers[].sourceArtifact` 显式声明;
- 通过 `source-artifact plan|check|write|status|verify-runtime` 管理;
- 新增 service 后,不能只看 PaC plan 的 `buildServices`;必须确认 renderer 生成了对应 plan result、独立 build Task 和 collector 依赖,并在自动事件中看到实际 TaskRun;
- 修改 source artifact 引用的源码入口时,先以独立 PR 合并源码,使 target branch 提供精确 source identity,再从更新后的 target branch 执行 `source-artifact write --confirm`renderer 返回 `aligned=true` 时禁止制造无语义的生成文件 PR
- `taskRunTemplate` 等运行事实归属 owning YAML,代码只负责校验和渲染;
- desired 只来自 owning YAML 与共享 renderer,禁止从 live Pipeline/PipelineRun 反向导出;
- `verify-runtime` 使用干净且 `HEAD` 等于完整 source commit 的独立 worktree
@@ -181,6 +183,14 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
- 三者一致时才允许返回 `no-runtime-change``retained` provenance
- 仍要求 PipelineRun 成功、原 Argo `Synced/Healthy`、runtime ready、sha256 digest pin 与 health ready
- 证据缺失、冲突或 source commit 不匹配必须 fail-closed,不得等价为 delivery disabled,也不得伪造新 artifact、GitOps revision 或 runtime source commit。
- PaC 自动事件的阶段判定必须分层:
- webhook `202` 只表示 durable admission;以 branch、snapshot 和 delivery `committed` 证明 source authority 已提交;
- source committed 后仍需唯一匹配 source commit 的 PipelineRunPaC create timeout 不能表述为构建失败;
- PipelineRun `Completed` 后必须检查 promote 结果;`skipped-stale-source` 表示沿最新后继 source commit 继续验收,不表示当前提交已部署;
- GitOps push、Argo revision、Deployment ready 和原入口分别取证;任一上游成功不能替代下游收敛。
- BuildKit cache import/export 只属于加速能力:
- 镜像构建、manifest/digest 和 push 仍可阻塞;
- registry cache export 必须使用 BuildKit 原生 `ignore-error=true` 或等价非阻塞配置,禁止在镜像已成功发布后仅因 cache 写入抖动把 TaskRun 判失败。
- PaC `status|closeout|history``--json` 是有界 machine contract`--full` 展开单条详情,`--raw` 才展开目标侧原始 payload。`history --id --full` 不得重复嵌套同一 rows/consumer payload或依赖 `/tmp/unidesk-cli-output` 才可读。
- PaC `status` 必须在 `observability.readOnlyCapture.timeoutMs` 内完成:
- 目标侧通过 `pac-status-progress` 披露最后阶段,CLI 将其投影为 `observation.remoteStage`