diff --git a/AGENTS.md b/AGENTS.md index c86b8f99..aeaf7b4c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,7 @@ # Agent Workbench项目执行规范 +推理设置接续:用户补充推理可开启/选强度,并要求品牌与自定义兼容配套。空Messages诊断3ab3a6e4、共享配置档/可视设置/导入同步/DeepSeek JSON-SSE原生状态回传f1242ee8已源码验证(85相关+最终8专项、网页/实际Electron各6组及旧参数6/Messages7组)。当前冻结1.25.3独立发行验收中,正式仍1.25.2/PID36552/原Provider,未改Key/原连接;不能称已部署或真实模型成功。见docs/REASONING-CONTROLS-PLAN.md及QA-REASONING-CONTROLS.md。本阶段真实模型0,旧Z3空响应/DeepSeek length/网络/重复读取/自主交付/Purge未知保留;完成归档重建/实际安装与保留原状态升级、回顾、本地提交。不委派、不推送、不续跑旧实验。 + Z2/Z3接续:用户更正后Z2新预检1请求225tokens请求claude-opus-5-5但上游gpt-6.1-sol,mismatch/0工具封存;用户明确“你再试试apikey-Claude”,当前用户连接/凭据修订3另冻Z3。Z3预检1请求209tokens matched通过,新Node首请求6692输入/0输出、message_start/delta/stop而0内容块,原verification_incomplete暂停,0工具/检查/提案/交付、不续跑。Z2的31份31255079字节、Z3的118份51985161字节证据离线通过,docs/QA-LIVE-PROVIDER-Z2-CLAUDE.md及QA-LIVE-PROVIDER-Z3-CLAUDE.md。原配置/全部原行/导出/工件恢复,Claude连接3→4→5/凭据3保持,正式仍1.25.2/PID36552/原Provider、9229关闭;当前75项目91会话6723记录14320事件/outbox、3926工件。下一修复Messages空响应被解释为检查未完成、Chat缺少DeepSeek thinking.disabled支持;修复前无更多真实请求,不把上游问题宣称已解决。 Z两路线已封存:apikey-Claude首预检1请求176tokens,手误claude-opus-5.5对上游claude-opus-5-5,mismatch停止0工具;用户明确已自行改为claude-opus-5-5,当前连接修订2/凭据修订2,保留新配置,另冻Z2,不续跑原Z。DeepSeek预检1请求146tokens通过,新Node5请求47740tokens,末次SSE有DONE但finish_reason=length、2048输出全reasoning,原protocol失败/identity incomplete,不执行工具、不续跑。原九基线失败/build通过、0提案/交付;配置/预算/池/原状态恢复通过,连接1→2→3、凭据1保持。两样本共7请求48062tokens、151份82988849字节证据离线通过,docs/QA-LIVE-PROVIDER-Z.md。当前72项目88会话6697记录14254事件/outbox、3912工件,原PID36552/Provider/9229关闭保持。DeepSeek官方证实默认high推理,Chat thinking开关当前白名单未支持,兼容性缺口另列,不能宣称已修或以网络不稳定代替原因。下一用户更正Claude的新单次预检/原题有界Node。 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c4f8d9f..53cd3e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Agent Workbench 更新记录 +## 1.25.3 · 推理控制与兼容能力配套(发行验收中) + +- 模型中心增加“推理与能力”:按品牌或自定义兼容格式选择默认、关闭、开启、强度及 Messages 推理预算,保存、导入和实际请求使用同一份参数。 +- DeepSeek JSON/流式工具往返保留所属原生推理状态,受原输出预算约束;接口能力声明、检测结果和本地接入范围可查看。 +- Messages 空响应明确显示供应商返回为空,保留原文与用量,不再误报检查未完成。 + ## 1.25.2 · 预留证据、安装边界与读取进展(已本地交付) - 用量预留v3封存原消费范围,按所属账本顺序复核,拒绝重排历史来排除最新高值;输入异常不再丢掉已报告输出上界。旧v1/v2与原失败保持可核验。 diff --git a/docs/REASONING-CONTROLS-PLAN.md b/docs/REASONING-CONTROLS-PLAN.md index fc65b849..fa76324b 100644 --- a/docs/REASONING-CONTROLS-PLAN.md +++ b/docs/REASONING-CONTROLS-PLAN.md @@ -17,3 +17,4 @@ - 官方来源:DeepSeek既有Thinking Mode原HTML保持;OpenAI Docs查阅Chat与reasoning-effort;Claude文档重定向地区不可用页,已保存原失败,随后官方SDK原始类型取得HTTP200,确认output_config.effort支持low/medium/high/xhigh/max。一次node_repl网络等待超时、几次不存在的可选路径读取错误均无产品影响,后续改curl有界及已有实际文件定位。 - 阶段二:参数配置档、可视推理设置、导入同步、所属Chat opaque状态回传/流式聚合及原预算约束已实现。相关85/85,补充冻结/旧连接恢复后专项8/8;完整构建通过。网页与真实Electron各6组、原参数错误UI6组/Messages UI7组通过;1440/390原图已回看。新控件未读取Key,保存本身不发请求,HTTP夹具均自有。 - 首失败保留:首构建缺新共享契约声明,补d.mts后通过;首联合测试在新增重开SQLite夹具清理时挂起(reopened用t.after,夹具先删目录),有界单项诊断超时与所属测试进程终止保留。改用fixture.onCleanup先关数据库,不改产品断言/期限;随后专项/相关全部通过。一次对整个.qa的递归定位过慢,停止所属rg,改为已有发行目录的有界定位。 +- 发行准备:同步package/lock/APP_VERSION=1.25.3,构建和发行一致性守卫14/14通过;既有便携/源码/安装白名单加入新版本,安装保留原75组并追加新网页/桌面各6组。发行来源/编译输入将冻结,所有新证据使用.qa/reasoning-1.25.3,不写旧封存目录。 diff --git a/package-lock.json b/package-lock.json index aecede94..f1b84b87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "local-agent-workbench", - "version": "1.25.2", + "version": "1.25.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "local-agent-workbench", - "version": "1.25.2", + "version": "1.25.3", "dependencies": { "@babel/parser": "7.29.11", "@peculiar/x509": "3.1.0", diff --git a/package.json b/package.json index d1a66d34..8e1554ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "local-agent-workbench", - "version": "1.25.2", + "version": "1.25.3", "private": true, "type": "module", "description": "A local coding workbench with explicit tool execution, reviewable changes and recoverable sessions.", diff --git a/scripts/qa-evidence.mjs b/scripts/qa-evidence.mjs index abc59d8e..3ba5dd06 100644 --- a/scripts/qa-evidence.mjs +++ b/scripts/qa-evidence.mjs @@ -29,6 +29,7 @@ const prefixes = Object.freeze({ '1.25.0': 'task-agreement', '1.25.1': 'outlier-install', '1.25.2': 'reliability', + '1.25.3': 'reasoning-controls', }); export function releaseEvidencePrefix(version) { const prefix = prefixes[version]; diff --git a/scripts/reasoning-formal-release.mjs b/scripts/reasoning-formal-release.mjs new file mode 100644 index 00000000..28b5400d --- /dev/null +++ b/scripts/reasoning-formal-release.mjs @@ -0,0 +1,101 @@ +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'; + +// Retained-state 1.25.2 to 1.25.3 local upgrade. One installer operation only; +// preserve every first failure and never restart the formal Provider or read keys. +const attempt = process.argv[3] ?? 'formal', url = 'http://127.0.0.1:4318', mode = process.argv[2]; +assert.match(attempt, /^formal(-attempt-[0-9]+)?$/); +const root = path.resolve('.qa/reasoning-1.25.3', attempt); +assert.ok(['before', 'upgrade', 'final'].includes(mode)); +const { execFileSync } = await import('node:child_process'); +const sourceCommit = execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8', windowsHide: true }).trim(); +assert.equal(execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8', windowsHide: true }).trim(), '', 'Release driver needs a clean reviewed tree.'); +fs.mkdirSync(root, { recursive: true }); +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.'); +const baseline = mode === 'before'; +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); + 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.25.2'); + 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, eventCursor: current.eventCursor, + 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('releases/latest.json'); + assert.equal(candidate.documentation.sourceCommit, sourceCommit, 'Candidate must be built from the reviewed HEAD.'); + assert.equal(read(path.join(candidate.portableRoot, 'MANIFEST.json')).version, '1.25.3'); + // Reject a stale compiled version before touching the formal host. + const served = /APP_VERSION\s*=\s*["']([0-9.]+)["']/.exec(fs.readFileSync(path.join(candidate.portableRoot, 'dist-server', 'server.mjs'), 'utf8')); + assert.equal(served?.[1], '1.25.3', 'Compiled server must report the candidate version.'); + 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, 'Installer drifted from latest.json.'); + save('candidate.json', candidate); save('preinstall-state.json', current); + const operationStartedAt = Date.now(); + 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); } + const operationElapsedMs = Date.now() - operationStartedAt; + save('installer-exit.json', { code, operationElapsedMs, 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.25.3'); 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, + pointerRevision: pointer.revision, previous: pointer.previous?.version, operationState: operation.state, + 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 }, null, 2)); diff --git a/scripts/reasoning-release.mjs b/scripts/reasoning-release.mjs new file mode 100644 index 00000000..7dffe208 --- /dev/null +++ b/scripts/reasoning-release.mjs @@ -0,0 +1,103 @@ +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'; + +if (process.argv.includes('--help')) { console.log('node scripts/reasoning-release.mjs freeze|register|rebuild|archives|portable|install|source-reasoning|source-reasoning-desktop|portable-reasoning|portable-reasoning-desktop|portable-fidelity|portable-messages|portable-files — frozen 1.25.3 acceptance, synthetic requests only; each receipt is write-once.'); process.exit(0); } +const releaseStage = process.argv[3] ?? 'release'; assert.ok(['release', 'release-final'].includes(releaseStage)); +const root = path.resolve('.qa/reasoning-1.25.3', releaseStage), 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 = 'D:/Ai-project/REA逆向/Agent-Workbench/.qa/reliability-1.25.2/python-env/Scripts/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.25.3'); + 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.25.3', + 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']], + 'portable-recheck': [process.execPath, ['scripts/verify-release.mjs']], + install: [process.execPath, ['scripts/verify-desktop-install.mjs']], + 'source-reasoning': [process.execPath, ['scripts/verify-reasoning-settings-ui.mjs']], + 'source-reasoning-desktop': [process.execPath, ['scripts/verify-reasoning-settings-ui.mjs', '--desktop']], + 'portable-reasoning': [process.execPath, ['scripts/verify-reasoning-settings-ui.mjs']], + 'portable-reasoning-desktop': [process.execPath, ['scripts/verify-reasoning-settings-ui.mjs', '--desktop']], + 'portable-fidelity': [process.execPath, ['scripts/verify-model-fidelity-ui.mjs', '--app-root', candidate.portableRoot]], + 'portable-messages': [process.execPath, ['scripts/verify-anthropic-messages-ui.mjs', '--app-root', candidate.portableRoot]], + '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']], + 'portable-results': [process.execPath, ['scripts/verify-file-results-ui.mjs']], + 'portable-reading': [process.execPath, ['scripts/verify-reading-reliability-ui.mjs']], + 'source-c': [process.execPath, ['scripts/verify-task-agreement-ui.mjs']], + 'source-c-desktop': [process.execPath, ['scripts/verify-task-agreement-ui.mjs', '--desktop']], + 'source-d': [process.execPath, ['scripts/verify-task-follow-up-ui.mjs']], + 'source-d-desktop': [process.execPath, ['scripts/verify-task-follow-up-ui.mjs', '--desktop']], + 'portable-c': [process.execPath, ['scripts/verify-task-agreement-ui.mjs']], + 'portable-c-desktop': [process.execPath, ['scripts/verify-task-agreement-ui.mjs', '--desktop']], + 'portable-d': [process.execPath, ['scripts/verify-task-follow-up-ui.mjs']], + 'portable-d-desktop': [process.execPath, ['scripts/verify-task-follow-up-ui.mjs', '--desktop']], +}; +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 (['portable', 'portable-recheck'].includes(mode)) 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); + const count = { a: 7, 'a-desktop': 3, b: 9, 'b-desktop': 9, c: 6, 'c-desktop': 6, d: 5, 'd-desktop': 5 }[mode.replace(/^(source|portable)-/, '')]; + if (count) { assert.equal(value.passed.length, count); assert.deepEqual(value.errors, []); assert.equal(value.realModelRequests, 0); } + if (!['archives', 'portable-reading'].includes(mode)) assert.equal(value.version, freeze.version); + if (mode === 'portable-reading') { assert.equal(value.checks.length, 10); assert.deepEqual(value.errors, []); assert.equal(value.realModelRequests, 0); } + if (mode === 'portable-results') { assert.equal(value.checks.length, 16); assert.deepEqual(value.errors, []); assert.equal(value.realModelRequests, 0); } + if (mode.includes('reasoning') || mode === 'portable-fidelity' || mode === 'portable-messages') { + assert.equal(value.checks.length, mode === 'portable-messages' ? 7 : 6); assert.deepEqual(value.errors, []); assert.equal(value.realModelRequests, 0); + } + 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 })); diff --git a/scripts/verify-desktop-install.mjs b/scripts/verify-desktop-install.mjs index c5bf5e3f..5057129a 100644 --- a/scripts/verify-desktop-install.mjs +++ b/scripts/verify-desktop-install.mjs @@ -149,14 +149,15 @@ 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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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 = []; const suites = [ ['verify-file-results-ui.mjs', [], 16], ['verify-local-files.mjs', [], 9], - ...(['1.24.9', '1.25.0', '1.25.1', '1.25.2'].includes(version) ? [['verify-requirements-ui.mjs', [], 7], ['verify-requirements-desktop.mjs', [], 3], ['verify-turn-progress-ui.mjs', [], 9], ['verify-turn-progress-ui.mjs', ['--desktop'], 9]] : []), - ...(['1.25.0', '1.25.1', '1.25.2'].includes(version) ? [['verify-task-agreement-ui.mjs', [], 6], ['verify-task-agreement-ui.mjs', ['--desktop'], 6], ['verify-task-follow-up-ui.mjs', [], 5], ['verify-task-follow-up-ui.mjs', ['--desktop'], 5]] : []), + ...(['1.24.9', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].includes(version) ? [['verify-requirements-ui.mjs', [], 7], ['verify-requirements-desktop.mjs', [], 3], ['verify-turn-progress-ui.mjs', [], 9], ['verify-turn-progress-ui.mjs', ['--desktop'], 9]] : []), + ...(['1.25.0', '1.25.1', '1.25.2', '1.25.3'].includes(version) ? [['verify-task-agreement-ui.mjs', [], 6], ['verify-task-agreement-ui.mjs', ['--desktop'], 6], ['verify-task-follow-up-ui.mjs', [], 5], ['verify-task-follow-up-ui.mjs', ['--desktop'], 5]] : []), + ...(version === '1.25.3' ? [['verify-reasoning-settings-ui.mjs', [], 6], ['verify-reasoning-settings-ui.mjs', ['--desktop'], 6]] : []), ]; for (const [script, args, expected] of suites) { const output = await run(process.execPath, [path.join(appRoot, 'scripts', script), ...args], { cwd: appRoot, diff --git a/scripts/verify-release.mjs b/scripts/verify-release.mjs index 1cf9c0b9..ae2c7b05 100644 --- a/scripts/verify-release.mjs +++ b/scripts/verify-release.mjs @@ -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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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 {} } } diff --git a/scripts/verify-source-package.mjs b/scripts/verify-source-package.mjs index def3354a..e0d743a6 100644 --- a/scripts/verify-source-package.mjs +++ b/scripts/verify-source-package.mjs @@ -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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.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(); 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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].includes(evidence.version)) { + if (['1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].includes(evidence.version)) { + if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.9', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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', '1.24.9', '1.25.0', '1.25.1', '1.25.2'].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', '1.25.0', '1.25.1', '1.25.2', '1.25.3'].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(); diff --git a/src/server/diagnostics.mjs b/src/server/diagnostics.mjs index 0022004b..0d93bbdd 100644 --- a/src/server/diagnostics.mjs +++ b/src/server/diagnostics.mjs @@ -1,6 +1,6 @@ import { randomUUID, createHash } from 'node:crypto'; -export const APP_VERSION = '1.25.2'; +export const APP_VERSION = '1.25.3'; export function executionEnvironment() { const windows = process.platform === 'win32'; diff --git a/task_plan.md b/task_plan.md index 970e6ab9..180315dc 100644 --- a/task_plan.md +++ b/task_plan.md @@ -11,7 +11,8 @@ 5. [complete] X预冻结拒绝0请求保持;用户选择另冻Y,预检通过、Node8请求64500tokens三源码模型封存并应用,step_limit前未检查/交付。原诊断元数据收尾失败、开场外部池变化及两次只读复核错误保持;独立对账通过,不续跑Y。 6. [complete] 用户指定Z两路线完成:Claude手误型号mismatch,DeepSeek预检通过但新Node第5请求2048输出全用于reasoning后length失败,0提案/交付;151份证据离线通过,状态恢复、原失败和回顾保持。 7. [complete] 用户更正Claude后Z2返回GPT而停止;用户明确再试后Z3预检matched、Node首请求6692输入/0输出空内容,verification_incomplete暂停。两样本均封存并离线通过,原状态恢复、凭据3保持,不续跑。 -8. [in_progress] 推理开关/强度与空响应修复:用户补充使用者可开启并选择推理强度,扩展为按协议的实际控件与参数、DeepSeek推理工具历史、Messages空响应诊断。见docs/REASONING-CONTROLS-PLAN.md;先自有HTTP/预算/恢复与网页/桌面核心流程验证、阶段回顾和提交,再独立发行;真实模型0,旧失败保持。 +8. [complete] 推理开关/强度、品牌/自定义兼容配置档及导入同步、DeepSeek推理工具历史与Messages空响应诊断完成,3ab3a6e4/f1242ee8。85/85相关+最终8/8专项、网页/实际桌面各6组和旧参数6/Messages7组通过,回顾见docs/QA-REASONING-CONTROLS.md;真实模型0,旧失败保持。 +9. [in_progress] 1.25.3独立发行:版本/守卫/安装验收同步,完整源码检查、不可变候选、源码ZIP独立重建、三归档/便携/实际安装、保留原PID36552/Provider正式升级及网页/原生回看、原状态/证据封存/回顾/本地提交。完成前正式仍1.25.2,不声明真实模型交付或Purge已验证。 细节和阶段回顾见docs/RELIABILITY-1.25.2.md。开始时session-catchup无待同步输出;计划文件首次补丁因findings标题上下文不符被拒且无文件变化,已按原标题修正。以下按历史时点理解。