From d8ba9dbf40256d3889a4236836df126075ec9762 Mon Sep 17 00:00:00 2001 From: lanrtop Date: Sat, 3 Oct 2026 06:09:25 +0900 Subject: [PATCH] =?UTF-8?q?docs(blueprint/delivery):=20=E7=AB=8B=E5=8D=A1?= =?UTF-8?q?=20P3-F=20get=5Fdelivery=5Fstatus=20=E6=8C=89=20PR=EF=BC=8F?= =?UTF-8?q?=E5=88=86=E6=94=AF=E6=9F=A5=E8=AF=A2=EF=BC=88=E4=BD=BF=E8=80=85?= =?UTF-8?q?=E5=9B=9E=E4=BC=A0=20#203=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enterprise 2026-10-03 实测:在独立 worktree 分支开 PR 交付时,get_delivery_status 只读主工作区当前分支,PR/CI 结论与目标 PR 脱节。本卡开始执行,标 🔵。 Co-Authored-By: Claude Opus 5.5 --- .blueprint/modules/project-capability-control-plane.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.blueprint/modules/project-capability-control-plane.md b/.blueprint/modules/project-capability-control-plane.md index 9ae0dea..e5c9bc0 100644 --- a/.blueprint/modules/project-capability-control-plane.md +++ b/.blueprint/modules/project-capability-control-plane.md @@ -370,6 +370,14 @@ v1 不新增 deployment history 表。最近部署时间和过程状态来自 Gi - acceptance: "agent_verify: [HTTP API + MCP] 经用户批准合并并由 Enterprise 既有 main workflow 部署后,`GET https://api3.yljt.info/health/version` 的 revision 与目标 commit SHA 一致,`get_delivery_status(enterprise_project_id)` 返回 deployed 且同时列出 Gitea/runtime evidence;不触发炼境 SSH、部署、回滚或数据库写入。随后记录 2~4 周人工确认次数、失败定位时间与漂移发现数,未证明收益前不新增 UI。" - progress_note: "2026-09-23 观测起点:Enterprise main SHA 3cfff458c241e419078f43a6d0d52b35397cc5fa 的公开 /health/version 与 scoped MCP 均返回同一运行 revision;MCP 列出 Gitea deploy-api success(run #531)和 http_probe healthy,deployment=deployed。观察窗为 2026-09-23 起 2~4 周;人工确认次数、失败定位时间、漂移发现数尚无完整基线数据,不据首次成功虚报收益或新增 UI。" +### 🔵 P3-F. get_delivery_status 按 PR/分支查询(使者回传 #203) +- status: in_progress +- complexity: M +- depends: P1. 交付状态与 Gitea 轻量治理投影, P3-S2. Agent PR 合并安全门禁 +- files: src-tauri/src/commands/delivery_status.rs, src-tauri/src/commands/gitea.rs, src-tauri/src/mcp_tools.rs, docs/ai-context/project-context.yaml, src-tauri/resources/onboarding/.agents/skills/lian-jing/SKILL.md, src-tauri/resources/onboarding/.lian-jing/capability-packs.json, src-tauri/src/commands/onboarding.rs, plugins/lian-jing-codex/skills/lian-jing/SKILL.md +- source: "使者回传 #203(Enterprise 2026-10-03 实测):为避开主工作区里其他会话的在制品,在独立 worktree 分支上开 PR 交付时,get_delivery_status 只读主工作区当前分支,返回「当前分支没有开放 PR」、CI 停在主工作区 HEAD,传 pr_number 也被忽略,只能改用 git ls-remote 与 get_ci_status(commit_sha) 兜底。" +- acceptance: "agent_verify: [cargo test] 合成 Gitea 下 get_delivery_status(pr_number=N) → 经 GET /pulls/N 取 head 分支与 head SHA,pull_request.data.head_sha、ci.data.target_sha、target.head_sha 均为该 PR head SHA,review 读 /pulls/N/reviews,本地工作区不可用也不影响;branch=B → 匹配 B 的开放 PR 并以其 head SHA 查 CI,无开放 PR 时以 Gitea 远端分支 head SHA 查 CI;PR 不存在返回 not_found、远端分支不存在时 CI 为 unknown;pr_number 非正整数或 branch 非法时 MCP 直接报错、不回退主工作区;都不给时 target.mode=local_branch 保持原行为;merge_pull_request 门禁测试不变;cargo test --locked 全量通过。" + ## 迭代衡量 首个版本上线后连续观察四周:commit 至 production 部署结果可追溯的时间、production 前实际拦截问题数、失败定位与回滚耗时、PR 等待时间、Agent 重复劳动/上下文丢失次数。不能降低任一真实成本的门禁或自动化应降级或移除。