From 2533914b26318e97472d5f2c886fa011fc1fb6b9 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 04:39:37 +0200 Subject: [PATCH 1/7] docs: migrate Workbench tasks to TaskTree --- .../R6.1.1_Task_Report.md | 26 --------------- .../R6.1_Task_Report.md | 26 --------------- .../R6.3_Task_Report.md | 33 ------------------- docs/MDTODO/hwlab-web-product-experience.md | 24 -------------- 4 files changed, 109 deletions(-) delete mode 100644 docs/MDTODO/details/hwlab-web-product-experience/R6.1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/hwlab-web-product-experience/R6.1_Task_Report.md delete mode 100644 docs/MDTODO/details/hwlab-web-product-experience/R6.3_Task_Report.md diff --git a/docs/MDTODO/details/hwlab-web-product-experience/R6.1.1_Task_Report.md b/docs/MDTODO/details/hwlab-web-product-experience/R6.1.1_Task_Report.md deleted file mode 100644 index e6276573..00000000 --- a/docs/MDTODO/details/hwlab-web-product-experience/R6.1.1_Task_Report.md +++ /dev/null @@ -1,26 +0,0 @@ -# R6.1.1 任务报告 - -## 结论 - -Workbench L1 已通过 YAML-first 注入 AgentRun v0.2 现有 provider/tool Secret 对象名,不创建、复制、反解或打印 Secret 值。固定 HTTPS typed CLI 的 `gpt.pika` turn 已通过纯 Kafka SSE 完成,原 `agentrun_provider_secret_not_configured` 根因消失。 - -## 交付 - -- Issue:`pikasTech/unidesk#2531`,已关闭。 -- PR:`pikasTech/unidesk#2532`。 -- Merge commit:`467eddc62336b91f78a083fbab113a46eca685d2`。 -- owning YAML:`config/hwlab-node-lanes.yaml#lanes.v03.targets.NC01.codeAgentRuntime.providerSecretNames`。 -- native renderer 只投影 Secret namespace、provider Secret name 和 tool Secret name。 - -## 验证 - -- `bun test scripts/src/hwlab-native-development.test.ts`:1 pass,37 assertions。 -- `bun scripts/cli.ts check --syntax-only`:11/11 pass。 -- API、Worker、Web 重启后均为 `running` 且 health 200。 -- Session:`ses_c68ab39e-28ac-47b6-8082-3d50423c2188`。 -- Trace:`trc_c68ab39e28ac47b680823d50423c2188`。 -- 提交结果:`accepted=true`、`terminalAuthority=hwlab.event.v1`、`resultSynthesized=false`。 -- 产品 SSE:`connected=true`、53 events、`missingSemantics=[]`、终态 `completed`。 -- 浏览器 readiness:`status=pass`,console/page/failed-response 均为 0。 -- 报告 SHA:`sha256:8fc3b070bbb996787d016244b467755af64c94136c021d7f4657f4817f583554`。 -- 截图 SHA:`sha256:20cd40757e9b0763c87b8824bbe910bf1287d40348acc135eda2b4660ed0706d`。 diff --git a/docs/MDTODO/details/hwlab-web-product-experience/R6.1_Task_Report.md b/docs/MDTODO/details/hwlab-web-product-experience/R6.1_Task_Report.md deleted file mode 100644 index 320e3b30..00000000 --- a/docs/MDTODO/details/hwlab-web-product-experience/R6.1_Task_Report.md +++ /dev/null @@ -1,26 +0,0 @@ -# R6.1 任务报告 - -## 结论 - -Workbench L1 已通过 owning YAML 与 shared public-edge 固定暴露为 `https://lab-dev-workbench.hwpod.com/workbench`。执行历史 L1 扫描时发现 CaseRun 未暴露,已按“一例一处理”治理为 `https://lab-dev-caserun.hwpod.com/caserun`。两个入口均完成受控部署、HTTPS 签发和浏览器验收。 - -## 交付 - -- Issue:`pikasTech/unidesk#2529`,已关闭。 -- UniDesk PR:`#2530`,merge commit `2ed7ab3f0d1b3cf10b902bad1ac5200de4743a44`。 -- HWLAB PR:`#2667`,merge commit `8b57d87ff721ab7cc815ae09e5f3bd6c5de302aa`。 -- fixed exposure 由 `config/hwlab-node-lanes.yaml` 与 `config/platform-infra/public-edge.yaml` 拥有。 -- 旧 public-host 环境规格已废弃,L1 用户入口只返回固定 HTTPS origin。 -- 开发等级 SKILL 已规定所有 L1 使用 YAML 固定 HTTPS 域名;发现历史未暴露实例时逐例登记、部署、验收后再继续。 -- 内部端口冲突时只修改 owning YAML 的内部端口,固定域名保持不变。 - -## 验证 - -- shared public-edge 受控 apply 成功,两个 Let's Encrypt 证书签发成功。 -- Workbench 与 CaseRun 固定 HTTPS 页面均返回 200。 -- Workbench `/health/live`、`/health/ready` 均为 200;CaseRun `/health/live` 为 200。 -- Workbench AgentRun v0.2 纯 Kafka SSE smoke 已在 R6.1.1 完成,终态为 `completed`。 -- Workbench 最终浏览器 readiness:`status=pass`,console/page/failed-response 均为 0。 -- Workbench 最终报告 SHA:`sha256:8fc3b070bbb996787d016244b467755af64c94136c021d7f4657f4817f583554`。 -- Workbench 最终截图 SHA:`sha256:20cd40757e9b0763c87b8824bbe910bf1287d40348acc135eda2b4660ed0706d`。 -- CaseRun 浏览器 readiness:`status=pass`,报告 SHA `sha256:fa63cdf6c24887bcd5435c959363db586633a3adda71a1fc8f7d1864fd14a7b8`,截图 SHA `sha256:06f573a8c9c39de5c9657141a2903d4f61ee0d81d0a75b1d9448c100cf92bd9f`。 diff --git a/docs/MDTODO/details/hwlab-web-product-experience/R6.3_Task_Report.md b/docs/MDTODO/details/hwlab-web-product-experience/R6.3_Task_Report.md deleted file mode 100644 index c8089dc7..00000000 --- a/docs/MDTODO/details/hwlab-web-product-experience/R6.3_Task_Report.md +++ /dev/null @@ -1,33 +0,0 @@ -# R6.3 任务报告 - -## 结论 - -已修复 Workbench 将非核心 realtime 元数据漂移升级为业务门禁的问题,并修正 Provider 默认选择。Kafka SSE 的 transport 与 session scope 仍是阻断边界;delivery、capabilities 等内部元数据漂移只记录 warning,不再清空 realtime ready。Provider catalog 成功且旧选择未配置时自动选择首个 configured profile;catalog 失败或无 configured profile 时保留原值。 - -## 交付 - -- HWLAB issue:pikasTech/HWLAB#2674。 -- HWLAB PR:pikasTech/HWLAB#2675。 -- merge commit:`8e215f010c2c69c93bbf8a4a3e30a4b3673123d5`。 -- 长期规则:`docs/reference/devops-hygiene.md`、`docs/reference/hwlab.md` 与 `$unidesk-webdev`。 - -## L0 - -- Provider/realtime 定点测试:33 pass。 -- `bun run workbench:native:smoke`:10 pass,native smoke `ok=true`。 -- 覆盖 capability 缺失仍 ready、session scope 错配仍阻断、旧 `codex` 自动选择 configured profile、catalog 失败或无 configured profile 非阻塞。 - -## L1 - -- NC01/v03 API、worker、web 通过 YAML-first CLI 重启并健康。 -- 固定入口 `https://lab-dev-workbench.hwpod.com/workbench` 的 native readiness 为 pass;console error、page error、关键失败响应均为 0。 -- observer:`webobs-mrqjohle-723ec1`,已停止且 `alive=false`。 -- command:`cmd-mrqjqt6i-6bf96d`,Provider 原生 select 实际值为 `gpt.pika`。 -- session:`ses_ece97e02-5082-4911-82cf-f925e1e2cd21`。 -- trace:`trc_7948aef2397849bf`,turn accepted 后 completed。 -- Final Response:`Hi. What would you like to work on?`。 -- 旧 `workbench_live_realtime_contract_invalid` 未再出现。 - -## 非阻塞残余 - -被动 observer 页未同步同一 trace 的 assistant、Final Response 与 Trace rows,已独立登记为 pikasTech/HWLAB#2676 和 R6.4;control 用户操作页已通过,不阻塞本任务。 diff --git a/docs/MDTODO/hwlab-web-product-experience.md b/docs/MDTODO/hwlab-web-product-experience.md index 57f58b99..ed75dd7f 100644 --- a/docs/MDTODO/hwlab-web-product-experience.md +++ b/docs/MDTODO/hwlab-web-product-experience.md @@ -107,27 +107,3 @@ ## R5 [completed] 执行 [UniDesk #2320](https://github.com/pikasTech/unidesk/issues/2320):将超过短连接预算的 repo-owned `web-probe console-verify` 接入既有 remote artifact `submit -> status -> result`,自动恢复 report、截图 SHA 与 issueEvidence,保持 owning YAML、认证、内存门禁、脱敏和 semantic origin 合同不变,并用 `cloud-console` profile 验收不再出现 60 秒 SSH timeout,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R5_Task_Report.md)。 - -## R6 - -执行 [HWLAB #2625](https://github.com/pikasTech/HWLAB/issues/2625):将 Workbench 后端改造为共享 dispatcher、Temporal workflow/activity 和独立 API/worker,CLI 默认 local 且显式 `--over-api` 只切 transport,前端支持独立 Vite HMR 与 native test API;保持 AgentRun 执行权威和 `hwlab.event.v1` Kafka realtime/terminal/Final Response 权威,先完成 L0/L1 native smoke,再由单一 `v0.3` PR merge 回归原 PaC/Tekton/GitOps/Argo development 自动链,禁止 production、人工 CI/CD、第二状态权威和 fake production fallback,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6_Task_Report.md)。 - -### R6.1 [completed] - -执行 [UniDesk #2529](https://github.com/pikasTech/unidesk/issues/2529):将 Workbench L1 用户入口通过 owning YAML 与 shared public-edge 固定暴露为 `https://lab-dev-workbench.hwpod.com`,CLI 与 `web-probe native-readiness` 只消费固定 HTTPS origin;内部 IP/port 仅用于 bind/probe,端口冲突时修改 YAML 且域名不变;在开发等级 SKILL 中规定所有 L1 一律使用 YAML 固定 HTTPS 域名,并要求执行 L1 时发现历史未暴露实例就逐例登记、治理和验收后再继续,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6.1_Task_Report.md)。 - -#### R6.1.1 [completed] - -修复 [UniDesk #2531](https://github.com/pikasTech/unidesk/issues/2531):复用 AgentRun nc01-v02 owning YAML 的现有 provider/tool SecretRef,补齐 Workbench L1 native environment 的 namespace、provider Secret name 和 tool Secret name 映射,禁止创建、复制或反解密钥,并以固定 HTTPS typed CLI 和纯 Kafka SSE 完成 `gpt.pika` smoke,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6.1.1_Task_Report.md)。 - -### R6.2 [in_progress] - -修复 [HWLAB #2669](https://github.com/pikasTech/HWLAB/issues/2669) 与 [HWLAB #2671](https://github.com/pikasTech/HWLAB/issues/2671):将 `POST /v1/workbench/commands` 纳入 Cloud Web authenticated same-origin proxy,并让 Workbench internal Cloud API adapter 按统一密钥契约规范化 Bearer 认证头,恢复 `lab-dev.hwpod.com` 的 L2 typed CLI fresh turn;通过正常 `v0.3` PR 自动交付,不修改 Secret、不新增 fallback 或第二认证 authority,保持 Temporal、AgentRun 与 Kafka 权威不变,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6.2_Task_Report.md)。 - -### R6.3 [completed] - -修复 [HWLAB #2674](https://github.com/pikasTech/HWLAB/issues/2674):将 Workbench 已连接后的 delivery、capabilities、version 等非核心实时合同漂移降级为可见 warning,仅 transport 失败和 session scope 错配阻断;provider catalog 成功时自动选择可用 profile,catalog 失败或无可用 profile 不新增业务门禁;完成 L0/L1 与 native smoke 回归并沉淀长期规则,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6.3_Task_Report.md)。 - -### R6.4 - -修复 [HWLAB #2676](https://github.com/pikasTech/HWLAB/issues/2676):保持 Kafka SSE 单一实时与终态权威,修复同 session/trace 的 Workbench 被动观察页未同步 assistant、Final Response 与 Trace rows 的跨页投影缺口,不新增 polling、result fallback、第二 EventSource 或第二状态 authority,完成任务后将详细报告写入[任务报告](./details/hwlab-web-product-experience/R6.4_Task_Report.md)。 From 654524d5837f6eb604a73d46dd6a9e76889953e2 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 04:40:51 +0200 Subject: [PATCH 2/7] docs: define SuperAPI remote skill distribution --- .../specs/PJ2026-01050205-superapi.md | 59 +++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/project-management/PJ2026-01/specs/PJ2026-01050205-superapi.md b/project-management/PJ2026-01/specs/PJ2026-01050205-superapi.md index 72371257..6b4565c6 100644 --- a/project-management/PJ2026-01/specs/PJ2026-01050205-superapi.md +++ b/project-management/PJ2026-01/specs/PJ2026-01050205-superapi.md @@ -27,10 +27,10 @@ ### 2.1 目的 -SuperAPI 负责把企业虚拟 skill 的 `name` 和 `description` +SuperAPI 负责把企业 skill 的 `name` 和 `description` 绑定到指定下游 API Key,并在请求进入 Codex-compatible 上游前追加到 -Agent instructions,使企业可以通过 description 引导 Agent 从公司内网读取 -最新文件和脚本。 +Agent instructions。SuperAPI 同时提供公开的文档型 Remote Skill registry, +使 Agent 可以按标准 `SKILL.md` 入口获取完整说明和 references 文档。 本规格中的 SuperAPI 是面向 LLM 请求的上游加载与管理服务,不是 [PJ2026-010104 AI网关](PJ2026-010104-ai-gateway.md) 定义的硬件节点执行网关。 @@ -42,11 +42,15 @@ Agent instructions,使企业可以通过 description 引导 Agent 从公司内 - 支持流式与同步 Responses 请求的透明透传。 - API Key、Authorization 和上游响应的脱敏日志与健康状态。 - skill、API Key、绑定关系和请求历史的管理 API 与多页面 Web。 +- 通过单个 `SKILL.md`、目录或 ZIP 导入文档型 Remote Skill。 +- 自动识别或补齐 `SKILL.md` 的 YAML frontmatter。 +- 公开分发 `SKILL.md` 与 references 文档,并提供三平台一次性读取命令。 - native PostgreSQL 持久化、Temporal worker 和网关只读快照。 ### 2.3 范围外 -- 不保存或分发完整 `SKILL.md`、references、scripts 或 bundle。 +- 不执行、安装或代理运行 Remote Skill 中的脚本。 +- 不接受包含符号链接、路径穿越、多个不明确 Skill 根或超出容量上限的 bundle。 - 不把虚拟 skill 注册为 Codex 客户端本地 skill,也不承诺出现在 `/skills`。 - 不替代公司内网资源的认证、版本管理和访问控制。 - 不修改模型输出、工具执行结果或上游计费语义。 @@ -240,3 +244,50 @@ owning YAML 应声明: 4. L1 用同一 CLI 的 `--over-api` 重复管理操作; 5. L1 从 `https://superapi.hwpod.com` 验证多页面 Web 和 `/v1/*` gateway; 6. 本阶段不进入 L2,不触发 CI/CD 或 Kubernetes rollout。 + +### 4.14 USER-KEY-SKILL-REQ-014 文档型 Remote Skill 导入 + +管理入口应支持以下三种来源,并复用同一个导入器: + +- 单个 UTF-8 `SKILL.md`; +- 浏览器目录上传; +- ZIP 压缩包上传。 + +目录或 ZIP 中必须能够唯一识别 Skill 根及其 `SKILL.md`。导入器应拒绝路径穿越、 +符号链接、绝对路径、多个无法唯一判断的 Skill 根、压缩炸弹和超出 owning YAML +声明的文件数、单文件与总容量上限。当前阶段只保存 `SKILL.md` 和 references +文档,忽略系统元数据并拒绝可执行脚本;任何上传内容都不得在服务端执行。 + +导入器应识别 `SKILL.md` 顶部的 YAML frontmatter。已有非空 `name` 和 +`description` 时采用文档值;缺失字段时必须由上传表单或 CLI 明确提供,并在 +持久化前注入标准 frontmatter。冲突值必须在预览结果中同时披露,发布操作不得 +静默覆盖。发布内容统一为 UTF-8 和 LF 换行。 + +### 4.15 USER-KEY-SKILL-REQ-015 公开分发与版本 + +公开文档读取不鉴权,并至少提供: + +- `GET /skills/{skill_id}`:公开详情与安装说明; +- `GET /skills/{skill_id}/SKILL.md`:标准 Skill 主文档; +- `GET /skills/{skill_id}/references/{path}`:文档资源。 + +文档响应应使用准确的 `Content-Type`、内容摘要 `ETag` 和 +`X-SuperAPI-Skill-Revision`。Skill 记录应保存标准化主文档、发布时间和 +SHA-256 revision;文档资源应按 Skill、相对路径、内容摘要和媒体类型独立保存。 +删除 Skill 时应级联删除其公开文档。 + +公开详情必须分别展示 Windows PowerShell、Linux shell 和 macOS shell 的一条 +建议一次性读取命令。命令应把文档输出到标准输出供 Agent 当次读取,不创建本地 +目录、不写入本地文件。URL 只引用公开入口,不携带 API Key、Cookie、 +Authorization 或其他凭据。 + +### 4.16 USER-KEY-SKILL-REQ-016 Remote Skill L0/L1 验收 + +L0 应直接调用同源导入器、repository 和公开响应渲染函数,使用 `docs-spec` +作为真实样本,分别验证单文件、目录和 ZIP 的解析结果一致;同时验证缺失 +frontmatter 注入、ZIP 安全拒绝、revision 稳定、三平台一次性读取命令和数据库清理。 + +L1 应通过项目 CLI 启动既有独立 API、worker、Web 与 gateway 进程。管理 Web +提供上传、frontmatter 预览、补齐字段、发布 URL 和一次性读取命令;公开 `/skills/*` +由 API 进程提供且不经过管理 Basic Auth。浏览器验收复用项目 typed web-probe。 +公网 shared edge 只通过 owning YAML 和自动交付链收敛,不执行人工确认式 apply。 From 15bb76d71d7f1dc85bb3241ca3a33804a621d3e3 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 04:49:40 +0200 Subject: [PATCH 3/7] =?UTF-8?q?fix(cicd):=20=E4=BF=AE=E6=AD=A3=20public-ed?= =?UTF-8?q?ge=20=E5=90=8E=E7=BB=A7=E6=8F=90=E4=BA=A4=E5=81=87=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .agents/skills/unidesk-cicd/SKILL.md | 4 ++ docs/reference/platform-infra.md | 5 ++ .../specs/PJ2026-010604-public-entry.md | 4 ++ scripts/src/platform-infra-public-edge.ts | 51 +++++++++++++++++-- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/.agents/skills/unidesk-cicd/SKILL.md b/.agents/skills/unidesk-cicd/SKILL.md index 8ef10a85..6a920987 100644 --- a/.agents/skills/unidesk-cicd/SKILL.md +++ b/.agents/skills/unidesk-cicd/SKILL.md @@ -161,6 +161,10 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help - 领域服务不得生成或安装完整 Caddyfile。 - `status` 必须披露 redacted provenance: - installed/desired source commit; + - installed 与 desired 的 source relation; + - installed 是 desired 祖先且受管配置指纹一致时视为配置当前, + 不要求无关后继提交强制重写运行面; + - installed 倒退、分叉或关系无法验证时保持失败; - authority、managed fingerprint、Compose fingerprint 与 site count; - legacy container 是否已退役; - DNS 与 HTTP probe 的失败列表必须直接包含 site id、hostname、 diff --git a/docs/reference/platform-infra.md b/docs/reference/platform-infra.md index 0862a817..deef8df5 100644 --- a/docs/reference/platform-infra.md +++ b/docs/reference/platform-infra.md @@ -73,6 +73,11 @@ - 重建或 provenance 写入失败时恢复上一运行面。 - `status` 必须披露: - installed/desired source commit; + - installed 与 desired 的 source relation; + - installed 是 desired 的祖先且 managed Caddy/Compose 指纹与 desired + 完全一致时,判定配置当前; + - 后继无关提交不得要求强制 reconcile; + - installed 是 desired 的后继、两者分叉或关系无法验证时保持失败; - authority、managed Caddy fingerprint、Compose fingerprint 与 site count; - legacy container 是否已退役; - DNS、listener、Caddy validate 与逐站点 probe 摘要; diff --git a/project-management/PJ2026-01/specs/PJ2026-010604-public-entry.md b/project-management/PJ2026-01/specs/PJ2026-010604-public-entry.md index a20f7f1b..ba33d449 100644 --- a/project-management/PJ2026-01/specs/PJ2026-010604-public-entry.md +++ b/project-management/PJ2026-01/specs/PJ2026-010604-public-entry.md @@ -113,6 +113,10 @@ Caddy 更新必须使用受控 managed block 合并,不能用某个服务的 - 绝对外部 owning YAML 必须 pin 40 位 Git commit,并从该 commit 读取。 - 旧提交、分叉提交和乱序交付必须在 mutation 前拒绝。 - 运行面必须记录 redacted authority、source commit 与 fingerprint provenance。 +- 只读状态必须区分 source commit 一致、installed 为 desired 祖先、 + installed 为 desired 后继、分叉和无法验证。 +- installed 为 desired 祖先且受管配置指纹与 desired 完全一致时, + 应判定配置当前,不应要求无关后继提交强制重写运行面。 FRP、Caddy 和 TLS 输出只能包含目标、状态、fingerprint、health 和错误摘要,不输出 Secret、token、证书私钥或可复制凭据。 diff --git a/scripts/src/platform-infra-public-edge.ts b/scripts/src/platform-infra-public-edge.ts index 5b44645d..3a79e403 100644 --- a/scripts/src/platform-infra-public-edge.ts +++ b/scripts/src/platform-infra-public-edge.ts @@ -559,6 +559,7 @@ async function status( resolution: ResolutionResult, ): Promise> { const artifacts = resolution.unresolved.length === 0 ? renderPublicEdgeArtifacts(target, resolution.sites) : null; + const desiredSourceCommit = checkoutSourceCommit(); const result = await capture( config, target.route, @@ -568,12 +569,22 @@ async function status( resolution.sites, artifacts?.caddyfile ?? null, artifacts?.compose ?? null, - checkoutSourceCommit(), + desiredSourceCommit, delivery.authorityId, ), ); const runtime = parseJsonOutput(result.stdout) ?? { ok: false, capture: compactCapture(result, { full: true }) }; - const ok = result.exitCode === 0 && runtime.ok !== false; + const provenance = optionalRecord(runtime.provenance); + const installed = optionalRecord(provenance?.installed); + const installedSourceCommit = typeof installed?.sourceCommit === "string" ? installed.sourceCommit : null; + const sourceRelation = classifyPublicEdgeSourceRelation(installedSourceCommit, desiredSourceCommit); + const sourceAcceptable = sourceRelation === "same" || sourceRelation === "installed-ancestor"; + if (provenance !== null) { + provenance.sourceRelation = sourceRelation; + provenance.sourceAcceptable = sourceAcceptable; + } + runtime.ok = result.exitCode === 0 && runtime.ok !== false && sourceAcceptable; + const ok = runtime.ok === true; return { ok, action: "platform-infra-public-edge-status", @@ -967,7 +978,6 @@ state_matches_runtime = ( and "error" not in state and state.get("version") == 1 and state.get("authorityId") == desired_authority - and state.get("sourceCommit") == desired_commit and state.get("managedCaddyFingerprint") == current and state.get("composeFingerprint") == current_compose ) @@ -1016,6 +1026,41 @@ function checkoutSourceCommit(): string | null { return /^[0-9a-f]{40}$/u.test(value) ? value : null; } +export type PublicEdgeSourceRelation = + | "same" + | "installed-ancestor" + | "installed-descendant" + | "diverged" + | "unknown"; + +export function classifyPublicEdgeSourceRelation( + installedSourceCommit: string | null, + desiredSourceCommit: string | null, +): PublicEdgeSourceRelation { + if ( + installedSourceCommit === null + || desiredSourceCommit === null + || !/^[0-9a-f]{40}$/u.test(installedSourceCommit) + || !/^[0-9a-f]{40}$/u.test(desiredSourceCommit) + ) return "unknown"; + if (installedSourceCommit === desiredSourceCommit) return "same"; + const cwd = resolveRepoPath("."); + const installedAncestor = spawnSync( + "git", + ["merge-base", "--is-ancestor", installedSourceCommit, desiredSourceCommit], + { cwd, encoding: "utf8" }, + ); + if (installedAncestor.status === 0) return "installed-ancestor"; + if (installedAncestor.status !== 1) return "unknown"; + const installedDescendant = spawnSync( + "git", + ["merge-base", "--is-ancestor", desiredSourceCommit, installedSourceCommit], + { cwd, encoding: "utf8" }, + ); + if (installedDescendant.status === 0) return "installed-descendant"; + return installedDescendant.status === 1 ? "diverged" : "unknown"; +} + function record(value: unknown, path: string): Record { if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${path} 必须是对象`); return value as Record; From 1e9908cb7a0f681cd2ba2312648d1ba86da69c03 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 04:50:51 +0200 Subject: [PATCH 4/7] ops: publish SuperAPI remote skill routes --- config/platform-infra/public-edge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/platform-infra/public-edge.yaml b/config/platform-infra/public-edge.yaml index d0fc56da..b14ed663 100644 --- a/config/platform-infra/public-edge.yaml +++ b/config/platform-infra/public-edge.yaml @@ -122,4 +122,4 @@ targets: - id: superapi configRef: /root/superapi/config/superapi.yaml path: publicExposure - sourceCommit: 2f68c9989f49601537780e8804d02b74600adf7d + sourceCommit: fe4c9dcd649fc8d6e39d1eb4122c38867acd82f5 From c4be0dc75da0beb59451cd520b1cfd36f048297e Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 04:51:04 +0200 Subject: [PATCH 5/7] docs(tasktree): migrate personal job search tasks --- .../personal-job-search/R1.1_Task_Report.md | 25 ------------- .../personal-job-search/R1.2_Task_Report.md | 26 -------------- .../personal-job-search/R1_Task_Report.md | 36 ------------------- docs/MDTODO/personal-job-search.md | 16 --------- 4 files changed, 103 deletions(-) delete mode 100644 docs/MDTODO/details/personal-job-search/R1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/personal-job-search/R1.2_Task_Report.md delete mode 100644 docs/MDTODO/details/personal-job-search/R1_Task_Report.md delete mode 100644 docs/MDTODO/personal-job-search.md diff --git a/docs/MDTODO/details/personal-job-search/R1.1_Task_Report.md b/docs/MDTODO/details/personal-job-search/R1.1_Task_Report.md deleted file mode 100644 index cab63322..00000000 --- a/docs/MDTODO/details/personal-job-search/R1.1_Task_Report.md +++ /dev/null @@ -1,25 +0,0 @@ -# R1.1 任务报告 - -## 调查范围 - -- 上海工业自动化、能源、电气和大型外企公开岗位。 -- 资料收集由 `gpt-5.6-luna`、低思考等级子代理执行。 -- 子任务及原始资料:。 - -## 核验结论 - -- 第一批保留: - - 施耐德供应链规划数字化转型负责人 `009KHM`,涉及 AI Agent、Skill、Harness、机器学习与全栈能力,投递前确认管理职责占比; - - 采埃孚算法工程师 `Req 89163`,涉及控制、规划、PID/MPC、C++、Linux、MATLAB/Simulink/ROS。 -- 补充核验: - - 施耐德电子硬件设计 `009LNN` 需要继续核对完整职责和年限门槛; - - 博世 IoT Computing 需补齐稳定详情页,强化学习研究岗有博士或顶会成果等明显硬门槛。 -- 观察池: - - Rockwell 当前只有搜索页级证据; - - GE、ABB、Siemens 暂无足够稳定的上海具体岗位证据。 - -## 主代理复核 - -- 最终优先级按硬门槛、方向匹配和证据稳定性重排。 -- 未修改源码、未创建 PR。 -- 任务后复盘未发现值得扩展为独立工程 issue 的重复性问题。 diff --git a/docs/MDTODO/details/personal-job-search/R1.2_Task_Report.md b/docs/MDTODO/details/personal-job-search/R1.2_Task_Report.md deleted file mode 100644 index 035379f2..00000000 --- a/docs/MDTODO/details/personal-job-search/R1.2_Task_Report.md +++ /dev/null @@ -1,26 +0,0 @@ -# R1.2 任务报告 - -## 调查范围 - -- 上海 AI、机器人、汽车智能化、嵌入式和系统软件公开岗位。 -- 资料收集由 `gpt-5.6-luna`、低思考等级子代理执行。 -- 子任务及原始资料:。 - -## 核验结论 - -- 第一批保留: - - Apple Embedded Software Engineer `200644032-3715`,核心要求为 C/C++、ARM、驱动和通信协议,公开页未显示明确年限硬门槛; - - 华为上海 AI 底层软件栈岗位 `jobId 32189`,投递前先确认 HC、校招或社招资格和页面有效性。 -- 第二批或挑战岗: - - NVIDIA Isaac Lab `JR2013813` 仍有约 3 年机器学习或仿真基础设施要求; - - NVIDIA Senior Isaac Lab 明确 4 年以上要求; - - Apple Senior ML/AI 明确约 8 年经验要求。 -- 观察池: - - 小米当前主要是动态机会池; - - Tesla、蔚来尚无可稳定复核的当前上海具体岗位证据。 - -## 主代理复核 - -- 纠正了子代理原始结果中对 Senior、高年限岗位的过高排序。 -- 未修改源码、未创建 PR。 -- 子代理反馈的 CLI 参数疑问不属于本次求职资料范围,未扩展为工程支线。 diff --git a/docs/MDTODO/details/personal-job-search/R1_Task_Report.md b/docs/MDTODO/details/personal-job-search/R1_Task_Report.md deleted file mode 100644 index 542dd73a..00000000 --- a/docs/MDTODO/details/personal-job-search/R1_Task_Report.md +++ /dev/null @@ -1,36 +0,0 @@ -# R1 任务报告 - -## 完成结果 - -- 使用两个 `gpt-5.6-luna`、低思考等级子代理并行收集上海大公司岗位资料。 -- 主任务:。 -- 主代理复核:。 -- 全程只处理公开招聘资料,没有在 GitHub issue 中写入候选人隐私信息。 - -## 最终岗位分层 - -- 第一批: - - Apple Embedded Software Engineer; - - 采埃孚 Algorithm Engineer; - - 施耐德供应链规划数字化转型负责人; - - 华为上海 AI 底层软件栈岗位,先确认 HC 和资格。 -- 第二批或挑战岗: - - NVIDIA Isaac Lab; - - 博世 IoT Computing 或强化学习研究岗位; - - 施耐德电子硬件设计岗位。 -- 观察池: - - Rockwell、GE、ABB、Siemens; - - 小米、Tesla、蔚来; - - 获得稳定具体岗位页并完成硬门槛核验后才升级。 - -## 执行计划 - -- 2026-07-16 09:00 完成岗位证据矩阵,记录硬门槛、项目证据、简历版本和投递结论。 -- 2026-07-16 13:30 投递第一批岗位,分别使用嵌入式、算法控制、Agent 或工业智能、AI 系统软件简历版本。 -- 2026-07-17 13:30 处理挑战岗,对高年限、博士或顶会门槛明确记录差距,不盲投。 -- 上述节奏已写入 Decision Center 的“找工作”待办及三个子待办。 - -## 交付边界 - -- 本任务没有源码修改或 PR。 -- 两个子代理都完成了任务后复盘,没有选出需要在当前范围推进的工程改进项。 diff --git a/docs/MDTODO/personal-job-search.md b/docs/MDTODO/personal-job-search.md deleted file mode 100644 index d2d02b9a..00000000 --- a/docs/MDTODO/personal-job-search.md +++ /dev/null @@ -1,16 +0,0 @@ -# 个人求职信息管理 - -- 本文件承载公开岗位调查、岗位证据核验、投递节奏和求职资料维护。 -- 个人敏感材料不进入 GitHub issue、AgentRun prompt 或公开调查报告。 - -## R1 [completed] - -并行调查上海大公司高匹配公开岗位并形成可投递清单,关联 [GitHub issue #2141](https://github.com/pikasTech/unidesk/issues/2141),完成任务后将详细报告写入[任务报告](./details/personal-job-search/R1_Task_Report.md)。 - -### R1.1 [completed] - -使用 `gpt-5.6-luna` 低思考等级核验上海工业自动化、能源、电气与大型外企岗位,关联 [GitHub issue #2143](https://github.com/pikasTech/unidesk/issues/2143),完成任务后将详细报告写入[任务报告](./details/personal-job-search/R1.1_Task_Report.md)。 - -### R1.2 [completed] - -使用 `gpt-5.6-luna` 低思考等级核验上海 AI、机器人、汽车智能化与系统软件岗位,关联 [GitHub issue #2142](https://github.com/pikasTech/unidesk/issues/2142),完成任务后将详细报告写入[任务报告](./details/personal-job-search/R1.2_Task_Report.md)。 From d101fedf8c748706a9cab2acae8775ff5a6290c8 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 05:01:51 +0200 Subject: [PATCH 6/7] ops: advance SuperAPI remote skill source --- config/platform-infra/public-edge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/platform-infra/public-edge.yaml b/config/platform-infra/public-edge.yaml index b14ed663..ad94a090 100644 --- a/config/platform-infra/public-edge.yaml +++ b/config/platform-infra/public-edge.yaml @@ -122,4 +122,4 @@ targets: - id: superapi configRef: /root/superapi/config/superapi.yaml path: publicExposure - sourceCommit: fe4c9dcd649fc8d6e39d1eb4122c38867acd82f5 + sourceCommit: d42b2c525885b319bbc5b75ee081c78657c1cedb From 2897790fa6cfa7204a35a793bc10769f45b78988 Mon Sep 17 00:00:00 2001 From: pikastech Date: Sun, 19 Jul 2026 05:13:35 +0200 Subject: [PATCH 7/7] docs: migrate automatic delivery MDTODO to TaskTree --- .../R1.1_Task_Report.md | 15 -- .../R1.2_Task_Report.md | 24 -- .../R1.3_Task_Report.md | 19 -- .../R1.4_Task_Report.md | 23 -- .../R1.5_Task_Report.md | 29 --- .../R10.1_Task_Report.md | 30 --- .../R10_Task_Report.md | 44 ---- .../R11_Task_Report.md | 37 --- .../R12.1_Task_Report.md | 20 -- .../R12_Task_Report.md | 21 -- .../R13_Task_Report.md | 25 -- .../R1_Task_Report.md | 23 -- .../R3.1_Task_Report.md | 7 - .../R3_Task_Report.md | 3 - .../R4.1.1_Task_Report.md | 58 ----- .../R5.1_Task_Report.md | 23 -- .../R6.2_Task_Report.md | 14 -- .../R6_Task_Report.md | 22 -- .../R7.2_Task_Report.md | 143 ------------ .../R7_Task_Report.md | 47 ---- .../R8.1_Task_Report.md | 31 --- .../R8.2_Task_Report.md | 24 -- .../R8.4_Task_Report.md | 24 -- .../R8_Task_Report.md | 103 --------- .../R9.1.1_Task_Report.md | 59 ----- .../R9.1_Task_Report.md | 122 ---------- .../R9.2_Task_Report.md | 70 ------ .../R9.3.1_Task_Report.md | 32 --- .../R9.3_Task_Report.md | 53 ----- .../R9.4.1_Task_Report.md | 20 -- .../R9.4_Task_Report.md | 34 --- .../R9.5.1.1_Task_Report.md | 150 ------------ .../R9.6_Task_Report.md | 29 --- .../R9.7_Task_Report.md | 59 ----- .../R9.8.2_Task_Report.md | 23 -- .../pr-merge-driven-automatic-delivery.md | 213 ------------------ 36 files changed, 1673 deletions(-) delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.2_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.3_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.4_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.5_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R11_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R13_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R4.1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R5.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6.2_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7.2_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.2_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.4_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.2_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.5.1.1_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.6_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.7_Task_Report.md delete mode 100644 docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.8.2_Task_Report.md delete mode 100644 docs/MDTODO/pr-merge-driven-automatic-delivery.md diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.1_Task_Report.md deleted file mode 100644 index 85c0ab63..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.1_Task_Report.md +++ /dev/null @@ -1,15 +0,0 @@ -# R1.1 任务报告 - -## 盘点结论 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 已识别会误导 migrated consumer 人工补链的旧规则: - - 把 `trigger-current` 当作通用交付入口; - - 把 `closeout --wait` 放入默认观察顺序与覆盖矩阵; - - 在 stale mirror 时引导人工 `REPAIR` 或 mirror sync; - - 把“受控 CLI”误解为 PR 合并后仍需执行写命令。 -- 已将 legacy/bootstrap 入口与 PaC migrated consumer 的自动交付边界分开。 - -## 结论 - -PaC migrated consumer 的交付不存在合并后人工“下一步”;若链路断开,只能修复自动链。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.2_Task_Report.md deleted file mode 100644 index 8af3b64b..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.2_Task_Report.md +++ /dev/null @@ -1,24 +0,0 @@ -# R1.2 任务报告 - -## 规则收敛 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 唯一正式触发:目标 source branch 的 GitHub PR merge。 -- 唯一正式链路: - - GitHub webhook; - - Gitea controlled mirror 与 immutable snapshot ref; - - Gitea webhook; - - PaC; - - Tekton; - - GitOps/Argo; - - runtime 自动滚动。 -- 主代理、子代理与操作者均不得通过 apply、closeout、trigger、sync、flush、人工 PipelineRun 或运行面 patch 补链。 -- 自动链失败时必须修复 owning YAML、controller 或源码,并以修复 PR 合并产生的新事件验收。 -- `status/history/events/logs` 仅在显式故障调查时按需读取,不是交付前置。 -- `closeout` 只保留可选只读历史/诊断兼容能力,不得成为默认观察顺序或代理任务。 - -## 变更位置 - -- `.agents/skills/unidesk-cicd/SKILL.md` -- `.agents/skills/unidesk-cicd/references/gitea-pac.md` -- `docs/reference/platform-infra.md` diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.3_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.3_Task_Report.md deleted file mode 100644 index 3adcdae6..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.3_Task_Report.md +++ /dev/null @@ -1,19 +0,0 @@ -# R1.3 任务报告 - -## 文档合同 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 新增 `scripts/src/cicd-pr-merge-auto-delivery-doc-contract.test.ts`。 -- 合同覆盖: - - PR merge 唯一触发与完整自动链; - - 主/子代理与操作者禁止人工补链; - - 故障调查入口只读; - - coverage matrix 与按需调查段不得重新引导 `closeout --wait`; - - `source-artifact write` 仅限 PR 合并前; - - 可调整预算由 owning YAML 声明。 - -## 验证 - -- 命令:`bun test scripts/src/cicd-pr-merge-auto-delivery-doc-contract.test.ts` -- 结果:6 pass,0 fail,40 个断言通过。 -- `git diff --check` 通过。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.4_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.4_Task_Report.md deleted file mode 100644 index a77ec420..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.4_Task_Report.md +++ /dev/null @@ -1,23 +0,0 @@ -# R1.4 任务报告 - -## Git 与 PR 收口 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 语义提交:`a7823cf9` (`docs: enforce PR-merge automatic delivery`)。 -- 最终合入的 `origin/master`:`96020b08`。 -- 对应 merge commit:`43bfca39`。 -- 分支:`docs/1755-pr-merge-auto-delivery`。 -- 非草稿 PR:https://github.com/pikasTech/unidesk/pull/1757 -- preflight: - - state: `open`; - - mergeable: `MERGEABLE`; - - merge state: `CLEAN`; - - blockers: 无; - - conclusion: `ready`。 - -## 验证与边界 - -- 文档合同:6 pass,0 fail,40 个断言。 -- `git diff --check origin/master...HEAD` 通过。 -- 未 merge PR。 -- 未执行 apply、closeout、trigger、sync、flush 或部署。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.5_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.5_Task_Report.md deleted file mode 100644 index 124bb9c9..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1.5_Task_Report.md +++ /dev/null @@ -1,29 +0,0 @@ -# R1.5 任务报告 - -## 结论 - -受控 `gh pr merge` 现在默认同时保留远端和本地 head branch 状态。只有显式传入 `--delete-branch` 才删除已确认的临时远端 branch,并清理精确匹配的本地临时 worktree/branch;`--keep-branch` 保留兼容,冲突标志继续拒绝。 - -## 实现 - -- 参数解析不再根据 `pr merge` 命令隐式启用删除。 -- 未删除结果使用稳定 typed reason `branch-preserved`。 -- local closeout 在未显式删除时不进入 head worktree 或本地 branch 清理路径。 -- 显式删除只匹配 Git 已登记、branch 精确一致、非主 worktree 且状态干净的 worktree,不依赖 repo 内外目录名称。 -- 自动重试命令在默认保留场景不再附加冗余 `--keep-branch`。 -- scoped help、顶层 help 和 `unidesk-gh` 长期合同同步完整保留语义。 -- 未按分支名称硬编码,不新增运行面、配置合同或部署步骤。 - -## 验证 - -- `bun test scripts/src/gh-pr-merge-options.test.ts scripts/src/gh-default-render.test.ts scripts/src/gh-pr-ready.test.ts` - - 20 项通过,0 项失败。 - - 覆盖默认远端保留、默认本地保留、显式删除、冲突标志、外置已登记 worktree 和主 worktree 排除。 -- `bun scripts/cli.ts gh pr merge --help` - - 明确显示默认保留远端和本地 head 状态,显式 `--delete-branch` 才删除。 -- `git diff --check` - - 通过。 - -## 工具调用改进 - -同类长期分支合并不再需要“显式保留、检查远端和本地分支、发现误删、恢复分支”的补救调用链。临时分支使用单个 `--delete-branch` 参数即可完成远端 branch、本地已登记 clean worktree 和本地 branch 的受控清理,不再要求手工 `git worktree remove` 与 `git branch -d`。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10.1_Task_Report.md deleted file mode 100644 index 076bbd00..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10.1_Task_Report.md +++ /dev/null @@ -1,30 +0,0 @@ -# R10.1 PaC 随机后缀状态决策纠偏报告 - -## 交付 - -- Issue:`pikasTech/unidesk#2387` -- PR:`pikasTech/unidesk#2390` -- Artificer task:`qt_02cd7dbc5d254f69bca662e390e641dd` -- AgentRun:`run_11ee8aef3ea645c392495bf49cbb38b1` -- 实现提交:`ef53a9066ebf62726c6f4ce0a468cd5f6ea0368e` - -## 修复 - -- `decideAndMaybeTrigger` 不再调用伪确定性 PipelineRun 名称 helper。 -- 决策层直接消费 native bundle 已按当前完整 source commit 精确筛选的真实 PipelineRun identity。 -- 删除 `expectedPipelineRunName` 死 helper。 -- 新增 PaC `generateName` 随机后缀、run 未完成且无 stored trigger 的回归测试。 - -## 验证 - -- 定向测试:1 项通过,0 项失败。 -- TypeScript 模块导入:通过。 -- `expectedPipelineRunName` 残留检索:无匹配。 -- `git diff --check`:通过。 -- 主代理 bounded review:通过,未发现新的代码、authority 或交付边界问题。 - -## 边界 - -- 未新增 authority、状态库、合同、租约、安全机制或围栏。 -- 未执行人工 PipelineRun、mirror sync/flush、Argo refresh/sync、rollout 或 runtime patch。 -- 自动链仅由 PR merge 产生的新事件验收。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10_Task_Report.md deleted file mode 100644 index 8f33f123..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R10_Task_Report.md +++ /dev/null @@ -1,44 +0,0 @@ -# R10 HWLAB v03 PaC 派生断点任务报告 - -## 交付 - -- MDTODO:`R10` -- Issue:`pikasTech/unidesk#2387` -- 产品 PR:`pikasTech/unidesk#2390` -- Target:`NC01:/root/unidesk/.worktree/2387-hwlab-pac-admission` -- 分支:`fix/2387-hwlab-pac-admission` - -- 2026-07-16 的 P1 只读定位确认近期并行提交已改变现场: - - `pikasTech/unidesk#2386` 已修复 PaC consumer 参数覆盖; - - source commit `4a6c987f2948ddb7dbf425c3fcf74f8641abf815` - 已由既有 PaC controller 自动创建 - `hwlab-nc01-v03-ci-poll-2cfng`; - - 后续 commit `09a1273bbea165bea1e7c98e1d4418831b904a02` - 也自动创建 `hwlab-nc01-v03-ci-poll-8nthq`。 - -- 本任务修复剩余的只读状态投影根因: - - native bundle 不再把 PaC `generateName` - 错当成 `${pipelineRunPrefix}-${sha12}` 确定性名称; - - 按当前 source commit 从 Kubernetes PipelineRun 列表中选择 exact match; - - 当前 commit 缺少 PipelineRun 时返回 typed missing; - - 不再使用旧 run、旧 stored state 或 runtime 对齐 - 绕过当前 PipelineRun gate。 - -## 验证 - -- `sh -n scripts/native/cicd/read-native-bundle.sh`:通过。 -- `node --check scripts/native/cicd/select-current-pipelinerun.mjs`:通过。 -- 模块导入 smoke:`cicd-native-bundle.ts` 与 `cicd-branch-follower.ts` 通过。 -- live exact-commit:`09a1273bbea1` 解析为 `hwlab-nc01-v03-ci-poll-8nthq`。 -- live historical exact-commit:`4a6c987f2948` 解析为 `hwlab-nc01-v03-ci-poll-2cfng`。 -- 不存在 commit:返回 `current-source-pipelinerun-missing`,未回退旧 run。 -- `git diff --check`:通过。 -- `bun test scripts/src/cicd-delivery-authority.test.ts`:37 项通过;1 项因并行新增第 16 个 consumer 后旧固定计数仍为 15 而失败,与本任务改动无关。 - -## 边界 - -- 未人工创建 PipelineRun。 -- 未执行 mirror sync/flush、Argo refresh/sync、rollout、runtime patch 或 webhook test。 -- 未修改 PK01。 -- 未新增 authority、合同、租约、安全机制、围栏、状态库或第二执行路径。 -- 原入口自动链验收由本 PR merge 后的新 GitHub merge 事件完成,主代理负责 review、merge 与自动链验收。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R11_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R11_Task_Report.md deleted file mode 100644 index aec86269..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R11_Task_Report.md +++ /dev/null @@ -1,37 +0,0 @@ -# R11 consumer 服务选择闭环检查任务报告 - -## 交付 - -- MDTODO:`pr-merge-driven-automatic-delivery R11` -- Issue:`pikasTech/unidesk#2449` -- Target:`NC01:/root/unidesk/.worktree/2449-service-selection-check` -- 分支:`fix/2449-service-selection-check` -- 实现提交:`6ca1f6ebdcb07c13bba818c16977c73347e7cf17` - -## 实现 - -- 以 consumer `deploy/deploy.yaml` 的服务声明作为比较基线。 -- 对比 PaC selected services、lane owning YAML `serviceIds` 与 rendered GitOps workload/service。 -- 服务集合一致时输出 `pac-consumer-service-selection-aligned`。 -- 服务集合漂移时输出 `pac-consumer-service-selection-drift`、`partial` 状态、typed warning、各来源集合和缺项证据。 -- warning 保持非阻塞,只增加可见性,不改变既有 owning YAML authority、renderer 或自动交付路径。 - -## 验证 - -- L0 定向 fixture:1 项通过,0 项失败。 -- L1 native smoke:通过。 -- 真实 consumer 只读 render:通过,并确认闭环证据随既有输出返回。 -- 实现 checkpoint 的 `git diff --check`:通过。 -- 收口阶段未重做实现与运行面验证,只复用 issue checkpoint 中已经冻结的证据。 - -## 边界 - -- 未修改共享 CI/CD 控制器、owning YAML authority 或运行面。 -- 未执行人工 PipelineRun、mirror、trigger、sync、flush、rollout 或 runtime patch。 -- 未新增第二权威、阻断型围栏、合同、租约或安全机制。 -- 本次收口只补任务报告、issue 证据和面向 `master` 的 PR;PR 不由本任务自行合并。 - -## 风险 - -- 闭环检查是非阻塞 warning,发现漂移时不会阻止 consumer 业务或自动交付。 -- PR 合并前,`master` 尚未包含实现与本报告;后续只按既有 PR merge 自动链处理,不进行人工补跑。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12.1_Task_Report.md deleted file mode 100644 index be7ae497..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12.1_Task_Report.md +++ /dev/null @@ -1,20 +0,0 @@ -# R12.1 任务报告 - -## 结果 - -- PikaOA Issue [#99](https://github.com/pikainc/pikaoa/issues/99) 与 PR [#100](https://github.com/pikainc/pikaoa/pull/100) 已关闭/合并。 -- README 已明确 UniDesk owning YAML、source-artifact renderer、`.tekton` 生成物和 GitHub PR merge 唯一触发关系。 -- 开发 `master` 与生产 `release` 的事件隔离已写明;本任务没有生产滚动。 - -## 性能证据 - -- cache-hit source commit:`9fcfa0caeb72e21da6cbcb6c44b5f57466b8f176`。 -- PipelineRun:`pikaoa-dev-nc01-9fcfa0caeb72e21da6cbcb6c44b5f57466b8f176-vw7l8`,状态成功。 -- trigger wait:10 秒;PipelineRun:104 秒;端到端:114 秒;最长 build:83 秒。 -- 相对基线 226 秒 / 236 秒 / 204 秒,分别缩短约 54% / 52% / 59%。 -- `source-artifact verify-runtime` 返回 `aligned=true`、`provenance=true`、`commitMatch=true`、`runtime=aligned`。 - -## 边界 - -- 未执行人工 PipelineRun、mirror sync、Argo sync、补链或生产滚动。 -- 一次 status/timing 读取曾超过 25 秒只读预算;后续同一受控入口恢复并取得完整证据,没有修改公共 CI/CD 基础设施。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12_Task_Report.md deleted file mode 100644 index 5610721e..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R12_Task_Report.md +++ /dev/null @@ -1,21 +0,0 @@ -# R12 任务报告 - -## 实现 - -- UniDesk Issue [#2486](https://github.com/pikasTech/unidesk/issues/2486) 与 PR [#2488](https://github.com/pikasTech/unidesk/pull/2488) 已关闭/合并,merge commit 为 `49ee68d11e9f09dbcf26ce39dadcaf10e48bcec5`。 -- `config/pikaoa.yaml` 为 development/release 声明 api、worker、web 隔离的 registry cache refs。 -- runtime parser 严格读取 cache 配置且不提供代码默认值;renderer 生成 BuildKit import/export cache 参数。 -- cache export 使用 `ignore-error=true`;镜像 digest 已验证时 BuildKit 非零收尾输出 `blocking=false` warning,镜像或 digest 真实失败仍阻塞。 - -## 自动交付 - -- PikaOA Issue [#97](https://github.com/pikainc/pikaoa/issues/97) 与 PR [#98](https://github.com/pikainc/pikaoa/pull/98) 已关闭/合并。 -- 开发 source artifact 由受控 renderer 写入,首次预热 PipelineRun 成功:249 秒,最长 build-api 229 秒。 -- 后续正常 PR #100 验证 cache hit:PipelineRun 104 秒、端到端 114 秒、最长 build 83 秒。 -- 相对原基线 PipelineRun 226 秒、端到端 236 秒、build-api 204 秒,分别缩短约 54%、52%、59%,进入 120 秒预算。 -- 最终 exact source commit `9fcfa0caeb72e21da6cbcb6c44b5f57466b8f176` 的 artifact、embedded PipelineRun、provenance 与 runtime 全部 aligned。 - -## 范围 - -- 只通过 GitHub PR merge 触发开发自动链,没有人工 PipelineRun、mirror/Argo、Docker socket、第二 authority 或公共基础设施修改。 -- production owning YAML 已具备独立 `:release` cache refs;由于没有当次生产授权,`release` 分支 artifact 未更新,生产未滚动。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R13_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R13_Task_Report.md deleted file mode 100644 index 2c1252c9..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R13_Task_Report.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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 配置或运行面。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1_Task_Report.md deleted file mode 100644 index 3c75dd75..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R1_Task_Report.md +++ /dev/null @@ -1,23 +0,0 @@ -# R1 任务报告 - -## 结果 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 交付 PR:https://github.com/pikasTech/unidesk/pull/1757 -- 已将 PaC migrated consumer 的唯一正式交付固化为: - - GitHub PR merge; - - GitHub webhook; - - Gitea controlled mirror 与 immutable snapshot ref; - - Gitea webhook; - - PaC; - - Tekton; - - GitOps/Argo; - - runtime 自动滚动。 -- 自动链不通时只修自动链,禁止主代理、子代理与操作者人工补链。 -- 观察入口仅在显式故障调查时按需只读使用,不是交付前置或 PR 合并后的代理任务。 - -## 验收 - -- 合同测试:6 pass,0 fail,40 个断言。 -- PR #1757 为非草稿,preflight 为 `ready`。 -- 本任务没有人工触发或部署 CI/CD。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3.1_Task_Report.md deleted file mode 100644 index c6f4a0ab..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3.1_Task_Report.md +++ /dev/null @@ -1,7 +0,0 @@ -# R3.1 任务报告 - -[UniDesk #1802](https://github.com/pikasTech/unidesk/issues/1802) 已登记并保持 open。 - -AgentRun PR #301 的 merge commit 4b651e12783d 通过真实 outer PaC event 生成 PipelineRun,38 秒成功;GitOps result 为 4ae90e718196,Argo 为 Synced/Healthy 但 revision 仍是 5705ac156a7b,relation=stale,runtime 仍为旧 digest。 - -该问题涉及 GitOps/Argo revision authority、managed mirror commit graph 或 PaC provenance,属于架构变更。本轮未执行 mirror、sync、flush、trigger、apply、closeout、人工 PipelineRun 或 runtime patch。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3_Task_Report.md deleted file mode 100644 index 7ed02204..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R3_Task_Report.md +++ /dev/null @@ -1,3 +0,0 @@ -# R3 任务报告 - -已完成 AgentRun PR merge 自动交付异常的有界登记:PaC Pipeline 成功,但 GitOps/Argo/runtime provenance 未自动收敛。问题已进入 #1802;按用户边界跳过架构变更,不以手工操作补洞。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R4.1.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R4.1.1_Task_Report.md deleted file mode 100644 index 9a8cb883..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R4.1.1_Task_Report.md +++ /dev/null @@ -1,58 +0,0 @@ -# R4.1.1 任务报告 - -## 状态 - -- MDTODO:`R4.1.1` -- GitHub issue:`pikasTech/unidesk#2039` -- 状态:`completed` -- 结论:PaC admission 业务阻断、watcher 启动 backlog 和公共 status renderer 三段事故均已恢复;SelfMedia 原只读入口在 YAML 预算内连续通过。 - -## 事故与处置 - -- PR #1808/#1812 基于错误的原子 queue transition 假设拒绝官方 PaC watcher: - - PR #2145 将 admission 回退为 `Ignore` 与 `Warn/Audit`; - - provenance、creator、marker、ServiceAccount、版本、SHA 与漂移继续作为 `blocking=false` warning; - - runner、RoleBinding 与 Argo repository credential 等真实 bootstrap 缺失继续 fail-closed。 -- watcher 重放 backlog 时被过早 liveness 重启: - - PR #2156 将 startup、readiness、liveness probe 收敛到 owning YAML; - - bootstrap 只按 YAML 渲染官方 release manifest,未增加 runtime patch 或第二 authority。 -- 公共 status renderer 引用未定义的 `bootstrap_ready`,生成非法 `"ok":,`: - - `80ca187c` 是最后已知正确赋值; - - `1f3283ff` 删除赋值,`2b385f08` 恢复引用时漏恢复; - - PR #2255 只恢复缺失赋值,保留正确的 bootstrap fail-closed 语义,并删除成功 TaskRun 的同步日志读取。 -- PR #2256 收敛 selector 与对象复用后仍留下两个观察断点: - - YAML `25000ms` 总预算被按 `/8000` 错误切成 `3s` 单次上限; - - PipelineRun 查询超时被改写为空数组并误报 `pipeline-missing`; - - admission provenance 串行执行十次 `kubectl auth can-i`,累计占用总预算。 -- PR #2257 完成最终恢复: - - 精确回退 `/8000` 错误切分,单次读取使用 YAML 总预算,整次观察仍由调用侧总预算硬限制; - - 十次权限探测收敛为一次 `kubectl auth can-i --list`; - - PipelineRun 读取失败返回 `pac-pipelinerun-read-failed`,不再伪装成对象不存在; - - merge commit 为 `47aad5c962b2a5774db69326d3dd981bf9d39116`。 - -## 验证 - -- 定向测试: - - bootstrap:`16 pass, 0 fail, 104 expect()`; - - provenance 相关定点:`1 pass, 0 fail, 22 expect()`; - - 全量 provenance 套件剩余一个与本补丁无关的 consumer 列表漂移,已登记 #2254。 -- 静态验证: - - `sh -n`、`git diff --check`、Skill `quick_validate.py` 均通过; - - 共享 renderer 为 `1999` 行,低于仓库 `2000` 行上限。 -- PR #2257 合并后从最新 `master` 连续执行: - - `bun scripts/cli.ts platform-infra pipelines-as-code status --target NC01 --consumer selfmedia-nc01 --json` -- 两轮结果: - - 远端读取分别为 `14431ms` 与 `15170ms`,均低于 YAML `25000ms` 预算; - - `ok=true`、`mutation=false`、`remoteStage=complete`; - - PipelineRun `Succeeded`,source commit 为 `8c03bcca554457315bc16bad01e5a96764276472`; - - admission provenance 与 consumer bootstrap 均为 ready; - - Argo 为 `Synced/Healthy`; - - SelfMedia runtime 为 `1/1` ready。 - -## 长期规则 - -- 生产 CI/CD 事故先锁定最后成功、首次失败、共同指纹和致因变更,优先回退到最后已知健康语义。 -- 未经用户明确授权,只能修改选中 consumer 的独立 YAML;公共 renderer、PaC、Gitea、Tekton/Argo bootstrap 和共享网络入口不得改动。 -- status 必须区分 delivery failure 与 observer failure;读取失败不得伪装成资源不存在。 -- 总观察预算不得按假定调用数切成会制造 false negative 的隐藏局部 timeout。 -- 全程未修改 SelfMedia 私有 YAML,未人工执行 PipelineRun、mirror、trigger、sync、flush、Argo sync 或 runtime patch。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R5.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R5.1_Task_Report.md deleted file mode 100644 index e3615c62..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R5.1_Task_Report.md +++ /dev/null @@ -1,23 +0,0 @@ -# R5.1 任务报告 - -## 结论 - -[UniDesk #1900](https://github.com/pikasTech/unidesk/issues/1900) 的直接断点不是 PR、Pipeline 定义或 AgentRun,而是 NC01 的 `pipelines-as-code-watcher` 未启动。GitHub merge、Gitea mirror/webhook 和 PaC 创建 PipelineRun 均正常;唯一负责把 `queued/PipelineRunPending` 推进为 `started` 的 watcher 不可用,因此自动链停在 0 TaskRun。 - -## 运行面证据 - -- watcher Deployment:`replicas=1`、`ready=0`、`unavailable=1`。 -- 故障 Pod:`pipelines-as-code-watcher-7f6c87497c-h2dzz`,UID `7fe65fbe-a18e-4513-89f2-5fac37ae0b71`。 -- projected ServiceAccount token 被 node authorizer 拒绝:`node requested token bound to a pod scheduled on a different node` / `no relationship found between node`。 -- 同一控制面恢复窗口创建的 `tempo`、`todo-note` Pod 出现相同错误;稍后新建 Pod 已能正常挂载 token,排除 watcher ServiceAccount RBAC 和 AgentRun Pipeline 定义。 -- AgentRun merge commit `4155132aa7e8de1936b2bf447ea889a607ee59d7` 的 PipelineRun 已由 PaC 创建并标记 `queued`,但长期 `startTime=null`、0 TaskRun。 - -## 有界临时恢复 - -在 issue 和 MDTODO 建立后,只删除上述精确 Pending watcher Pod,由既有 Deployment/ReplicaSet 自动重建。未修改、删除或重跑任何 PipelineRun,也未执行 mirror、sync、refresh、trigger 或 rollout。 - -新 Pod `pipelines-as-code-watcher-7f6c87497c-7lhfh` 随后 Ready,并接管 leader lease;既有 #347 PipelineRun 自动从 `queued` 进入 `Running`,产生 TaskRun。该证据证明恢复仍由原 PaC 自动权威完成。 - -## 长期归属 - -长期修复归 [#1900](https://github.com/pikasTech/unidesk/issues/1900) 的 NC01 k3s node-authorizer / Pod 生命周期恢复。不得把本次精确 Pod 重建固化为额外 delivery actor、补跑入口或自动围栏。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6.2_Task_Report.md deleted file mode 100644 index 81e66ece..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6.2_Task_Report.md +++ /dev/null @@ -1,14 +0,0 @@ -# R6.2 任务报告 - -## 结果 - -- `unidesk-cicd` 已明确:除非用户明确要求,配置一致性、版本、契约、schema、preflight 与跨对象校验不得阻断 Pipeline、artifact、GitOps、Argo、runtime rollout 或 health closeout。 -- 全局配置、非选中 target/consumer 与跨 consumer 漂移统一输出结构化 `blocking=false` warning。 -- 发现既有阻塞实例时逐例降级,不再以旧测试或旧合同阻止滚动。 -- 仅保留当前选中对象缺少必需输入、Secret/权限不成立、目标无法唯一解析或 mutation target 不安全的 mutation 前损害预防。 -- 已同步修正 delivery authority 与 feature-schema OTel 匹配的两处矛盾表述。 - -## 验证 - -- skill `quick_validate.py` 通过。 -- `git diff --check` 通过。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6_Task_Report.md deleted file mode 100644 index 9519de76..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R6_Task_Report.md +++ /dev/null @@ -1,22 +0,0 @@ -# R6 任务报告 - -## 结论 - -- 产品功能 schema 固定为 `config/feature-config.schema.json`,使用 JSON Schema Draft 2020-12 与锁定的 `ajv-dist@8.17.1` 结构化 validator。 -- 每个顶层 property 通过唯一 `x-unidesk-feature` 建立一对一配置关系;CI runner env 不作为产品配置 authority。 -- schema、输入、重复、值不匹配、validator 与 OTel 异常均只产生 typed warning,不写回配置、不关闭功能、不切换架构,也不阻断 artifact、GitOps、Argo、rollout 与 health。 -- PR #1987 完成 schema/validator/OTel/`status|history|debug-step` 投影和旧 capability env 门禁删除;PR #1989 修复 source artifact 缺少 Ajv bundle 的首断点。 - -## 验证 - -- 定向测试首轮 53/53;主代理 shell 状态纠偏后回归 49/49。 -- merge commit `92b19ce6c8b55b1059506d6b4527388d1f671828` 自动创建 `unidesk-host-v2xn8`,44 秒 Succeeded。 -- GitOps `fa4d36a288ac2943091ffb92e0a4d5a0e93e5ff5`;Argo `Synced/Healthy` 且 revision relation=exact。 -- registry/runtime digest 同为 `sha256:a10a22b94976eb65a664b0b3b0c838a5720d39c037229b325c6fe0083578f355`,1/1 ready,health=200。 -- 全程未人工创建 PipelineRun、mirror sync、Argo refresh 或 patch 运行面。 - -## 工件 - -- Issue: https://github.com/pikasTech/unidesk/issues/1981 -- PR: https://github.com/pikasTech/unidesk/pull/1987 -- Follow-up PR: https://github.com/pikasTech/unidesk/pull/1989 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7.2_Task_Report.md deleted file mode 100644 index 262e7f88..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7.2_Task_Report.md +++ /dev/null @@ -1,143 +0,0 @@ -# R7.2 任务报告 - -## 任务定位 - -- MDTODO:`R7.2`。 -- GitHub issue:`pikasTech/unidesk#2010`。 -- Pull request:`pikasTech/unidesk#2101`。 -- Target:`NC01`。 -- targetWorkspace:`/root/unidesk/.worktree/2010-hwlab-release-production-lane`。 -- repository/ref:`pikasTech/unidesk` / `feat/2010-hwlab-release-production-lane`。 - -## 本轮结果 - -- 在 `config/hwlab-node-lanes.yaml` 中以 `lanes.v03` 为 baseline 增加短 production override。 -- production lane 独立声明: - - `release` source branch; - - source workspace、snapshot、Pipeline、PipelineRun、ServiceAccount; - - GitOps branch/path、artifact catalog、Argo Application、namespace; - - production publicExposure 已由 R9.2 更新为 `https://lab.hwpod.com` 与内部 NodePort `32010`; - - PostgreSQL database、role、Secret consumer 和 migration ledger; - - Kafka client、direct publish、refresh replay、projector 和 live SSE consumer group。 -- production 与 development 复用同一个 Gitea 物理仓库 - `mirrors/pikasTech-HWLAB`,但分别声明独立 YAML source identity: - - development:`hwlab-nc01-v03` / `v0.3` / `v0.3-gitops`; - - production:`hwlab-nc01-production` / `release` / `release-gitops`。 -- production PaC consumer 精确引用 `hwlab-nc01-production` repository identity; - branch、snapshot 和 GitOps revision 由该 repository identity 声明, - 不再由 consumer params 覆盖 development identity。 -- `lanes.production.targets.NC01.sourceAuthority.giteaMirrorRepoKey` - 精确引用 `hwlab-nc01-production`。 -- delivery authority parser 已删除同 target/owner/repo 的跨 branch fallback: - - 必须同时精确匹配 target、Gitea owner/name 和 source branch; - - 缺少或冲突时 fail-closed; - - 禁止把 `v0.3` identity 猜作 `release` authority。 -- 通用 HWLAB lane parser 和 plan 已投影 migration ledger,并从 owning YAML 动态生成合法 lane 提示。 -- `config/platform-infra/kafka.yaml` 已声明 production Cloud API Kafka ACL,未改变 topic、实时和回放架构。 - -## 方案依据 - -- OpenGitOps 原则要求 desired state 声明式、版本化且不可变,并由软件代理自动拉取和持续 reconcile;因此 branch identity 与 immutable snapshot 必须由 owning YAML 明确声明,不能依赖运行时猜测。 -- Tekton Pipelines 将 Git revision 作为显式输入: - - source branch 只负责选择受控镜像入口; - - 实际构建继续使用受控 snapshot/commit revision; - - mutable branch 名不直接充当构建 provenance。 -- Argo CD 的 `targetRevision` 明确选择 Git branch、tag 或 commit;production 使用独立 `release-gitops`,避免与 `v0.3-gitops` 共用可变 desired state。 -- Kubernetes 建议以不可变 image digest 或等价内容寻址 revision - 固定工作负载版本: - - Pipeline 继续产出 commit-pinned artifact; - - GitOps/Argo 只消费已固定 revision; - - 禁止从运行面或脏 workspace 构建。 -- 官方参考: - - OpenGitOps principles:; - - Tekton Git resolver revision:; - - Argo CD tracking strategies:; - - Kubernetes image digest:。 - -## Target 原入口证据 - -以下命令均在 `NC01:/root/unidesk/.worktree/2010-hwlab-release-production-lane` 执行: - -- `git diff --check`:通过。 -- `bun --check`: - - `scripts/src/cicd-delivery-authority.ts`:通过; - - `scripts/src/hwlab-fake-model-provider.ts`:通过; - - `scripts/src/hwlab-node-lanes.ts`:通过; - - `scripts/src/hwlab-node/entry.ts`:通过; - - `scripts/src/hwlab-node/plan.ts`:通过。 -- `bun scripts/cli.ts hwlab nodes control-plane plan --node NC01 --lane production`: - - `status=ok`; - - namespace 为 `hwlab-production`; - - external PostgreSQL 与 publicExposure 均被选中; - - Secret values 未输出。 -- `bun scripts/cli.ts hwlab nodes control-plane plan --node NC01 --lane v03`: - - `status=ok`; - - namespace 为 `hwlab-v03`; - - development 配置继续可解析。 -- `bun scripts/cli.ts platform-infra pipelines-as-code plan --target NC01 --consumer hwlab-nc01-production`: - - Repository 为独立 identity `hwlab-nc01-production`; - - consumer 为独立的 `hwlab-nc01-production`; - - Tekton Pipeline 为 `hwlab-nc01-production-ci-image-publish`; - - Argo Application 为 `hwlab-node-production`; - - `single-path`、`yaml-source-of-truth`、`public-repository-url`、`gitea-internal-source` 和 `runtime-zero-docker` 均为 `true`。 -- `bun scripts/cli.ts platform-infra pipelines-as-code plan --target NC01 --consumer hwlab-nc01-v03`:通过,development consumer 保持独立。 -- delivery authority 与 renderer 定向断言通过: - - NC01 声明两个 HWLAB source identity,分别为 - `hwlab-nc01-v03` 与 `hwlab-nc01-production`; - - 两个 identity 指向同一 Gitea 物理仓库; - - production `repositoryRef` 为 `hwlab-nc01-production`,branch 为 `release`; - - development `repositoryRef` 为 `hwlab-nc01-v03`,branch 为 `v0.3`; - - 两个 lane 的 snapshot prefix 与 GitOps branch 独立; - - production consumer 携带 `v0.3` source branch 查询时返回 - `authority-identity-mismatch`,证明跨 branch fail-closed; - - parser 源码不再包含 `branchAuthorityRepositories` fallback。 -- 纯 Kafka 定向断言通过: - - `directPublish`、`liveKafkaSse`、`kafkaRefreshReplay` 为 `true`; - - `transactionalProjector`、`projectionOutboxRelay`、`projectionRealtime` 为 `false`; - - `transactionalProjectorConsumerGroupId` 仅作为 parser 必填的 inert compatibility 字段保留。 -- 解析后隔离断言全部通过: - - source branch、workspace、Pipeline、PipelineRun prefix、ServiceAccount; - - GitOps branch、runtime namespace、Argo Application、public origin; - - PostgreSQL database、role、Secret、migration ledger; - - Kafka direct publish、refresh replay 和 live SSE group; - - shared physical Gitea repository、independent source/repository/consumer identity。 - -## 验证边界 - -- `platform-infra gitea validate --target NC01` 未能进入本任务新增 identity 的运行面校验: - - 命令先被既有 `agentrun-nc01-release` 的 - `legacyGitMirror.configRef` 缺失阻断; - - 该缺失存在于 `origin/master`,不属于本任务改动; - - 本轮未扩大范围修复该独立问题。 -- 因用户明确禁止人工 mirror、PipelineRun、Argo 和创建 `release` branch, - 本轮证据证明的是 YAML 声明、controlled-push 选择、PaC binding 与 fail-closed 隔离; - 合并后的真实自动链仍由后续授权阶段通过正常 GitHub release 提交触发。 - -## Primary Workspace 边界 - -- primary workspace 仅用于读取 runtime-managed skills、执行受控 GitHub CLI 和发出 `trans` 命令。 -- 未在 primary workspace 读取、编辑、验证或提交目标源码。 -- 未把 runner 容器本地结果作为 Target 原入口证据。 - -## 未执行范围 - -- 未创建或推进 HWLAB `release` branch。 -- 未人工触发 PipelineRun、Gitea mirror、Argo refresh/sync 或 GitOps rollout。 -- 未修改运行面 Pod、Secret、Caddy、FRP 或 PostgreSQL。 -- 未运行 Vitest、裸 `tsc`、浏览器、web-probe 或重型构建。 -- 未切换 `https://lab.hwpod.com`,也未声明 production 已上线。 - -## 后续阶段 - -- PR 合并授权、`release` 初始化和 production 自动 rollout 由 `pikasTech/unidesk#2010` 后续阶段控制。 -- 只有 `release` 正常提交自动触发唯一 production PipelineRun,并收敛到 Argo `Synced/Healthy` 后,才执行 production 公网原入口验收并完成 MDTODO R7.2。 - -## R9.2 更新 - -- R7.2 的 release source identity、独立 PaC/Tekton/GitOps/Argo、namespace、PostgreSQL 与 Kafka 隔离事实保持不变。 -- 旧 PK01 Caddy/FRP 与 `hwlab.pikapython.com` publicExposure 已删除,不再属于 production lane authority。 -- production 产品 exposure 现由 `config/hwlab-node-control-plane.yaml#publicExposures.NC01.production` 唯一声明: - - 公网入口:`https://lab.hwpod.com`; - - 共享 edge upstream:`http://127.0.0.1:32010`; - - Kubernetes Service:NodePort `32010`。 -- 共享 edge 的站点聚合必须由 R9.1 按 `configRef/path` 消费该 exposure;本分支不增加 fallback 或第二 authority。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7_Task_Report.md deleted file mode 100644 index 6d6d397a..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R7_Task_Report.md +++ /dev/null @@ -1,47 +0,0 @@ -# R7 任务报告 - -## 结果 - -- 新增只读命令 `platform-infra pipelines-as-code delivery-timing --target --consumer `。 -- 命令从 `config/platform-infra/pipelines-as-code.yaml` 与 `config/platform-infra/gitea.yaml` 精确解析 consumer、上游 GitHub repository 和 branch。 -- 单次调用并行读取最新 PaC PipelineRun/TaskRun 与 status closeout,再按 source commit 查询 GitHub 关联 PR;不新增历史库或第二状态源。 -- 默认及 JSON 输出包含 source commit、PR、mergedAt、PipelineRun 起止、trigger wait、pipeline duration、end-to-end duration、Argo/runtime health 和 `evidenceGaps`。 -- PR、时间戳或 provenance 缺失时保持 `partial/unknown`,不使用 commit 时间冒充 mergedAt;入口固定 `mutation=false`。 - -## 真实只读验收 - -命令: - -`bun scripts/cli.ts platform-infra pipelines-as-code delivery-timing --target NC01 --consumer selfmedia-nc01 --json` - -结果: - -- source commit:`11bfcf2657cd4f62e5e7221803872e53143e5f0c` -- GitHub PR:`pikainc/selfmedia#26` -- mergedAt:`2026-07-14T05:54:19Z` -- PipelineRun:`2026-07-14T05:54:26Z` 至 `2026-07-14T05:57:28Z` -- trigger wait:7 秒 -- PipelineRun:182 秒 -- 端到端:189 秒 -- TaskRun:181 秒 -- Argo:`Synced/Healthy` -- runtime:`1/1` ready -- 状态:`partial`,保留既有 `runtime-provenance-unknown` 缺口 -- mutation:`false` - -## 验证 - -- `bun --check scripts/src/platform-infra-pipelines-as-code.ts`:通过。 -- `bun scripts/cli.ts check --syntax-only`:11/11 通过。 -- `bun test scripts/src/cicd-pr-merge-auto-delivery-doc-contract.test.ts`:8/8 通过。 -- `quick_validate.py .agents/skills/unidesk-cicd`:通过。 -- `git diff --check`:通过。 -- 受控 scripts typecheck 已安装锁文件声明的 TypeScript 后执行;仓库现有 364 条诊断、94 个路径,本次新模块路径匹配 0 条。 - -## Skill 入口复核 - -已在 `unidesk-cicd/SKILL.md` 高频入口加入 SELFMEDIA 唯一推荐命令,并明确一次调用直接披露 `mergedAt`、trigger wait、PipelineRun/TaskRun、端到端耗时、Argo、runtime health 与 `evidenceGaps`;`partial` 保留已成立字段,入口固定 `mutation=false`。 - -`bun scripts/cli.ts platform-infra pipelines-as-code delivery-timing --target NC01 --consumer selfmedia-nc01` - -吸收最新 master 时保留 checkpoint `7e8b8396` 原生提交语义。由于 master 已并发占用顶层 MDTODO R7,索引将本任务记为“原 MDTODO R7”的 R6.1 completed 条目;本报告身份、issue #2005 与任务上下文仍保持 MDTODO R7。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.1_Task_Report.md deleted file mode 100644 index ab55000c..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.1_Task_Report.md +++ /dev/null @@ -1,31 +0,0 @@ -# R8.1 任务报告 - -## 结论 - -[UniDesk #2447](https://github.com/pikasTech/unidesk/issues/2447) 的节点聚合误报已在源码侧修复。`cicd status --node ` 不再为每个 consumer 并发执行完整 PaC status,而是在目标侧用一个远端进程批量读取 PipelineRun、Argo Application 与 Deployment,再按 owning YAML consumer 投影。单 consumer 深度 status 保持不变,未修改共享 PaC/Tekton/Argo 控制器或运行面。 - -## 根因 - -NC01 配置有 14 个 PaC consumer。旧节点聚合通过 `Promise.all` 同时建立 14 个 `trans`,每个进程重复读取公共 CRD、controller、admission、PipelineRun、Argo、Deployment 与诊断证据,导致 provider transport 出现 `exit 255`,其余读取竞争 25 秒 YAML 预算后返回 `pac-read-timeout`,最终误报 `cicd-node-blocked`。 - -## 修改 - -- 新增独立 native 批量快照脚本,一次远端进程执行三次有界 Kubernetes list,原始大对象只在目标侧临时文件中处理。 -- 扩展既有 PaC evaluator,按 consumer 选择最新 outer PaC PipelineRun、Argo Application 与运行 Deployment。 -- list 失败保留 `pipeline-read-failed`、`argo-read-failed` 或 `runtime-read-failed`,不再推导 `pipeline-missing`。 -- 节点默认 JSON 收敛为有界机器合同,披露 `remoteCaptureCount`、`observation`、`readErrors` 与 consumer 核心状态;完整对象仅由显式 `--raw` 展开。 -- 将节点聚合职责拆入独立 127 行 TypeScript 模块与 60 行 native shell;原 3867 行 PaC 主文件净减少到 3794 行。 - -## 验证 - -- L0:22 项定向测试通过,覆盖 evaluator 正常投影、typed read failure、三次只读 list、节点 text/JSON renderer 与既有 PaC bootstrap 合同。 -- 语法:修改的 TypeScript、CJS、shell 均通过原生语法检查,`git diff --check` 通过。 -- L1 native:旧入口约 28 秒内产生 4 个 `exit 255` 与 6 个 timeout;新入口连续多次仅输出一个 `consumer=*` capture,耗时约 5.6 至 9.4 秒,`remoteCaptureCount=1`、`readErrors=[]`,14 个 consumer 全部得到状态投影。 -- 默认 JSON 未再触发 10 KiB 输出截断,可直接由 `jq` 读取摘要。 -- 真实 NC01 当前 11/14 ready;其余为一个真实 PipelineRun Pending、一个 Argo Degraded、一个尚无权威 PipelineRun,不再包含 transport/read timeout 误报。 - -## 边界 - -- Kubernetes、Tekton、Argo 与 runtime live objects 仍是唯一状态 authority。 -- 未新增缓存、数据库、第二状态源、租约、围栏或交付 mutation。 -- 未执行人工 PipelineRun、mirror、Argo sync、rollout 或 live patch。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.2_Task_Report.md deleted file mode 100644 index a2f6e8c2..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.2_Task_Report.md +++ /dev/null @@ -1,24 +0,0 @@ -# R8.2 任务报告 - -## 目标 - -解决 [UniDesk #2165](https://github.com/pikasTech/unidesk/issues/2165) 的剩余状态可见性问题:默认 `taskrun-status-only` 观察不读取 TaskRun 日志时,不再把预期缺失的 delivery plan 误判为交付故障,并把默认 JSON 收敛到 10 KiB 预算内。 - -## 实现 - -- 仅当 PipelineRun 成功、Argo `Synced/Healthy`、runtime replicas ready 且 collector 为 `taskrun-status-only` 时,将 `pac-gitops-missing` 或 `pac-source-observation-inconsistent` 降级为 `pac-artifact-log-evidence-deferred`。 -- 保持延迟证据为 `blocking=false`,需要同步日志证据时继续使用 id-specific history;不改变显式证据存在时的真实矛盾判定。 -- compact status 只投影 admission provenance、consumer bootstrap 与 source observation 的有界摘要,移除其内部原始 policy、runner、terminal 和 service 列表。 -- 更新共享合同测试,固定错误码 allowlist 和 compact 投影边界。 - -## 验证 - -- L0:`bun test scripts/src/platform-infra-pac-failure-evidence.test.ts scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts`,26 项通过。 -- L0:`bun --check scripts/src/platform-infra-pipelines-as-code.ts`、`node --check scripts/native/cicd/pac-status-evaluator.cjs`、`sh -n scripts/src/platform-infra-pipelines-as-code-remote.sh` 与 `git diff --check` 均通过。 -- L1 text:NC01 的 `agentrun-nc01-v02` 在 9.1 秒返回;PipelineRun `Succeeded`、Argo `Synced/Healthy`、runtime `1/1`,诊断为 `pac-artifact-log-evidence-deferred` 且 `OK=true`。 -- L1 JSON:在 10.3 秒返回合法 JSON,`remoteStage=complete`,默认 stdout 为 8,230 字节,低于 10 KiB 预算。 -- 全程只使用受控只读 status,没有执行 PipelineRun、mirror、Argo、runtime 或其他 CI/CD mutation。 - -## 结论 - -问题位于状态观察和 compact 投影,不是 CI/CD 交付基础设施故障。修复没有新增状态源、缓存 authority、fallback 或交付门禁。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.4_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.4_Task_Report.md deleted file mode 100644 index cec01d19..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8.4_Task_Report.md +++ /dev/null @@ -1,24 +0,0 @@ -# R8.4 任务报告 - -## 结果 - -完成 UniDesk #2510 的 PaC 发布后一次取证入口: - -- 新增 `platform-infra pipelines-as-code delivery-observe --target --consumer --source-commit `。 -- 命令复用一次既有 status target-side capture,固定 `remoteCaptureCount=1`、`mutation=false`,不查询 GitHub、不触发交付、不串联 history/timing/裸 Kubernetes 查询。 -- 一次输出有界 PipelineRun source match、Argo sync/health/首个退化资源或 condition、runtime namespace 全部 workload 的 source commit/ready/digest、首断点和 `complete|partial|blocked`。 -- status evaluator 未放宽;TaskRun 日志延后显式标记 `artifactEvidence.deferred=true`。 -- 期望副本数为 0 的声明式缩容 workload 按 ready 处理。 - -## 验证 - -- `bun test scripts/src/platform-infra-pac-delivery-observe.test.ts scripts/src/platform-infra-pac-failure-evidence.test.ts` -- `bash -n scripts/src/platform-infra-pipelines-as-code-remote.sh` -- `bun scripts/cli.ts check --syntax-only` -- `git diff --check` -- NC01/HWLAB L1 只读 smoke:单次采集约 12.1 秒,当前 source `8b57d87ff721ab7cc815ae09e5f3bd6c5de302aa` PipelineRun exact match,观察到 18 个 exact-source workloads;Argo 为 `Synced/Degraded`,因此结果正确保留为 `partial`,未误报 source commit 缺失。 -- 对已被后续发布替代的旧 source,入口返回 `blocked/pipeline-source-commit-mismatch`,保持 fail-closed。 - -## 工具调用减少 - -同类发布后取证从手工串联 status、history、delivery-timing 和多个对象查询,收敛为一次受控命令;最短路径已固化到 `unidesk-cicd` skill。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8_Task_Report.md deleted file mode 100644 index 186f6179..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R8_Task_Report.md +++ /dev/null @@ -1,103 +0,0 @@ -# R8 任务报告 - -## 任务定位 - -- MDTODO:`R8`。 -- Issue:`pikasTech/unidesk#2165`。 -- PR:`pikasTech/unidesk#2168`。 -- 本轮范围:仅处理主代理 blocker comment `#issuecomment-4978743309`。 -- Target:`NC01`。 -- targetWorkspace:`/root/unidesk/.worktree/2165-pac-status-visible`。 -- ref:`fix/2165-pac-status-visible`。 - -## 根因 - -- 首轮修复已建立稳定的 typed observation,使 PaC `status/history/debug-step` 与 AgentRun `control-plane status` 在 timeout、remote failure、empty response 和 parse failure 时不再以空 stdout 结束。 -- 首轮仍把 PaC 只读 capture 预算 `25000ms` 与 AgentRun status capture 预算 `20000ms` 写成 TypeScript 常量。 -- 这些预算属于可调运维事实;源码常量绕过 owning YAML,无法披露来源路径,也无法在选中对象缺失预算时 fail-closed。 -- `18d0bd89` 已把预算迁入 YAML,但只给默认 `nc01-v02` lane 声明 AgentRun 预算;parser 会校验 `controlPlane.lanes` 的全部对象,因此 `nc01-release` 缺失 `status.readOnlyCapture` 时,`agentrun control-plane status` 在任何目标选择前即失败。 -- AgentRun 默认文本只显示嵌套 PaC timeout,未披露选中 lane 的 budget path;PaC observation 实际返回 `configPath`,其 TypeScript 接口却漏声明该字段。 -- `b82b4ecf` 虽已完成 YAML 预算迁移和原入口复测,但 PaC parser 仍用 `integerInRange(..., 1000, 120000)` 限制 `observability.readOnlyCapture.timeoutMs`。 -- 该 `120000ms` 上限仍是源码中的运维策略,会拒绝 owning YAML 明确声明的更大正整数预算,因此 YAML 尚未成为完整 authority。 - -## 官方最佳实践 - -- 遵循仓库 `AGENTS.md` 与 `docs/reference/yaml-first-ops.md`:owning YAML 是可调运维事实的唯一真相,parser 只做结构与类型校验,代码只消费已验证值。 -- 遵循 `docs/reference/cli.md`:远端 timeout、空响应和解析失败必须形成有界 typed 输出,并保留稳定退出语义与只读 drill-down。 -- 遵循 Issue #2165 的 P0 SPEC:Kubernetes、Tekton、Argo 和既有 runtime 聚合器继续作为状态 authority;预算配置不新增状态源、缓存 authority 或交付 mutation。 - -## Current Control Flow - -1. CLI 读取 PaC 或 AgentRun YAML。 -2. parser 解析目标、consumer 或全部 lane。 -3. `18d0bd89` 后 capture 已使用 YAML timeout,但 AgentRun 只有一个 lane 声明预算,导致 parser 在发起只读 capture 前失败。 -4. PaC text/JSON 已披露 timeout 与 config path;AgentRun JSON 有 `readCaptureBudget`,默认文本未披露该字段。 -5. 嵌套 PaC 与 runtime capture 串行执行;当前有效预算为 `25000ms + 20000ms`,需要用原入口实测其是否与外层 `trans` 60 秒短连接竞争。 - -## Desired Control Flow - -1. PaC parser 必填读取 `config/platform-infra/pipelines-as-code.yaml#observability.readOnlyCapture.timeoutMs`。 -2. AgentRun 每个 owning lane 都必须声明 `config/agentrun.yaml#controlPlane.lanes..status.readOnlyCapture.timeoutMs`,parser 对全部 lane 必填校验且不补默认值。 -3. parser 只校验预算字段结构和正整数类型,将预算值与精确 config path 放入 typed spec,不提供源码默认值或上限。 -4. capture 只使用已验证的 YAML 预算。 -5. PaC text/JSON observation 与 AgentRun status text/JSON 摘要同时披露 config path 和实际 timeout。 -6. 缺失字段时 parser 在发起远端读取前失败,并指出缺失 YAML 路径。 -7. status JSON 显式声明 `mutation: false`;失败保持非空 typed 结果,不触发 PipelineRun、Argo、mirror 或 runtime 写操作。 - -## 修改 - -- `config/platform-infra/pipelines-as-code.yaml` - - 新增 `observability.readOnlyCapture.timeoutMs: 25000`。 -- `scripts/src/platform-infra-pipelines-as-code.ts` - - 删除 `pacReadOnlyCaptureTimeoutMs` 源码常量。 - - parser 必填校验预算并记录精确 config path。 - - `status/history/debug-step` capture 使用 YAML 预算。 - - typed observation 与默认 text 输出披露预算路径和实际数值。 -- `config/agentrun.yaml` - - 在 `controlPlane.lanes.nc01-v02.status.readOnlyCapture.timeoutMs` 与 `controlPlane.lanes.nc01-release.status.readOnlyCapture.timeoutMs` 分别声明 `20000`,保证所有 owning lane 通过必填 parser。 -- `scripts/src/agentrun-lanes.ts` - - lane parser 必填解析 status capture 预算与精确 config path。 -- `scripts/src/agentrun/control-plane.ts` - - 删除 `agentRunStatusCaptureTimeoutMs` 源码常量。 - - source、runtime 和 git-mirror 只读 capture 使用选中 lane 的 YAML 预算。 - - status 结果披露 `readCaptureBudget`。 - - status 结果显式披露 `mutation: false`。 -- `scripts/src/agentrun/public-exposure.ts` - - 默认文本新增 `AGENTRUN READ CAPTURE BUDGET`,披露选中 lane 的实际 timeout 与 config path。 - - 嵌套 `PAC READ OBSERVATION` 同时披露 PaC budget config path。 -- `scripts/src/platform-infra-pipelines-as-code.ts` - - 补齐 `PacReadOnlyCaptureObservation.configPath` 类型声明,使 typed JSON 与 TypeScript 合同一致。 - - 删除 `observability.readOnlyCapture.timeoutMs` 的 `120000ms` 代码上限,只保留 owning YAML 字段的正整数与结构校验。 - -## 验证证据 - -- 定向 Bun 测试:`7 pass / 0 fail`,覆盖 PaC typed observation 与 AgentRun text 两层 YAML budget path。 -- `bun --check` 覆盖修改的 parser、PaC、AgentRun control-plane、renderer 与 capture helper。 -- PaC status JSON:约 `28s` 返回 `status=timeout`、`timeoutMs=25000`、PaC config path、`mutation=false`,exit `1`,stdout 非空。 -- PaC history text:约 `29s` 返回 `pac-read-timeout`、PaC config path 与只读 Next,exit `1`,stdout 非空。 -- PaC debug-step text:约 `3s` 成功,`34/34` fixtures,通过同一 YAML budget path,exit `0`。 -- AgentRun status text:内部 PaC `25609ms`、runtime `20150ms`、total `45759ms`;外层 `trans` 总耗时约 `47.273s`,在 60 秒短连接预算内稳定返回,披露 PaC `25000ms` 与 lane `20000ms` 两层 config path,exit `1`,stdout 非空。 -- AgentRun `--raw` JSON:约 `45.242s` 返回;完整 JSON 的 `readCaptureBudget` 与 `summary.pac.readObservation` 分别披露 AgentRun/PaC config path,且 status 结果声明 `mutation=false`。 -- `git diff --check` 验证补丁格式。 -- 不落盘 parser 探针确认 `120001ms` 被接受,`0` 仍以 `must be positive` 拒绝,证明预算上限完全由 owning YAML 决定。 -- 复核 PaC `status/history/debug-step` typed observation 与 AgentRun control-plane/RunnerJob 观察路径:timeout、remote failure、empty response、parse failure 和对象缺失均保留有界摘要、elapsed/first break、只读 Next 或对象存在性证据,结果继续声明 `mutation=false`。 -- 所有目标源码、Git、验证和原入口观察均通过 `trans NC01:/root/unidesk/.worktree/2165-pac-status-visible ...` 执行。 - -## 取消与超时结论 - -- 上次任务取消不能归因于当前 CLI 嵌套预算:修正 YAML 完整性后,最慢 AgentRun 原入口内部总耗时约 `45.759s`,外层 `trans` 约 `47.273s`,未触发 60 秒短连接 timeout。 -- 当前链路确实串行消费 PaC `25000ms` 与 runtime `20000ms`,但仍保留约 14 秒外层余量;本轮没有证据支持新增 job、锁、租约、第二状态库或额外 authority。 -- 取消更符合 Artificer/session 外部终止,而不是 CLI 预算嵌套 first break;本报告只记录可复现证据,不猜测未观测的调度原因。 - -## 权限与变更边界 - -- 保留现有 typed observation、即时 progress、只读 Next 和非 mutation 行为。 -- 未增加 env、ConfigMap、数据库、缓存或第二状态源 authority。 -- 未增加合同、租约、安全围栏或锁。 -- 未执行 Vitest、PK01 操作、人工 PipelineRun、Argo、mirror 或其他交付 mutation。 -- 不自行合并 PR;管理性结论由主代理审核。 - -## 剩余边界 - -- Issue #2167 不属于 R8 当前 blocker 修复范围,本轮不扩展其 authority、实现或验收。 -- PR 合并与后续交付由主代理审核后决定。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1.1_Task_Report.md deleted file mode 100644 index 7aecf0fc..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1.1_Task_Report.md +++ /dev/null @@ -1,59 +0,0 @@ -# R9.1.1 任务报告 - -## 交付结果 - -- MDTODO:R9.1.1。 -- GitHub issue:#2197。 -- 关联 PR:#2192。 -- 分支:`feat/2181-nc01-shared-public-edge`。 -- 非破坏性合并最新 `origin/master`,吸收 `proxy.hwpod.com` 现网配置。 - -## YAML authority - -- `config/platform-infra/public-edge.yaml` 唯一拥有共享 TCP listener、Caddy runtime、 - 站点聚合顺序、`excludedRoutes: [PK01]` 与 `preservedUdpPorts: [443]`。 -- NC01 仅作为 `targets.NC01` 值,不进入可复用文件名、parser 或 renderer 命名。 -- `config/platform-infra/vpn-subscription.yaml` 独立拥有: - - `proxy.hwpod.com`; - - `https://127.0.0.1:8443`; - - `upstreamTlsServerName: 152-53-229-148.nip.io`; - - `/subscribe`; - - DNS expected A。 - -## 实现 - -- resolver 支持 `host:port`、`http://host:port` 与 `https://host:port` upstream。 -- 可选 TLS SNI 仅允许 HTTPS upstream,并渲染为 Caddy `tls_server_name`。 -- parser 拒绝 target route 命中排除项,拒绝 `h3` 抢占保留 UDP 443。 -- plan、dry-run 与 status 将未合并消费者投影为 `blocking=false` warning, - 保持顶层只读结果成功。 -- `apply --confirm` 在引用不完整时保持 `mutation=false` 并拒绝执行。 -- status 与 apply 前置检查显示并验证 TCP listener、UDP listener 与 PK01 隔离摘要。 -- `platform-infra public-edge --help` 使用专属 scoped help。 -- 删除本轮新增合同 smoke 脚本,保留既有 CLI 轻量验证。 - -## 执行边界 - -- primary workspace 仅用于读取 resource bundle 与 skill。 -- 目标源码、Git、编辑和验证均通过 - `NC01:/root/unidesk/.worktree/2181-nc01-shared-public-edge` 执行。 -- 未执行真实 apply、部署、Caddy reload、PipelineRun、GitOps、Argo 或 PK01 mutation。 -- 未修改 R9.2-R9.5 产品消费者值。 - -## 验证 - -- `bun --check scripts/src/platform-infra-public-edge.ts`:通过。 -- `bun scripts/cli.ts check --syntax-only`:通过,11 项全部成功。 -- `bun scripts/cli.ts platform-infra public-edge --help`:专属 scoped help 通过。 -- `bun scripts/cli.ts platform-infra public-edge plan --target NC01`: - - `complete=true`; - - `unresolved=[]`; - - PikaOA、VPN subscription、HWLAB v03/production、UniDesk、WebTerm 七站全部解析。 -- `bun scripts/cli.ts platform-infra public-edge status --target NC01`: - - 七站全部解析,`unresolved=[]`; - - TCP `80/443`、UDP `443` 与 DNS 检查通过; - - 因禁止真实 apply,当前 Caddy 尚未安装全部新消费者,site probe 返回非零, - 顶层 `ok=false`、`mutation=false`,未改运行面。 -- `bun scripts/cli.ts platform-infra public-edge apply --target NC01 --dry-run`: - `complete=true`、`unresolved=[]`、`mutation=false`。 -- `git diff --check`:通过。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1_Task_Report.md deleted file mode 100644 index 7fe5956c..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.1_Task_Report.md +++ /dev/null @@ -1,122 +0,0 @@ -# R9.1 任务报告 - -## 交付结果 - -- MDTODO:R9.1。 -- GitHub issue:#2181。 -- PR:#2192,`https://github.com/pikasTech/unidesk/pull/2192`。 -- 实现提交:`9512d3d3`。 -- 审查返工提交:`fca153a4`。 -- 冲突收敛基线:`origin/master@7bc48791`。 -- 分支:`feat/2181-nc01-shared-public-edge`。 - -## YAML authority - -- 新增 `config/platform-infra/public-edge.yaml`: - - 唯一拥有 NC01 TCP `80/443` listener; - - 唯一拥有 Caddy image、container、workDir、Compose、Caddyfile、data/config; - - 唯一拥有七站点聚合顺序; - - 每个 site 只声明产品 `configRef/path`。 -- 新增 `config/platform-infra/vpn-subscription.yaml`: - - 独立拥有 `proxy.hwpod.com`; - - 独立拥有 `https://127.0.0.1:8443`、TLS SNI、`/subscribe` 与 DNS expected A。 -- PikaOA 产品事实继续由 `config/pikaoa.yaml` 拥有: - - test:`oa-dev.hwpod.com -> 127.0.0.1:32080`; - - production:`oa.hwpod.com -> 127.0.0.1:32096`。 - -## 实现 - -- 新增公共 `scripts/src/platform-infra-public-edge.ts`: - - 通用 `configRef/path` resolver,支持对象路径与数组 `id` selector; - - 直接消费 canonical `hostname`、`upstream`、`healthPath`、`dns.expectedA`; - - 仅在产品现有 schema 明确提供 `publicBaseUrl` 时校验 HTTPS 与 hostname 一致性; - - PikaOA 继续消费其既有 `publicBaseUrl`、`hostIP/port`、probe schema,不产生默认值或第二 authority; - - 校验 hostname 唯一、upstream、probe path、`expectedA`; - - 支持 bare、HTTP、HTTPS upstream 与可选 TLS SNI,TLS SNI 仅允许 HTTPS upstream; - - 拒绝 target route 命中 `excludedRoutes`,拒绝 `h3` 抢占保留 UDP 端口; - - 渲染多个独立 Caddy site block; - - `plan|apply|status` 薄入口; - - apply 每次重新读取 YAML 与运行面; - - Caddyfile 与 Compose 都先写入正式文件同目录的唯一候选文件; - - Compose `config` 与 Caddy `adapt --validate`、`validate` 全部通过后,才以 `rename` 原子安装; - - install、reload、probe、rollback 分阶段输出 typed evidence; - - reload 或任一站点 probe 失败时,以同目录候选恢复旧 Caddyfile/Compose,并 reload 旧配置; - - 旧配置复制、恢复或 reload 失败时,`ok=false`、`mutation=false`,不伪报成功。 -- 删除本轮新增的 `scripts/platform-infra-public-edge-smoke.ts`,按最新规则只使用既有 CLI 轻量 smoke。 -- 复用现有 `pikaoa-edge`: - - container:`pikaoa-edge`; - - workDir:`/opt/unidesk/pikaoa-edge`; - - data:`/var/lib/unidesk/pikaoa-edge/caddy-data`; - - config:`/var/lib/unidesk/pikaoa-edge/caddy-config`。 - -## 删除的 legacy authority - -- 删除 `config/pikaoa.yaml#publicEdge`。 -- 删除 `scripts/src/pikaoa-public-edge.ts`。 -- 删除 `pikaoa public-edge` CLI 路由。 -- 删除 PikaOA delivery 对旧 `config/pikaoa.yaml#publicEdge` 的引用。 -- 本任务未修改 PK01,也未新增第二 Caddy、FRP、fallback 或状态库。 - -## 验证 - -- `git diff --check`:通过。 -- TypeScript 模块 import:通过。 -- `bun --check scripts/src/platform-infra-public-edge.ts`:通过。 -- `bun scripts/cli.ts check --syntax-only`:通过。 -- `plan --target NC01`: - - 正确解析 PikaOA development/production 与 VPN subscription; - - 以 `blocking=false` warning 精确披露四个尚未迁移消费者; - - 显示 TCP/UDP 与 PK01 隔离摘要。 -- `apply --target NC01 --dry-run`:`mutation=false`。 -- 吸收 #2188/#2189 与最新 HWLAB owning YAML 后,最终 plan/dry-run 同时解析 - PikaOA、VPN subscription、HWLAB v03/production、UniDesk、WebTerm 七站, - `complete=true`、`unresolved=[]`。 -- `apply --target NC01 --confirm`:四个引用未迁移时 fail-closed,未执行 mutation。 -- 公共 renderer 生成的两站 Caddyfile: - - Caddy `adapt --validate` 通过; - - Caddy `validate` 通过。 -- `status --target NC01` 只读运行面证据: - - `pikaoa-edge` running; - - TCP `80/443` listener 正常; - - UDP `443` listener 正常; - - 当前 Caddy validate 通过; - - PikaOA 两站 DNS 与 site probe 通过。 -- 原入口基线: - - `https://oa-dev.hwpod.com/healthz` 返回 `200`; - - `https://oa.hwpod.com/healthz` 返回 `200`。 - -## 最新 master 冲突收敛 - -- 确认 Target worktree clean 且分支与远端 head `cda4d122` 一致后,fetch - `origin/master@7bc48791` 并执行普通非破坏性 merge。 -- 冲突逐块按语义处理: - - 保留 master 已完成的 R8 状态与同期 PikaOA、PaC、AgentRun、SelfMedia 变更; - - 保留 PikaOA development/production 的现有域名、NodePort、`/healthz` 与 - `expectedA`; - - 删除已由共享 public-edge 替代的 `config/pikaoa.yaml#publicEdge` 与 - `scripts/src/pikaoa-public-edge.ts`; - - 保持 `config/platform-infra/public-edge.yaml` 通过 `configRef/path` - 解析 PikaOA 两站,不复制 hostname 或 upstream。 -- merge 后重新验证: - - `git diff --check` 通过; - - TypeScript 模块 import 通过; - - public-edge smoke 五个场景通过; - - plan 以 `mutation=false` 精确解析 PikaOA 两个唯一站点,并列出四个待迁移引用。 -- 未执行 Vitest、PK01、人工 CI/CD、runtime apply,也未修改 R9.2-R9.5 或取消 - sibling task。 - -## 审查返工执行边界 - -- primary workspace 仅用于读取 AgentRun resource bundle、skill 与执行规范,未作为源码或验收 authority。 -- 源码读取、Git、编辑、smoke、CLI plan 与 `git diff --check` 全部通过 Target route - `NC01:/root/unidesk/.worktree/2181-nc01-shared-public-edge` 执行。 -- 本轮遵循审查约束,未执行真实 `apply`、PK01、人工 PipelineRun、Argo 或 sibling task 操作。 -- R9.3 PR #2188 与 R9.4 PR #2189 仅用于只读核对产品 owning YAML 形状。 - -## 后续消费者边界 - -- R9.2:补齐 HWLAB `nc01-v03` 与 `nc01-production` 的 `publicExposure` owning 对象。 -- R9.3:将 `config/frontend.yaml#publicExposure` 迁移到 `unidesk.hwpod.com -> 32676`。 -- R9.4:将 `targets[id=local-7683].publicExposure` 迁移到 `term.hwpod.com -> 127.0.0.1:7683`。 -- 在四个消费者全部迁移前,shared edge apply 保持 fail-closed;不得用隐藏默认值补齐。 -- R9.5 负责六站点完整自动交付与公网原入口回归。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.2_Task_Report.md deleted file mode 100644 index 152042c6..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.2_Task_Report.md +++ /dev/null @@ -1,70 +0,0 @@ -# R9.2 任务报告 - -## 任务定位 - -- MDTODO:`R9.2`。 -- GitHub issue:`pikasTech/unidesk#2181`。 -- Pull request:`pikasTech/unidesk#2101`。 -- Target:`NC01`。 -- targetWorkspace:`/root/unidesk/.worktree/2010-hwlab-release-production-lane`。 -- repository/ref:`pikasTech/unidesk` / `feat/2010-hwlab-release-production-lane`。 - -## 本轮结果 - -- 保留 R7.2 已冻结的 release source identity、独立 PaC/Tekton/GitOps/Argo、namespace、PostgreSQL database/role/Secret/migration ledger 与 Kafka client/group 隔离。 -- 将 HWLAB 产品公网事实收敛到 `config/hwlab-node-control-plane.yaml#publicExposures.NC01`: - - development `v03`:`https://lab-dev.hwpod.com`,upstream `http://127.0.0.1:32009`,NodePort `32009`; - - release `production`:`https://lab.hwpod.com`,upstream `http://127.0.0.1:32010`,NodePort `32010`。 -- 新增通用 `node-port-shared-edge` parser 与 renderer 投影: - - 校验 HTTPS public origin、hostname、expectedA、HTTP upstream、healthPath 与 Service nodePort; - - 继续由共享 renderer 生成 `node-public-service.yaml` 并加入 kustomization; - - development 与 production 使用同一 renderer,不新增 lane-specific helper。 -- 删除 lane YAML 中旧裸 IP、PK01 Caddy/FRP、`hwlab.pikapython.com` 与 FRP template authority。 -- 更新 `docs/reference/hwlab.md`,长期入口只认产品 exposure 与共享 edge `configRef/path`,删除 PK01/FRP 排障口径。 -- 更新 R7.2 报告,保留 production lane 隔离事实并记录 R9.2 公网 authority 迁移。 - -## 共享 edge 依赖 - -- R9.1 的共享 `public-edge` schema、CLI 与 owning YAML 尚未在当前 master 合并。 -- 本 PR 只冻结产品 exposure 路径: - - `config/hwlab-node-control-plane.yaml#publicExposures.NC01.v03`; - - `config/hwlab-node-control-plane.yaml#publicExposures.NC01.production`。 -- R9.1 合并时必须由共享 edge 站点条目通过 `configRef/path` 消费上述对象,不得复制 hostname、upstream 或 healthPath。 -- 本轮未增加 fallback、默认值、第二 Caddy、第二 authority 或运行面 patch。 - -## Target 原入口证据 - -以下命令均在 `NC01:/root/unidesk/.worktree/2010-hwlab-release-production-lane` 执行: - -- `git diff --check`:通过。 -- `bun --check`: - - `scripts/src/hwlab-node-lanes.ts`:通过; - - `scripts/src/hwlab-node/public-exposure.ts`:通过; - - `scripts/src/hwlab-node/render.ts`:通过; - - `scripts/src/hwlab-node/web-probe.ts`:通过。 -- `hwlab nodes control-plane plan`: - - `NC01/v03`:`status=ok`、namespace=`hwlab-v03`、publicExposure=true; - - `NC01/production`:`status=ok`、namespace=`hwlab-production`、publicExposure=true。 -- `hwlab nodes control-plane public-exposure`: - - v03 投影 `lab-dev.hwpod.com`、`127.0.0.1:32009`、NodePort `32009`; - - production 投影 `lab.hwpod.com`、`127.0.0.1:32010`、NodePort `32010`; - - 两条命令均为 `mutation=false`,configPath 指向 control-plane product exposure。 -- `platform-infra pipelines-as-code plan`: - - development consumer `hwlab-nc01-v03` 通过; - - production consumer `hwlab-nc01-production` 通过; - - production Repository identity、Pipeline 与 Argo Application 保持独立。 -- 定向静态断言:两个 mode、两个 NodePort 各唯一声明;产品 owning YAML 不再包含旧裸 IP、旧 hostname 或 `publicExposurePk01`;共享 renderer 仍生成 `node-public-service.yaml`。 - -## 验证边界 - -- 未修改 PK01。 -- 未运行 Vitest、裸 `tsc`、浏览器、web-probe 或重型构建。 -- 未创建 HWLAB `release` branch。 -- 未人工执行 PipelineRun、mirror sync、Gitea push、Argo sync、runtime patch、Caddy reload 或共享 edge apply。 -- 当前证据仅证明 YAML/parser/renderer/自动链配置准备完成,不声明公网域名已上线。 - -## Primary Workspace 边界 - -- primary workspace 仅用于读取 runtime-managed skills、发出 `trans` 命令和维护计划。 -- 目标源码读取、Git、编辑、验证与 GitHub 写入均通过 Target route 执行。 -- 未把 runner 容器本地结果作为 Target 原入口证据。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3.1_Task_Report.md deleted file mode 100644 index 52ede132..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3.1_Task_Report.md +++ /dev/null @@ -1,32 +0,0 @@ -# R9.3.1 任务报告 - -## 任务上下文 - -- MDTODO:R9.3.1。 -- GitHub issue:[#2195](https://github.com/pikasTech/unidesk/issues/2195)。 -- 关联 PR:[#2188](https://github.com/pikasTech/unidesk/pull/2188)。 -- Target:NC01。 -- targetWorkspace:`/root/unidesk/.worktree/2181-unidesk-public-site`。 -- 分支:`feat/2181-unidesk-public-site`。 - -## 完成内容 - -- 在 `config/frontend.yaml#publicExposure` 增加 `expectedA: 152.53.229.148`。 -- 保持 DNS 期望地址由 UniDesk owning YAML 唯一声明。 -- 未修改 shared public edge renderer、默认值、域名特例或其他消费者配置。 -- 未部署、未执行真实 apply、未修改 PK01 或 Caddy 运行面。 - -## 验证 - -- YAML 解析确认 `publicExposure` 同时包含 `hostname`、`expectedA`、`upstream` 与 `healthPath`。 -- `git diff --check` 通过。 -- 配置提交:`88fc1996cf47a3736fe200185391fc4785a4e536`。 -- 在该提交上临时以 `--no-commit` 合并 `origin/feat/2181-nc01-shared-public-edge` 后,执行 `bun scripts/cli.ts platform-infra public-edge plan --target NC01`。 -- plan 的 resolved `sites` 包含 `unidesk`,读取 `config/frontend.yaml#publicExposure` 并得到 `expectedA: 152.53.229.148`。 -- `unidesk` 不再出现在 unresolved;其余 unresolved 为尚未合并的 HWLAB 与 WebTerm 消费者。 -- 集成实验结束后执行 `git merge --abort`,目标分支仅保留本 issue 授权修改。 - -## 风险与后续 - -- R9.1 resolver 仍位于并行 PR #2192,因此当前 PR 分支单独运行 `public-edge plan` 不具备该子命令实现。 -- 完整公网入口与旧域名退役验收仍由 R9.1/R9.5 的正常自动交付链完成。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3_Task_Report.md deleted file mode 100644 index 1261d506..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.3_Task_Report.md +++ /dev/null @@ -1,53 +0,0 @@ -# R9.3 任务报告 - -## 任务上下文 - -- MDTODO:R9.3。 -- GitHub issue:UniDesk #2181。 -- Target:NC01。 -- targetWorkspace:`/root/unidesk/.worktree/2181-unidesk-public-site`。 -- 分支:`feat/2181-unidesk-public-site`。 - -## 完成内容 - -- 将 `config/frontend.yaml#publicExposure` 收敛为 UniDesk frontend 的唯一产品侧公网声明: - - `hostname: unidesk.hwpod.com`; - - `expectedA: 152.53.229.148`; - - `upstream: 127.0.0.1:32676`; - - `healthPath: /health`。 -- 将 UniDesk frontend 内的 HWLAB 应用链接迁移为 `https://lab.hwpod.com`。 -- 删除旧 `unidesk.pikapython.com` 的 DNS、PK01 Caddy 与旧 upstream owning 字段。 -- 删除会直接写 PK01 Caddy 的 `frontend public-exposure plan|apply|status|validate` 入口及实现,避免形成共享 public edge 之外的第二 authority。 -- 未修改 PK01 运行面,也未修改 HWLAB、WebTerm、PikaOA owning 配置。 - -## 验证 - -全部验证均通过 Target route 在目标 worktree 执行: - -- 使用仓库锁文件安装已声明但缺失的 `yaml` 依赖。 -- YAML 结构检查确认 `config/frontend.yaml#publicExposure` 包含目标 hostname、DNS 期望地址、NodePort upstream 与 health path。 -- `bun scripts/cli.ts frontend auth plan` 成功,证明 frontend CLI 路由仍可加载,且默认入口已回到 `auth`。 -- 检索确认旧 `frontend public-exposure` 路由与实现引用已不存在。 -- 检索确认 `config/frontend.yaml`、frontend CLI 与长期 reference 中不再保留 `unidesk.pikapython.com` authority。 -- `git diff --check` 通过。 -- 按任务边界未运行 Vitest、重型构建、人工 PipelineRun、mirror、GitOps、Argo 或 runtime patch。 - -## R9.3.1 补充验证 - -- 关联 issue:[#2195](https://github.com/pikasTech/unidesk/issues/2195)。 -- 配置提交:`88fc1996cf47a3736fe200185391fc4785a4e536`。 -- 在当前提交上临时以 `--no-commit` 合并 `origin/feat/2181-nc01-shared-public-edge`,执行 `bun scripts/cli.ts platform-infra public-edge plan --target NC01`,随后使用 `git merge --abort` 撤销集成实验。 -- plan 的 resolved `sites` 包含 `unidesk`,并读取: - - `configRef: config/frontend.yaml`; - - `path: publicExposure`; - - `hostname: unidesk.hwpod.com`; - - `upstream: 127.0.0.1:32676`; - - `healthPath: /health`; - - `expectedA: 152.53.229.148`。 -- `unresolved` 仅剩尚未合并的 `hwlab-development`、`hwlab-production` 与 `webterm` 消费者;`unidesk` 不再出现于 unresolved。 - -## 集成依赖 - -- R9.1 的共享 `public-edge` schema、renderer 与受控 CLI 仍位于并行 PR #2192,尚未进入本任务 ref。 -- 本任务严格采用 #2181 冻结的 `config/frontend.yaml#publicExposure` 产品侧接口,不增加 fallback、默认值或第二 authority。 -- 合并后仍需由 R9.1/R9.5 的正常 PR 自动链读取该声明、生成共享 Caddy site,并完成 `https://unidesk.hwpod.com` 公网原入口验收与旧域名退役状态复核。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4.1_Task_Report.md deleted file mode 100644 index 495d0330..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4.1_Task_Report.md +++ /dev/null @@ -1,20 +0,0 @@ -# R9.4.1 任务报告 - -## 结果 - -- 已修复 [#2196](https://github.com/pikasTech/unidesk/issues/2196) 指出的 YAML-first 偏差,并继续在 [PR #2189](https://github.com/pikasTech/unidesk/pull/2189) 交付。 -- legacy target parser 不再补写 `healthPath=/healthz` 与 `websocket=true`;两项兼容字段使用 `null` 表示 owning YAML 未声明。 -- shared public edge target 仍强制从 YAML 读取 `healthPath` 与 `websocket`,因此 `local-7683` 的 `/healthz` 与 `true` 继续由唯一配置真相提供。 -- 未修改 `local-7681`、`local-7682` 的 PK01 结构和值,未修改 R9.1 renderer,也未让 WebTerm CLI 写共享 Caddy。 - -## 验证 - -- `bun scripts/cli.ts platform-infra webterm plan --target local-7683 --full`:通过,显示 `healthPath=/healthz`、`websocket=true`、`management=shared-public-edge` 与 `pk01Route=null`。 -- `bun scripts/cli.ts platform-infra webterm plan --target local-7681`:通过,保持既有 PK01 计划行为。 -- `bun scripts/cli.ts platform-infra webterm plan --target local-7681 --full`:通过,显示 `healthPath=null`、`websocket=null`,证明 parser 未制造新默认事实。 -- `git diff --check`:通过。 - -## 边界 - -- 未执行真实 `apply`、部署、PK01/Caddy mutation、PipelineRun、GitOps 或 Argo 操作。 -- Target 原入口为 `NC01:/root/unidesk/.worktree/2181-webterm-public-site`;runner primary workspace 仅用于加载受控工具与 skill。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4_Task_Report.md deleted file mode 100644 index f7db1299..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.4_Task_Report.md +++ /dev/null @@ -1,34 +0,0 @@ -# R9.4 任务报告 - -## 结果 - -- WebTerm `local-7683` 的 owning YAML 已将唯一公网 hostname 迁移为 `term.hwpod.com`。 -- 共享边缘读取路径固定为 `config/platform-infra/webterm.yaml#targets[id=local-7683].publicExposure`。 -- 上游唯一声明为 `127.0.0.1:7683`,健康路径为 `/healthz`,并显式保留 `websocket: true`。 -- `local-7683` 已删除 `term.pikapython.com`、外部 upstream 与 PK01 Caddy 归属;未修改 PK01,也未改动 `local-7681`、`local-7682` 或 speed-test 端口。 - -## CLI 收敛 - -- WebTerm 配置解析兼容现有未迁移 target,并识别 `local-7683` 为 `shared-public-edge` 管理。 -- `apply` 不再为 shared-edge target 写入 PK01 Caddy;`plan` 显式披露 shared-edge、hostname、upstream、healthPath、WebSocket 与空 PK01 marker。 -- 轻量 policy 校验 shared-edge upstream 必须为本机对应 runtime 端口,并要求 WebSocket 语义保持启用。 - -## 验证 - -- `bun scripts/cli.ts platform-infra webterm plan --target local-7683 --full`:通过,输出 `term.hwpod.com`、`127.0.0.1:7683`、`websocket=true`、`management=shared-public-edge`、`pk01Route=null`。 -- `bun scripts/cli.ts platform-infra webterm plan --target local-7681`:通过,证明未迁移 target 的既有配置仍可读取。 -- `Bun.YAML.parse(config/platform-infra/webterm.yaml)` 定点断言:通过,`local-7683` 不含 `pk01`。 -- `git diff --check`:通过。 -- 按任务边界未执行 Vitest、重型构建、人工 PipelineRun、GitOps/Argo mutation、runtime patch 或 PK01 操作。 - -## 集成依赖 - -- R9.1 仍需实现 NC01 shared `public-edge` schema/renderer,并按冻结的 `configRef` 与 path 读取本 YAML;该 renderer 必须直接消费 hostname、upstream、healthPath 与 websocket,禁止复制这些值或增加 fallback/default/第二 authority。 -- 本子项未实现共享 renderer;公网证书、路由和 WebSocket 原入口验收归 R9.1/R9.5 的正常 PR 自动链集成与回归范围。 - -## R9.4.1 补充修正 - -- 已删除 legacy target parser 对 `healthPath=/healthz`、`websocket=true` 的隐藏默认;未迁移 target 的兼容字段现在为 `null`,不再制造 owning YAML 未声明的配置事实。 -- `local-7683` 仍从 shared public edge YAML 形状强制读取 `healthPath` 与 `websocket`,缺失时解析失败,不引入 fallback。 -- `local-7681`、`local-7682` 的 PK01 配置结构和值均未修改;WebTerm CLI 仍不写共享 Caddy。 -- 定向验证通过:`local-7683 --full` 显示 `/healthz`、`websocket=true` 与 `management=shared-public-edge`;`local-7681` 计划保持通过,且 full 输出的两项兼容字段为 `null`。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.5.1.1_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.5.1.1_Task_Report.md deleted file mode 100644 index 3ebe3c66..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.5.1.1_Task_Report.md +++ /dev/null @@ -1,150 +0,0 @@ -# R9.5.1.1 任务报告 - -## 任务定位 - -- MDTODO:`R9.5.1.1`。 -- Issue:UniDesk `#2205`。 -- Target:`NC01`。 -- targetWorkspace: - `/root/unidesk/.worktree/2205-public-edge-single-authority`。 -- 分支:`fix/2205-public-edge-single-authority`。 -- 最新基线:`origin/master` 的 `76511eabfb291c95a03d3aa150fa51ab404fa6f9`。 -- 主要实现 commit:`1b423f2b9b178fc89dc6eef17b717c3294ea0c4b`。 -- Pull Request:UniDesk `#2213`。 -- 当前状态:`completed`;主代理复审已通过,Secret bootstrap 已受控完成, - 等待正常 PR merge 自动交付。 -- 子代理交付边界:只创建 PR,不合并;主代理按受控路径完成 Secret sync 与 - guarded merge。 -- 禁止人工 PipelineRun、Argo sync 或运行面终态 apply。 - -## 实现结果 - -- `config/platform-infra/public-edge.yaml` 继续作为 shared public-edge 唯一真相: - - 新增现有 `platform-infra-gitea-nc01` PaC 的自动触发归属; - - 声明 source commit 环境变量、受控 trans SecretRef、NC01 host cwd; - - 声明 commit archive 根目录、archive 内 helper 与 source path 集合; - - 未复制 hostname、upstream、Caddyfile 或 Compose 渲染逻辑。 -- `config/secrets-distribution.yaml` 新增 `public-edge-delivery-nc01` scope: - - sourceRef 为 `unidesk-host-k8s.env`; - - sourceKey 与 targetKey 均为 `UNIDESK_SSH_CLIENT_TOKEN`; - - 目标是 `devops-infra/public-edge-trans`; - - 仅披露 presence、key、fingerprint 与摘要,不披露 Secret 值。 -- `.tekton/platform-infra-gitea-nc01-pac.yaml` 在现有 immutable checkout 后新增步骤: - - 再次校验 checkout `HEAD` 等于 `SOURCE_COMMIT`; - - 通过 Kubernetes SecretRef 注入受控 trans token; - - 调用 checkout 内版本化 archive delivery helper; - - 未增加 PipelineRun、Argo Hook、Job、hostPath、Docker socket 或特权 Pod。 -- `scripts/native/cicd/deliver-platform-infra-public-edge.mjs`: - - 读取 owning YAML 与 secrets-distribution 引用图; - - 校验 source checkout、source commit、sourceRef、sourceKey 与 targetKey; - - 只从该 commit 生成 `config`、`scripts`、`package.json`、`bun.lock` archive; - - 计算 SHA-256,并由 checkout 内 `scripts/trans` 上传和执行; - - 仅在 host-local apply 返回 `mutation=true` 后报告成功。 -- `scripts/native/cicd/apply-platform-infra-public-edge-archive.mjs`: - - 校验 archive source commit marker; - - 从 archive checkout 调用既有 - `platform-infra public-edge apply --target NC01 --confirm`; - - 不包含 Caddyfile 生成、安装、reload、探测或 rollback 的第二实现。 - -## 单一控制链证明 - -终态链固定为: - -1. GitHub `master` merge; -2. 现有 `platform-infra-gitea-nc01` PaC immutable checkout; -3. `config/platform-infra/public-edge.yaml` 的 delivery 与 SecretRef 声明; -4. `config/secrets-distribution.yaml` 的 sourceRef/targetKey 投影; -5. checkout 内版本化 `scripts/trans`; -6. NC01 host-local commit archive helper; -7. 同 archive 的既有 `platform-infra public-edge apply`; -8. 候选校验与原子安装后,通过同一 Compose 强制重建唯一 - `pikaoa-edge`; -9. 只有安装或唯一 edge 重建失败时恢复旧文件并再次重建,站点探测失败 - 仅输出 `blocking=false` warning。 - -不存在以下第二路径: - -- Argo `PostSync`、`Sync` Hook 或 Kubernetes Job; -- hostPath、Caddy Admin API 直写或直接修改 Caddyfile; -- 第二 renderer、第二 apply、第二 Caddy、fallback listener; -- Docker socket、Docker daemon API、`docker exec` 或特权 Pod; -- PK01 变更或人工终态交付。 - -## 审核局部返工 - -- 删除安装新 Caddyfile 后的 `docker exec ... caddy reload`: - - 单文件 bind mount 经原子 `mv` 后,旧容器仍引用旧 inode; - - 改为 - `docker compose ... up -d --no-build --no-deps --force-recreate caddy`; - - 只重建 Compose 中现有 `caddy` 服务,继续复用同一 host listener、 - workDir、data/config 目录和唯一 `pikaoa-edge` 容器名。 -- 回滚恢复旧 Compose 与 Caddyfile 后,也通过同一 Compose 重建唯一 edge, - 不再对旧 inode 执行 reload。 -- site/upstream probe 与配置安装分层: - - probe 失败不进入 rollback 条件; - - apply 保持 `ok=true`、`mutation=true`; - - 每个失败站点输出包含 hostname/path 的结构化 - `site-probe-failed`、`level=warning`、`blocking=false` 记录。 -- MDTODO `R9.5.1.1` 保持 `in_progress`,等待 PR 复审与正常自动链收口。 - -## Target 原入口证据 - -以下证据全部在指定 Target workspace 通过 `trans` 执行: - -- `node --check`: - - `deliver-platform-infra-public-edge.mjs` 通过; - - `apply-platform-infra-public-edge-archive.mjs` 通过。 -- `bun test scripts/native/cicd/deliver-platform-infra-public-edge.test.ts`: - - `4 pass`; - - 覆盖 YAML delivery plan、PaC 禁止项、SecretRef 绑定; - - fake-trans confirm 实际生成 commit archive 并执行三段受控调用; - - 未连接 Target 运行面。 -- 生成后的 host-local apply shell 隔离执行: - - 模拟 `lab.hwpod.com` probe 失败时,命令退出码为 `0`; - - `mutation=true`,warning 为 `site-probe-failed` 且 - `blocking=false`; - - `rollback.attempted=false`,只执行一次唯一 edge force-recreate; - - 模拟首次 force-recreate 失败时,命令退出码非零且 - `failurePhase=recreate`; - - 旧 Compose/Caddyfile 完整恢复,rollback 使用同一 Compose 再次重建, - `rollback.exitCode=0`。 -- `platform-infra public-edge plan --target NC01`: - - `mutation=false`; - - 七站全部解析; - - `unresolved=[]`; - - UDP `443` 保持; - - Caddyfile fingerprint 为 - `sha256:a998c3d5c3a409883a7dc62e121f7e8210998af686c0b9c34aa456035494ff67`。 -- `platform-infra public-edge apply --target NC01 --dry-run`: - - `mutation=false`; - - 七站与 fingerprint 和 plan 一致。 -- Secret 分发 plan: - - 命令为 - `secrets plan --config config/secrets-distribution.yaml --scope public-edge-delivery`; - - `mutation=false`; - - sourceRef 存在且 owner-only mode 为 `0600`; - - `UNIDESK_SSH_CLIENT_TOKEN` 无缺失; - - desired Secret 为 `devops-infra/public-edge-trans`; - - `valuesPrinted=false`。 -- `git diff --check`:通过。 -- 未运行 Vitest 或重型构建。 - -## Primary Workspace 边界 - -- primary workspace 仅用于加载 resource bundle skills、调用 `trans` wrapper、 - 使用 `unidesk-gh` 读取和评论 Issue。 -- primary workspace 未修改目标源码,未执行目标测试,未冒充 Target 原入口证据。 - -## 未执行事项 - -- 未执行 `secrets sync`。 -- 未触发或创建 PipelineRun。 -- 未执行 Argo refresh、sync 或 runtime patch。 -- 未执行 `platform-infra public-edge apply --confirm`。 -- 未修改 PK01 任意配置、Secret、路由或运行面。 -- PR 合并与 merge 后自动链观察由主代理审核后完成。 - -## 回链 - -- MDTODO:`R9.5.1.1`。 -- Issue:`#2205`。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.6_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.6_Task_Report.md deleted file mode 100644 index e272d522..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.6_Task_Report.md +++ /dev/null @@ -1,29 +0,0 @@ -# R9.6 任务报告 - -## 结果 - -- 修复 [UniDesk #2203](https://github.com/pikasTech/unidesk/issues/2203) 的 PaC release manifest YAML stream 解析缺陷。 -- renderer 现在跳过空文档以及 `Bun.YAML.parse` 返回 `null` 或 `undefined` 的 comment-only 文档。 -- renderer 在 watcher probe 注入和后续集群 mutation 前,统一验证每个实际资源均具备非空 `apiVersion` 与 `kind`。 -- 无效资源通过 `PacReleaseManifestRenderError` 返回稳定错误类型、错误码、文档序号和缺失字段,不再把 `null` 转换为 `{}` 后交给 `kubectl`。 - -## 语义保持 - -- watcher Deployment 仍按 owning YAML 声明的 deployment、namespace 与 container 精确匹配。 -- startup、readiness 与 liveness probes 的注入逻辑未改变。 -- 有效资源的原始顺序保持不变;仅空文档和 comment-only/null 文档从输出 stream 中移除。 -- 未修改 PaC 上游 URL、版本、owning YAML、PK01 或其他 consumer 配置。 - -## Fixture 与验证 - -- `release-leading-comment-only.yaml` 覆盖官方 release manifest 形状:首个文档仅包含版权注释,后续 Deployment 与 Service 正常渲染,输出保持两个有效资源。 -- `release-missing-object-identity.yaml` 覆盖缺少 `apiVersion` 与 `kind` 的实际对象,renderer 在 mutation 前返回 `pac-release-manifest-object-identity-invalid`。 -- `bun test scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts`:14 项通过,0 项失败。 -- `bun --check scripts/src/platform-infra-pipelines-as-code.ts`:通过。 -- `git diff --check`:通过。 -- 按任务边界未运行 Vitest,未使用 `validate=false`、fallback、人工 PipelineRun、Argo、mirror、trigger 或 PK01 操作。 - -## 自动交付边界 - -- 本任务只提交源码、fixture、Bun 定向测试与报告,并通过正常 PR merge 事件触发 PaC 自动交付。 -- PR 合并后的 `hwlab-nc01-production` bootstrap/status 原入口复测由主代理在正常自动链上完成;源码验证、PR 或构建结果不能替代该运行面证据。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.7_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.7_Task_Report.md deleted file mode 100644 index 8ecf76cc..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.7_Task_Report.md +++ /dev/null @@ -1,59 +0,0 @@ -# R9.7 任务报告 - -## 结果 - -- 执行 [MDTODO R9.7](../../pr-merge-driven-automatic-delivery.md) 与 - [UniDesk #2207](https://github.com/pikasTech/unidesk/issues/2207)。 -- `hwlab-nc01-v03` 与 `hwlab-nc01-production` 现在共享 NC01 - `hwlab-ci` 中唯一的 `hwlab-nc01-v03` PaC Repository CR、webhook、 - Gitea URL 与 SecretRef authority。 -- production consumer 继续独立声明 `release` source branch、 - `release-gitops`、Pipeline、PipelineRun prefix、ServiceAccount、 - runtime namespace、Argo application 与 source artifact。 -- `config/platform-infra/gitea.yaml` 中的 v0.3 与 production source - identity 保持独立,用于按 branch 维护各自不可变 snapshot;未制造第二个 - PaC Repository URL authority。 - -## Mutation 前校验 - -- 所选 consumer 的 Repository URL authority 按 Target 校验唯一性。 -- 同一 Target 和规范化 URL 出现多个 Repository 声明时,在任何远端 - mutation 前失败。 -- 错误会区分重复声明,以及 `providerType`、namespace、SecretRef、 - `cloneUrl`、owner/repo 等 authority 字段冲突。 -- 校验仅对当前所选 consumer fail-closed,不为无关 lane 新增 warning 或门禁。 - -## 定向验证 - -- `bun test scripts/src/platform-infra-pipelines-as-code-bootstrap.test.ts`: - 16 项通过,0 项失败。 -- Bun 测试覆盖: - - 一仓两个 branch/consumer 只渲染一个 NC01 Repository CR; - - production consumer 仍使用 release、release-gitops 与独立 Pipeline; - - URL authority 的 namespace、SecretRef 与 provider 冲突均在 mutation 前失败。 -- `platform-infra pipelines-as-code plan`: - - production 与 v0.3 均解析到 `hwlab-nc01-v03` Repository; - - production 保持 `hwlab-nc01-production-ci-image-publish` 与 - `hwlab-node-production`; - - 两个 plan 均无配置 warning。 -- `git diff --check`:通过。 -- 按任务边界未运行 Vitest,未改 URL、关闭 admission、使用 fallback, - 未触碰 PK01,也未人工触发 PipelineRun、Argo、mirror 或 CI/CD。 - -## Target 只读观察 - -- 修改与验证全部通过 - `trans NC01:/root/unidesk/.worktree/2207-pac-repository-reuse ...` - 在 Target workspace 执行;primary workspace 仅承载受控 CLI 与 skill。 -- 合并前 production 与 v0.3 `status` 均显示当前运行面尚未 bootstrap: - `READY=false`、`CRD=false`、Repository condition 缺失。 -- 两次 status observer 均返回 `pac-read-parse-failure` 的 partial observation; - 该事实作为合并后原入口复测风险记录,不用源码测试或 plan 冒充运行面 ready。 - -## 自动交付边界 - -- 本任务只交付 owning YAML、parser/validator、Bun 定向测试与任务报告。 -- PR 合并后由主代理从 production bootstrap/status 原入口复测;ready 后再合并 - HWLAB PR #2550,以真实 release merge 事件验收 production 自动链。 -- 禁止用人工 PipelineRun、Argo、mirror、trigger 或其他补跑替代正常 PR merge - 自动事件。 diff --git a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.8.2_Task_Report.md b/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.8.2_Task_Report.md deleted file mode 100644 index 471912ef..00000000 --- a/docs/MDTODO/details/pr-merge-driven-automatic-delivery/R9.8.2_Task_Report.md +++ /dev/null @@ -1,23 +0,0 @@ -# R9.8.2 命名 runtime lane renderer 任务报告 - -## 交付 - -- Issue:`pikasTech/HWLAB#2548` -- 产品 PR:`pikasTech/HWLAB#2551` -- 合并提交:`f5d8f3c50583c83f062f63f4944965e524cb2416` -- Target:`NC01:/root/hwlab-v03/.worktree/2548-production-runtime-lane` - -HWLAB 单一 renderer 已支持由 `deploy/deploy.yaml` 显式声明的稳定命名 lane。`vNN` 继续使用既有版本默认;命名 lane 的 node、source/GitOps branch、catalog、runtime path、namespace、endpoint、Service/NodePort 和 FRP 事实均来自 owning YAML,缺少必填字段时稳定拒绝。 - -## 验证 - -- `node scripts/run-bun.mjs scripts/src/runtime-lane.test.mjs`:通过。 -- `v02`、`v03` 生成目录与基线逐文件一致。 -- renderer 模块导入 smoke:通过。 -- `git diff --check`:通过。 - -## 边界 - -- 未手写 `.tekton` 或第二 renderer。 -- 未修改 UniDesk/PaC/Tekton/Argo、PK01 或运行面。 -- 后续 production lane、NodePort 和 source artifact 交付仍归属父项 `R9.8`,不由本子项宣称上线完成。 diff --git a/docs/MDTODO/pr-merge-driven-automatic-delivery.md b/docs/MDTODO/pr-merge-driven-automatic-delivery.md deleted file mode 100644 index 0858849c..00000000 --- a/docs/MDTODO/pr-merge-driven-automatic-delivery.md +++ /dev/null @@ -1,213 +0,0 @@ -# PR 合并驱动的全自动交付 - -- 来源:https://github.com/pikasTech/unidesk/issues/1755 -- 范围:长期规则、CI/CD skill 与文档合同。 -- 边界:不执行任何人工 CI/CD 触发、补跑或运行面修改。 - - -## R1 [completed] - -固化 PR 合并驱动的全自动交付与故障修复边界,来源:https://github.com/pikasTech/unidesk/issues/1755,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1_Task_Report.md)。 -### R1.1 [completed] - -盘点并收敛会误导人工触发或补跑的长期规则,引用:https://github.com/pikasTech/unidesk/issues/1755,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1.1_Task_Report.md)。 -### R1.2 [completed] - -更新 CI/CD reference 与 skill,明确 PR merge 唯一触发及自动链故障修复边界,引用:https://github.com/pikasTech/unidesk/issues/1755,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1.2_Task_Report.md)。 -### R1.3 [completed] - -补充轻量文档合同检查,阻止人工交付入口重新成为正式路径,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1.3_Task_Report.md)。 -### R1.4 [completed] - -完成静态验证、报告、提交、推送与非草稿 PR,禁止触发或部署 CI/CD,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1.4_Task_Report.md)。 -### R1.5 [completed] - -修复 [UniDesk #2462](https://github.com/pikasTech/unidesk/issues/2462):受控 `gh pr merge` 必须区分临时 feature branch 与 YAML/仓库配置声明的长期环境 branch,未证明可删除时默认保留并输出 typed reason,显式删除仅用于已确认临时分支;覆盖长期分支保留和临时分支删除的 L0 合同,不修改业务运行面,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R1.5_Task_Report.md)。 -## R2 [in_progress] - -清理 migrated PaC status/help 中会诱导人工补跑的 NEXT、REPAIR 与长期指引漂移;来源:[UniDesk #1764](https://github.com/pikasTech/unidesk/issues/1764),保持 GitHub PR merge 为唯一交付触发,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R2_Task_Report.md)。 - -### R2.1 [in_progress] - -盘点 migrated PaC 的 status/help/Next/REPAIR 与文档、skill 漂移,以 [UniDesk #1764](https://github.com/pikasTech/unidesk/issues/1764) 和 NC01 source 85abda3b 自动发布证据冻结删除边界,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R2.1_Task_Report.md)。 - -### R2.2 - -修复 CLI renderer 与定向合同测试:migrated consumer 只提示只读 status/history/debug-step,不输出 apply、closeout、trigger、sync、flush、webhook-test 或人工 PipelineRun;legacy 显式入口保持可发现,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R2.2_Task_Report.md)。 - -### R2.3 - -由主代理同步清理长期 reference/skill,合并后只观察新的 GitHub webhook→Gitea mirror/snapshot→PaC→Tekton→GitOps/Argo→runtime 自动事件,并完成 issue/报告收口,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R2.3_Task_Report.md)。 - -## R3 [completed] - -跟踪 [UniDesk #1802](https://github.com/pikasTech/unidesk/issues/1802) 暴露的 AgentRun PaC 成功后 GitOps/Argo revision 持续 stale;本轮只冻结自动链证据与架构边界,不手工补交付,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R3_Task_Report.md)。 - -### R3.1 [completed] - -记录 [AgentRun PR #301](https://github.com/pikasTech/agentrun/pull/301) 自动 Pipeline Succeeded、GitOps result 与 Argo/runtime provenance 未收敛的证据;确认涉及自动 GitOps/provenance 架构后保持 [UniDesk #1802](https://github.com/pikasTech/unidesk/issues/1802) open 并跳过实现,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R3.1_Task_Report.md)。 - -## R4 [in_progress] - -解决 [UniDesk #1802](https://github.com/pikasTech/unidesk/issues/1802) 并对齐 [UniDesk #1769](https://github.com/pikasTech/unidesk/issues/1769):建立 source commit → immutable snapshot → artifact digest → GitOps commit → Argo revision → runtime digest 的单一、不可伪造自动交付 provenance;GitHub PR merge 仍是唯一触发,禁止人工补交付,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4_Task_Report.md)。 - -### R4.1 [in_progress] - -冻结 [#1802](https://github.com/pikasTech/unidesk/issues/1802) / [#1769](https://github.com/pikasTech/unidesk/issues/1769) 的交付合同:定义 admission-owned outer-event provenance、标准 terminal roles/results、父子运行归属、commit/digest 关联和 fail-closed 判定,明确 YAML owner 与 controller 职责,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.1_Task_Report.md)。 - -#### R4.1.1 [completed] - -解决 [UniDesk #2039](https://github.com/pikasTech/unidesk/issues/2039):现场确认 PR #1808/#1812 引入的 `ValidatingAdmissionPolicy` 以错误的原子 queue transition 假设拒绝官方 PaC watcher,导致 HWLAB `df925768` 与 AgentRun 自动流水线停在 Pending;以新提交语义回退业务阻断型 admission 围栏,保留 provenance、creator、marker、ServiceAccount 和漂移为结构化 `blocking=false` warning,禁止继续扩展 CEL 围栏、人工 PipelineRun、mirror、trigger、sync、flush 或 runtime patch,并由既有 merge 事件自动恢复及完成原入口验收,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.1.1_Task_Report.md)。 - -### R4.2 - -依赖 R4.1,让 YAML-owned pipeline 输出标准 terminal evidence,由单一 controller 自动 reconcile GitOps;Argo/status 必须针对同一 GitOps repository 和 commit graph 验证 exact/descendant,并把 source、artifact、GitOps、revision、runtime digest 形成可审计链,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.2_Task_Report.md)。 - -### R4.3 - -依赖 R4.2,覆盖 provenance 缺失、伪造、stale revision、commit graph unavailable 和 runtime digest 不一致;最终只接受修复 PR merge 的新 webhook/PaC 事件自动收敛,禁止 mirror、PipelineRun、sync、flush、trigger、apply、closeout 或 runtime patch,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.3_Task_Report.md)。 - -### R4.4 - -记录并后续解决 [UniDesk #1828](https://github.com/pikasTech/unidesk/issues/1828):聚合 cicd status 对 sentinel/platform-infra 在 source、GitOps、Argo/runtime 已对齐时仍误报 pac-gitops-missing/relation unknown;统一专用 control-plane 与聚合器的 source→GitOps revision relation authority 和判定证据,本轮仅登记,不扩入 #1760 自动 delivery 修复,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.4_Task_Report.md)。 - -### R4.5 [in_progress] - -基于 [UniDesk #1802](https://github.com/pikasTech/unidesk/issues/1802) 修复当前 AgentRun NC01 自动交付阻塞:将 GitOps read/write、Argo repoURL 与 delivery provenance 从 legacy git-mirror 收敛到既有 Gitea internal 单一 authority;只做 owning YAML、既有 renderer/定向验证的最小必要修改,禁止人工 mirror、sync、flush、trigger、apply、closeout、PipelineRun 或 runtime patch,也禁止新增合同、租约、安全机制和围栏,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R4.5_Task_Report.md)。 -## R5 [in_progress] - -解决 [UniDesk #1900](https://github.com/pikasTech/unidesk/issues/1900):修复 NC01 PaC watcher 因 ServiceAccount token 的 node/pod 关系失败而 Pending,恢复 GitHub PR merge 驱动的唯一自动交付链,禁止人工补触发、第二权威或旁路,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R5_Task_Report.md)。 - -### R5.1 [completed] - -只读定位 [UniDesk #1900](https://github.com/pikasTech/unidesk/issues/1900) 的唯一根因,核对 watcher Pod、ServiceAccount token、node/pod 关系、owning YAML 与最近控制面变更,不改运行面,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R5.1_Task_Report.md)。 - -### R5.2 [in_progress] - -按 [UniDesk #1900](https://github.com/pikasTech/unidesk/issues/1900) 实施最小持久化修复和定向验证,不新增第二交付权威、合同、租约、安全机制或围栏,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R5.2_Task_Report.md)。 - -### R5.3 - -合并修复 PR 后只观察新的 GitHub webhook→Gitea mirror→PaC→Tekton→GitOps/Argo 自动事件,验证 watcher Ready、TaskRun 创建及 AgentRun/Monitor runtime 收敛,不人工补齐既有 queued run,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R5.3_Task_Report.md)。 - -## R6 [completed] - -执行 [UniDesk #1981](https://github.com/pikasTech/unidesk/issues/1981):固定仓库产品功能 schema 路径为 config/feature-config.schema.json,CI/CD 只读校验 schema 语法、值匹配和功能到唯一配置变量的一对一关系;缺失、非法、不匹配或重复仅输出 typed warning 并投影到 OTel/status/history/debug-step,必须继续 artifact、GitOps/Argo 和滚动上线,禁止写回、默认值、变量删除、功能关闭、架构切换及其他补救操作,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R6_Task_Report.md)。 - -### R6.1 [completed] - -原 MDTODO R7 依据 [UniDesk #2005](https://github.com/pikasTech/unidesk/issues/2005) 实现 SELFMEDIA CI/CD 单次只读查询:从 owning YAML 解析 selfmedia-nc01,在一次受控 CLI 调用内关联 pikainc/selfmedia GitHub mergedAt、PaC PipelineRun/TaskRun、Argo/runtime health,直接披露 trigger wait、pipeline duration、end-to-end duration 与证据缺口;同步 unidesk-cicd skill 的唯一推荐入口,禁止新增第二状态源或交付 mutation,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R7_Task_Report.md)。最新 master 已占用顶层 R7,本条仅调整索引层级,不改写任务报告身份与 checkpoint 语义。 - -### R6.2 [completed] - -按用户要求将 CI/CD 全局配置一致性、版本、契约和跨 consumer 校验统一为 non-blocking warning:除非用户明确要求阻塞,禁止新增会导致 Pipeline、GitOps、Argo 或 rollout 失败的校验;发现既有阻塞实例时逐例降级为 `blocking=false` warning,同时保留当前选中对象自身的必要输入与安全校验,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R6.2_Task_Report.md)。 -## R7 [in_progress] - -执行 [UniDesk #2008](https://github.com/pikasTech/unidesk/issues/2008):按 PJ2026-01060106 建立 HWLAB 开发/生产双环境发布;v0.3 固定为 NC01 development,release 固定为 production,两个环境在 source、Pipeline、GitOps、Argo、namespace、public origin、PostgreSQL database/role/Secret/migration ledger 和 Kafka consumer group 上隔离,所有值由 owning YAML 控制,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R7_Task_Report.md)。 - -### R7.1 [in_progress] - -迁移 [UniDesk #2009](https://github.com/pikasTech/unidesk/issues/2009):保持 v0.3 开发 branch/namespace/DB consumer,删除其对 hwlab.pikapython.com 的所有权,选择并 YAML 固化 NC01 公网 IP 的空闲 HTTP 端口和同源 API/health/probe,通过新 PR 和自动链完成原入口验证,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R7.1_Task_Report.md)。 - -### R7.2 [in_progress] - -建立 [UniDesk #2010](https://github.com/pikasTech/unidesk/issues/2010):跟随 release branch 的独立 production PaC/Tekton/GitOps/Argo、namespace、host PostgreSQL database/role/Secret/migration ledger、Kafka consumer group 与 https://hwlab.pikapython.com YAML publicExposure;release 只从完成 P0 Kafka 纠偏并验证的 v0.3 commit 初始化,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R7.2_Task_Report.md)。 - -## R8 [completed] - -解决 [UniDesk #2165](https://github.com/pikasTech/unidesk/issues/2165):修复 PaC `status/history/debug-step` 与 AgentRun control-plane 状态命令在远端 timeout、空 payload、解析失败或异常时以空 stdout/不明 exit 结束的问题;保持目标 Kubernetes/Tekton/Argo/runtime 为唯一状态 authority,所有成功、partial、timeout 和 failure 都输出有界 typed 摘要、耗时、first break 与只读下钻,禁止第二状态源、无界 dump、交付 mutation、PK01 修改、合同/租约/围栏和 Vitest,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R8_Task_Report.md)。 - -### R8.1 [completed] - -解决 [UniDesk #2447](https://github.com/pikasTech/unidesk/issues/2447):修复 `cicd status --node ` 为每个 consumer 并发启动完整远端 PaC status、重复读取公共对象并压垮 transport/read budget 后误报 `pac-read-remote-failure`、`pac-read-timeout` 与 `cicd-node-blocked`;改为一次目标侧批量只读快照并按 consumer 投影 PipelineRun、Argo、runtime 与 typed read failure,保留单 consumer 深度 status、Kubernetes/Tekton/Argo/runtime 唯一 authority 和 YAML 预算,不新增缓存/第二状态源/交付 mutation,通过 L0 fixture、L1 native node smoke、正常 PR 自动交付和只读回归验收,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R8.1_Task_Report.md)。 -### R8.2 [completed] - -继续解决 [UniDesk #2165](https://github.com/pikasTech/unidesk/issues/2165):单 consumer `status` 在默认 `taskrun-status-only` 模式未同步读取 plan logs 时,把预期缺失的 source observation 误报为阻断型 `pac-source-observation-inconsistent`,且 compact JSON 仍以 10,636 字节超过 10 KiB 输出预算;仅将可证明由默认日志延后造成的缺口降级为 `pac-artifact-log-evidence-deferred`、`blocking=false`,真实矛盾在显式日志证据存在时继续 fail-closed,并收敛默认 JSON 到预算内,保留 id-specific history 深度证据与现有 live authority,通过 L0 fixture、L1 native status text/JSON、正常 PR 自动交付验收,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R8.2_Task_Report.md)。 -### R8.3 [in_progress] - -继续解决 [UniDesk #2165](https://github.com/pikasTech/unidesk/issues/2165) 的 single-consumer `status` 可见性回归:远端观察只输出 started 后结束且缺少 success/partial/timeout/failure 终态摘要,而同 consumer `history` 已能返回 typed `pac-read-timeout`;保持目标 Kubernetes/Tekton/Argo/runtime 唯一 authority,不新增状态源或交付 mutation,修复所有退出分支的有界终态输出,并以一次目标侧最小 status smoke 验收,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R8.3_Task_Report.md)。 -### R8.4 [completed] - -解决 [UniDesk #2510](https://github.com/pikasTech/unidesk/issues/2510):修复 HWLAB PaC PipelineRun 已成功且 Gitea source authority 已 committed 后,single-consumer status 仍误报 source-commit-invalid-or-missing、id-specific history 在 25 秒预算内超时且 Argo Synced/Degraded 缺少首个资源下钻的问题;保持目标 Tekton/Argo/runtime 唯一 authority,禁止人工 PipelineRun、mirror、sync、refresh、第二 history store和放宽 evaluator,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R8.4_Task_Report.md)。 -## R9 [in_progress] - -建立 [UniDesk #2181](https://github.com/pikasTech/unidesk/issues/2181):在 NC01 建立单一共享 HTTPS 边缘,将 HWLAB v0.3、HWLAB release、UniDesk 与 WebTerm 分别迁移至 `lab-dev.hwpod.com`、`lab.hwpod.com`、`unidesk.hwpod.com`、`term.hwpod.com`;保持 PikaOA 现有站点无中断,全部公开事实由职责明确的 owning YAML 与 `configRef` 唯一声明,原子生成、校验、reload,共享 Caddy 不形成第二 authority,禁止修改 PK01、禁止 Vitest,最终通过正常 PR 与自动 CI/CD/GitOps 收敛,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9_Task_Report.md)。 - -### R9.1 [completed] - -实现 NC01 共享 `public-edge` owning YAML、引用模型及 `platform-infra public-edge plan|apply|status`,复用现有 PikaOA Caddy 数据目录,原子写入、validate、reload,失败保留旧配置,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.1_Task_Report.md)。 - -#### R9.1.1 [completed] - -收敛 [#2197](https://github.com/pikasTech/unidesk/issues/2197) 的 shared public edge 现网兼容与 YAML-first 边界,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.1.1_Task_Report.md)。 -### R9.2 [completed] - -将 HWLAB v0.3 与 release 生产 lane 的 Kubernetes Service 分别固定为内部 NodePort `32009`、`32010`,由共享边缘公开为 `lab-dev.hwpod.com` 与 `lab.hwpod.com`,移除旧 IP、PK01、FRP 和 `pikapython.com` authority,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.2_Task_Report.md)。 - -### R9.3 - -将 UniDesk NC01 frontend 的公开入口迁移为 `unidesk.hwpod.com`,移除 `unidesk.pikapython.com` 的 owning 配置与旧边缘归属,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.3_Task_Report.md)。 - -#### R9.3.1 [completed] - -修正 [#2195](https://github.com/pikasTech/unidesk/issues/2195) 的 UniDesk shared edge DNS 期望声明,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.3.1_Task_Report.md)。 -### R9.4 [completed] - -将 WebTerm `local-7683` 的公开入口迁移为 `term.hwpod.com`,保持上游 `127.0.0.1:7683` 与 WebSocket,移除 `term.pikapython.com` 的 owning 配置,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.4_Task_Report.md)。 - -#### R9.4.1 [completed] - -修正 [#2196](https://github.com/pikasTech/unidesk/issues/2196) 的 WebTerm shared edge 兼容解析隐藏默认,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.4.1_Task_Report.md)。 -### R9.5 [in_progress] - -执行 [UniDesk #2200](https://github.com/pikasTech/unidesk/issues/2200):完成共享边缘七站 YAML 引用、CLI plan/dry-run、GitHub merge 驱动的自动交付及公网原入口回归;保持单一共享 Caddy、UDP 443、VPN subscription 与 PikaOA 两站无回归,禁止 PK01 修改、人工 PipelineRun/Argo/mirror/trigger 和 Vitest,调试 patch 仅按 `$unidesk-daddev` 有界使用且终态必须由 owning YAML/源码与自动 CI/CD 覆盖,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.5_Task_Report.md)。 - -#### R9.5.1 [in_progress] - -重建 [UniDesk #2205](https://github.com/pikasTech/unidesk/issues/2205):从最新 master 以全新 worktree/session 实现 NC01 shared public-edge 的 merge 驱动自动交付,复用同一 renderer/apply 与 owning YAML/source commit;禁止复用旧 docker.sock 工件,禁止 Kubernetes 挂载 Docker socket/daemon、第二 edge/authority、人工交付、PK01和Vitest,合并后只由正常自动链收敛,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.5.1_Task_Report.md)。 -##### R9.5.1.1 [in_progress] - -重做 [UniDesk #2205](https://github.com/pikasTech/unidesk/issues/2205) 的单一 shared public-edge 自动交付链:仅允许 immutable PaC checkout → YAML SecretRef → 受控 trans → NC01 host-local 既有 public-edge renderer/apply;禁止 Argo PostSync、hostPath、Caddy Admin API 直写、Docker socket/daemon、第二 authority/fallback、PK01、Vitest和人工终态交付;必须使用最新 master 的全新 worktree 与全新 Artificer session,合并后只由自动 CI/CD 收敛,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.5.1.1_Task_Report.md)。 -### R9.6 [completed] - -修复 [UniDesk #2203](https://github.com/pikasTech/unidesk/issues/2203):PaC release manifest renderer 必须跳过 YAML stream 中的空文档与 comment-only/null 文档,并在 mutation 前拒绝缺少 apiVersion/kind 的实际对象,消除 hwlab-nc01-production bootstrap 的 `apiVersion not set, kind not set` 故障;禁止 validate=false、fallback、PK01、Vitest和人工交付,合并后从 bootstrap/status 原入口复测,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.6_Task_Report.md)。 - -### R9.7 [completed] - -修复 [UniDesk #2207](https://github.com/pikasTech/unidesk/issues/2207):HWLAB v0.3 与 production 必须按 PaC 官方单 URL 唯一 Repository CR 约束共享 NC01 hwlab-ci 的 Repository/webhook authority,由 branch/event annotations 与 consumer lane 区分 PipelineRun、GitOps和运行面;禁止重复 Repository CR、改 URL、关闭 admission、fallback、PK01、Vitest和人工交付,合并后从 production bootstrap/status 与真实 release merge 原入口验收,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.7_Task_Report.md)。 - -### R9.8 [in_progress] - -修复 [HWLAB #2548](https://github.com/pikasTech/HWLAB/issues/2548):基于 release 最新提交生成并提交 `hwlab-nc01-production` 的 YAML-owned PaC source artifact(production `.tekton` PipelineRun 与引用 Pipeline),确保 branch/event 只匹配 release、独立 release-gitops/ServiceAccount/runtime namespace/32010;禁止手写第二真相、复用 v0.3 PipelineRun、人工 PipelineRun/mirror/Argo、fallback、PK01和Vitest,合并新的 release PR 后仅观察自动链直到 production 运行面 ready,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.8_Task_Report.md)。 - -#### R9.8.1 [in_progress] - -修复 [UniDesk #2212](https://github.com/pikasTech/unidesk/issues/2212):补齐 NC01/production control-plane owning YAML target,使 `hwlab-nc01-production` 复用既有受控 renderer 生成 release 专用 PaC artifact,并把缺失 target 从哈希化 generic error 改为稳定 typed diagnostic;保持 v0.3 无漂移,禁止第二 authority、fallback、人工 PipelineRun/mirror/Argo、数据库迁移、PK01 和 Vitest,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.8.1_Task_Report.md)。 - -#### R9.8.2 [completed] - -修复 [HWLAB #2548](https://github.com/pikasTech/HWLAB/issues/2548) 的命名 runtime lane renderer:将 `scripts/gitops-render.mjs` 从仅接受 `vNN` 泛化为由 deploy owning YAML 显式声明的稳定 lane,非版本 lane 的 source branch、GitOps branch、catalog、runtime path、namespace、端口和 endpoint 必须来自 YAML 且缺失时 fail closed;禁止硬编码 `production`、`release`、`32010`、第二 renderer、fallback、数据库投影或 Vitest,保持 v03 生成无漂移并向 release 分支提交独立 PR,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R9.8.2_Task_Report.md)。 - -## R10 [completed] - -执行 [UniDesk #2387](https://github.com/pikasTech/unidesk/issues/2387):修复 HWLAB v03 Gitea branch/snapshot 已提交但 expected PaC PipelineRun 未创建的自动链断点,保持 GitHub PR merge 唯一触发和既有 Gitea/PaC/Tekton/GitOps/Argo authority;status/history 不得以旧 run fallback 冒充当前 commit 成功,禁止人工 PipelineRun、mirror、Argo、rollout、runtime patch、PK01、第二权威、合同、租约或围栏,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R10_Task_Report.md)。 - -### R10.1 [completed] - -纠正 [UniDesk #2387](https://github.com/pikasTech/unidesk/issues/2387) / [PR #2390](https://github.com/pikasTech/unidesk/pull/2390) 遗留的 `expectedPipelineRunName` 伪名称比较:状态决策只消费已按 current source 精确筛选的真实 PipelineRun identity,覆盖 PaC `generateName` 随机后缀和未完成窗口,删除死 helper,不扩大交付或 authority 边界,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R10.1_Task_Report.md)。 - -## R11 [completed] - -执行 [UniDesk #2449](https://github.com/pikasTech/unidesk/issues/2449):建立 consumer deploy 声明、PaC selected services、lane owning YAML serviceIds 与 rendered GitOps workload/service 的服务选择闭环检查;先用 L0 fixture 复现缺项并输出 typed warning/partial evidence,再做 L1 native smoke 与真实 consumer 只读 render 验证,保持既有 owning YAML 单一 authority,禁止修改共享 CI/CD 控制器、人工 PipelineRun/mirror/trigger/sync/flush、第二权威和阻断型围栏,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R11_Task_Report.md)。 - -## R12 [completed] - -执行 [UniDesk #2486](https://github.com/pikasTech/unidesk/issues/2486):为 PikaOA development/production 三个并行 BuildKit TaskRun 接入 YAML 驱动、按 api/worker/web 隔离的 registry cache,由 renderer 生成 import/export cache 参数并通过正常 UniDesk PR、PikaOA source-artifact PR 和自动链预热/回归验证;保持 GitHub merge 唯一触发,不新增缓存服务、第二 authority、人工 PipelineRun/mirror/Argo、Docker socket、PK01 或生产滚动,完成任务后将详细报告写入[任务报告](./details/pr-merge-driven-automatic-delivery/R12_Task_Report.md)。 - -### 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)。