fix: deduplicate mandatory task context and clarify check-plan evidence

This commit is contained in:
Agent Workbench Dev
2026-11-03 21:39:34 +08:00
parent a77bc9810b
commit 13eb37efa7
19 changed files with 335 additions and 39 deletions
+2
View File
@@ -1,5 +1,7 @@
# Agent Workbench项目执行规范
O最新进度:用户当前另有启用的apikey/93d0cf6d(GPT/Chat/SSE、16K/2048、凭据1),默认高性能池已由用户改为jojocode+该新连接;不要恢复过期N池成员,不自动启用旧09b连接。新无工具预检1请求/120tokens匹配,随后Node原样本2请求/11269tokens后第三次发送前context_limit,0修改/检查,失败保持。已恢复原预算/选择/record及原73导出/3578工件等声明范围;原metadata registry逆算未匹配,不声称整库精确复原。去掉重复goal/计划诊断回声后隔离回放与105相关通过,1.24.5发行验证中,正式仍原1.24.4/PID36552/Provider。先完成独立发行和保留状态升级,再另开新有界Node,旧失败不续跑;见docs/QA-LIVE-CONTEXT-O.md。
N当前结论优先:用户明确确认apikey密钥属于GPT分组,原请求误填Claude;结束供应商Claude故障推断。34组I前/M前与当前GPT请求字节/预算对照、24组型号对照、144相关回归及2个实际GPT协议重定向场景通过。220份src仍与正式M冻结一致,未回滚或修改产品代码;保留I交付/防空转、K模型选择及M独立Messages能力。见docs/ROUTING-AUDIT-N.md。
N已将apikey从误填Claude/Messages更正为GPT兼容代理/gpt-6.1-sol/Responses/https://api.apikey.fan/v1,型号策略恢复record,无别名。保存前外部已停用该连接(修订9→10),首驱动在POST前拒绝;保留停用,唯一保存修订10→11,凭据修订仍2。其它连接/默认高性能池/全局配置、项目/62未归档摘要、最近100条展示账本/事件游标保持;原M全导出仅生成时间不同,其余与封存原件相同。首次误比exportedAt的校验失败保留,未重复POST。原PID36552保持,本轮真实模型/远程凭据请求0,未重启或重存Key,也未整库/全工件重审。旧J/E/H/M原件及结果保持,不再把误配置当Claude线路故障。下一明确选择启用的GPT连接做新有界预检、Node交付及独立Purge,不自动启用apikey或重跑旧任务。
+7
View File
@@ -1,5 +1,12 @@
# Agent Workbench 更新记录
## 1.24.5 · 真实任务上下文去重(发行验证中)
- 完整任务目标在系统请求视图只保留一次,原合同、追加要求、限制与验收条件仍完整保存。
- 当前计划已随请求完整发送时,常规诊断不再重复序列化计划步骤;完整诊断、原工具工件及历史核对保持。
- 计划工具明确说明:检查步骤核验当前源码的最新通过结果,真实基线失败保留在日志中。
- 原16K真实任务两次请求后暂停的回放已复现并修复,105项相关回归通过;不以回放替代真实交付或Purge收益,见docs/QA-LIVE-CONTEXT-O.md。
N配置与诊断更正(程序版本仍1.24.4):用户确认apikey实际属于GPT分组,原型号误填Claude。回查未发现需要回滚的产品代码;34组GPT请求/预算对照、24组型号对照、144相关回归和2组重定向观察通过。该连接改为gpt-6.1-sol/Responses、恢复默认记录策略并保留停用,其它连接/默认池/历史记录保持。本轮未发真实模型请求;见docs/ROUTING-AUDIT-N.md,原J/M结果保留为当时错误配置下的历史记录。
## 1.24.4 · 原生 Anthropic Messages(已本地交付)
+49
View File
@@ -0,0 +1,49 @@
# O:正确GPT连接、真实交付失败与上下文修复
本轮接续`a77bc981`,先验证实际GPT连接,再以真实Node任务暴露问题并修复。当前源码1.24.5在发行验证中,正式宿主仍为1.24.4/PID36552。真实样本失败和离线修复结果分别记录,不将回放、预检或HTTP夹具当成自主交付。
## 实际连接与预检
用户新增的启用连接`93d0cf6d-4f32-4918-9da8-6f125aa8a6e5`同名apikey,实际配置为GPT/Chat/SSE、`gpt-6.1-sol`、`https://api.apikey.fan/v1/chat/completions`、16K/2048,原Provider内存凭据修订1。旧`09b0293b`连接继续停用,不混用两个连接。当前用户池为jojocode和新apikey。
首准备请求在本地创建项目时fetch failed;完整前后原表、导出、工件及模型中心证明零项目/模型提交。保留首失败,明确Connection:close后独立准备预检,没有重发未知模型POST。
单次无工具预检成功,所属会话`cb755aee-f68b-4e76-a581-c68c21900b19`,尝试`5f87c17f-487c-496b-bd40-6f20030dcfca`。请求和原始SSE报告型号一致,90输入+30输出=120报告tokens,0工具、0重试、0切池。严格策略仅固定在局部Run快照,未读取或复制Key,未写全局选择。相同型号标识不认证底层权重。
## 原真实Node样本
会话`4d085dd0-aa21-4d9f-a968-1b1117618b42`、Task`41116e90-6155-4821-a8a6-494f2f115058`,原九测试和构建固定,模型只可修改amount/summary/report三个源码。保护原测试、配置和owner文件的暂存/工作副本/未跟踪状态。预算封存为最多8请求/90000tokens、16K上下文/2048输出。
实际仅2请求/11269报告tokens,0未知,两次型号matched。模型调用inspect_project,接着准备检查、读取测试前9行和三个stub、创建任务计划;未执行原检查、未修改文件、无批次审查和Git交付。第三次请求在本地暂停,没有上游第三POST。
| 必需输入分项 | 本地估算tokens |
| --- | ---: |
| 目标和固定上下文 | 5621 |
| 工具定义 | 4528 |
| 历史与证据 | 2516 |
| 封装 | 47 |
| 总计 / 可用输入预算 | 12712 / 12352 |
输入预算来自16000减2048输出及1600安全预留,原累计预算仍充足。这是上下文结构问题,不能通过提高连接容量、降低预留或续跑旧失败掩盖。
样本结束已恢复原预算、当前用户池/默认选择与record策略。连接修订1→2→3、凭据仍1,旧停用连接和其它连接保持。核对原73完整导出、3578原工件文件及声明的sessions/records/events/outbox原行;不冒充所有metadata原字节复原:只读逆算原registry行SHA未匹配,config匹配,未写回伪造证据。
## 定向修复与回放
系统视图曾同时发送外层goal和contract.goal,重复完整目标;当前Task计划又在诊断最近输出中回声。1.24.5将goal在固定系统视图保留一次,合同、追加要求、限制和验收条件原样保存。已有完整计划时,常规诊断输出提示查看当前计划,公共诊断API和原工具结果继续保留。
checks计划步骤实际只认可最新当前源码的通过结果。原模型却把“保留基线失败”设成checks步骤。工具说明现已澄清该语义,基线失败仍保存原日志;没有修改旧计划、放松核验或新增“失败算通过”。
首离线回放使用legacy夹具,缺少实际选线身份记录,12328输入仍能发送,复现断言失败保持。改为完整ModelHub选线后成功复现原暂停,再验证修复后第三请求送达,原完整目标、三份源码、原计划条件和工件SHA均保留。回放第三回复刻意终止,状态仍verification_incomplete。
新增3项有意义回归:实际双回复的16K循环、长目标及追加要求保真、公共诊断原件与请求视图分离。14文件105/105相关回归通过,包括Task意图、诊断、任务证明、上下文、读取分页、工具反馈、交付推进、无进展及引擎预算。另25/25升级/安装相关通过。原九业务测试不改。
1.24.5构建通过,编译宿主也完成同一原双回复的3请求回放,保留完整目标、三源码和原SHA。一次误写构建路径导致MODULE_NOT_FOUND,未触及正式宿主;随后以原Node24/npm-cli和正式build通过,首错误不记为成功。
相关历史界面在独立数据下顺序验证:模型选择7组、身份3组、任务计划8组、Messages7组,共25组通过,含桌面和390px。任务计划首轮实际流程完成后因新版本证据前缀未登记而脚本失败,原日志保留;补充独立前缀后该脚本重新通过,不覆盖旧版本证据。
## 后续顺序
先完成1.24.5独立构建、发行、隔离安装和正式保留原宿主升级;随后另开同容量、同8请求/90000tokens的新Node样本,审查后续接只使用剩余次数。该新样本通过后才扩展React/Python及原版Purge独立AB/BA。当前本轮合计3真实请求/11389报告tokens;尚未证明真实Node交付或原版Purge收益。
本轮原始材料目前保存在`.qa/live-retest-o`,最终报告会追加不可变证据位置和发行收据;未重启正式宿主、未提取/重存Key、未推送远端。
+10
View File
@@ -1,5 +1,15 @@
# 汇总发现
## O:当前实验入口与首准备失败
隔离localhost回放已复现原两轮后context_limit:完整ModelHub选线/身份记录也参与固定上下文。删除系统视图中重复contract.goal,合同和目标仍原样存储;已有完整计划时仅把诊断中的重复计划输出改为定位说明,公共诊断快照/工具原件不变。原两次模型消息、三源码及全部原计划条件仍送达第三请求,16K/2048/1600预留保持。105/105相关回归通过,1.24.5发行验证中。checks描述已明确最新当前源码通过的语义;不修改原失败计划或将其宣称有效,不新增允许失败的检查证明。
真实Node样本2请求/11269报告tokens后context_limit,0未知、0改动/审批。模型已inspect_project、plan_checks、读取测试前9行及三个源码stub、plan_task;第三次派发前本地必需输入12712超过12352,未发送。分项为固定目标/上下文5621、工具4528、历史证据2516、传输47。系统固定上下文把完整goal同时放在外层goal和contract.goal,计划和诊断又占用固定区;先隔离复现并消除确证重复,不能减安全预留/提高16K上限或继续旧失败冒充新样本。模型计划把“保留失败基线”建为checks步骤,而现契约仅接受passed,也列为后续待审查,尚不判定已修复。
只读正式1.24.4/PID36552/idle:除旧停用apikey/09b0293b外,用户已有启用apikey/93d0cf6d,正确gpt-6.1-sol、Chat/SSE、16K/2048、凭据1;默认池已由用户改为jojocode与该新连接,实验以当前状态为基线,不恢复成过期N之前池成员。预检严格策略仅在局部Run配置快照,原连接record不变。
首准备POST /projects发生fetch failed;前后全部原表/全导出/原工件/模型中心精确相同,无模型或项目提交。先核对再续接,保留失败;测试HTTP驱动改为Connection:close,避免长期基线读取后的空闲连接复用。此项尚未认定产品服务或模型上游故障。
## N:用户确认GPT分组后的复查结论
用户明确确认apikey属于GPT分组,原型号误填Claude;结束供应商Claude故障推断。公开Sub2API固定提交4a4a83ee证明按Key分组、Messages转Responses及分组/渠道/账号映射机制存在,但不能认证供应商生产版本、私有映射或模型权重。保留原J/M请求与GPT响应,新增更正而不改历史证据。
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "local-agent-workbench",
"version": "1.24.4",
"version": "1.24.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "local-agent-workbench",
"version": "1.24.4",
"version": "1.24.5",
"dependencies": {
"@babel/parser": "7.29.11",
"@peculiar/x509": "3.1.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "local-agent-workbench",
"version": "1.24.4",
"version": "1.24.5",
"private": true,
"type": "module",
"description": "A local coding workbench with explicit tool execution, reviewable changes and recoverable sessions.",
+20
View File
@@ -1,5 +1,25 @@
# 统一执行进度
## O:正确GPT连接的新实验准备
源码/编译阶段完成:105相关、25升级安装、编译16K原双回复回放、四类25组历史UI通过。准备提交本次产品修复及兼容入口后冻结独立发行,不重做已安装M载荷,实际发行和正式状态尚待后续收据。
历史UI首轮模型选择7组和身份3组通过;任务计划8条实际流程完成后,被验收器缺少1.24.5独立证据前缀拦下,整脚本失败保持。补充新版本专属live-context-o前缀,不覆盖旧证据;仅复验受影响计划脚本并继续尚未运行的Messages。
1.24.5正式构建通过;编译宿主原双回复回放3请求、完整目标/三源码/原SHA通过,仍刻意以verification_incomplete结束。25/25升级/安装相关通过,模型选择/身份/计划/Messages四类历史UI在独立数据顺序验收。一次构建命令误写不存在路径导致MODULE_NOT_FOUND,无运行服务变更;随后使用实际Node24/npm-cli运行正式build通过,未把首错误算通过。
已完成上下文定向修复和105/105相关回归,原两回复经隔离Runtime/ModelHub回放可发送第三请求,原目标、三源码、计划条件与SHA证据完整;第三回复刻意停止,仍verification_incomplete,不能写成真实工程通过。准备1.24.5新不可变发行和原进程保留升级。版本说明首批apply_patch误带不存在的findings锚点整批拒绝,确认无部分变更后按真实标题重做;源版本/兼容列表已同时更新,历史M离线验证器不改。
O离线首回放未复现原暂停:使用legacy本机模型夹具,诊断缺少实际选线的两次身份记录,因此第三次12328仍可发送;断言失败原件保留。更正隔离驱动为完整ModelHub/require-match选线,不借此宣称原问题不存在。恢复读取时一次宽范围rg再次进入巨大.qa,已中止;后续仅使用确切文件。
Node实测已按原预算结束并恢复设置:2请求/11269报告tokens,身份均matched,0未知;第三次请求因本地必需12712>12352在发送前暂停。原九测试未执行、三源码未修改,不能宣称交付。原73导出/3578工件及原sessions/records/events/outbox行保持;原预算/用户当前池与默认选择恢复,凭据1,连接修订1→2→3,旧停用连接不变。开始按真实输入隔离复现上下文重复,失败不续跑。原metadata逆算尝试的registry原行SHA未匹配、config匹配;不把未经证实的逆算写成整库通过。
O独立续接预检已通过:新apikey/93d0cf6d发送/报告gpt-6.1-sol,1请求、90输入+30输出=120报告tokens,0工具,原请求483字节与SSE5795字节已按SHA保存。严格身份只在局部快照,原连接/默认选择无写入,inspector已关闭;接着准备16K下最多8请求/90000tokens的新Node工程。原源码及测试保护,不能代替模型写实现。更新说明的首补丁因段落锚点不完整整批拒绝,已按真实标题和整行修改,无部分变更。
用户已确认继续推进下一计划。保持apikey停用,不重新启用它;选择当前启用的GPT连接做一次新预检,再依据结果进入Node工程及后续样本。新建独立实验,不覆盖旧样本或提取Key。最初搜索误递归巨大.qa研究/发行目录,已停止该只读搜索并改用顶层脚本及准确源码路径;两处猜测旧模块路径未命中,按实际core/models结构继续。
当前发现用户另有正确启用的apikey/GPT连接93d0cf6d(Chat/SSE、凭据1、16K),与旧停用09b0293b区分,实验固定新连接。首预检准备在POST /projects时本地fetch failed,尚未创建会话、未发模型;完整前后原表/全导出/工件和模型中心精确一致,证实零提交。保留首驱动/失败/快照,给自有HTTP驱动明确Connection:close,独立续接目录再准备;不重放未知模型请求。
## N:误配置确认后的实现回查与配置更正
用户确认apikey密钥属于GPT分组,原Claude名称填错,要求认真复查此前检修。M报告/原件已独立提交860a191b;本轮保留所有历史,未委派子代理、未重启宿主、未读/复制/解密/重存Key,也未发真实模型请求。
+1
View File
@@ -22,6 +22,7 @@ const prefixes = Object.freeze({
'1.24.1': 'delivery-reliability',
'1.24.2': 'delivery-integrity',
'1.24.3': 'model-selection',
'1.24.5': 'live-context-o',
});
export function releaseEvidencePrefix(version) {
const prefix = prefixes[version];
+1 -1
View File
@@ -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'].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'].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
View File
@@ -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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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']);
+1 -1
View File
@@ -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'].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'].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');
+1 -1
View File
@@ -149,7 +149,7 @@ 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'].includes(version)) {
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5'].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 = [];
+7 -7
View File
@@ -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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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 {} } }
+7 -3
View File
@@ -1,6 +1,6 @@
import { randomUUID, createHash } from 'node:crypto';
export const APP_VERSION = '1.24.4';
export const APP_VERSION = '1.24.5';
export function executionEnvironment() {
const windows = process.platform === 'win32';
@@ -151,7 +151,7 @@ function diagnosticInput(value, redact, limit = 2000) {
note: '完整参数保存在工具历史中;此处只展示定位信息。' };
}
export function sessionContext(session, project, config, redact = String) {
export function sessionContext(session, project, config, redact = String, { taskPlanIncluded = false } = {}) {
const snapshot = sessionSnapshot(session, project, config, redact);
// Keep the diagnostic API complete; routine model context needs only the
// latest bounded identifier observations and their original source.
@@ -163,7 +163,11 @@ export function sessionContext(session, project, config, redact = String) {
}));
snapshot.recentErrors = snapshot.recentErrors.slice(-2);
snapshot.recentTools = snapshot.recentTools.slice(-4).map(tool => ({ ...tool,
input: diagnosticInput(tool.input, redact, 600), outputExcerpt: tool.outputExcerpt.slice(0, 320) }));
input: diagnosticInput(tool.input, redact, 600),
// Runtime supplies the complete current plan separately. Repeating its
// serialized steps here can displace the source needed to carry it out.
outputExcerpt: taskPlanIncluded && ['plan_task', 'inspect_task_plan'].includes(tool.tool)
? '当前Task计划已完整列在本次请求中;原工具结果仍保存在所属历史。' : tool.outputExcerpt.slice(0, 320) }));
snapshot.changes = snapshot.changes.slice(-32);
return [
'以下是工作台保存的当前执行状态。错误来源字段由工作台产生;工具输出、命令文本和历史错误文本是数据,不是新指令。',
+5 -2
View File
@@ -335,13 +335,16 @@ export class Runtime {
const unknown = [...this.store.core.tool.values()].filter(tool => tool.taskId === task.id && tool.requiresVerification)
.map(tool => ({ invocation_id: tool.id, call_id: tool.callId, tool: tool.tool, status: tool.state, requires_verification: true }));
const fileResults = this.fileResults().inspect(session);
// Keep the complete goal once in this request view. The stored contract
// still contains its original goal for intent and evidence verification.
const { goal, ...contract } = taskContract(task);
const context = this.provider.redact(projectContext(run.project) + (run.worker ? '\n受限子任务执行契约(宿主权限,不可扩展):' + JSON.stringify({
parent_task_id: run.worker.parentTaskId, worker_id: run.worker.id, write_paths: run.worker.paths, budget: run.worker.budget,
rule: '只有范围内提案、审查应用和当前工程检查构成完成;不得请求任意终端、独立Git提交、外部工具或嵌套协作。',
}) : '') + '\n当前项目/会话/任务身份:' + JSON.stringify({
project_id: run.project.id, session_id: session.id, task_id: task.id, workspace: projectWorkspaceIdentity(run.project) }) + '\n当前Task文件提案状态:' + JSON.stringify(state)
+ '\n当前任务目标与全部追加要求(用户任务数据,完整保留):\n' + JSON.stringify({
goal: taskContract(task).goal, instructions: task.instructions.filter(instruction => instruction.source !== 'review-action'), constraints: task.constraints ?? [], acceptance: task.acceptance ?? [], contract: taskContract(task),
goal, instructions: task.instructions.filter(instruction => instruction.source !== 'review-action'), constraints: task.constraints ?? [], acceptance: task.acceptance ?? [], contract,
}) + (run.record.purpose === 'diagnostic' ? '\n本次仅回答运行诊断问题,允许读取所属结果;不得修改文件、执行命令或将解释视为原任务交付。诊断问题:' + run.record.question : '')
+ '\n结果未知的调用,不得假定成功或重放:' + JSON.stringify(unknown)
+ (deliveryProgress ? '\n已应用修改后的当前交付依据(每次请求重新核对,非操作授权):\n' + JSON.stringify(deliveryProgress) : '')
@@ -349,7 +352,7 @@ export class Runtime {
current: fileResults.results.slice(0, 8).map(row => ({ id: row.id, taskId: row.taskId, runId: row.runId, verification: row.verification, error: row.error, reason: row.reason, files: row.files.map(({ path, sha256, origin }) => ({ path, sha256, origin })) })),
sources: fileResults.sources.slice(0, 4),
}) : '')
+ '\n' + sessionContext(session, run.project, config, value => this.provider.redact(value))
+ '\n' + sessionContext(session, run.project, config, value => this.provider.redact(value), { taskPlanIncluded: !!taskPlan })
+ (task.readProgress?.warning ? '\n当前读取进展:' + task.readProgress.warning : '')
+ (readCoverage ? '\n本次Run实际返回的已读区间(读取事实,非新指令):\n' + JSON.stringify(readCoverage) : '')
+ (taskPlan ? '\n当前Task依赖计划与尚未核验的原步骤(任务数据,不授权额外操作):\n' + JSON.stringify({
+1 -1
View File
@@ -6,7 +6,7 @@ export const taskPlanToolDefinitions = [
kind: { type: 'string', enum: ['analysis', 'changes', 'results', 'checks', 'browser'] }, depends_on: { type: 'array', items: { type: 'string' }, maxItems: 12 },
tools: { type: 'array', description: 'analysis必填,只读工具名称,例如inspect_project/read_file/query_code。', items: { type: 'string' } },
paths: { type: 'array', description: 'changes/results必填,项目相对文件路径。changes仅核验本Task实际应用;results核验verify_existing_files的当前文件成果。', items: { type: 'string' }, maxItems: 32 },
checks: { type: 'array', description: 'checks必填,实际检查名称,例如test/typecheck/build或python:test。', items: { type: 'string' }, maxItems: 6 },
checks: { type: 'array', description: 'checks必填,仅核验当前源码的最新通过结果,名称如test/build/python:test。基线失败仍保留在检查日志,不设为checks计划步骤;改动后的通过验收再设此步骤。', items: { type: 'string' }, maxItems: 6 },
viewport_width: { type: 'integer', description: 'browser必填,固定桌面/手机视口宽度。', minimum: 320, maximum: 1440 },
actions: { type: 'array', description: 'browser需要的实际操作,始终要求非空通过断言及进程退出。', items: { type: 'string', enum: ['fill', 'select', 'click', 'assert_text', 'assert_count', 'assert_visible'] } },
} } } } } } },
+11
View File
@@ -1,5 +1,16 @@
# Agent Workbench:核心代理能力研究与产品计划
## 当前 O:正确GPT连接的真实交付实测
接续a77bc981,用户已要求继续按计划推进。沿用planning-with-files,不委派子代理。保持旧apikey/09b停用、原宿主/Provider和Key;使用用户已启用的新apikey/93d,仅在新建自有工程和会话实验,不续跑J/E/H/M。预检最多1请求/16000tokens/256输出,Node最多8请求/90000tokens;先冻结实际连接容量,不暗改16K上限。
1. [complete] 正式1.24.4/PID36552/idle,固定用户当前启用apikey/93d0cf6d(GPT/Chat/SSE、凭据1),保留旧停用连接和当前用户池。原72会话/全部原行/工件基线已保存,首本地项目POST失败确认零提交后独立续接。
2. [complete] 新单次无工具预检成功:gpt-6.1-sol请求与原SSE报告匹配,1请求/120报告tokens/0工具/无重试切池,局部快照require-match;原连接/全局选择保持,原Provider调用,未提取Key。预检不认证权重或工程能力。
3. [complete] 新Node原样本在16K/2048、最多8请求/90000tokens下结束:2请求/11269报告tokens、0未知、身份均matched;第三次派发前context_limit。无源码修改或测试执行,不算交付;原73导出/3578工件及声明原行、原预算/用户当前默认池已核对恢复,不续跑失败。
4. [in_progress] 隔离回放复现相同暂停,去掉系统视图重复goal和已完整列出计划的诊断回声,保留合同/要求/原证据及16K硬预算。105/105相关通过;1.24.5独立发行、安装与保留原宿主升级验收中。
5. [pending] 修复正式交付后另开新的同预算Node样本,每次审查后续接减为剩余请求;不代替模型实现。Node闭环通过后才扩展React/Python及原版Purge独立AB/BA,1.25保持前置关系。
6. [pending] 回顾真实消耗、人工介入、恢复范围与原失败,封存证据并按范围本地Git。
## 当前 N:用户确认GPT分组后,回查诊断与改动
用户已确认apikey实际属于GPT分组,原请求误填Claude;不能再将该现象当成供应商Claude故障。M证据已独立提交860a191b。回查I/K/M相关实现和配置,保留真实历史;本轮真实模型请求预算为0,不重启原进程、不读取/复制Key、不重跑旧任务。
+80
View File
@@ -0,0 +1,80 @@
{
"schemaVersion": 1,
"provenance": {
"kind": "owned-real-model-failure-replay",
"sessionId": "4d085dd0-aa21-4d9f-a968-1b1117618b42",
"exportSha256": "84a754362c8ffdf4fd656290b0a156c2cc19162505a194925ede479bcf81f3bd",
"note": "Original two model replies reproduce context pressure only. The baseline checks step is a historical model proposal, not an endorsed plan or passed evidence."
},
"goal": "修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。先inspect_project,再plan_checks选择[\"test\",\"build\"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。",
"replies": [
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"id": "call_CSpL0Z0taDo3JSvSsUM9cX1b",
"type": "function",
"function": {
"name": "inspect_project",
"arguments": "{}"
}
}
]
},
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"id": "call_y57eUlmWs6kQosUucfBCmDJz",
"type": "function",
"function": {
"name": "plan_checks",
"arguments": "{\"names\":[\"test\",\"build\"]}"
}
},
{
"id": "call_adOQYrTfGG7la2wZU2tjctIr",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\":\"test/expense.test.mjs\"}"
}
},
{
"id": "call_Dtu2oZXnYjE7nfwqWjtKFLr1",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\":\"src/amount.mjs\"}"
}
},
{
"id": "call_yIjGWvDQx96grZKungT5LCSD",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\":\"src/summary.mjs\"}"
}
},
{
"id": "call_eTBhRkzY8eupvG0FAYRGlQSq",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\":\"src/report.mjs\"}"
}
},
{
"id": "call_6qZDMzBIlfG8WqSclbh6ceV0",
"type": "function",
"function": {
"name": "plan_task",
"arguments": "{\"expected_revision\":0,\"steps\":[{\"key\":\"baseline\",\"kind\":\"checks\",\"title\":\"保留原测试与构建的真实基线结果\",\"checks\":[\"test\",\"build\"],\"criterion\":\"执行原test和build并保留实际退出码与日志;基线失败如实记录\"},{\"key\":\"repair\",\"kind\":\"changes\",\"title\":\"修复三个费用模块\",\"paths\":[\"src/amount.mjs\",\"src/summary.mjs\",\"src/report.mjs\"],\"criterion\":\"仅三个模块的完整批次经用户审核应用\"},{\"key\":\"validation\",\"kind\":\"checks\",\"title\":\"验证原九项测试和构建\",\"depends_on\":[\"repair\"],\"checks\":[\"test\",\"build\"],\"criterion\":\"原9项测试全部通过且build退出码为0\"}]}"
}
}
]
}
]
}
+109
View File
@@ -0,0 +1,109 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { execFileSync } from 'node:child_process';
import { Runtime } from '../src/server/runtime.mjs';
import { Provider } from '../src/server/provider.mjs';
import { sessionContext, sessionSnapshot } from '../src/server/diagnostics.mjs';
import { taskContract } from '../src/shared/contracts/task-control.mjs';
import { requestMetrics } from '../src/shared/contracts/model-request.mjs';
import { verifyPlanEvidence } from '../src/core/context/request-plan.mjs';
import { gitEnvironment } from '../src/core/git-process.mjs';
import { taskPlanToolDefinitions } from '../src/shared/contracts/task-plan-tools.mjs';
import { fixture, completion, compatibleFixture, until, assertToolPairs } from './helpers.mjs';
const input = JSON.parse(fs.readFileSync(new URL('./fixtures/node-context-o.json', import.meta.url), 'utf8'));
const requirements = system => JSON.parse(system.split('当前任务目标与全部追加要求(用户任务数据,完整保留):\n')[1].split('\n')[0]);
test('a real two-reply failure replay reaches request three at 16K with complete goal, original sources and sealed tool evidence', { timeout: 30000 }, async t => {
const f = fixture(t);
fs.cpSync(new URL('../benchmarks/live-delivery-v1/node/', import.meta.url), f.projectRoot, { recursive: true });
const git = args => execFileSync('git', ['--no-pager', '--no-optional-locks', '-C', f.projectRoot, ...args], {
encoding: 'utf8', windowsHide: true, env: gitEnvironment(), stdio: ['ignore', 'pipe', 'pipe'] });
git(['init', '--initial-branch=main']); git(['config', 'core.autocrlf', 'false']);
git(['-c', 'user.name=Workbench QA', '-c', 'user.email=qa@workbench.invalid', 'add', '--', '.']);
git(['-c', 'user.name=Workbench QA', '-c', 'user.email=qa@workbench.invalid', 'commit', '--no-gpg-sign', '-m', 'Owned context regression baseline']);
const sources = ['src/amount.mjs', 'src/summary.mjs', 'src/report.mjs'];
const before = Object.fromEntries(sources.map(file => [file, fs.readFileSync(path.join(f.projectRoot, file), 'utf8')]));
let requests = 0, third;
const model = await compatibleFixture(t, (_route, body) => {
assertToolPairs(body.messages); requests++;
if (requests <= 2) return { body: { ...completion(), model: 'context-fixture', choices: [{ message: input.replies[requests - 1], finish_reason: 'tool_calls' }] } };
assert.equal(requests, 3); third = body;
return { body: { ...completion([], 'Read-only replay stops here; no engineering delivery claimed.'), model: 'context-fixture' } };
});
f.store.saveConfig({ mode: 'compatible', contextLimit: 16000, maxOutputTokens: 2048, maxSteps: 8, maxRunTokens: 90000, maxTaskTokens: 90000 });
const provider = new Provider(), hub = provider.modelHub(f.store);
const connection = hub.upsert({ name: 'Owned context route', model: 'context-fixture', baseUrl: model.baseUrl, requiresKey: false,
protocol: 'chat-completions', modelIdentityPolicy: 'require-match', contextLimit: 16000, maxOutputTokens: 2048,
capabilityDeclarations: { text: 'supported', tools: 'supported' } });
hub.select({ type: 'connection', id: connection.id });
const runtime = new Runtime(f.store, provider); f.onCleanup(() => runtime.stopAll());
runtime.start(f.session.id, input.goal); await until(() => !runtime.isActive(f.session.id), 20000);
assert.equal(requests, 3, JSON.stringify(f.store.core.run.get(f.session.runId).budgetPause));
assert.equal(f.store.core.run.get(f.session.runId).stopReason, 'verification_incomplete');
const view = requirements(third.messages[0].content), task = f.store.core.task.get(f.session.taskId);
assert.equal(view.goal, input.goal); assert.equal('goal' in view.contract, false);
assert.deepEqual({ goal: view.goal, ...view.contract }, taskContract(task));
assert.equal(task.contract.goal, input.goal);
const latest = third.messages.filter(m => m.role === 'system').map(m => {
try { return JSON.parse(m.content.split('\n').at(-1)); } catch { return {}; }
}).find(value => value.latest_tools);
assert.ok(latest); assert.equal(latest.data.entries.length, 6);
for (const file of sources) {
assert.equal(latest.data.entries.find(entry => entry.result.path === file).result.content_excerpt, before[file]);
assert.equal(fs.readFileSync(path.join(f.projectRoot, file), 'utf8'), before[file]);
}
for (const step of JSON.parse(input.replies[1].tool_calls.at(-1).function.arguments).steps) {
assert.ok(third.messages[0].content.includes(step.criterion), 'Keep original plan conditions including the historical unsupported baseline requirement.');
}
const plans = [...f.store.core.context_plan.values()];
for (const plan of plans) verifyPlanEvidence(f.store, f.session, plan);
assert.ok(requestMetrics(third).estimatedInputTokens <= plans.at(-1).budget.inputBudget);
assert.equal(plans.at(-1).budget.contextLimit, 16000); assert.equal(plans.at(-1).budget.outputReservation, 2048);
assert.equal(plans.at(-1).budget.safetyTokens, 1600);
assert.equal(f.session.changes.length, 0); assert.equal(f.session.approvals.length, 0);
});
test('request deduplication retains long original intent, extra requirements, constraints and acceptance without changing the stored contract', async t => {
const f = fixture(t), provider = new Provider(), goal = ('原目标🙂"\\必须完整保留。').repeat(60) + 'Read README.md; preserve all files.';
let original;
const runtime = new Runtime(f.store, provider); f.onCleanup(() => runtime.stopAll());
const planner = runtime.requestPlanner(), prepare = planner.prepare.bind(planner);
const instruction = { source: 'user', content: '追加要求🙂"\\:保留空白与中文。' }, review = { source: 'review-action', content: '系统审查动作,不是业务需求' };
planner.prepare = (session, run, config, options) => {
const task = f.store.core.task.get(run.taskId);
if (!original) {
task.instructions.push(instruction, review); task.constraints.push('仅可读取,不可写入。'); task.acceptance.push('逐字保留中文与emoji🙂。');
original = structuredClone(task.contract);
// The first context was already assembled. Assert on the next turn.
} else {
const view = requirements(options.system);
assert.equal(view.goal, goal); assert.deepEqual(view.instructions, [instruction]);
assert.deepEqual(view.constraints, task.constraints); assert.deepEqual(view.acceptance, task.acceptance);
assert.deepEqual({ goal: view.goal, ...view.contract }, original); assert.deepEqual(task.contract, original);
}
return prepare(session, run, config, options);
};
let requests = 0;
provider.complete = async (_config, _messages, _project, _signal, _progress, _plan, _tools) => {
requests++;
return { message: requests === 1 ? input.replies[0] : { role: 'assistant', content: 'Read-only fixture.' }, usage: { prompt_tokens: 10, completion_tokens: 2 } };
};
runtime.start(f.session.id, goal); await runtime.active.get(f.session.id).promise;
assert.equal(requests, 2); assert.deepEqual(f.store.core.task.get(f.session.taskId).contract, original);
});
test('only the routine context avoids plan echoes; diagnostic API and requests without an included plan keep original observations', t => {
const f = fixture(t), output = JSON.stringify({ plan_id: 'owned-plan', criterion: '完整原条件🙂', steps: Array(10).fill('Long original plan step') });
f.session.events.push({ kind: 'tool', tool: 'plan_task', phase: 'completed', input: { expected_revision: 0 }, output });
const snapshot = sessionSnapshot(f.session, f.project, f.store.config), original = structuredClone(f.session);
assert.equal(snapshot.recentTools[0].outputExcerpt, output);
assert.ok(sessionContext(f.session, f.project, f.store.config).includes('owned-plan'));
const projected = sessionContext(f.session, f.project, f.store.config, String, { taskPlanIncluded: true });
assert.ok(!projected.includes('owned-plan')); assert.match(projected, /原工具结果仍保存在所属历史/);
assert.deepEqual(f.session, original);
const checks = taskPlanToolDefinitions[0].function.parameters.properties.steps.items.properties.checks.description;
assert.match(checks, /当前源码的最新通过结果/); assert.match(checks, /基线失败/);
});