diff --git a/docs/git-review-ui-validation.json b/docs/git-review-ui-validation.json new file mode 100644 index 00000000..21c49142 --- /dev/null +++ b/docs/git-review-ui-validation.json @@ -0,0 +1,31 @@ +{ + "success": true, + "version": "1.5.1", + "testedAt": "2026-10-29T14:25:20.944Z", + "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-86647bcb-5c4c-4f53-bcaa-cc0a44a216e0\\四模块交付工程", + "projectId": "01836e8d-6e57-4369-8247-f9143fac83ab", + "sessionId": "63193e0b-9aab-4a6c-a2b9-08d7afaba113", + "taskId": "d4b5eaf1-49ec-4b89-8854-9b625b4e402c", + "commit": "31bb15390a0e98cbb480276d9f4e69e9b54a2e32", + "recoveryCommit": "3df0f2ee7fa292d4b785d490daaad4ef6e685359", + "testCounts": { + "baselineFailed": 13, + "passed": 14 + }, + "model": "controlled local HTTP fixture", + "confirmations": 2 +} \ No newline at end of file diff --git a/findings.md b/findings.md index 39dff04f..3006acfe 100644 --- a/findings.md +++ b/findings.md @@ -205,3 +205,6 @@ Claude Code 报告已验证工具输入校验、权限决定、队列并发屏 - 1.5.1真实读取已经能分页推进并产生全部四份补丁和实际14项检查通过;新的收尾缺口是plan_delivery只返回awaiting_review,Runtime仍继续请求模型,模型反复inspect_session/工件直到step_limit。必须在持久保存/工具完整配对后以Git审查边界停止请求,并用已封存预览完成确认;失败的验收器上限不掩盖,工程完成与自主循环完成分别记录。 - 本次只读诊断首次未携带bootstrap控制token而HTTP403,补齐后读取成功,没有模型Key读取。一次VALIDATION长行补丁只用了部分行而被拒绝,无写入;改为精确段落补丁与字面短语替换。 + +- Git审查边界的实际HTTP测试证实只发送1次响应;同消息里的后续run_command记interrupted、无审批或文件副作用,协议完整;重开Store后仍拒绝模型续接,确认原预览才完成Git。另测修改署名/预览和撤回不写Git、保留原Task;旧UI验收由等待completed修正为等待needs_review/git_review,9组复验通过。 +- 两次组合补丁包含只给长行前缀的无效锚点,整体被拒绝,无部分写入;随后以完整锚点/相邻短行完成。查询误用verify-batch-ui.mjs和不存在的.qa聚合器,只读失败,实际脚本是verify-change-sets-ui.mjs;后续使用rg --files定位。 diff --git a/progress.md b/progress.md index ce86f64a..ab22df73 100644 --- a/progress.md +++ b/progress.md @@ -157,3 +157,5 @@ - 独立源码163/163通过,原PID23080/连接/8项目10会话升级1.5.1成功。续接原失败Task后实际四补丁/一批次、14项检查/build通过;321秒因既有Git预览后继续查询而达四新增Run的验收器上限,保留上限失败记录。验收器只确认既有模型预览,无新增请求,Workbench commit5e3b8539/报告/SHA通过;模型仍paused/step_limit,不冒充自主完整收尾。新增45响应/453235已报告tokens,累计72/702772,服务失败usage未知。准备最终不可变1.5.1包,之后实施Git等待审查边界与隔离工作区。 - 最终1.5.1发行20261029140959308的2216/381份归档、CRC/SHA、独立便携实际4项检查通过;97份核心/测试/全部脚本/构建输入及6份编译与独立163项验收源码一致。原PID23080/模型及8项目10会话保留再次升级。证据提交67e5cbd后继续开发下一切片,正式服务保持已验证不可变目录。 + +- 下一切片已实现Git预览后的确定性审查边界:当前助手消息中后续工具成对记为未执行,保存计划/暂停原因,不继续请求模型;确认已有预览后内核完成原Task及报告,预览可修改/撤回。34项交付/实际退出/Runtime相关回归及9组桌面/390px交付流程通过,0页面/请求异常;确认截图已目视核对,证据为git-review-ui-validation.json。功能仍在开发源码,正式1.5.1保持。 diff --git a/scripts/verify-delivery-ui.mjs b/scripts/verify-delivery-ui.mjs index 63d09250..0fda5794 100644 --- a/scripts/verify-delivery-ui.mjs +++ b/scripts/verify-delivery-ui.mjs @@ -120,13 +120,20 @@ try { await page.getByRole('button', { name: '应用这项改动', exact: true }).click(); } await waitStatus('completed'); modelMode = 'final'; await page.getByRole('button', { name: '继续检查与交付', exact: true }).click(); - await waitStatus('awaiting_approval'); await page.getByRole('button', { name: '确认执行', exact: true }).click(); await waitStatus('completed'); + await waitStatus('awaiting_approval'); await page.getByRole('button', { name: '确认执行', exact: true }).click(); await waitStatus('needs_review'); const verified = await state(); assert.equal(verified.execution.task.id, reviewed.execution.task.id); assert.equal(verified.execution.checks.at(-1).status, 'passed'); assert.equal(verified.execution.checks.at(-1).results[0].tests.passed, 14); assert.equal(verified.execution.deliveries.length, 0); assert.equal(verified.execution.deliveryPlans.at(-1).preparedBy, 'agent'); + assert.equal(verified.execution.run.stopReason, 'git_review'); await page.getByRole('button', { name: '查看任务记录' }).click(); await expect(task()).toContainText('测试 14/14 通过'); await page.locator('.session-select').filter({ hasText: '修复四模块并交付Git报告' }).click(); await expect(task()).toContainText('测试 14/14 通过'); + await expect(delivery().getByLabel('等待Git确认')).toBeVisible(); + await expect(page.getByRole('button', { name: '继续检查与交付', exact: true })).toHaveCount(0); + await delivery().getByRole('button', { name: '查看待确认预览', exact: true }).click(); + await expect(confirm()).toBeVisible(); await expect(confirm()).toContainText('14/14'); + await screenshot('delivery-git-review-boundary'); + await confirm().getByRole('button', { name: '返回修改', exact: true }).click(); mark('reviewed changes continue the same Task through 14 real tests and model-prepared Git review'); await delivery().getByLabel('提交说明', { exact: true }).fill('feat: ship the reviewed four-module delivery'); diff --git a/src/client/App.tsx b/src/client/App.tsx index e552c9fa..a939ee71 100644 --- a/src/client/App.tsx +++ b/src/client/App.tsx @@ -86,6 +86,7 @@ export default function App() { const canContinueReview = !!session && pending.length === 0 && !isRunning && (reviewedRun?.status === 'needs_review' || reviewedRun?.status === 'paused' && reviewedRun.stopReason === 'step_limit') && reviewedRun?.taskId === session.execution?.task?.id + && reviewedRun?.stopReason !== 'git_review' && !session.execution?.progress.requiresVerification.length && session.changes.some(change => change.status === 'applied' && (!change.taskId || change.taskId === session.execution?.task?.id)); const selectedChange = session?.changes.find(change => change.id === changeId) || pending[0] || session?.changes.at(-1); diff --git a/src/client/DeliveryPanel.css b/src/client/DeliveryPanel.css index 433e5e94..d92c3933 100644 --- a/src/client/DeliveryPanel.css +++ b/src/client/DeliveryPanel.css @@ -25,6 +25,8 @@ .delivery-report-actions { display: flex; gap: 4px 10px; flex-wrap: wrap; margin-top: 8px; } .delivery-report-actions .text-button { padding: 3px 0; } .delivery-attention { padding: 12px; border: 1px solid #e7d8b8; background: #fffaf0; border-radius: 5px; } +.delivery-review-boundary { margin: 14px 0; font-size: 11px; line-height: 1.8; } +.delivery-review-boundary > p { margin: 7px 0; color: #805d22; overflow-wrap: anywhere; } .delivery-warning { display: flex; align-items: flex-start; gap: 6px; color: #805d22; font-size: 11px; line-height: 1.8; } .delivery-report-summary { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 15px; } .delivery-report-summary > .text-button { display: flex; margin-top: 8px; padding-left: 0; } diff --git a/src/client/DeliveryPanel.tsx b/src/client/DeliveryPanel.tsx index f0e0f8b5..a150cd9a 100644 --- a/src/client/DeliveryPanel.tsx +++ b/src/client/DeliveryPanel.tsx @@ -31,11 +31,15 @@ export function DeliveryPanel({ session, busy, onSession, onError, openArtifact const hasApplied = session.changes.some(change => change.taskId === task?.id && change.status === 'applied'); const reports = session.execution?.artifacts.filter(artifact => artifact.kind === 'delivery-report-markdown') ?? []; const latestReport = reports.at(-1); + const waitingPlan = (session.execution?.deliveryPlans ?? []).filter(plan => plan.taskId === task?.id + && plan.runId === session.execution?.run?.id && ['planned', 'accepted'].includes(plan.status) + && (session.execution?.run?.review?.status === 'pending' && session.execution.run.review.planId === plan.id || plan.preparedBy === 'agent' && plan.status === 'planned')).at(-1); useEffect(() => { identity.current++; setConfirm(null); setPlanning(false); setSubmitting(false); setReporting(false); setReconciling(''); setMessage(task ? '完成:' + task.goal.replace(/\s+/g, ' ').slice(0, 90) : ''); setAuthorName(''); setAuthorEmail(''); inFlight.current = false; + return () => { identity.current++; }; }, [session.id, task?.id]); async function prepare() { @@ -57,6 +61,15 @@ export function DeliveryPanel({ session, busy, onSession, onError, openArtifact } catch (error) { if (request === identity.current) onError(error); } finally { if (request === identity.current) { inFlight.current = false; setSubmitting(false); } } } + async function discard() { + if (!waitingPlan || inFlight.current) return; + inFlight.current = true; setSubmitting(true); const request = identity.current; + try { + const result = await api('/sessions/' + session.id + '/delivery-plans/' + waitingPlan.id + '/discard', {}); + if (request === identity.current) { onSession(result); setConfirm(null); } + } catch (error) { if (request === identity.current) onError(error); } + finally { if (request === identity.current) { inFlight.current = false; setSubmitting(false); } } + } async function report() { if (inFlight.current) return; inFlight.current = true; setReporting(true); const request = identity.current; @@ -88,6 +101,7 @@ export function DeliveryPanel({ session, busy, onSession, onError, openArtifact

审核提交与交付

核对当前任务已应用的文件和实际测试,预览后生成本地提交。其他项目改动保留。

文件已审查→实际检查→ job.status === 'completed') ? 'done' : ''}>本地提交
+ {waitingPlan &&
Git预览已保存,等待确认

{waitingPlan.paths.length} 个文件 · {waitingPlan.baseline.branch} · HEAD {waitingPlan.baseline.head.slice(0, 12)}

任务已暂停请求模型。审查现有预览后确认提交,或撤回预览再继续。

{waitingPlan.status === 'accepted' &&

这份预览已尝试执行;请核对原结果,确认未提交后重新预览。

}
}