feat(workbench): run 审查可信 workDir 真实批准/驳回(#1967) - #1983
Merged
Conversation
Co-authored-by: Codex <codex@vectorcontrol.tech>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Codex <codex@vectorcontrol.tech>
Co-authored-by: Codex <codex@vectorcontrol.tech>
DeliciousBuding
force-pushed
the
feat/run-review-apply
branch
from
August 25, 2026 19:39
520f466 to
35db31e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run 级审查:可信 workDir 数据合同 + 真实批准/驳回(#1967 剩余部分)
#1975 交付了诚实的只读聚合视图,并明确剩余路径:「先增加可信 run workDir/权威 run diff 数据合同,再接 Desktop apply port」。本 PR 完成该路径:
数据合同(Edge → transcript → 前端)
store.Run新增WorkDir;process executor 在run.started前把执行器真实解析的 workDir(adapter BuildCommand / profile WorkDir)记入 run 证据;RunResponse仅在有值时携带workDir。Mock executor 不上报(诚实:mock run 保持只读)。api/events.md合同:workDir是 run 级 diff 审查唯一可信 workDir 证据;客户端禁止猜测(当前 composer 目录等),缺失即只读。EvidenceRef.workDir(kind=run)、runEvidence(runId, status, workDir?)、9 个 run 生命周期 mapper 全量透传 payload.workDir、selectRunReview暴露所选 run 的 workDir(首个非空值获胜,重放事件不可覆盖;legacy 永不携带)。前端接线(不产生第二套审批状态)
canApplyRunReview = 非 legacy + 可信 workDir + platform.preview.applyAllRunDiffs。满足时 RunReviewOverlay 接runId(原始 Edge run id,剥离run-证据前缀)+onApplyHunk/onApplyAllHunks(走既有 PreviewPort → Desktop Local EdgePOST /v1/runs/:id/apply[-all],Edge 端validateWorkDirAllowed仍是硬边界)+ accept/reject-run(面板合同:仅异步 apply 成功后回调,失败精确回滚 hunk 状态)。验收对照
onApplyAllHunks端口)runReview.test.tsx12 用例(含 5 新行为用例:批准/驳回带可信 workDir+原始 runId、逐块 apply、无 port 只读、legacy 永不适用)DiffReviewPanel.test.tsx(#1975 回滚/时序合同)仍绿composer/runReview新增键中英成对resources.test.ts键集/占位符绿;verify-i18n-callsites本 lane 零新增违规文件验证证据(本机,串行)
go test ./... -short -count=1全部包绿(新增TestStoreSetRunWorkDir、TestRunResponseCarriesWorkDirEvidence、TestProcessExecutorRunStartedCarriesWorkDir)app/sharedvitest:152 文件 / 2652 用例全绿app/workbenchvitest:146 文件 / 1469 用例全绿overflow=falseverify-doc-ssot.pyPASS;verify-i18n-callsites.py为存量 advisory 红(baseline 停在 refactor(app): workbench 独立为 @agenthub/workbench 包 (#1759 第二阶段) #1832,今日合入的 feat(review): 单 run 聚合只读审查入口(#1967 部分交付) #1975/feat(workbench): Tasks 与会话双向深链 (#1963) #1976 文件已先于本 lane 计入;本 lane 0 新增违规文件,按 verifier-map 设计保持 advisory 不削弱棘轮)real_tested=false(L0 单元/组件 + visual shell + stubbed E2E;未在真实 Desktop+Edge run 上跑真实 apply 往返,建议远程 dev 服务器做一次 L3 口径验证)
Closes #1967