diff --git a/AGENTS.md b/AGENTS.md index f920cf31..ff4e919a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,7 @@ # Agent Workbench项目执行规范 +当前F发行门控:首候选20261102151352527/source3934667的独立源码ZIP重建发现dist-server/install-manager.mjs遗漏已修正升级脚本的重新编译;其它21份编译完全一致,原D/E执行服务载荷与原证据保持。原候选不正式安装,失败保留。已补齐构建并新增scripts/verify-packaged-build.mjs;先固定新候选、独立重建和真实安装,再保留Provider交付。不得继续宣称三项验收/升级脚本都不影响产品编译。正式仍同源临时运行目录,未等同新安装发行。 + 当前E实测完成:同源修复载荷、真实claude-opus-5-5/Chat/32K六新例52请求/621486报告tokens/0未知;Python原6/6/编译/审查Git通过,React和四原版AB/BA未交付。两次原版实际apply与11开启/17关闭输入通过核对,不证明收益。889份证据见docs/LIVE-RETEST-E-RESULTS.md;46原会话/2143工件/原表每行与96原尝试保持,公开参数和原池恢复。当前同源临时宿主已启用但尚非新安装发行,先固定同一载荷本地交付,再按docs/LIVE-DELIVERY-EFFICIENCY-PLAN.md修复原结果反复读取和审查交接空转;不重跑本批旧失败,不擅自扩大预算,不复制Key。 当前可靠性修复A/B/C已按源码切片完成并各自封存,正式宿主未部署:A上下文、B所属网络/未知POST、C实际Task模型身份和每次发送前的已知usage预留。C实现bb45dab,最终425输入/149项、两协议固定16K各5组、编译UI两视口及离线核验通过;见docs/QA-LIVE-BUDGET-C.md。原六例仍未交付,Responses开发轮一次unknown/reset原因未明并保留,不自动重放。下一D原版插件隔离/固定输入/无Key加载验收,随后E另开有界真实批次;此轮真实模型请求0,不使用正式Key续跑旧六例。 diff --git a/docs/QA-ORIGINAL-PURGE-D.md b/docs/QA-ORIGINAL-PURGE-D.md index a04c36f8..bba4b0fe 100644 --- a/docs/QA-ORIGINAL-PURGE-D.md +++ b/docs/QA-ORIGINAL-PURGE-D.md @@ -28,6 +28,8 @@ host 验证器原先对零请求读取不存在的 consumption,已增加必须 完整原轮 756 项中 751 通过、5 失败,原日志保持失败。两项 Python 原因是默认解释器缺 pytest,使用已有 Python3.12.10/pytest8.4.2 复验 15/15;两项升级失败是捆绑 Undici 后请求处理器定位不唯一,收紧到实际 loopback handler 后 2/2。第五项历史 1.6.1 测试改写旧视图却保留新正文的预算预留;修正历史夹具并断言混合记录必须拒绝,六个相关文件 53/53。生产预算校验未放宽。这些是独立复验,不宣称重跑 756/756。 -原始完整轮冻结后仅三项验收/升级脚本和一个历史测试夹具修改;产品、编译载荷保持同一输入。相关来源谱系、原失败、运行/宿主收据、两协议工程记录及 343 条工件、四张截图共 399 份/51,254,660 字节,见 [manifest](original-purge-production-evidence/manifest.json)。manifest SHA-256:`ce3e7cec4136627cd3ad4bdea5f69bf46dbdf5c8db93876d33e72667598d32d1`。离线重建并核验源码、20 次夹具请求、原版输入、用量和进程关闭通过;核验器不启动插件/Provider/网络。 +原始完整轮冻结后修改了三项验收/升级脚本和一个历史测试夹具,原 22 份编译载荷按原字节封存。F 发行复核后来发现:升级脚本也由安装管理器导入,修正源码后遗漏重新编译该单独入口。因此原 D 编译安装管理器仍包含旧定位代码;不能把升级脚本简单视为不影响产品编译的验收改动。F 将补齐该入口的构建和实际安装验收;另外 21 份服务、网页和桌面编译文件与独立源码重建逐字节一致,E 模型执行载荷和实测结果保持原归属。 + +相关来源谱系、原失败、运行/宿主收据、两协议工程记录及 343 条工件、四张截图共 399 份/51,254,660 字节,见 [manifest](original-purge-production-evidence/manifest.json)。manifest SHA-256:`ce3e7cec4136627cd3ad4bdea5f69bf46dbdf5c8db93876d33e72667598d32d1`。原件离线重建并核验源码、20 次夹具请求、原版输入、用量和进程关闭通过;这不等同源码包独立编译一致性。核验器不启动插件/Provider/网络,原封存清单及失败不改写。 正式只读复核:全部 45 个历史会话导出、2,122 份历史工件和原 3,807 records/7,564 events/7,564 outbox 原字节保持。期间其他活动新增一个项目/会话和六次模型尝试,当前 30 项目/46 会话/96 尝试;不将它们归属于本阶段,也不宣称历史全状态相等。原池选择保持,本阶段真实模型请求为零。下一先在保留原 Provider 的同源不可变宿主启用并核对原状态,再独立执行 E。 diff --git a/findings.md b/findings.md index 2fb1df4c..92f636d7 100644 --- a/findings.md +++ b/findings.md @@ -1,5 +1,9 @@ # 汇总发现 +## F 源码与发行编译一致性 + +scripts/upgrade-running.mjs由src/core/desktop/install-manager.mjs直接导入,会进入单独的dist-server/install-manager.mjs。D后续修正该脚本时只复验源码升级而未重编这一入口,故436源码输入和旧22编译分别正确仍不足以证明两者对应。首发行源码ZIP独立重建已实际检出55字节差异;21份模型服务/网页/桌面编译仍完全一致。补齐构建后主仓与独立重建22/22逐字节一致。后续以独立源包重建核对作为正式安装前门槛,原D清单/失败及E实测数据不改写。 + ## E 真实样本结论 新六例52请求/621486报告tokens/0未知:Python6原测试、编译和审查Git闭环,React无修复批次,四原版对照均未交付。原版开启11输入/两实际apply,关闭17输入同源,未证明收益。第一开启顶层engine_input_budget实际limitingReason剩余累计预算:必需27424<窗口27552,但预留29600>剩余28339,不能误报32K不足。Python完整批次后还inspect_session两次;React反复读取历史/原结果;下一独立效率修复,保留全部失败。889份封存/离线通过,46原导出/2143工件及原表逐行保护、96原尝试保持,原参数/池恢复。 diff --git a/progress.md b/progress.md index a3cfd0e7..86a08c76 100644 --- a/progress.md +++ b/progress.md @@ -1,5 +1,11 @@ # 统一执行进度 +## F 发行一致性复核与构建遗漏修复 + +首不可变候选20261102151352527/source3934667的三归档CRC/完整目录/字节/SHA、436份D源码输入和22份原编译输入核对通过。首预检错误要求源码包自带dist,按package.mjs实际源码分发契约修正并保留原失败。便携实际链路通过,安装生命周期仍在自有数据中运行。 + +独立源码ZIP提取、离线npm ci及实际完整构建随后拦截真正遗漏:只有dist-server/install-manager.mjs不同(76499→76554字节),升级脚本收紧handler定位的源码修复未进入其旧编译入口;其他21份编译完全相同。原候选未执行正式安装。已用固定Node24重新构建,全部22份与独立重建相同;新增可复用verify-packaged-build.mjs,要求下一候选独立重建逐文件一致,保留原失败及旧包,不修改D/E封存原件或将夹具当模型实测。 + ## E 实测完成与本地发行接续 E证据本地提交b4c72d0,890个暂存文件逐字节核对通过;原TAP自带尾空格导致diff检查未通过时继续了封存提交,现补充原TAP binary属性,按既有原件规则保持字节,再整体检查通过后封存发行输入,不擦除原日志。 diff --git a/scripts/verify-packaged-build.mjs b/scripts/verify-packaged-build.mjs new file mode 100644 index 00000000..ad1287f3 --- /dev/null +++ b/scripts/verify-packaged-build.mjs @@ -0,0 +1,95 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import assert from 'node:assert/strict'; +import { createHash, randomUUID } from 'node:crypto'; +import { spawn, execFileSync } from 'node:child_process'; +import { projectEnvironment } from '../src/core/process-environment.mjs'; + +if (process.argv.includes('--help')) { + console.log('node scripts/verify-packaged-build.mjs — extract compile inputs from the latest source ZIP, install offline, rebuild and compare every compiled file to its portable ZIP identity. Set AGENT_WORKBENCH_TEST_PYTHON to an absolute Python path. No model calls or formal-host changes.'); + process.exit(0); +} +assert.equal(process.argv.length, 2); +assert.match(process.version, /^v24\./); +const release = JSON.parse(fs.readFileSync('releases/latest.json')); +const manifest = JSON.parse(fs.readFileSync(path.join(release.portableRoot, 'MANIFEST.json'))); +const root = path.resolve('.qa', 'packaged-build-' + randomUUID()), destination = path.join(root, 'source'); +fs.mkdirSync(destination, { recursive: true }); +const env = projectEnvironment(); +const python = process.env.AGENT_WORKBENCH_TEST_PYTHON; +assert.ok(python && path.isAbsolute(python) && fs.existsSync(python), 'Select an explicit QA Python.'); +const npm = path.join(path.dirname(process.execPath), 'node_modules/npm/bin/npm-cli.js'); +assert.ok(fs.existsSync(npm), 'Use Node with its bundled npm.'); +const sha = bytes => createHash('sha256').update(bytes).digest('hex'); +async function digestFile(file) { + const hash = createHash('sha256'); + for await (const bytes of fs.createReadStream(file)) hash.update(bytes); + return hash.digest('hex'); +} +const startedAt = new Date().toISOString(); +const extract = `import sys,zipfile,pathlib,json,hashlib +archive,destination,top=sys.argv[1:] +folders={'src','public','scripts','tests','examples','benchmarks','research'} +names={'package.json','package-lock.json','vite.config.ts','tsconfig.json','index.html','mobile.html'} +output=pathlib.Path(destination).resolve() +with zipfile.ZipFile(archive) as bundle: + manifest=json.loads(bundle.read(top+'/MANIFEST.json')) + selected=[item for item in manifest['files'] if item['path'].split('/')[0] in folders or item['path'] in names] + assert manifest['kind']=='source' and selected + for item in selected: + relative=pathlib.PurePosixPath(item['path']) + assert not relative.is_absolute() and '..' not in relative.parts + contents=bundle.read(top+'/'+item['path']) + assert len(contents)==item['bytes'] and hashlib.sha256(contents).hexdigest()==item['sha256'] + target=(output/str(relative)).resolve() + assert target.is_relative_to(output) + target.parent.mkdir(parents=True,exist_ok=True) + target.write_bytes(contents) +print(json.dumps({'version':manifest['version'],'inputs':selected}))`; +const logs = []; +async function run(args, name) { + const file = path.join(root, name + '.log'), log = fs.openSync(file, 'wx'); + let code; + try { + code = await new Promise((resolve, reject) => { + const child = spawn(process.execPath, [npm, ...args], { cwd: destination, env, windowsHide: true, stdio: ['ignore', log, log] }); + child.once('error', reject); child.once('close', resolve); + }); + } finally { fs.closeSync(log); } + logs.push({ name, file, code, sha256: await digestFile(file) }); + assert.equal(code, 0, name + ': inspect original log ' + file); + console.log('PASS ' + name); +} +let result, stage = 'source archive identity', inputs = [], compiled = [], mismatches = []; +try { + assert.equal(await digestFile(release.source.path), release.source.sha256); + stage = 'extract fixed compile inputs'; + const extraction = JSON.parse(execFileSync(python, ['-I', '-c', extract, release.source.path, destination, path.basename(release.sourceRoot)], + { env, encoding: 'utf8', windowsHide: true, maxBuffer: 8 * 1024 * 1024 })); + assert.equal(extraction.version, manifest.version); inputs = extraction.inputs; + stage = 'offline install'; await run(['ci', '--offline', '--ignore-scripts', '--no-audit', '--no-fund'], 'offline-install'); + stage = 'actual source build'; await run(['run', 'build'], 'build'); + stage = 'source and compiled bytes'; + for (const input of inputs) assert.equal(await digestFile(path.join(destination, input.path)), input.sha256, 'Source input changed: ' + input.path); + const folders = ['dist-client', 'dist-server', 'dist-desktop']; + const walk = folder => fs.readdirSync(path.join(destination, folder), { withFileTypes: true }) + .flatMap(entry => entry.isDirectory() ? walk(path.posix.join(folder, entry.name)) : [path.posix.join(folder, entry.name)]); + const expected = manifest.files.filter(item => folders.some(folder => item.path.startsWith(folder + '/'))); + assert.deepEqual(folders.flatMap(walk).sort(), expected.map(item => item.path).sort(), 'Exact compiled directory'); + for (const item of expected) { + const file = path.join(destination, item.path), actual = { bytes: fs.statSync(file).size, sha256: await digestFile(file) }; + assert.equal(await digestFile(path.join(release.portableRoot, item.path)), item.sha256, 'Portable input drift: ' + item.path); + compiled.push({ path: item.path, expected: { bytes: item.bytes, sha256: item.sha256 }, actual }); + if (actual.bytes !== item.bytes || actual.sha256 !== item.sha256) mismatches.push(compiled.at(-1)); + } + assert.deepEqual(mismatches, [], 'Source ZIP rebuild differs from portable compilation.'); + result = { success: true }; +} catch (error) { result = { success: false, stage, error: error.stack }; process.exitCode = 1; } +result = { ...result, startedAt, finishedAt: new Date().toISOString(), version: manifest.version, sourceCommit: release.documentation.sourceCommit, + root, destination, sourceZip: release.source, portableManifestSha256: await digestFile(path.join(release.portableRoot, 'MANIFEST.json')), + node: { version: process.version, sha256: await digestFile(process.execPath) }, inputCount: inputs.length, inputs, compiled, mismatches, logs, realModelRequests: 0, + scope: 'Independent compile-input extraction from the exact source ZIP, offline dependency installation and actual TypeScript/Vite/mobile/server/desktop rebuild. Every source input retained and every compiled file compared. Historical source tests and full archive checks keep their separate receipts.' }; +const output = path.join(root, 'result.json'); +fs.writeFileSync(output, JSON.stringify(result, null, 2) + '\n', { flag: 'wx' }); +console.log(JSON.stringify({ success: result.success, stage: result.stage, root, output, inputCount: inputs.length, + compiledFiles: compiled.length, mismatches: mismatches.length, error: result.error })); diff --git a/task_plan.md b/task_plan.md index 39af6ced..608bbe54 100644 --- a/task_plan.md +++ b/task_plan.md @@ -9,7 +9,7 @@ 3. [complete] D3 Task/Run真实消费/每次派发预算、默认关闭原版模式/完整来源及策略明细通过。大快照改有游标有界通知,编译UI四组/四截图/两视口零页面错误与意外断开;原失败保持。 4. [complete] D4 原生三场景、宿主四场景、Chat/Responses32K工程各五组通过。完整原轮751/756五失败及独立Python15/15、升级2/2、上下文53/53保持原归属;实现9106655/最终d05a741。399份/51254660字节/343工件离线来源/20夹具请求/用量/退出核验通过;见docs/QA-ORIGINAL-PURGE-D.md。本地证据提交后接E。 5. [complete] E 六个新有界样本实测及889份/39866911字节封存/离线原请求用量核验完成:52次真实请求/621486报告tokens/0未知。Python6/6/编译/审查Git通过;React与四原版AB/BA未交付,原版收益没有证明。11开启/17关闭输入、两次真实原版apply与六原生进程退出核对。46原会话/2143原工件及全部表逐原行保持,原模型参数/池恢复,修订单调增长明确记录。见docs/LIVE-RETEST-E-RESULTS.md。 -6. [in_progress] 将同一验证编译载荷固定为本地发行并保留Provider升级,核对原状态与桌面入口;不得把临时.qa运行副本冒作新安装交付。之后按docs/LIVE-DELIVERY-EFFICIENCY-PLAN.md继续效率与审查交接修复。 +6. [in_progress] F 固定本地发行并保留Provider升级,核对原状态与桌面入口。首候选三归档、436源码及22原编译身份通过,但独立源码重建发现安装管理器入口遗漏升级脚本修正;其余21编译逐字节一致。原失败保持,先补齐该入口构建、新增可复用源码ZIP重建核验、再生成新不可变候选并实际验收安装;正式尚未安装,不把临时.qa副本冒作交付。之后按docs/LIVE-DELIVERY-EFFICIENCY-PLAN.md继续效率与审查交接修复。 恢复读取时三次批读总输出超过工具上限,截断内容不作为审查依据;后续限制每批总输出和具体短段。