docs: 固化 PaC cache 冷热验收路径
This commit is contained in:
@@ -75,13 +75,14 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
|
||||
- `--timeout` 只接受严格 `<正整数>ms|s|m`,测试使用短 timeout 或虚拟时钟,不真实等待 `120s`。
|
||||
- watch 断连或后端错误必须显式失败,不能折叠为 timeout;该入口固定 `mutation=false`,不触发 PipelineRun、Argo refresh、GitOps 或 rollout。
|
||||
|
||||
- SELFMEDIA 最新一次端到端耗时:
|
||||
- 唯一推荐入口是 `platform-infra pipelines-as-code delivery-timing --target NC01 --consumer selfmedia-nc01`;
|
||||
- PaC consumer 最新一次端到端耗时:
|
||||
- 唯一推荐入口是 `platform-infra pipelines-as-code delivery-timing --target <NODE> --consumer <id>`;
|
||||
- 一次调用直接披露 GitHub PR `mergedAt`、trigger wait、PipelineRun/TaskRun、端到端耗时、Argo、runtime health 和 `evidenceGaps`;
|
||||
- 证据不完整时保留已成立的耗时字段并返回 `partial` 与明确缺口,不得手工串联第二状态源;
|
||||
- 端到端耗时严格超过 owning YAML 预算时输出 `pac-automatic-delivery-over-budget`,固定 `blocking=false`、`mutation=false`;
|
||||
- 超预算提示只下钻 env identity、依赖缓存、BuildKit/cache 和 stage timing,不给出人工恢复命令;
|
||||
- 该入口固定只读且 `mutation=false`,不得用于同步、触发、补跑或运行面写入。
|
||||
- 验收 registry cache 性能时,按 [Gitea + PaC](references/gitea-pac.md) 的冷热两次正常 PR 流程执行,不用人工 PipelineRun 或重复 status/timing 试探。
|
||||
|
||||
- 新增 PaC consumer 的首次引导:
|
||||
- 先执行一次 `pipelines-as-code bootstrap --dry-run`;
|
||||
|
||||
@@ -157,6 +157,27 @@ bun scripts/cli.ts platform-infra pipelines-as-code source-artifact verify-runti
|
||||
- 同时披露 trigger wait、PipelineRun、端到端耗时及 Argo/runtime closeout;
|
||||
- 缺少 PR、时间戳或 provenance 时返回 `partial` 与 `evidenceGaps`,不得用 commit 时间替代 `mergedAt`;
|
||||
- 整个入口保持 `mutation=false`,不写入历史库,不触发、同步或补跑交付。
|
||||
- registry cache 性能验收:
|
||||
- 冷缓存样本:
|
||||
- 第一个正常 source PR 只负责预热;
|
||||
- PipelineRun 成功且 cache 已导出后记录一次 `delivery-timing`;
|
||||
- 不得把首次 `mode=max` 导出耗时当作 cache-hit 回归结果。
|
||||
- cache-hit 样本:
|
||||
- 第二个正常 source PR 不得改变目标构建输入;
|
||||
- 可以使用本来就需要合并的源码或文档变更;
|
||||
- 禁止制造无语义 source-artifact 刷新。
|
||||
- 耗时判定:
|
||||
- 两个样本各执行一次 `delivery-timing`;
|
||||
- 按 owning YAML 的 `deliveryTiming.endToEndBudgetSeconds` 比较 trigger wait、PipelineRun、最长 TaskRun 和端到端耗时;
|
||||
- `state=partial` 时保留已成立的时间字段与 `evidenceGaps`,不立即串联 `status`、`history` 或日志;
|
||||
- 只有真实失败或证据矛盾才按最短分层诊断入口下钻。
|
||||
- source artifact 收口:
|
||||
- consumer 声明 `sourceArtifact` 时,在最终 cache-hit commit 建立 clean exact-commit worktree;
|
||||
- 只执行一次 `source-artifact verify-runtime`,完成 artifact、embedded PipelineRun 与 provenance 对齐。
|
||||
- 禁止项:
|
||||
- 整个流程只使用两次正常 PR merge 自动事件;
|
||||
- 不创建人工 PipelineRun;
|
||||
- 不执行 mirror sync、Argo sync、补链或第二触发。
|
||||
|
||||
`history --id <pipelinerun>` 必须按 target 内唯一 PipelineRun prefix 或 Tekton pipeline 归属解析实际 consumer,并用该 consumer 生成 status/history `Next`。零匹配、多匹配或显式 `--consumer` 与实际归属冲突时必须在远端读取前 fail-closed;禁止回退默认 consumer。
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# R13 任务报告
|
||||
|
||||
## 结果
|
||||
|
||||
- `$unidesk-cicd` 的端到端耗时入口已从 SELFMEDIA 特例泛化为任意 PaC consumer。
|
||||
- `references/gitea-pac.md` 成为 registry cache 性能验收的唯一详细出处。
|
||||
- 最短路径固定为冷缓存预热 PR、后续正常 cache-hit PR,以及 source artifact consumer 的一次可选 exact-commit `verify-runtime`。
|
||||
|
||||
## 减少工具调用
|
||||
|
||||
- 每个冷/热样本只执行一次 `delivery-timing`。
|
||||
- `state=partial` 保留现有耗时和 evidence gaps,不默认串联 `status`、`history` 或日志。
|
||||
- 只有真实失败或证据矛盾才进入既有分层诊断。
|
||||
- 禁止人工 PipelineRun、无语义 source-artifact 刷新、mirror/Argo 补链和第二触发。
|
||||
|
||||
## 验证
|
||||
|
||||
- `quick_validate.py .agents/skills/unidesk-cicd`:`Skill is valid!`。
|
||||
- 定点 `rg` 可从 `delivery-timing`、`registry cache 性能验收`、`冷缓存样本`、`cache-hit 样本` 和 `source artifact 收口` 一次定位完整流程。
|
||||
- `git diff --check`:通过。
|
||||
|
||||
## 边界
|
||||
|
||||
- 只修改 skill、单一 reference 与 MDTODO/report。
|
||||
- 未修改公共 CI/CD CLI、controller、consumer 配置或运行面。
|
||||
@@ -201,3 +201,7 @@
|
||||
### R12.1 [completed]
|
||||
|
||||
执行 [PikaOA #99](https://github.com/pikainc/pikaoa/issues/99):在 README 固化 YAML-first PaC 生成物与唯一 PR merge 触发入口,并以该正常文档 PR 验证首次预热后的 registry cache 命中耗时,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R12.1_Task_Report.md)。
|
||||
|
||||
## R13 [completed]
|
||||
|
||||
执行 [UniDesk #2492](https://github.com/pikasTech/unidesk/issues/2492):在 `$unidesk-cicd` 与唯一长期 reference 固化 PaC registry cache 冷缓存预热、后续正常 PR cache-hit 测量和可选 exact-commit verify-runtime 的最短验收路径,减少重复 status/timing 试探且不修改公共 CI/CD 运行面,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R13_Task_Report.md)。
|
||||
|
||||
Reference in New Issue
Block a user