feat: add reviewed Task Git delivery and verified evidence reports

This commit is contained in:
Agent Workbench Dev
2026-10-29 16:41:03 +08:00
parent 3781591f97
commit 73758985ee
50 changed files with 1964 additions and 69 deletions
+11 -2
View File
@@ -1,6 +1,6 @@
# Agent Workbench 能力目标与验收矩阵
日期:2026-10-29。1.0.0为已保存的基础里程碑,1.1.0为本轮M1实现。下表保留1.0.0缺口与完整产品目标;每项完成范围以实际验证记录为准。
日期:2026-10-29。1.0.0为基础里程碑,1.1.0实现M1,1.2.0实现首个内置Git交付切片。下表保留1.0.0缺口与完整产品目标;每项完成范围以实际验证记录为准。
总体方案见 [PRODUCT-PLAN.md](PRODUCT-PLAN.md),研究问题与来源见 [RESEARCH-ROADMAP.md](RESEARCH-ROADMAP.md)。
@@ -21,6 +21,13 @@
模块路径指 [建议架构](PRODUCT-PLAN.md#4-建议架构一套执行核心多种入口),不是当前目录结构。研究编号对应研究路线中的问题组。
### 1.2.0 M2已实现切片
- C09/C13:Task绑定的Git预览、已审核文件的实际本地提交、其他工作区/暂存修改保留及JSON/Markdown报告;支持已有命名分支,尚无隔离worktree与自动合并。
- C02/C07/C23:稳定plan/job身份、实际引用核对与9个真实退出切点、不重放提交;索引恢复只处理本次拥有的字节,外部变化保留需核对状态。
- C11/C24:源码与Git基线分别验证,检查日志完整性和测试数量仍须满足;92项完整行为检查、9组桌面/390px交付界面通过。
- C08、多类工程与完整M2/M6成功率仍待后续实施。范围见[QA-1.2](QA-1.2.md)与[Git交付契约](GIT-DELIVERY.md)。
| ID / 能力 | 当前1.0.0基础与缺口 | 后续产品目标 | 参考问题 / 模块 / 阶段 | 必须看到的验收证据 |
| --- | --- | --- | --- | --- |
| C01 需求与任务规划 | 有对话和有限步数工具循环,没有任务依赖图 | 固定目标、约束和完成标准;拆任务、判断依赖、接收追加要求与重规划 | CX-1、WB-1 / tasks / M1–M2 | 追加要求后仍保留原目标;任务完成由验收条件决定 |
@@ -52,7 +59,9 @@
- [provider.mjs](../src/server/provider.mjs):固定工具定义、深度3/160项的项目上下文、提取式投影、非流式模型请求。
- [runtime.mjs](../src/server/runtime.mjs):有限循环、内存active/waiters、命令审批与60秒进程生命周期。
- [store.mjs](../src/server/store.mjs):JSON会话存储、备份与重启状态处理。
- [store.mjs](../src/server/store.mjs):SQLite任务与事件、旧JSON迁移、备份与重启状态处理。
- [git-delivery.mjs](../src/core/git-delivery.mjs):当前Task已审核文件的提交计划、独立索引/引用事务、结果核对和恢复。
- [delivery-report.mjs](../src/core/delivery-report.mjs):实际检查与提交证据的JSON/Markdown报告。
- [files.mjs](../src/server/files.mjs):最多400文件/8MB的搜索预算、单文件提案、基线与原文备份。
- [app.mjs](../src/server/app.mjs):SSE快照、全局配置、默认12步/最高30步限制。快照revision与未来持久事件seq是两个概念。
+32
View File
@@ -0,0 +1,32 @@
# 内置本地Git交付契约
本切片把已审核文件、实际工程检查、只读提交预览、持久提交job和交付报告绑定到同一个Task。代码检查不等同于业务需求已验收;报告只陈述已有证据。
## 准入与范围
- 当前工程必须是自己的Git仓库,已有HEAD;不自动初始化、推送或创建worktree。
- 本机需要可用的Git;当前实现使用Git索引及prepare/commit引用事务,已在Git for Windows 2.54.0验证。便携包随附Node/npm,Git使用本机安装。
- 只接受当前Task中已应用的普通文本文件。连续提案的基线链必须一致,当前文件SHA256必须等于最新已应用提案。
- Git HEAD中的内容必须与该修改链起点一致。选中文件已有其他人的工作区修改、暂存修改、未合并或特殊索引标记时拒绝提交。
- 新文件必须由本Task从不存在的基线创建。其他未跟踪文件不会进入提交。
- 完整有界源码快照和至少一项实际有测试数量的通过记录必须一致;跳过、取消、未知、损坏日志和过期检查均不能准入。
- 不执行自定义Git内容过滤器、外部diff或fsmonitor。本地提交不执行仓库hooks和GPG签名,预览明确说明该策略;依赖这些检查的团队工程须通过自己的Git流程交付。
- 源码指纹与Git执行基线分别保存。文件未变化时,提交不使已有测试过期。
## 提交与保留
确认只接收已保存的planId。预览包含任务、HEAD/ref、作者、实际消息、明确文件清单、diff、检查记录和策略;任一基线变化需要新计划。
执行宿主持有项目互斥。Git使用参数数组、明确路径、受限环境和独立索引构建交付树;原索引持有标准index.lock,保留不属于此任务的所有索引条目。Git引用事务先比较原HEAD并prepare锁定HEAD和当前分支,再核对实际分支引用后commit或abort;支持已有命名分支。提交记录含唯一Workbench-Delivery trailer,禁止以重试生成第二个提交。
完成必须核对实际提交的父节点、树、路径、文件blob、唯一trailer、原工作区源码与无关索引条目。未知状态不会伪装成完成。
## 停止与恢复
job持久保存queued/preparing/prepared/publishing/committed/completed阶段及索引锁的本次身份。发布前停止不会更新HEAD;已发布后的停止继续核对实际结果,不能假定取消了提交。
服务实际退出后不自动重放。显式“核对提交结果”先只读确认预期提交和引用;只有本次持有的遗留索引锁及原索引SHA均匹配、原进程已结束时,才修复本次索引发布。遇到外部索引/引用变化保留需处理状态,不删除别人的锁、不覆盖外部修改。
## 交付报告
JSON和Markdown工件从实际Task、Run、模型快照、usage、提案、检查日志、源指纹及Git结果生成;带SHA256并可查看/下载。无需额外模型调用。报告明确区分待审核、需检查、检查通过待提交、已验证提交和结果待核对,不把模型文字中的“完成”作为交付证据。
+1 -1
View File
@@ -1,6 +1,6 @@
# Agent Workbench 后续产品与执行开发方案
日期:2026-10-29。状态:规划版本;当前软件为1.0.0基础版本。本文中的后续能力与验收目标均为待实施项。
日期:2026-10-29。本文保留完整产品规划;1.1.0已实现M1,1.2.0已实现M2的当前Task本地Git交付及证据报告切片。具体已实现范围见[能力矩阵](CAPABILITIES.md),其余阶段与完整验收目标继续实施。
## 1. 产品目标
+15
View File
@@ -0,0 +1,15 @@
# 1.2.0 内置Git交付验收
本轮覆盖同一个Task中的实际测试失败、四模块修复、文件审核、重新检查、Git预览/确认、结果核对和JSON/Markdown报告。完整M2的ChangeSet、增量工程索引、React/Python样本、worktree及后续引擎/桌面/手机配对仍继续开发。
| 用户可见行为 | 实际检查 | 已验证范围 |
| --- | --- | --- |
| 审核文件与检查绑定同一Task | 原Task/Run、文件链、源码指纹、日志完整性 | 完整92项行为/API通过 |
| 只读预览与独立确认 | 实际diff、署名、说明、planId与重复请求 | 9组交付UI通过 |
| 保留其他暂存和工作区改动 | 独立索引/树及Git引用事务 | 新/旧文件、CRLF、无关删除与索引标记 |
| 中断结果核对且不重放 | 9个真实进程退出切点及索引/引用归属 | 外部变化保留需核对状态 |
| 报告查看和下载 | JSON/Markdown真实工件SHA256、检查与commit | 桌面/390px与逐字节下载通过 |
| 重复选中会话内容保留 | 同id选择不清空、可只读刷新 | 重复点击回归通过 |
| 旧版原进程连续升级 | 旧0.1→1.0→SQLite→1.2→再次升级 | 合成内存连接与历史保留通过 |
基础/诊断/任务UI、便携/源码ZIP和正式配置模型的最终记录随验收完成写入[VALIDATION](VALIDATION.md)。手机尺寸验证用于响应式界面;实际手机远程连接仍需后续配对网关。
+6 -6
View File
@@ -1,16 +1,16 @@
# 升级到 1.1.0并保留原连接
# 升级到 1.2.0并保留原连接
升级脚本在原Node进程中替换工作台实现,保留现有内存连接对象、项目和会话。它不会读取、打印、导出或复制API Key。普通停止后重启会丢失仅在内存中的Key,需要重新填写。
## 升级条件
使用已完成构建的1.1.0便携包,保留原启动发行目录及当前实现目录。工作台中的任务、工程检查和命令审批均已结束,当前本地9229端口可用。脚本接受127.0.0.1上的0.1.0、1.0.0或1.1.0工作台,先核对进程PID和原发行路径,再迁移对象。升级后校验配置、项目、会话和PID,并关闭本次开启的调试端口。控制请求使用独立HTTP连接,避免调试暂停后复用超时连接。
使用已完成构建的1.2.0便携包,保留原启动发行目录及当前实现目录。工作台中的任务、工程检查、Git交付和命令审批均已结束,当前本地9229端口可用。脚本接受127.0.0.1上的0.1.0、1.0.0、1.1.0或1.2.0工作台,先核对进程PID和原发行路径,再迁移对象。升级后校验配置、项目、会话和PID,并关闭本次开启的调试端口。控制请求使用独立HTTP连接,避免调试暂停后复用超时连接。
首次进入1.1.0时,旧JSON数据在保留原字节备份的事务中迁移到SQLite。任务、运行、事件和工件使用新契约,旧历史以legacy-import标明来源。随附npm位于新发行runtime,原进程保留原Node可执行路径并使用新npm检查器。
首次从旧JSON版本进入SQLite时,数据在保留原字节备份的事务中迁移,旧历史以legacy-import标明来源。已有SQLite实例保留原状态与Map并补齐新增Git记录类型。随附npm位于新发行runtime,原进程保留原Node可执行路径并使用新npm检查器。
## 执行
在解压后的1.1.0便携目录打开PowerShell。使用service-info保存的原启动目录,数据目录沿用当前启动配置;此前已经热升级的实例另传当前handler目录。
在解压后的1.2.0便携目录打开PowerShell。使用service-info保存的原启动目录,数据目录沿用当前启动配置;此前已经热升级的实例另传当前handler目录。
```powershell
$awNewRoot = (Get-Location).Path
@@ -20,9 +20,9 @@ if ($awServiceInfo.runtimeRoot) { $awUpgradeArguments += @('--handler-root', $aw
& (Join-Path $awNewRoot 'runtime\node.exe') @awUpgradeArguments
```
成功后访问 `http://127.0.0.1:4318/?release=1.1.0`,界面显示v1.1.0。任务记录和运行诊断可核对模型、预算、工具、工件与文件审核状态。已有项目路径继续指向原项目,不移动用户文件。
成功后访问 `http://127.0.0.1:4318/?release=1.2.0`,界面显示v1.2.0。任务记录可查看工程检查、Git预览、提交与交付报告;已有项目路径继续指向原项目,不移动用户文件。
`service-info.json`保留原启动目录,并更新当前实现目录`runtimeRoot`与版本。再次运行启动器会复用当前本地服务;以后需要重启时,从1.1.0目录启动。
`service-info.json`保留原启动目录,并更新当前实现目录`runtimeRoot`与版本。再次运行启动器会复用当前本地服务;以后需要重启时,从1.2.0目录启动。
## 验证范围
+14
View File
@@ -1,5 +1,19 @@
# Agent Workbench 验收记录
## 1.2.0 · 当前Task的Git交付与证据报告
Windows x64、Node24.22.1、Edge156.0.4314.42。构建通过;完整92项行为/API/实际退出恢复测试全部通过,0失败/跳过/取消。首轮90/92的两个失败已定位并修复,15项相关专项及最终完整回归均通过。
| 验证 | 结果 | 结构化证据 |
| --- | --- | --- |
| 完整行为/API/实际退出与连续升级 | 92/92通过 | [m2-tests-validation.json](m2-tests-validation.json) |
| 基础界面 | 10/10通过 | [m2-ui-validation.json](m2-ui-validation.json) |
| 模型错误与诊断界面 | 9/9通过 | [m2-diagnostics-ui-validation.json](m2-diagnostics-ui-validation.json) |
| 任务、工件、预算与审核后继续 | 7/7通过 | [m2-execution-ui-validation.json](m2-execution-ui-validation.json) |
| Git预览/确认/报告/未知结果核对 | 9/9通过 | [m2-delivery-ui-validation.json](m2-delivery-ui-validation.json) |
桌面提交预览和390px报告已目视核对,文字、diff、hash、关闭入口与固定输入区均可用。全部界面检查无页面/请求异常。便携/源码包、正式原进程升级及配置模型的内置Git真实闭环正在进行,完成后补入此处;完整M2/M6验收和后续能力不计入上述结果。
## 1.1.0 · M1可靠内核与工程切片
2026-10-29,Windows x64,Node24.22.1,Edge156.0.4314.42。TypeScript/Vite/esbuild构建通过。完整68项行为/API/进程退出恢复检查通过,0失败/跳过/取消;新增Task/Run、SQLite事务、工件损坏、预算、工程检查与审核后继续的覆盖。
+31
View File
@@ -0,0 +1,31 @@
{
"success": true,
"version": "1.2.0",
"testedAt": "2026-10-29T08:23:37.531Z",
"browser": "156.0.4314.42",
"passed": [
"actual failing tests and four source proposals retain the original project and task",
"reviewed changes continue the same Task through 14 real tests and model-prepared Git review",
"review shows actual paths, diffs, tests, author and policy; cancelling leaves Git unchanged",
"an index change after confirmation preview refuses the stale job and preserves both staged owners",
"390px confirmation keeps file hashes, diffs and actions inside the modal",
"double confirmation creates one four-file commit, retains owner bytes and publishes report with completion",
"report viewing and Markdown/JSON downloads preserve verified artifact bytes and truthful acceptance limits",
"mobile report preview closes cleanly and keeps the task input fixed",
"unknown Git results block new submission and the explicit reconcile action restores the existing commit"
],
"pageErrors": [],
"requestFailures": [],
"projectRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\delivery-ui-069d8e99-b7f8-4dd9-abb2-8b55e1aaff68\\四模块交付工程",
"projectId": "8a3b97cc-61d4-4e39-96f4-2b22def997ec",
"sessionId": "0b0642eb-113f-451f-a550-76010f5ffaa5",
"taskId": "75f017e1-1159-4216-8941-5b33a89e0286",
"commit": "14cd93f53bb4c74f75512d04b7b395c655965c73",
"recoveryCommit": "2139da22a461ae7e9cf68dcefba6600fdecea819",
"testCounts": {
"baselineFailed": 13,
"passed": 14
},
"model": "controlled local HTTP fixture",
"confirmations": 2
}
+20
View File
@@ -0,0 +1,20 @@
{
"success": true,
"version": "1.2.0",
"url": "http://127.0.0.1:4321",
"date": "2026-10-29T08:38:14.039Z",
"passed": [
"model response validation checks the tentative connection before saving",
"a model failure after successful tools shows source, attempts and local runtime diagnosis",
"explicit retry preserves the completed tool result without replaying the task",
"an error question receives the actual session diagnosis and formatted answer",
"review state exposes the review action and prevents application during a running request",
"approved Unicode commands execute in the declared shell and retain Chinese output",
"authentication errors do not retry and error/diagnostic controls fit a 390 px viewport",
"stop cancels pending retry and clears running model state",
"a transient service failure recovers within the bounded retry policy"
],
"pageErrors": [],
"requestFailures": [],
"modelValidation": "controlled local HTTP fixture; actual configured model is verified separately"
}
+19
View File
@@ -0,0 +1,19 @@
{
"success": true,
"version": "1.2.0",
"testedAt": "2026-10-29T08:38:36.258Z",
"browser": "156.0.4314.42",
"passed": [
"model-selected checks wait for approval and display actual counted results",
"verified artifact preview shows the real check log and hash",
"changed source invalidates old checks and manual confirmation runs the new plan",
"390px task drawer, log preview, close controls and fixed composer remain operable",
"reconnection synchronizes missed session changes in other projects",
"budget controls pause before tools and preserve the goal across recorded runs",
"applied proposals continue the original task into actual engineering verification"
],
"pageErrors": [],
"requestFailures": [],
"projectRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\execution-ui-1d074ed9-8f2d-43e2-b012-53bc79e39075\\project",
"model": "controlled local HTTP fixture"
}
+20
View File
@@ -0,0 +1,20 @@
{
"testedAt": "2026-10-29T08:36:56.5605637Z",
"firstRun": {
"pass": 90,
"tests": 92,
"fail": 2
},
"version": "1.2.0",
"node": "v24.22.1",
"tests": {
"fail": 0,
"cancelled": 0,
"skipped": 0,
"tests": 92,
"todo": 0,
"pass": 92
},
"success": true,
"tap": ".qa/m2-final-tests.tap"
}
+27
View File
@@ -0,0 +1,27 @@
{
"success": true,
"url": "http://127.0.0.1:4321",
"browser": "Microsoft Edge 156.0.4314.42",
"date": "2026-10-29T08:37:57.844Z",
"projectRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\ui-625675d3-61be-48fe-bad6-0eee2a151b60\\ui-project",
"viewports": [
1440,
780,
390
],
"passed": [
"project selection and real file preview",
"real command consent, execution and stale snapshot rejection",
"diff review and verified file application",
"manual editor creates a reviewable proposal",
"file responses stay with the current selection",
"denial, session selection, reload, stale response rejection and export",
"project inventory responses cannot replace another project",
"780 and 390 px: project drawer, file, diff and trace controls, no page overflow",
"unified and detailed research reports render",
"model list, ephemeral key, compatible fixture tool loop and return to offline mode"
],
"pageErrors": [],
"requestFailures": [],
"modelValidation": "controlled local HTTP fixture; no real model"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB