build: prepare independent adoption A/B release and retained-host gates
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Agent Workbench项目执行规范
|
||||
|
||||
当前按用户“全量开发”完成A/B独立1.24.9发行链路,范围见docs/ADOPTION-AB-RELEASE-PLAN.md,不代表整个1.25完成。版本/发行入口和实际appRoot验证已接入,构建及源码A网页7/Electron3、B网页9/Electron9通过;首相关54项52通过/1失败/1取消,原断言不变的串行单轮15/15及升级2/2复验通过,首失败保留,见docs/QA-ADOPTION-AB-RELEASE.md。正式只读全原状态基线已存65项目81会话6377记录13484事件/outbox,原生空闲窗口正常关闭;正式仍1.24.8/PID36552/原Provider,尚未安装。本轮真实模型0,不委派/推送,不提取/复制/解密/重存Key,不重启正式;V网络partial、T/R/P/O原失败、重复读取/自主交付/Purge未知保持。以下“开发切片未发行”为当时时点,最终发行状态需以后续验收为准。
|
||||
|
||||
当前接续要求复核A与单轮shadow观察B已完成开发切片及阶段回顾。研究原未提交内容已验证并提交ce3afb2f;A提交785dd0c5,相关53/53/网页7组/Electron3组及构建通过,见docs/REQUIREMENTS-REVIEW-A.md;B相关68/68及补强最终31/31、网页9组/Electron9组和构建通过,见docs/TURN-PROGRESS-B.md。B只记录外显事实和原收据,不改变提示/停止/权限/预算。独立发行/安装/正式升级未完成,正式仍1.24.8/PID36552/原Provider,不代表1.25已交付。真实模型预算0,保留V网络partial、T/R/P/O原失败、重复读取和Purge未知,不续跑旧样本、不委派、不推送、不读取/重存Key。下方“当前新增研究只读”等为研究时点。
|
||||
|
||||
V按一次诊断partial在预检前结束,真实请求0;原正式状态精确保持,46份证据离线通过,见docs/QA-LIVE-DELIVERY-V.md。当前用户新增Tianshu-harness深度源码研究:固定2d0b22e,只读机制/原理/逻辑与本产品差异,不运行第三方安装服务或导入其配置,不改正式Provider/Key,不委派、不推送;真实交付另冻新样本,不续跑V/T/R/P/O。下方U“下一V”和V执行中段落为历史状态。
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Agent Workbench 更新记录
|
||||
|
||||
## 1.24.9 · 用户要求复核与单轮观察(发行验收中)
|
||||
|
||||
- 在原任务侧栏记录用户原文来源、独立要求修订和验收方式,对照当前文件、实际检查/页面及原工件;模型答复不能自签业务验收,失败与过期依据保留。
|
||||
- 单轮观察记录实际分页增长、重复候选、失败和所属等待;可查看原收据、历史运行及交付报告,不改变提示、停止、权限或预算。
|
||||
- 本批独立发行和实际安装验收进行中,正式尚未升级;1.25自动草案提取、完整范围约定及诊断闭环继续排期。真实自主工程交付、网络恢复与Purge收益未由这些本机验证证明。
|
||||
|
||||
## 1.24.8 · 已读文件与当前检查的工作记忆(已本地交付)
|
||||
|
||||
- 同一版本、同一原范围的已返回文件页连续聚合,保留全部原调用和工件来源;空洞不补造、重叠冲突拒绝,旧请求继续按原视图核对。
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# A/B首批能力1.24.9发行计划
|
||||
|
||||
本轮授权来自用户在发行下一步说明后的“全量开发”。交付范围为已提交的要求来源与证据复核A、单轮外显事实shadow B,以及独立发行/安装/保留原状态正式升级。1.25的自动草案提取、完整范围约定及诊断闭环尚未完整实现,继续排期,不用新版本号掩盖缺口。
|
||||
|
||||
阶段依次为:版本与受影响发行入口修正并验证提交;冻结已提交源码/编译并生成不可变候选;源码ZIP离线独立重建和所有编译SHA、三份归档核对;源码/便携/真实安装副本A/B及既有文件/HTML路径验证;真实隔离安装、同进程更新、失败回滚、重启恢复和卸载;正式全原状态核对后唯一安装;网页与原生回看后全原状态再核对;证据封存、回顾和本地Git。
|
||||
|
||||
正式升级复用原进程和Provider,不读取/复制/解密/重新保存真实Key,不重启宿主。正式存在活动任务、审批、窗口、未知外部操作或状态变化时,先保留并核对,不自动停止用户操作或重放未知安装。实际安装器必须先通过隔离生命周期;候选目录/ZIP/安装器全部有SHA,任何来源变化都需新候选,不能刷新旧发行。
|
||||
|
||||
观察仍仅记录,不注入提示、不改停止/权限/预算。协议/工程夹具与真实模型能力分别报告。真实模型预算0,旧V/T/R/P/O不续跑;网络partial/原失败/重复读取和自主交付/Purge收益未验证继续保留。真实模型后续需另冻新预检与Node样本,Node闭环后才React/Python及独立Purge对照。
|
||||
@@ -0,0 +1,23 @@
|
||||
# A/B 1.24.9 发行验收
|
||||
|
||||
状态:发行输入验证中,尚未生成候选、安装或升级正式版本。开发切片分别为 `785dd0c5` 与 `6fe04042`;本次发行工作以 `feat/adoption-ab-release-1.24.9` 继续。正式仍为 1.24.8 / PID 36552。
|
||||
|
||||
## 范围和不变条件
|
||||
|
||||
交付要求原文来源与当前证据复核 A、单轮外显事实 shadow B,以及完整独立发行/安装/保留状态升级链路。1.25 的自动要求草案、完整范围约定和诊断闭环继续排期。真实模型请求预算 0;全部执行夹具使用隔离目录、端口和 localhost 模型服务。V 网络 partial、T/R/P/O 原失败、重复读取、自主交付和 Purge 收益未验证继续保留,不续跑旧样本。
|
||||
|
||||
不读取、复制、解密或重存真实 Key,不重启正式宿主或 Provider,不委派、不推送。所有首失败另存,不能把最终复验改写成首轮整批通过。
|
||||
|
||||
## 阶段一:发行输入和原状态
|
||||
|
||||
- 完整构建通过,原日志 `.qa/adoption-ab-release/build-first.log`。A 源码网页 7 组通过。
|
||||
- 首轮相关 54 项:52 通过、1 失败、1 取消。长检查样本在原 8 秒等待审批阶段超时;独立串行原 15 项随后全部通过,未改断言/预算/停止规则。首原日志 `related-first.tap`,复验 `turn-progress-serial.tap`。
|
||||
- 首 Electron B 在原 25 秒门槛时仍等待第三次本机夹具响应,前两次读取已完成。首 DOM/截图与结果保持;串行复验原 9 组全部通过,桌面和 390px 截图已实际回看。该复验不证明首失败的唯一根因;不归为真实供应商网络故障。
|
||||
- 旧版升级首用例超时时,隔离目录内 npm 文件复制仍在更新。保存隔离身份/健康现场后,仅正常关闭 PID 23200 / 端口 51192 的自有宿主;原测试子进程在清理后结束,首取消结果保留。原文件未改的单独复验 2/2 通过:直接宿主两次升级 3246ms,0.1 旧版完整迁移 6344ms。原超时门槛仍为 30/60 秒,日志 `upgrade-serial.tap`。52 个首通过及这两组复验共同覆盖原 54 项,不记成新的整批 54/54。
|
||||
- 正式首次 before 因 1 个已打开窗口拒绝,未安装。基线脚本修正为允许只读记录空闲窗口,升级前仍要求窗口数 0;`before-recheck` 成功,65 项目 / 81 会话 / 6377 记录 / 13484 事件及 outbox。已保存每原表行、全导出、全工件与公开模型中心摘要。Computer Use 核对窗口空闲后正常关闭,正式 PID 36552、版本和连接保持,窗口数 0。首失败不覆盖。
|
||||
|
||||
最终源码 A 网页 7 / Electron 3、B 网页 9 / Electron 9 全部通过。回顾:版本兼容入口与 A/B 的实际 appRoot 必须同时覆盖候选和安装副本。安装验证已接入上述四入口,原文件 16 / HTML 等 9 路径继续执行。新增失败现场保存会话原收据和请求时间。阶段一通过,可本地提交并冻结源码;当前未声称已发行或整个 1.25 已完成。
|
||||
|
||||
## 后续门槛
|
||||
|
||||
冻结已提交输入 → 新不可变候选 → 源码 ZIP 离线重建/全编译 SHA → 三归档/便携 → 源码与便携 A/B 四入口 → 实际隔离安装及安装副本 A/B/文件路径 → 正式唯一安装/全原状态复核 → 网页和原生回看/再次全对账 → 证据封存/索引核对/回顾/本地 Git。各结果按实际执行补充。
|
||||
@@ -1,5 +1,11 @@
|
||||
# 汇总发现
|
||||
|
||||
## A/B发行入口
|
||||
|
||||
首54相关52通过/1失败/1取消;原文件、断言和超时不变的串行单轮15/15、热升级2/2复验均通过。首B Electron仍等待第3本机响应,串行原9组通过;保存全部首失败与实际截图,不把并发/文件复制迟缓直接写成唯一根因。安装副本需要A/B网页及Electron四入口;同脚本两个模式分别保存日志,不能覆盖。正式只读基线允许记录空闲窗口,安装必须0窗口;正式基线已存并正常关闭空闲界面,原PID/Provider保持。
|
||||
|
||||
打包要求干净且sourceCommit对应实际载荷;verify-packaged-build可从源码ZIP独立提取并离线重建所有编译文件。现有升级/便携验收多处显式版本列表,新1.24.9需在不可变打包前补齐。A/B验收脚本此前固定工作区,需接AGENT_WORKBENCH_QA_APP_ROOT验证实际便携和安装目录。正式更新沿用原安装器与热替换,保留原Provider对象;只读摘要检查所有原表行/导出/工件和公开配置,不读取/导出真实Key。
|
||||
|
||||
## 本轮实现边界
|
||||
|
||||
B补强确认:等待审批不能先消耗同轮已完成工具,否则结算误标重复;观察收据成功后才发布新摘要,避免一次写失败使后续引用错位。原检查作业启动需补仅记录接点,实际批准长测试已验证等待→计数结果。原模型诊断/可用HTTP响应、原调用参数SHA和结果SHA参与观察来源复核;篡改不会被报告为原字节已核对。shadow不进入模型请求,也不设置停止原因;合法只读的总结轮可以没有新增外显事实。
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "local-agent-workbench",
|
||||
"version": "1.24.8",
|
||||
"version": "1.24.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "local-agent-workbench",
|
||||
"version": "1.24.8",
|
||||
"version": "1.24.9",
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.29.11",
|
||||
"@peculiar/x509": "3.1.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "local-agent-workbench",
|
||||
"version": "1.24.8",
|
||||
"version": "1.24.9",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "A local coding workbench with explicit tool execution, reviewable changes and recoverable sessions.",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# 统一执行进度
|
||||
|
||||
## A/B首批能力发行接续
|
||||
|
||||
阶段一已验证:构建、源码A 7/3和B 9/9通过;首54相关52通过/1失败/1取消,串行原单轮15/15与升级2/2通过,未放宽门槛。补失败快照/请求时间、正式before-recheck和安装副本四入口。正式基线65项目81会话6377记录13484事件/outbox已存,空闲窗口正常关闭,仍1.24.8/PID36552;尚未安装。阶段回顾见docs/QA-ADOPTION-AB-RELEASE.md,下一冻结并打新不可变候选。
|
||||
|
||||
用户授权完整推进前述发行/安装/保留状态升级。干净HEAD6fe04042,正式仍1.24.8/PID36552。选1.24.9承载A手动来源复核与B仅记录观察;1.25其余未完能力不倒写为交付。已核对原不可变打包/独立ZIP重建/真实安装及正式状态保留驱动,下一补当前版本入口和候选A/B验证,不改冻结研究/A/B原件。
|
||||
|
||||
## 单轮观察 B 开发
|
||||
|
||||
最终B索引原字节/13项源码对照和离线来源复核通过;研究8份114222字节/63固定源码/14产品输入/6案例及A45份1299321字节/16源码对照的Git索引再次通过,冻结研究/A原件无差异。只读正式health与原PID存在已核对,不声称本轮重做全部正式表/工件审计。范围暂存无.qa或其他未提交修改,收尾本地提交。
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import net from 'node:net';
|
||||
import assert from 'node:assert/strict';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { publicSnapshot, compareOriginalState, hash } from './retained-host-state.mjs';
|
||||
import { inspectHostInstallation } from '../src/core/desktop/app-installation.mjs';
|
||||
|
||||
// Explicit local release stages. Never sends a model request, stops an existing
|
||||
// task/window, reads a private credential map, or retries an unknown installer.
|
||||
const root = path.resolve('.qa/adoption-ab-release/formal'), url = 'http://127.0.0.1:4318', mode = process.argv[2];
|
||||
assert.ok(['before', 'before-recheck', 'upgrade', 'final'].includes(mode)); fs.mkdirSync(root, { recursive: true });
|
||||
const baseline = mode === 'before' || mode === 'before-recheck';
|
||||
const read = file => JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
|
||||
const save = (name, value) => fs.writeFileSync(path.join(root, name), JSON.stringify(value, null, 2) + '\n', { flag: 'wx' });
|
||||
assert.equal(fs.existsSync(path.join(root, mode + '.json')), false, 'Preserve the original attempt; no automatic replay.');
|
||||
async function api(route) {
|
||||
const boot = await (await fetch(url + '/api/bootstrap', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) })).json();
|
||||
const response = await fetch(url + '/api' + route, { headers: { 'X-Workbench-Token': boot.token, Connection: 'close' }, signal: AbortSignal.timeout(20000) });
|
||||
assert.equal(response.status, 200, route); return response.json();
|
||||
}
|
||||
async function inspectorClosed() {
|
||||
await new Promise((resolve, reject) => { const socket = net.createConnection({ host: '127.0.0.1', port: 9229 }); socket.setTimeout(1500);
|
||||
socket.once('connect', () => { socket.destroy(); reject(Error('Inspector is already open.')); });
|
||||
socket.once('error', error => { socket.destroy(); error.code === 'ECONNREFUSED' ? resolve() : reject(error); });
|
||||
socket.once('timeout', () => { socket.destroy(); reject(Error('Inspector state unknown.')); }); });
|
||||
}
|
||||
const startedAt = new Date().toISOString(); let result;
|
||||
try {
|
||||
await inspectorClosed(); const host = await api('/host/status'), dataRoot = host.identity.dataRoot;
|
||||
assert.equal(host.identity.pid, 36552); assert.equal(host.activity.active, false);
|
||||
// An open idle window can be recorded by a read-only baseline. Installation
|
||||
// and the final retention check still require every registered window closed.
|
||||
if (!baseline) assert.equal(host.desktopWindows.count, 0);
|
||||
const installRoot = path.dirname(path.dirname(host.identity.runtimeRoot)); assert.equal(path.basename(path.dirname(host.identity.runtimeRoot)), 'versions');
|
||||
const current = await publicSnapshot(url, dataRoot); assert.equal(current.pid, 36552); assert.equal(current.hasKey, true); assert.deepEqual(current.active, []);
|
||||
if (baseline) {
|
||||
assert.equal(current.version, '1.24.8'); save('state-before.json', current); save('host-before.json', host); save('pointer-before.json', read(path.join(installRoot, 'current.json')));
|
||||
result = { success: true, version: current.version, pid: current.pid, dataRoot, installRoot, projects: current.projects,
|
||||
sessions: current.database.sessionIds.length, desktopWindows: host.desktopWindows.count,
|
||||
tables: Object.fromEntries(Object.entries(current.database.tables).map(([name, table]) => [name, table.count])) };
|
||||
} else {
|
||||
const before = read(path.join(root, 'state-before.json')); compareOriginalState(before, current);
|
||||
const candidate = read('.qa/adoption-ab-release/candidate.json'), freeze = read('.qa/adoption-ab-release/freeze.json');
|
||||
assert.equal(candidate.documentation.sourceCommit, freeze.sourceCommit);
|
||||
for (const input of freeze.inputs) assert.equal(hash(fs.readFileSync(input.path)), input.sha256, 'Frozen input drift.');
|
||||
for (const stage of ['rebuild', 'archives', 'portable', 'install', 'source-a', 'source-a-desktop', 'source-b', 'source-b-desktop', 'portable-a', 'portable-a-desktop', 'portable-b', 'portable-b-desktop', 'portable-files']) {
|
||||
const receipt = read('.qa/adoption-ab-release/receipts/' + stage + '.json'); assert.equal(receipt.success, true, stage);
|
||||
assert.equal(receipt.sourceCommit, freeze.sourceCommit); assert.equal(receipt.candidate, candidate.portableRoot); assert.equal(hash(fs.readFileSync(receipt.log)), receipt.logSha256);
|
||||
}
|
||||
if (mode === 'upgrade') {
|
||||
assert.equal(current.version, before.version); assert.deepEqual(read(path.join(installRoot, 'current.json')), read(path.join(root, 'pointer-before.json')));
|
||||
assert.equal(hash(fs.readFileSync(candidate.installer.path)), candidate.installer.sha256);
|
||||
save('candidate.json', candidate); save('preinstall-state.json', current);
|
||||
const fd = fs.openSync(path.join(root, 'installer-process.log'), 'wx'); let code;
|
||||
try { code = await new Promise((resolve, reject) => {
|
||||
const child = spawn(candidate.installer.path, ['/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/LOG=' + path.join(root, 'installer.log'), '/DIR=' + installRoot, '/DATA_ROOT=' + dataRoot, '/PORT=4318'], { windowsHide: true, stdio: ['ignore', fd, fd] });
|
||||
child.once('error', reject); child.once('close', resolve);
|
||||
}); } finally { fs.closeSync(fd); }
|
||||
save('installer-exit.json', { code, finishedAt: new Date().toISOString() }); assert.equal(code, 0, 'Do not replay a failed/unknown formal installation.');
|
||||
} else { assert.equal(read(path.join(root, 'upgrade.json')).success, true); assert.deepEqual(candidate, read(path.join(root, 'candidate.json'))); }
|
||||
const after = await publicSnapshot(url, dataRoot), retention = compareOriginalState(before, after), afterHost = await api('/host/status');
|
||||
assert.equal(after.version, '1.24.9'); assert.equal(after.pid, before.pid);
|
||||
assert.equal(afterHost.identity.instanceId, read(path.join(root, 'host-before.json')).identity.instanceId);
|
||||
const installed = path.join(installRoot, 'versions', path.basename(candidate.portableRoot)); assert.equal(fs.realpathSync.native(after.runtimeRoot), fs.realpathSync.native(installed));
|
||||
const identity = inspectHostInstallation(installed), pointer = read(path.join(installRoot, 'current.json'));
|
||||
assert.equal(pointer.active.directory, path.basename(installed)); assert.equal(pointer.active.manifestSha256, identity.manifestSha256); assert.equal(pointer.active.runtimeIdentity, identity.identitySha256);
|
||||
const operation = fs.readdirSync(path.join(installRoot, '.installation')).filter(name => /^progress-.*\.json$/.test(name)).map(name => read(path.join(installRoot, '.installation', name))).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))[0];
|
||||
assert.equal(operation.state, 'completed'); assert.equal(operation.candidate.manifestSha256, identity.manifestSha256); await inspectorClosed();
|
||||
save(mode + '-state-after.json', after); result = { success: true, version: after.version, pid: after.pid, runtimeRoot: after.runtimeRoot,
|
||||
projects: after.projects, sessions: after.database.sessionIds.length, hasKey: after.hasKey, retention, sourceCommit: freeze.sourceCommit,
|
||||
pointer, operation, inspectorClosed: true, desktopWindows: afterHost.desktopWindows.count };
|
||||
}
|
||||
} catch (error) { result = { success: false, error: error.stack }; process.exitCode = 1; }
|
||||
result = { ...result, mode, startedAt, finishedAt: new Date().toISOString(), realModelRequests: 0, keyReadOrResaved: false };
|
||||
save(mode + '.json', result); console.log(JSON.stringify({ success: result.success, mode, version: result.version, pid: result.pid, error: result.error }));
|
||||
@@ -0,0 +1,77 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { execFileSync, spawn } from 'node:child_process';
|
||||
import { projectEnvironment } from '../src/core/process-environment.mjs';
|
||||
|
||||
const root = path.resolve('.qa/adoption-ab-release'), mode = process.argv[2];
|
||||
const read = file => JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
|
||||
const save = (name, value) => { const file = path.join(root, name); fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, JSON.stringify(value, null, 2) + '\n', { flag: 'wx' }); };
|
||||
const hash = file => createHash('sha256').update(fs.readFileSync(file)).digest('hex');
|
||||
const record = file => ({ path: file.replaceAll('\\', '/'), bytes: fs.statSync(file).size, sha256: hash(file) });
|
||||
const walk = directory => fs.readdirSync(directory, { withFileTypes: true }).flatMap(row => row.isDirectory() ? walk(path.join(directory, row.name)) : [path.join(directory, row.name)]);
|
||||
const python = 'C:/Users/wangy/AppData/Local/Programs/Python/Python312/python.exe';
|
||||
fs.mkdirSync(root, { recursive: true });
|
||||
if (mode === 'freeze') {
|
||||
assert.equal(execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8', windowsHide: true }).trim(), '');
|
||||
assert.equal(read('package.json').version, '1.24.9');
|
||||
const inputs = execFileSync('git', ['ls-files', '-z', '--', 'src', 'public', 'scripts', 'tests', 'examples', 'benchmarks', 'research', 'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', 'mobile.html'], { encoding: 'utf8', windowsHide: true }).split('\0').filter(Boolean).sort();
|
||||
const freeze = { sourceCommit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8', windowsHide: true }).trim(), version: '1.24.9',
|
||||
inputs: inputs.map(record), compiled: ['dist-client', 'dist-server', 'dist-desktop'].flatMap(walk).sort().map(record), realModelRequests: 0 };
|
||||
save('freeze.json', freeze); console.log(JSON.stringify({ success: true, sourceCommit: freeze.sourceCommit, inputs: freeze.inputs.length, compiled: freeze.compiled.length })); process.exit(0);
|
||||
}
|
||||
const freeze = read(path.join(root, 'freeze.json'));
|
||||
for (const row of freeze.inputs) assert.equal(hash(row.path), row.sha256, 'Frozen input drift: ' + row.path);
|
||||
if (mode === 'register') {
|
||||
const candidate = read('releases/latest.json'); assert.equal(candidate.documentation.sourceCommit, freeze.sourceCommit);
|
||||
assert.equal(read(path.join(candidate.portableRoot, 'MANIFEST.json')).version, freeze.version);
|
||||
for (const row of freeze.compiled) assert.equal(hash(path.join(candidate.portableRoot, row.path)), row.sha256);
|
||||
save('candidate.json', candidate); console.log(JSON.stringify({ success: true, candidate: candidate.portableRoot })); process.exit(0);
|
||||
}
|
||||
const candidate = read(path.join(root, 'candidate.json')); assert.deepEqual(read('releases/latest.json'), candidate);
|
||||
const commands = {
|
||||
rebuild: [process.execPath, ['scripts/verify-packaged-build.mjs']],
|
||||
archives: [python, ['-I', 'scripts/verify-archives.py']],
|
||||
portable: [process.execPath, ['scripts/verify-release.mjs']],
|
||||
install: [process.execPath, ['scripts/verify-desktop-install.mjs']],
|
||||
'source-a': [process.execPath, ['scripts/verify-requirements-ui.mjs']],
|
||||
'source-a-desktop': [process.execPath, ['scripts/verify-requirements-desktop.mjs']],
|
||||
'source-b': [process.execPath, ['scripts/verify-turn-progress-ui.mjs']],
|
||||
'source-b-desktop': [process.execPath, ['scripts/verify-turn-progress-ui.mjs', '--desktop']],
|
||||
'portable-a': [process.execPath, ['scripts/verify-requirements-ui.mjs']],
|
||||
'portable-a-desktop': [process.execPath, ['scripts/verify-requirements-desktop.mjs']],
|
||||
'portable-b': [process.execPath, ['scripts/verify-turn-progress-ui.mjs']],
|
||||
'portable-b-desktop': [process.execPath, ['scripts/verify-turn-progress-ui.mjs', '--desktop']],
|
||||
'portable-files': [process.execPath, ['scripts/verify-local-files.mjs']],
|
||||
};
|
||||
assert.ok(commands[mode], 'Unknown release stage.');
|
||||
const output = path.join(root, 'receipts', mode + '.json'), log = path.join(root, 'logs', mode + '.log');
|
||||
assert.equal(fs.existsSync(output), false, 'Preserve previous stage receipt; do not replay unknown work.'); fs.mkdirSync(path.dirname(log), { recursive: true });
|
||||
const fd = fs.openSync(log, 'wx'), startedAt = new Date().toISOString();
|
||||
const env = projectEnvironment({ AGENT_WORKBENCH_TEST_PYTHON: python,
|
||||
...((mode.startsWith('portable-') || mode === 'install') ? { AGENT_WORKBENCH_QA_APP_ROOT: candidate.portableRoot } : {}) });
|
||||
let result, code;
|
||||
try {
|
||||
console.log('START ' + mode);
|
||||
code = await new Promise((resolve, reject) => { const child = spawn(...commands[mode], { env, windowsHide: true, stdio: ['ignore', fd, fd] }); child.once('error', reject); child.once('close', resolve); });
|
||||
fs.closeSync(fd); assert.equal(code, 0, 'Inspect preserved log: ' + log);
|
||||
assert.deepEqual(read('releases/latest.json'), candidate);
|
||||
let file;
|
||||
if (mode === 'archives') file = '.qa/archives-validation.json';
|
||||
else if (mode === 'portable') file = '.qa/release-validation.json';
|
||||
else if (mode === 'install') file = read('.qa/desktop-install-location.json').result;
|
||||
else {
|
||||
const summaries = fs.readFileSync(log, 'utf8').trim().split(/\r?\n/).filter(line => line.startsWith('{')).map(line => { try { return JSON.parse(line); } catch { return null; } });
|
||||
const summary = summaries.findLast(row => row?.success !== undefined); assert.ok(summary);
|
||||
file = summary.output ?? path.join(summary.directory ?? summary.root, 'result.json');
|
||||
}
|
||||
const value = read(file); assert.equal(value.success, true);
|
||||
if (mode !== 'archives') assert.equal(value.version, freeze.version);
|
||||
if (mode.startsWith('portable-')) assert.equal(fs.realpathSync.native(value.appRoot), fs.realpathSync.native(candidate.portableRoot));
|
||||
if (mode === 'install') assert.equal(fs.realpathSync.native(value.packagedSource), fs.realpathSync.native(candidate.portableRoot));
|
||||
if (mode === 'rebuild') assert.equal(value.sourceCommit, freeze.sourceCommit);
|
||||
result = { success: true, resultPath: path.resolve(file), result: value };
|
||||
} catch (error) { result = { success: false, code, error: error.stack }; process.exitCode = 1; }
|
||||
result = { ...result, mode, log, logSha256: hash(log), startedAt, finishedAt: new Date().toISOString(), sourceCommit: freeze.sourceCommit, candidate: candidate.portableRoot, realModelRequests: 0 };
|
||||
save('receipts/' + mode + '.json', result); console.log(JSON.stringify({ success: result.success, mode, output, resultPath: result.resultPath, error: result.error }));
|
||||
@@ -25,6 +25,7 @@ const prefixes = Object.freeze({
|
||||
'1.24.5': 'live-context-o',
|
||||
'1.24.6': 'network-q',
|
||||
'1.24.7': 'reading-s',
|
||||
'1.24.9': 'adoption-ab',
|
||||
});
|
||||
export function releaseEvidencePrefix(version) {
|
||||
const prefix = prefixes[version];
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { DatabaseSync } from 'node:sqlite';
|
||||
import { snapshotPersistentData } from '../src/core/desktop/install-manager.mjs';
|
||||
export const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
||||
export const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object' ? Object.fromEntries(Object.keys(value).sort().map(key => [key, canonical(value[key])])) : value;
|
||||
export const digest = value => hash(JSON.stringify(canonical(value)));
|
||||
export function databaseSnapshot(dataRoot) {
|
||||
const database = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true }); database.exec('BEGIN');
|
||||
try {
|
||||
assert.equal(database.prepare('PRAGMA quick_check').get().quick_check, 'ok');
|
||||
const tables = {};
|
||||
for (const { name, sql } of database.prepare("SELECT name,sql FROM sqlite_schema WHERE type='table' ORDER BY name").all()) {
|
||||
assert.match(name, /^[a-z_]+$/);
|
||||
const rows = database.prepare('SELECT * FROM "' + name + '" ORDER BY rowid').all().filter(row => !(name === 'metadata' && row.key === 'runtimeOwner'));
|
||||
tables[name] = { count: rows.length, schemaSha256: hash(sql), sha256: digest(rows), rows: rows.map((row, index) => ({ id: row.id ?? row.key ?? row.seq ?? index, ...(row.kind ? { kind: row.kind } : {}), sha256: digest(row) })) };
|
||||
}
|
||||
const sessionIds = database.prepare('SELECT id FROM sessions ORDER BY id').all().map(row => row.id);
|
||||
const owner = database.prepare("SELECT value FROM metadata WHERE key='runtimeOwner'").get();
|
||||
return { tables, sessionIds, ownerSha256: owner ? digest(owner) : null, scope: 'Every original table schema and row field hashed, excluding only runtimeOwner lifecycle metadata. No row payload or credential is returned.' };
|
||||
} finally { database.exec('ROLLBACK'); database.close(); }
|
||||
}
|
||||
export async function publicSnapshot(url, dataRoot) {
|
||||
const healthResponse = await fetch(url + '/api/health', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(healthResponse.status, 200);
|
||||
const health = await healthResponse.json(), bootResponse = await fetch(url + '/api/bootstrap', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(bootResponse.status, 200);
|
||||
const bootstrap = await bootResponse.json(); const token = bootstrap.token;
|
||||
const api = async route => { const response = await fetch(url + '/api' + route, { headers: { 'X-Workbench-Token': token, Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.ok(response.ok, route + ': HTTP ' + response.status); return response.json(); };
|
||||
const database = databaseSnapshot(dataRoot), exports = [];
|
||||
for (const id of database.sessionIds) {
|
||||
const report = await api('/sessions/' + id + '/export');
|
||||
exports.push({ id, project: digest(report.project), session: digest(report.session), execution: digest(report.execution) });
|
||||
}
|
||||
const center = await api('/model-center');
|
||||
// This is the documented public model-center view; Provider's private map and
|
||||
// API key are never accessed. Only this public object is retained for schema-aware comparison.
|
||||
const modelCenter = structuredClone(center);
|
||||
return { observedAt: new Date().toISOString(), version: health.version, pid: health.pid, runtimeRoot: bootstrap.runtimeRoot,
|
||||
configSha256: digest(bootstrap.config), projectsSha256: digest(bootstrap.projects), sessionsSha256: digest(bootstrap.sessions), modelCenterSha256: digest(modelCenter), modelCenter,
|
||||
projects: bootstrap.projects.length, visibleSessions: bootstrap.sessions.length, hasKey: !!bootstrap.config.hasKey,
|
||||
active: bootstrap.sessions.filter(value => ['running', 'awaiting_approval', 'stopping'].includes(value.status)).map(value => ({ id: value.id, status: value.status })),
|
||||
storage: bootstrap.storage, eventCursor: bootstrap.eventCursor, database, exports, persistent: snapshotPersistentData(dataRoot),
|
||||
scope: 'Read-only public state, every original session export digest, original table/row/schema hashes and every original artifact byte hash. No credential extraction, model probe, execution or mutation.' };
|
||||
}
|
||||
export function compareOriginalState(before, after, { modelCenterSchemaChange = false } = {}) {
|
||||
for (const field of ['pid', 'hasKey', 'configSha256', 'projectsSha256', 'sessionsSha256', 'eventCursor']) assert.deepEqual(after[field], before[field], field);
|
||||
assert.deepEqual(canonical(after.database.tables), canonical(before.database.tables), 'All original table schemas and every persistent row');
|
||||
assert.deepEqual(after.database.sessionIds, before.database.sessionIds); assert.deepEqual(after.exports, before.exports);
|
||||
assert.deepEqual(after.persistent, before.persistent, 'Every original artifact byte, persistent row and public disk config');
|
||||
if (modelCenterSchemaChange) {
|
||||
const original = structuredClone(before.modelCenter), next = structuredClone(after.modelCenter);
|
||||
// 1.15 changes only the public explanatory text about optional DPAPI storage.
|
||||
// Existing IDs, routes, revisions, credentials-present bits and all original attempts remain exact.
|
||||
assert.match(next.storage.restart, /临时凭据.*已明确本机加密保存/);
|
||||
next.storage.restart = original.storage.restart;
|
||||
assert.deepEqual(next, original, 'Original public model center, except versioned storage explanation');
|
||||
return { modelCenterChange: { path: '/storage/restart', original: before.modelCenter.storage.restart, actual: after.modelCenter.storage.restart }, originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact' };
|
||||
}
|
||||
assert.equal(after.modelCenterSha256, before.modelCenterSha256);
|
||||
return { originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact', originalModelCenter: 'exact' };
|
||||
}
|
||||
@@ -64,7 +64,7 @@ export async function upgradeRunning({ url, pid, currentRoot, newRoot, handlerRo
|
||||
if (!fs.existsSync(originalScript) || !fs.existsSync(upgradeScript) || !fs.existsSync(path.join(next, 'dist-client', 'index.html'))) throw new Error('Upgrade bundles are incomplete.');
|
||||
if (!Number.isInteger(pid) || pid < 1 || pid === process.pid) throw new Error('Invalid target process.');
|
||||
const before = await readUpgradeJson(origin + '/api/bootstrap', 5000, 'Read original Workbench');
|
||||
if (!before.token || !['0.1.0', '1.0.0', '1.1.0', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.5.1', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.20.2', '1.20.3', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(before.version)) throw new Error('This migration accepts a supported existing Workbench.');
|
||||
if (!before.token || !['0.1.0', '1.0.0', '1.1.0', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.5.1', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.20.2', '1.20.3', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(before.version)) throw new Error('This migration accepts a supported existing Workbench.');
|
||||
if (before.sessions.some(session => ['running', 'awaiting_approval', 'stopping'].includes(session.status))) throw new Error('Wait for existing tasks and approvals before upgrading.');
|
||||
let protocol, socket, enabledHere = false, paused = false;
|
||||
const breakpoints = [];
|
||||
|
||||
+20
-20
@@ -9,36 +9,36 @@ import { randomUUID } from 'node:crypto';
|
||||
if (process.argv.slice(2).some(value => value !== '--help')) throw new Error('Unsupported argument; use --help.');
|
||||
if (process.argv.includes('--help')) { console.log('node scripts/verify-all-ui.mjs - run serial desktop/390px checks in independent local hosts; use explicit QA Python/Harness/Purge source paths for 1.15.'); process.exit(0); }
|
||||
const version = JSON.parse(fs.readFileSync('package.json', 'utf8')).version;
|
||||
assert.ok(['1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version), 'Review evidence paths when introducing the next release.');
|
||||
assert.ok(['1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version), 'Review evidence paths when introducing the next release.');
|
||||
const prefix = releaseEvidencePrefix(version), resultFile = `.qa/${prefix}-all-ui-validation.json`, results = [];
|
||||
const qaEnvironment = Object.fromEntries(['AGENT_WORKBENCH_TEST_PYTHON', 'AGENT_WORKBENCH_DEEPSEEK_ROOT', 'AGENT_WORKBENCH_PURGE_178_ROOT', 'AGENT_WORKBENCH_PURGE_181_ROOT']
|
||||
.filter(name => process.env[name]).map(name => [name, process.env[name]]));
|
||||
for (const [name, value] of Object.entries(qaEnvironment)) assert.ok(path.isAbsolute(value) && fs.existsSync(value), 'Use an existing absolute QA runtime/source path: ' + name);
|
||||
const cases = [
|
||||
...(['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-file-results-ui.mjs', null]] : []),
|
||||
...(['1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-release-efficiency-ui.mjs', null]] : []),
|
||||
...(['1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-local-files.mjs', null]] : []),
|
||||
...(['1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version)?[['verify-embedded-browser.mjs',null]]:[]),
|
||||
...(['1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version)?[['verify-environment-ui.mjs',null],['verify-model-fidelity-ui.mjs',null],['verify-model-wait-ui.mjs',null],['verify-task-control-ui.mjs',null]]:[]),
|
||||
...(['1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-evaluations-ui.mjs', null]] : []),
|
||||
...(['1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-project-cache-ui.mjs', null]] : []),
|
||||
...(['1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-vision-ui.mjs', null]] : []),
|
||||
...(['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-model-protocols-ui.mjs', null]] : []),
|
||||
...(['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-companion-ui.mjs', null]] : []),
|
||||
...(['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-controlled-ui.mjs', null], ['verify-purge-ui.mjs', null]] : []),
|
||||
...(['1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-workers-ui.mjs', null]] : []),
|
||||
...(['1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-task-plans-ui.mjs', `docs/${prefix}-task-ui-validation.json`]] : []),
|
||||
...(['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-browser-ui.mjs', `docs/${prefix}-browser-ui-validation.json`]] : []),
|
||||
...(['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-file-results-ui.mjs', null]] : []),
|
||||
...(['1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-release-efficiency-ui.mjs', null]] : []),
|
||||
...(['1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-local-files.mjs', null]] : []),
|
||||
...(['1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version)?[['verify-embedded-browser.mjs',null]]:[]),
|
||||
...(['1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version)?[['verify-environment-ui.mjs',null],['verify-model-fidelity-ui.mjs',null],['verify-model-wait-ui.mjs',null],['verify-task-control-ui.mjs',null]]:[]),
|
||||
...(['1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-evaluations-ui.mjs', null]] : []),
|
||||
...(['1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-project-cache-ui.mjs', null]] : []),
|
||||
...(['1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-vision-ui.mjs', null]] : []),
|
||||
...(['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-model-protocols-ui.mjs', null]] : []),
|
||||
...(['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-companion-ui.mjs', null]] : []),
|
||||
...(['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-controlled-ui.mjs', null], ['verify-purge-ui.mjs', null]] : []),
|
||||
...(['1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-workers-ui.mjs', null]] : []),
|
||||
...(['1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-task-plans-ui.mjs', `docs/${prefix}-task-ui-validation.json`]] : []),
|
||||
...(['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-browser-ui.mjs', `docs/${prefix}-browser-ui-validation.json`]] : []),
|
||||
['verify-ui.mjs', '.qa/ui-validation.json'], ['verify-diagnostics-ui.mjs', '.qa/diagnostics-ui-validation.json'],
|
||||
['verify-execution-ui.mjs', '.qa/execution-ui-validation.json'], ['verify-delivery-ui.mjs', '.qa/delivery-ui-validation.json'],
|
||||
['verify-index-ui.mjs', '.qa/index-ui-result.json'], ['verify-change-sets-ui.mjs', `docs/${prefix}-batch-ui-validation.json`],
|
||||
['verify-context-ui.mjs', `.qa/${version === '1.6.0' ? 'workspaces-context' : prefix}-ui-validation.json`],
|
||||
['verify-workspaces-ui.mjs', `docs/${prefix === 'workspaces' ? prefix : prefix + '-workspaces'}-ui-validation.json`],
|
||||
...(['1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-python-ui.mjs', `docs/${prefix}-python-ui-validation.json`]] : []),
|
||||
...(['1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-react-delivery.mjs', version === '1.7.0' ? 'docs/react-engine-delivery-validation.json' : `docs/${prefix}-react-delivery-validation.json`]] : []),
|
||||
...(['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-research-ui.mjs', `docs/${prefix}-research-ui-validation.json`]] : []),
|
||||
...(['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? [['verify-engines-ui.mjs', version === '1.9.0' ? 'docs/engines-ui-validation.json' : `docs/${prefix}-engines-ui-validation.json`]] : []),
|
||||
...(['1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7'].includes(version) ? ['model-center', 'project-memory', 'task-checkpoints', 'skills', 'mcp', 'mcp-recovery'].map(name => [`verify-${name}-ui.mjs`, null]) : []),
|
||||
...(['1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-python-ui.mjs', `docs/${prefix}-python-ui-validation.json`]] : []),
|
||||
...(['1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-react-delivery.mjs', version === '1.7.0' ? 'docs/react-engine-delivery-validation.json' : `docs/${prefix}-react-delivery-validation.json`]] : []),
|
||||
...(['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-research-ui.mjs', `docs/${prefix}-research-ui-validation.json`]] : []),
|
||||
...(['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? [['verify-engines-ui.mjs', version === '1.9.0' ? 'docs/engines-ui-validation.json' : `docs/${prefix}-engines-ui-validation.json`]] : []),
|
||||
...(['1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.9'].includes(version) ? ['model-center', 'project-memory', 'task-checkpoints', 'skills', 'mcp', 'mcp-recovery'].map(name => [`verify-${name}-ui.mjs`, null]) : []),
|
||||
];
|
||||
fs.mkdirSync('.qa', { recursive: true });
|
||||
const externalHost = new Set(['verify-ui.mjs', 'verify-diagnostics-ui.mjs', 'verify-execution-ui.mjs', 'verify-index-ui.mjs']);
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function verifyControlledApi({ api, url, token, directory, appRoot,
|
||||
const origin = new URL(url);
|
||||
assert.equal(origin.hostname, '127.0.0.1'); assert.notEqual(origin.port, '4318');
|
||||
const expectedVersion = JSON.parse(fs.readFileSync(path.join(appRoot, fs.existsSync(path.join(appRoot, 'MANIFEST.json')) ? 'MANIFEST.json' : 'package.json'), 'utf8')).version;
|
||||
assert.ok(['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.20.2', '1.20.3', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(expectedVersion));
|
||||
assert.ok(['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.20.2', '1.20.3', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(expectedVersion));
|
||||
const bootstrap = await api('/bootstrap'); assert.equal(bootstrap.version, expectedVersion);
|
||||
assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
|
||||
const root = path.join(directory, 'compiled-controlled-node'), hooks = path.join(directory, 'disabled-hooks');
|
||||
|
||||
@@ -149,19 +149,23 @@ try {
|
||||
const beforeRestart = snapshotPersistentData(dataRoot); await controller.stop(); const restarted = (await controller.start()).identity;
|
||||
assert.notEqual(restarted.pid, original.pid); assert.deepEqual(snapshotPersistentData(dataRoot), beforeRestart);
|
||||
await controller.api('/model-center/probe', { method: 'POST', input: { id: connectionId } }); assert.equal(authenticated, 3); record(stage, { originalPid: original.pid, restartedPid: restarted.pid, authenticatedRequests: authenticated });
|
||||
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(version)) {
|
||||
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(version)) {
|
||||
stage = 'actual installed current results and saved HTML user paths';
|
||||
const pointer = JSON.parse(fs.readFileSync(path.join(installRoot, 'current.json')));
|
||||
const installedRoot = fs.realpathSync.native(path.join(installRoot, 'versions', pointer.active.directory)), proofs = [];
|
||||
for (const script of ['verify-file-results-ui.mjs', 'verify-local-files.mjs']) {
|
||||
const output = await run(process.execPath, [path.join(appRoot, 'scripts', script)], { cwd: appRoot,
|
||||
const suites = [
|
||||
['verify-file-results-ui.mjs', [], 16], ['verify-local-files.mjs', [], 9],
|
||||
...(version === '1.24.9' ? [['verify-requirements-ui.mjs', [], 7], ['verify-requirements-desktop.mjs', [], 3], ['verify-turn-progress-ui.mjs', [], 9], ['verify-turn-progress-ui.mjs', ['--desktop'], 9]] : []),
|
||||
];
|
||||
for (const [script, args, expected] of suites) {
|
||||
const output = await run(process.execPath, [path.join(appRoot, 'scripts', script), ...args], { cwd: appRoot,
|
||||
env: { ...env, AGENT_WORKBENCH_QA_APP_ROOT: installedRoot }, windowsHide: true, timeout: 180000, maxBuffer: 1024 * 1024 });
|
||||
const log = path.join(root, 'installed-' + script + '.log'); fs.writeFileSync(log, output.stdout + output.stderr);
|
||||
const summary = JSON.parse(output.stdout.trim().split(/\r?\n/).findLast(line => line.startsWith('{"success":')));
|
||||
const log = path.join(root, 'installed-' + script + (args.includes('--desktop') ? '-desktop' : '') + '.log'); fs.writeFileSync(log, output.stdout + output.stderr);
|
||||
const summary = output.stdout.trim().split(/\r?\n/).filter(line => line.startsWith('{')).map(line => { try { return JSON.parse(line); } catch { return null; } }).findLast(row => row?.success !== undefined);
|
||||
const proofRoot = summary.directory ?? summary.root; assert.ok(proofRoot && path.resolve(proofRoot).startsWith(path.join(appRoot, '.qa') + path.sep));
|
||||
const proof = JSON.parse(fs.readFileSync(path.join(proofRoot, 'result.json'), 'utf8'));
|
||||
assert.equal(proof.success, true); assert.equal(proof.version, version); assert.equal(fs.realpathSync.native(proof.appRoot), installedRoot);
|
||||
assert.equal(proof.checks.length, script === 'verify-file-results-ui.mjs' ? 16 : 9); assert.deepEqual(proof.errors, []);
|
||||
assert.equal((proof.checks ?? proof.passed).length, expected); assert.deepEqual(proof.errors, []);
|
||||
assert.equal(proof.realModelRequests, 0); proofs.push({ script, proof, log, sha256: hash(fs.readFileSync(log)) });
|
||||
}
|
||||
installedUI = { success: true, version, installedRoot, packagedSource, proofs, realModelRequests: 0 };
|
||||
|
||||
@@ -34,7 +34,7 @@ for (const name of Object.keys(env)) if (name.toLowerCase() === 'path') delete e
|
||||
const windowsRoot = process.env.SystemRoot || 'C:\\Windows';
|
||||
env.PATH = [windowsRoot, path.join(windowsRoot, 'System32'), path.join(windowsRoot, 'System32', 'WindowsPowerShell', 'v1.0')].join(path.delimiter);
|
||||
let externalGit = null;
|
||||
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
|
||||
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version)) {
|
||||
// The controlled project requires external Git. Preserve its observed binary
|
||||
// directory while keeping system Node/npm unavailable to the packaged host.
|
||||
const binary = fs.realpathSync.native(execFileSync('where.exe', ['git.exe'], { env: gitEnvironment(), encoding: 'utf8', windowsHide: true, timeout: 10000 }).trim().split(/\r?\n/)[0]);
|
||||
@@ -88,7 +88,7 @@ try {
|
||||
console.log((await launch()).trim());
|
||||
assert.equal(JSON.parse(fs.readFileSync(path.join(data, 'service-info.json'), 'utf8')).pid, firstInfo.pid);
|
||||
const example = bootstrap.projects.find(project => project.id === bootstrap.exampleProjectId);
|
||||
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
|
||||
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version)) {
|
||||
assert.equal(path.resolve(example.root).toLowerCase(), path.join(data, 'projects', 'starter-project').toLowerCase());
|
||||
const compareTemplate = relative => { for (const entry of fs.readdirSync(path.join(appRoot, 'examples/starter-project', relative), { withFileTypes: true })) {
|
||||
const next = path.join(relative, entry.name); if (entry.isDirectory()) compareTemplate(next);
|
||||
@@ -114,7 +114,7 @@ try {
|
||||
const checkLog = await api('/artifacts/' + checked.results[0].logArtifactId + '?session=' + session.id); assert.match(checkLog.content, /tests 4/);
|
||||
assert.ok(fs.existsSync(path.join(appRoot, 'runtime/node_modules/npm/bin/npm-cli.js')));
|
||||
const actualRea = [];
|
||||
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
|
||||
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version)) {
|
||||
const installation = await api('/research/availability'); assert.equal(installation.status, 'available'); assert.equal(installation.version, '6.8.0');
|
||||
assert.equal(fs.realpathSync.native(installation.packageRoot), fs.realpathSync.native(path.join(appRoot, 'runtime/node_modules/rea-agents')));
|
||||
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
|
||||
@@ -146,7 +146,7 @@ try {
|
||||
console.log('PASS actual contained REA: ASAR, PE imports and PE resources; zero target execution/model requests');
|
||||
}
|
||||
let actualEngine = null;
|
||||
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) && process.argv.includes('--native-engines')) {
|
||||
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version) && process.argv.includes('--native-engines')) {
|
||||
const installation = await api('/engines/deepseek/availability'); assert.equal(installation.status, 'available', installation.message);
|
||||
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
|
||||
const engineRoot = path.join(data, 'engine-project'); fs.mkdirSync(engineRoot); fs.writeFileSync(path.join(engineRoot, 'README.md'), '# Owned portable engine connection\n');
|
||||
@@ -166,8 +166,8 @@ try {
|
||||
assert.equal((await api('/research')).length, 4);
|
||||
const page = await fetch(url); assert.equal(page.status, 200);
|
||||
assert.match(await page.text(), /Agent Workbench/);
|
||||
const actualBrowser = ['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyBrowserApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
|
||||
const actualControlled = ['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyControlledApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
|
||||
const actualBrowser = ['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version) ? await verifyBrowserApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
|
||||
const actualControlled = ['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version) ? await verifyControlledApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
|
||||
console.log((await stop()).trim()); started = false;
|
||||
await until(async () => { try { await fetch(url + '/api/health'); return false; } catch { return true; } });
|
||||
for (const file of manifest.files) {
|
||||
@@ -176,7 +176,7 @@ try {
|
||||
}
|
||||
const result = { success: true, date: new Date().toISOString(), appRoot, version: manifest.version, nodeVersion: manifest.nodeVersion,
|
||||
verifiedFiles: manifest.files.length, url, reusedPid: firstInfo.pid, checks: { jobId, status: checked.status, tests: checked.results[0].tests }, actualRea, actualEngine, actualBrowser, actualControlled, externalGit,
|
||||
steps: ['manifest hashes', 'bundled Node launch', 'same-service reuse', 'packaged example and static page', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? ['starter project copied to owned user data; original template bytes matched'] : []), 'explicit command consent', 'actual bundled Node version', 'actual bundled npm check without system Node/npm', 'check log artifact', ...(actualRea.length ? ['contained REA installation and Node identity', 'actual ASAR/imports/resources', 'original Bundle and target hash binding', 'verified reuse without producer replay'] : []), 'report availability', 'graceful stop', 'every original packaged file remains unchanged'], realModel: false };
|
||||
steps: ['manifest hashes', 'bundled Node launch', 'same-service reuse', 'packaged example and static page', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8', '1.24.9'].includes(manifest.version) ? ['starter project copied to owned user data; original template bytes matched'] : []), 'explicit command consent', 'actual bundled Node version', 'actual bundled npm check without system Node/npm', 'check log artifact', ...(actualRea.length ? ['contained REA installation and Node identity', 'actual ASAR/imports/resources', 'original Bundle and target hash binding', 'verified reuse without producer replay'] : []), 'report availability', 'graceful stop', 'every original packaged file remains unchanged'], realModel: false };
|
||||
fs.writeFileSync('.qa/release-validation.json', JSON.stringify(result, null, 2));
|
||||
console.log(JSON.stringify(result, null, 2));
|
||||
} finally { if (started) { try { await stop(); } catch {} } }
|
||||
|
||||
@@ -11,19 +11,20 @@ import { desktopExecutableIdentity } from '../src/core/desktop/app-installation.
|
||||
import { projectEnvironment } from '../src/core/process-environment.mjs';
|
||||
|
||||
const root = path.resolve('.qa/requirements-progress', 'electron-' + randomUUID()); fs.mkdirSync(root, { recursive: true });
|
||||
const appRoot = path.resolve(process.env.AGENT_WORKBENCH_QA_APP_ROOT || '.');
|
||||
const disposers = [], t = { after: fn => disposers.push(fn) }, f = fixture(t);
|
||||
beginPlanTask(f, '解释当前工程依据,保留用户原文和原读取。'); completeRead(f); f.session.title = 'Electron要求证据原任务'; f.store.save(f.session); f.store.close();
|
||||
const socket = net.createServer(); await new Promise(resolve => socket.listen(0, '127.0.0.1', resolve)); const port = socket.address().port; await new Promise(resolve => socket.close(resolve));
|
||||
assert.notEqual(port, 4318);
|
||||
const controller = new HostController({ appRoot: process.cwd(), dataRoot: f.data, port, nodePath: process.execPath, timeoutMs: 60000 });
|
||||
const controller = new HostController({ appRoot, dataRoot: f.data, port, nodePath: process.execPath, timeoutMs: 60000 });
|
||||
const passed = [], errors = [], screenshots = []; let application, result;
|
||||
const mark = name => { passed.push(name); console.log('PASS ' + name); };
|
||||
try {
|
||||
await controller.start(); assert.equal((await controller.api('/bootstrap')).config.hasKey, false);
|
||||
const executable = desktopExecutableIdentity(process.cwd()).path;
|
||||
const executable = desktopExecutableIdentity(appRoot).path;
|
||||
application = await _electron.launch({ executablePath: executable,
|
||||
args: [...(executable.toLowerCase().endsWith('agentworkbench.exe') ? [] : [path.resolve('dist-desktop/main.cjs')]), '--app-root', process.cwd(), '--data-root', f.data, '--node', process.execPath, '--port', String(port), '--hidden-window'],
|
||||
cwd: process.cwd(), env: projectEnvironment(), timeout: 60000 });
|
||||
args: [...(executable.toLowerCase().endsWith('agentworkbench.exe') ? [] : [path.join(appRoot, 'dist-desktop/main.cjs')]), '--app-root', appRoot, '--data-root', f.data, '--node', process.execPath, '--port', String(port), '--hidden-window'],
|
||||
cwd: appRoot, env: projectEnvironment(), timeout: 60000 });
|
||||
const page = await application.firstWindow(); page.on('pageerror', error => errors.push(error.message));
|
||||
const window = await application.browserWindow(page); await window.evaluate(win => win.setSize(1440, 1080));
|
||||
await page.locator('.connection.connected').waitFor(); assert.equal(await page.evaluate(() => typeof window.process), 'undefined');
|
||||
@@ -44,7 +45,7 @@ try {
|
||||
await until(() => page.evaluate(() => innerWidth === 1440));
|
||||
await panel.scrollIntoViewIfNeeded(); const screenshot = path.join(root, 'verified.png'); await page.screenshot({ path: screenshot }); screenshots.push(screenshot);
|
||||
mark('renderer reload restores the same Task and requirement proof'); assert.deepEqual(errors, []);
|
||||
result = { success: true, passed, errors, screenshots, actualElectron: true, installationValidated: false, realModelRequests: 0, officialServiceTouched: false };
|
||||
result = { success: true, version: (await controller.api('/bootstrap')).version, appRoot, passed, errors, screenshots, actualElectron: true, installationValidated: false, realModelRequests: 0, officialServiceTouched: false };
|
||||
} catch (error) { result = { success: false, passed, errors, screenshots, error: error.stack, realModelRequests: 0 }; }
|
||||
finally {
|
||||
if (application) await application.close(); if (await controller.health()) await controller.stop();
|
||||
|
||||
@@ -7,12 +7,13 @@ import { fixture, launchWorkbench, until } from '../tests/helpers.mjs';
|
||||
import { beginPlanTask, completeRead } from '../tests/fixtures/task-plan-fixture.mjs';
|
||||
|
||||
const directory = path.resolve('.qa/requirements-progress', 'ui-' + randomUUID()); fs.mkdirSync(directory, { recursive: true });
|
||||
const appRoot = path.resolve(process.env.AGENT_WORKBENCH_QA_APP_ROOT || '.');
|
||||
const disposers = [], t = { after: fn => disposers.push(fn) }, f = fixture(t);
|
||||
beginPlanTask(f, '研究现有README.md,说明原工程依据,不修改参考文件。'); const read = completeRead(f);
|
||||
f.session.title = '要求复核原工程'; f.store.save(f.session);
|
||||
const other = f.store.createSession(f.project.id), originalSession = f.session; f.session = other; beginPlanTask(f, '另一个独立研究目标');
|
||||
other.title = '另一任务的独立目标'; f.store.save(other); f.session = originalSession; f.store.close();
|
||||
const host = await launchWorkbench(t, f.data); assert.notEqual(new URL(host.url).port, '4318'); assert.equal(host.bootstrap.config.hasKey, false);
|
||||
const host = await launchWorkbench(t, f.data, {}, { appRoot }); assert.notEqual(new URL(host.url).port, '4318'); assert.equal(host.bootstrap.config.hasKey, false);
|
||||
const browser = await chromium.launch({ channel: 'msedge', headless: true }), page = await browser.newPage({ viewport: { width: 1440, height: 1080 } });
|
||||
const passed = [], screenshots = [], errors = [];
|
||||
page.on('pageerror', error => errors.push(error.message));
|
||||
@@ -74,7 +75,7 @@ try {
|
||||
assert.ok(!(await panel().textContent()).includes('解释当前工程的实际依据')); mark('late response for original Task cannot replace the newly selected task');
|
||||
assert.deepEqual(errors, []);
|
||||
const requirements = await host.api('/sessions/' + f.session.id + '/requirements?taskId=' + f.session.taskId);
|
||||
result = { success: true, passed, screenshots, errors, requirements, realModelRequests: 0, officialServiceTouched: false, companionWritePermissionsAdded: false };
|
||||
result = { success: true, version: host.bootstrap.version, appRoot, passed, screenshots, errors, requirements, realModelRequests: 0, officialServiceTouched: false, companionWritePermissionsAdded: false };
|
||||
} catch (error) {
|
||||
await shot('failure').catch(() => {}); result = { success: false, passed, screenshots, errors, error: error.stack, realModelRequests: 0 };
|
||||
} finally {
|
||||
|
||||
@@ -19,7 +19,7 @@ assert.ok(fs.existsSync(npmCli), 'Use Node with its bundled npm.');
|
||||
const files = (root, relative = '') => fs.readdirSync(path.join(root, relative), { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))
|
||||
.flatMap(entry => entry.isDirectory() ? files(root, path.join(relative, entry.name)) : [path.join(relative, entry.name)]);
|
||||
const digest = file => createHash('sha256').update(fs.readFileSync(file)).digest('hex');
|
||||
const buildFolders = ['dist-client', 'dist-server', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version) ? ['dist-desktop'] : [])];
|
||||
const buildFolders = ['dist-client', 'dist-server', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version) ? ['dist-desktop'] : [])];
|
||||
const expected = Object.fromEntries(buildFolders.flatMap(folder => files(path.join(workspace, folder)).map(relative => [path.join(folder, relative), digest(path.join(workspace, folder, relative))])));
|
||||
const allowedEnv = /^(path|pathext|systemroot|systemdrive|windir|comspec|temp|tmp|userprofile|homedrive|homepath|home|appdata|localappdata|programfiles(?:\(x86\))?|commonprogramfiles(?:\(x86\))?|lang|lc_all|AGENT_WORKBENCH_TEST_PYTHON|AGENT_WORKBENCH_DEEPSEEK_ROOT|AGENT_WORKBENCH_PURGE_ROOT)$/i;
|
||||
const env = Object.fromEntries(Object.entries(process.env).filter(([key]) => allowedEnv.test(key)));
|
||||
@@ -30,7 +30,7 @@ const directory = path.join(sourceRoot, '.qa', 'package-validation-' + randomUUI
|
||||
fs.mkdirSync(directory, { recursive: true });
|
||||
const inputFolders = ['src', 'tests', 'scripts', ...['benchmarks', 'public', 'examples', 'research'].filter(folder => fs.existsSync(path.join(sourceRoot, folder)))];
|
||||
const inputNames = [...inputFolders.flatMap(folder => files(path.join(sourceRoot, folder)).map(relative => path.join(folder, relative))),
|
||||
'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', ...(['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version) ? ['mobile.html'] : []), ...['.gitattributes', '.gitignore', 'Start-Desktop.cmd', 'Start-Workbench.cmd', 'Stop-Workbench.cmd'].filter(name => fs.existsSync(path.join(sourceRoot, name)))].sort();
|
||||
'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', ...(['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version) ? ['mobile.html'] : []), ...['.gitattributes', '.gitignore', 'Start-Desktop.cmd', 'Start-Workbench.cmd', 'Stop-Workbench.cmd'].filter(name => fs.existsSync(path.join(sourceRoot, name)))].sort();
|
||||
const snapshot = () => inputNames.map(relative => ({ path: relative.replaceAll('\\', '/'), bytes: fs.statSync(path.join(sourceRoot, relative)).size, sha256: digest(path.join(sourceRoot, relative)) }));
|
||||
const inputs = snapshot(); fs.writeFileSync(path.join(directory, 'inputs.json'), JSON.stringify(inputs, null, 2));
|
||||
let stage = 'environment preflight', python = null;
|
||||
@@ -83,7 +83,7 @@ try {
|
||||
assert.deepEqual(actualFiles.slice().sort(), Object.keys(expected).sort());
|
||||
for (const [relative, sha256] of Object.entries(expected)) assert.equal(digest(path.join(sourceRoot, relative)), sha256, relative);
|
||||
let actualRea = null;
|
||||
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained REA';
|
||||
const reaOutput = await run(['scripts/verify-rea.mjs', '--app-root', sourceRoot, '--contained'], 'rea.log');
|
||||
actualRea = JSON.parse(reaOutput.trim().split('\n').at(-1));
|
||||
@@ -91,7 +91,7 @@ try {
|
||||
assert.ok(actualRea.results.every(item => item.rootExited === true));
|
||||
}
|
||||
let actualEngine = null;
|
||||
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version) && process.argv.includes('--native-engines')) {
|
||||
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version) && process.argv.includes('--native-engines')) {
|
||||
stage = 'native DeepSeek SDK';
|
||||
const output = await run(['scripts/verify-engines.mjs'], 'engines.log');
|
||||
actualEngine = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -99,7 +99,7 @@ try {
|
||||
assert.equal(actualEngine.modelRequests, 0); assert.equal(actualEngine.rootExited, true); assert.equal(actualEngine.nativeMethods.length, 6);
|
||||
}
|
||||
let actualBrowser = null;
|
||||
if (['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained browser runtime';
|
||||
const output = await run(['scripts/verify-browser.mjs', '--app-root', sourceRoot, '--contained'], 'browser.log');
|
||||
actualBrowser = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -109,7 +109,7 @@ try {
|
||||
assert.equal(actualBrowser.modelRequests, 0);
|
||||
}
|
||||
let actualControlled = null;
|
||||
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'compiled controlled-engine delivery';
|
||||
const output = await run(['scripts/verify-controlled-release.mjs', '--app-root', sourceRoot], 'controlled-engine.log');
|
||||
actualControlled = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -117,7 +117,7 @@ try {
|
||||
assert.equal(actualControlled.realModelRequests, 0); assert.equal(actualControlled.cases, 4); assert.ok(actualControlled.fixtureModelRequests > 0);
|
||||
}
|
||||
let actualCompanion = null;
|
||||
if (['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained companion gateway and UI';
|
||||
const output = await run(['scripts/verify-companion-ui.mjs', '--app-root', sourceRoot], 'companion-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -128,7 +128,7 @@ try {
|
||||
assert.equal(actualCompanion.passed.length, 7); assert.deepEqual(actualCompanion.errors, []); assert.equal(actualCompanion.realModelRequests, 0);
|
||||
}
|
||||
let actualProtocols = null;
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained model protocols and mobile streams';
|
||||
const output = await run(['scripts/verify-model-protocols-ui.mjs', '--app-root', sourceRoot], 'model-protocols-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -139,7 +139,7 @@ try {
|
||||
assert.equal(actualProtocols.passed.length, 5); assert.deepEqual(actualProtocols.pageErrors, []); assert.deepEqual(actualProtocols.requestFailures, []);
|
||||
}
|
||||
let actualVision = null;
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained screenshot inputs and exact Task budget resume';
|
||||
const output = await run(['scripts/verify-vision-ui.mjs', '--app-root', sourceRoot], 'vision-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -150,7 +150,7 @@ try {
|
||||
assert.equal(actualVision.passed.length, 5); assert.deepEqual(actualVision.pageErrors, []); assert.equal(actualVision.realModelRequests, 0);
|
||||
}
|
||||
let actualProjectCache = null;
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained source-verified parsing cache controls';
|
||||
const output = await run(['scripts/verify-project-cache-ui.mjs', '--app-root', sourceRoot], 'project-cache-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -161,7 +161,7 @@ try {
|
||||
assert.equal(actualProjectCache.realModelRequests, 0); assert.deepEqual(actualProjectCache.pageErrors, []);
|
||||
}
|
||||
let actualEnvironment = null, actualEnvironmentEngineering = null;
|
||||
if (['1.21.0','1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.21.0','1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'contained environment approval, stop and recovery UI';
|
||||
const output = await run(['scripts/verify-environment-ui.mjs', '--app-root', sourceRoot], 'environment-ui.log');
|
||||
const summary = JSON.parse(output.trim().split(/\r?\n/).findLast(line => line.startsWith('{"success":')));
|
||||
@@ -179,7 +179,7 @@ try {
|
||||
assert.equal(actualEnvironmentEngineering.pythonTests, 2); assert.equal(actualEnvironmentEngineering.realModelRequests, 0);
|
||||
}
|
||||
let actualEmbeddedBrowser = null;
|
||||
if (['1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'actual embedded Electron, Vite and original mobile observation';
|
||||
await run(['scripts/verify-embedded-browser.mjs', '--app-root', sourceRoot], 'embedded-browser.log');
|
||||
actualEmbeddedBrowser = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/embedded-browser-latest.json'), 'utf8'));
|
||||
@@ -189,7 +189,7 @@ try {
|
||||
assert.equal(actualEmbeddedBrowser.realModelRequests, 0); assert.deepEqual(actualEmbeddedBrowser.errors, []);
|
||||
}
|
||||
let actualReleaseEfficiency = null;
|
||||
if (['1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'actual update status Edge/Electron and basic saved HTML flows';
|
||||
const proofs = [];
|
||||
for (const script of ['verify-release-efficiency-ui.mjs', 'verify-local-files.mjs']) {
|
||||
@@ -203,7 +203,7 @@ try {
|
||||
actualReleaseEfficiency = proofs;
|
||||
}
|
||||
let actualFileResults = null;
|
||||
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'current file results Edge, Electron and paired mobile observation';
|
||||
await run(['scripts/verify-file-results-ui.mjs'], 'file-results-ui.log');
|
||||
actualFileResults = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/file-results-ui-latest.json'), 'utf8'));
|
||||
@@ -243,14 +243,14 @@ try {
|
||||
for (const key of ['fail', 'cancelled', 'skipped', 'todo']) assert.equal(groupStats[key], 0);
|
||||
}
|
||||
let actualTaskControl = null;
|
||||
if (['1.20.1', '1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.20.1', '1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'task control desktop and 390px';
|
||||
await run(['scripts/verify-task-control-ui.mjs', '--app-root', sourceRoot], 'task-control-ui.log');
|
||||
actualTaskControl = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/task-control-ui-validation.json'), 'utf8'));
|
||||
assert.equal(actualTaskControl.success, true); assert.equal(actualTaskControl.passed.length, 5); assert.equal(actualTaskControl.realModelRequests, 0);
|
||||
}
|
||||
let actualDesktop = null;
|
||||
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'actual contained Electron window'; await run(['scripts/verify-desktop-window.mjs'], 'desktop-window.log');
|
||||
const window = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/desktop-window-latest.json'), 'utf8'));
|
||||
assert.equal(window.success, true); assert.equal(path.resolve(window.appRoot), sourceRoot); assert.equal(window.results.length, 7);
|
||||
@@ -264,7 +264,7 @@ try {
|
||||
actualDesktop = { window, ui, projects, scope: 'Independently rebuilt source and its shipped Electron binary; original window/engine/engineering assertions. Own credentials/HTTP fixtures; Windows native picker and complete host crash/stop have separate actual evidence.' };
|
||||
}
|
||||
let actualProtocolEngineering = null;
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'Responses SSE actual Node React Python engineering';
|
||||
await run(['scripts/verify-controlled-projects.mjs', '--responses'], 'responses-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/responses-engineering-location.json'), 'utf8'));
|
||||
@@ -274,7 +274,7 @@ try {
|
||||
assert.deepEqual(actualProtocolEngineering.results.map(value => value.parentCheck.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualVisionEngineering = null;
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'screenshot Task Node React Python engineering';
|
||||
await run(['scripts/verify-vision-projects.mjs'], 'vision-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/vision-engineering-location.json'), 'utf8'));
|
||||
@@ -284,7 +284,7 @@ try {
|
||||
assert.deepEqual(actualVisionEngineering.results.map(value => value.check.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualCacheEngineering = null;
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'cached index original requests and Node React Python engineering';
|
||||
await run(['scripts/verify-project-cache-projects.mjs'], 'project-cache-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/project-cache-engineering-location.json'), 'utf8'));
|
||||
@@ -294,7 +294,7 @@ try {
|
||||
assert.deepEqual(actualCacheEngineering.results.map(value => value.check.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualEvaluations = null, actualEvaluationEngineering = null;
|
||||
if (['1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3'].includes(evidence.version)) {
|
||||
if (['1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9'].includes(evidence.version)) {
|
||||
stage = 'compiled fixed engineering evaluations';
|
||||
const output = await run(['scripts/verify-evaluations-release.mjs', '--app-root', sourceRoot], 'evaluations-release.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
|
||||
@@ -12,12 +12,15 @@ import { projectEnvironment } from '../src/core/process-environment.mjs';
|
||||
// Existing UI-verifier convention: a real browser/Electron, isolated data and a
|
||||
// localhost model protocol fixture. No configured provider or real key is used.
|
||||
const desktop = process.argv.includes('--desktop');
|
||||
const appRoot = path.resolve(process.env.AGENT_WORKBENCH_QA_APP_ROOT || '.');
|
||||
const directory = path.resolve('.qa/requirements-progress', (desktop ? 'shadow-electron-' : 'shadow-ui-') + randomUUID());
|
||||
fs.mkdirSync(directory, { recursive: true });
|
||||
const disposers = [], t = { after: fn => disposers.push(fn) }, f = fixture(t);
|
||||
let scenario = 'pages', requests = 0;
|
||||
const fixtureRequests = [];
|
||||
const model = await compatibleFixture(t, () => {
|
||||
const request = ++requests;
|
||||
fixtureRequests.push({ scenario, request, receivedAt: new Date().toISOString() });
|
||||
if (scenario === 'network') return { status: 502, body: { error: { message: 'Owned shadow gateway failure, original response retained' } } };
|
||||
if (scenario === 'approval') return { body: request === 1 ? completion([
|
||||
call('read-before-approval', 'read_file', { path: 'README.md', limit: 10 }),
|
||||
@@ -71,18 +74,18 @@ try {
|
||||
if (desktop) {
|
||||
const socket = net.createServer(); await new Promise(resolve => socket.listen(0, '127.0.0.1', resolve));
|
||||
const port = socket.address().port; await new Promise(resolve => socket.close(resolve)); assert.notEqual(port, 4318);
|
||||
controller = new HostController({ appRoot: process.cwd(), dataRoot: f.data, port, nodePath: process.execPath, timeoutMs: 60000 });
|
||||
controller = new HostController({ appRoot, dataRoot: f.data, port, nodePath: process.execPath, timeoutMs: 60000 });
|
||||
await controller.start(); host = { url: controller.url, bootstrap: await controller.api('/bootstrap'),
|
||||
api: (route, input) => controller.api(route, input === undefined ? {} : { method: 'POST', input }) };
|
||||
const executable = desktopExecutableIdentity(process.cwd()).path;
|
||||
const executable = desktopExecutableIdentity(appRoot).path;
|
||||
application = await _electron.launch({ executablePath: executable,
|
||||
args: [...(executable.toLowerCase().endsWith('agentworkbench.exe') ? [] : [path.resolve('dist-desktop/main.cjs')]), '--app-root', process.cwd(), '--data-root', f.data, '--node', process.execPath, '--port', String(port), '--hidden-window'],
|
||||
cwd: process.cwd(), env: projectEnvironment(), timeout: 60000 });
|
||||
args: [...(executable.toLowerCase().endsWith('agentworkbench.exe') ? [] : [path.join(appRoot, 'dist-desktop/main.cjs')]), '--app-root', appRoot, '--data-root', f.data, '--node', process.execPath, '--port', String(port), '--hidden-window'],
|
||||
cwd: appRoot, env: projectEnvironment(), timeout: 60000 });
|
||||
page = await application.firstWindow(); window = await application.browserWindow(page);
|
||||
await window.evaluate(win => { win.showInactive(); win.setContentSize(1440, 1080); }); await until(() => page.evaluate(() => innerWidth === 1440));
|
||||
assert.equal(await page.evaluate(() => typeof globalThis.process), 'undefined');
|
||||
} else {
|
||||
host = await launchWorkbench(t, f.data); assert.notEqual(new URL(host.url).port, '4318');
|
||||
host = await launchWorkbench(t, f.data, {}, { appRoot }); assert.notEqual(new URL(host.url).port, '4318');
|
||||
browser = await chromium.launch({ channel: 'msedge', headless: true }); page = await browser.newPage({ viewport: { width: 1440, height: 1080 } }); await page.goto(host.url);
|
||||
}
|
||||
assert.equal(host.bootstrap.config.hasKey, false); page.on('pageerror', error => errors.push(error.message));
|
||||
@@ -137,11 +140,15 @@ try {
|
||||
const failure = await state(networkSession); assert.equal(failure.lastFailure.httpStatus, 502); assert.equal(failure.execution.run.stopReason, null);
|
||||
await shot('network-original-failure'); await saved('network-original', networkSession);
|
||||
mark('original HTTP 502 remains a model failure and is not relabeled as no progress'); assert.deepEqual(errors, []);
|
||||
result = { success: true, passed, errors, screenshots, snapshots, actualElectron: desktop, installationValidated: false, realModelRequests: 0, officialServiceTouched: false };
|
||||
result = { success: true, version: host.bootstrap.version, appRoot, passed, errors, screenshots, snapshots, actualElectron: desktop, installationValidated: false, realModelRequests: 0, officialServiceTouched: false };
|
||||
} catch (error) {
|
||||
try { await saved('failure-session'); } catch (captureError) {
|
||||
fs.writeFileSync(path.join(directory, 'failure-session-error.txt'), captureError.stack);
|
||||
}
|
||||
if (page) { try { await page.screenshot({ path: path.join(directory, 'failure.png') }); fs.writeFileSync(path.join(directory, 'failure-dom.txt'), await page.locator('body').innerText()); } catch {} }
|
||||
result = { success: false, passed, errors, screenshots, snapshots, error: error.stack, actualElectron: desktop, realModelRequests: 0, officialServiceTouched: false };
|
||||
} finally {
|
||||
fs.writeFileSync(path.join(directory, 'fixture-requests.json'), JSON.stringify(fixtureRequests, null, 2));
|
||||
if (application) await application.close(); if (browser) await browser.close();
|
||||
if (controller && await controller.health()) await controller.stop();
|
||||
for (const dispose of disposers.reverse()) await dispose();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID, createHash } from 'node:crypto';
|
||||
|
||||
export const APP_VERSION = '1.24.8';
|
||||
export const APP_VERSION = '1.24.9';
|
||||
|
||||
export function executionEnvironment() {
|
||||
const windows = process.platform === 'win32';
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Agent Workbench:核心代理能力研究与产品计划
|
||||
|
||||
## 当前:A/B首批能力1.24.9独立发行与保留状态升级
|
||||
|
||||
用户在下一步说明后授权“全量开发”,本轮完整推进A/B首批能力发行,不把尚缺自动草案提取/完整范围约定/诊断闭环的1.25标成完成。沿用planning-with-files/product-ui-ux,不委派、不推送、不读取/复制/解密/重存真实Key,不重启正式Provider;真实模型预算0。
|
||||
|
||||
1. [complete] 核对干净基线6fe04042、正式只读状态与发行入口;补1.24.9版本、候选/安装A/B入口及兼容列表,相关回归、源码A/B四入口与构建通过,首失败及回顾保留后本地提交。
|
||||
2. [in_progress] 冻结已提交源码和编译,生成新的不可变源码/便携/证据归档与安装器;独立源码ZIP提取离线重建、原编译全SHA和三归档核对。
|
||||
3. [pending] 源码与便携A/B实际网页/原生入口、原文件/HTML路径,隔离真实安装/升级/回滚/卸载以及安装副本A/B验证;保留首失败,回顾。
|
||||
4. [pending] 全部门槛通过后核对正式原进程/Provider/全表原行/导出/工件/公开配置,执行一次所属正式安装,保留原状态升级及网页/原生回看后复核。
|
||||
5. [pending] 冻结发行身份、阶段证据/离线与Git索引核对、回顾并本地提交;保留V网络partial、T/R/P/O原失败、重复读取、真实自主交付及Purge未验证,不续跑旧样本。
|
||||
|
||||
恢复首轮宽批读截断且PowerShell rg文件名通配未展开,改明确路径与-g过滤;查不存在tests/hot-upgrade后按清单定位为upgrade.test。截断内容不作完整审查依据。
|
||||
|
||||
## 本轮:要求与证据复核、单轮进展观察
|
||||
|
||||
- [complete] 核对并封存既有未提交研究;8份114222字节、63来源/14固定Git输入/6案例与索引通过,提交ce3afb2f。
|
||||
|
||||
Reference in New Issue
Block a user