fix(ci): observe reminder progress and capture painted desktop views
This commit is contained in:
@@ -44,3 +44,13 @@
|
||||
- 研究原失败JSON逐层复核发现首因是旧16K有限夹具的Evidence字段读取返回“预算无法容纳元数据”,随后本机模型夹具解析失败并触发其重试,才出现第4/5次工具范围断言。完整原状态在`research-first-failure-state-1.json`,这是受控夹具错误,不是外部供应商异常。下一让该研究功能用例采用当前不限/完整历史默认,同时核对开放诊断工具广告与既有执行契约一致;不恢复额度或新增执行拦截。
|
||||
- 原提醒五请求/原20秒等待另做逐请求和状态观察,11.6秒独立用例通过;原并发超时的最后状态未封存,不能补造唯一性能根因。后续验收按五个实际请求的进展观察等待,仍核一次发送/当前证据/resolved/跨会话拒读/重启持久,不把总20秒误当产品运行额度。
|
||||
- 三处测试修正最终规范文本专项23/23,0失败/取消/跳过/todo,102798ms;正确QA解释器环境下,先前误覆盖的三项识别/身份用例均通过。全部产品/测试/脚本与编译输入前后一致,见`remaining-python-profile-fixed/run-windows-mw6jyjbh-5f925ebf/evidence/`。这仅是复用已建依赖/编译的专项,最后干净安装全套仍待;原首轮与局部失败未改写。
|
||||
- 核对现有执行端后,开放/full的诊断仍按`taskToolAllowed`保留只读意图;原工具广告却在unrestricted下绕过它。只修发送工具列表和排除原因,使广告与已有执行契约一致,未新增执行守卫;研究HTTP用例采用当前不限/完整历史默认,原5请求/1分析/原Task/Evidence/诊断只读断言全部保留。新增full诊断/无需测试广告、强行写入仍按原契约记错、无审批/文件变化/主历史替换的回归。
|
||||
- 最后新编译下三个实际文件22/22(47111ms),另实际`tool-prefix-observation.test.mjs`4/4(12270ms)通过;分别保留来源/编译SHA。首专项命令误带不存在的`tool-surface.test.mjs`,Node未拒绝该参数;只承认实际三个文件的22项,不宣称四文件完成,纠正在`task-surface-actual-input-review-1.json`。局部复验器随后加实文件前置;最终CI原本已逐个读取测试输入SHA,不采用该错误参数。
|
||||
- 提醒验收按5个实际请求及最终结束逐阶段观察,每阶段仍20秒停滞失败并保存最后运行状态;新编译下5请求/resolved/原设置与跨会话/重启全部通过。它只是验收等待方式,未修改产品不限时长、模型等待或预算策略;原31秒并发失败及两次原20秒局部通过分别保留。
|
||||
- 第一次实际Edge冒烟在1280模型中心通过,390切换后导航仍点击刚变inert的侧栏而30秒失败;真实失败DOM28131字节/PNG42376字节已保存并实看,0页面脚本错/外部请求,所属宿主65732及记录TCP58255已实际退出/拒绝连接。未运行Electron,不能冒称桌面通过。改模型中心验收导航使用两宽度均可见的工具箱;不force点击或改产品布局。失败捕获已补DOM及隐藏Electron原生截图,原错不被捕获失败替换。
|
||||
- 第二次实际冒烟`run-windows-mw6ko1ui-9d5564cc`原报告7组/4图通过,但实看原生1280仍为加载画面、390仍为工具箱,DOM与PNG不同步;不接受为完整视觉通过,原报告的`passed:true`与原图照存。第三次`run-windows-mw6kwdlc-8ead8ec3`在模型卡片/可用默认选择、字体、有限动画及两个实际RAF后原生截帧,7组/4图通过(命令32314ms),四图逐张实看均为加载完成的模型中心;宽窄网页/原生无文档横溢,窄原生内部滚动条保持。隐藏QA窗口临时关闭background throttling,尺寸逐项核对,不更改产品窗口行为;录入字段改名`requireLoadedModelCard`明确它是要求而非预填成功证据,观察在DOM的`painted`字段及原图。
|
||||
- 第三轮来源/构建前后未变,0模型尝试/页面脚本错误/外部页面请求;宿主62812/Electron13276退出,TCP62009实收ECONNREFUSED。第二轮宿主67464/Electron39816与TCP65462亦结束,不能由截图不足推导产品服务失败。两轮原报告/PNG/DOM不改写,另存只读视觉及SHA复核;最终已提交源码的干净Windows全套仍待。
|
||||
- 本次接续planning catchup退出0无补遗;组合读取历史内容再次遇工具输出截断,随后按当前规则/计划/实际diff限定输出。新日期为2026-11-08(本批来源与证据目录仍沿2026-11-07),不重做已完成专项,不改原证据或正式服务。
|
||||
- 本次提交前辅助索引核对误猜专项快照名`inputs-before.json`,实收ENOENT并以exit1停止,未继续提交。按实际证据文件名核对后再提交;这是辅助读取错误,不改原专项统计或产品。
|
||||
- 必要CI专项辅助记录器首命令id误含`.mjs`被既有仅字母/数字/横线守卫拒绝,尚未启动任何测试。原helper/已创建输入保留,另存check-2用稳定数字id后再执行;不更改产品记录器或放宽守卫。
|
||||
- 运行时/研究/任务广告修复已限定提交`87ca0751`,暂存字节与22项专项冻结输入逐SHA一致。提交前八图/八DOM SHA和PNG实际尺寸复核通过,最新两张原生图本次再次实看;两轮记录PID均不存在、TCP65462/62009重新实收拒绝,只观察自有QA端口。提醒/导航/截帧最终代码语法与CI pipeline8/8通过,来源SHA前后一致,`requireLoadedModelCard`仅记录语义更名;下一限定提交后以最终已提交源码另起真正干净Windows全套。
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# 汇总发现
|
||||
|
||||
I27/I28本次接续:开放模式广告曾绕过taskToolAllowed,执行端仍遵守原诊断/无需测试约定;本轮只对齐广告/排除原因,未新增执行守卫。研究首失败来自旧16K受控夹具Evidence元数据预算,不是外部模型故障。原生截图存在DOM已经模型中心而PNG仍加载/工具箱的真实证据差异;第二轮不作视觉通过,第三轮隐藏QA窗口关闭background throttling并等加载/字体/有限动画/两RAF后四图实看通过。最终干净已提交源码全套仍待,历史失败/unknown完整保留。
|
||||
|
||||
I27/I28公开只读调查:GitAtlas实返Gitea1.26.2、仓库has_actions=true;当前API公开private=false,不擅自修改可见性。Actions运行与runner接口匿名均401,不能据此断言有可用执行器。已保存1.26版quickstart/act-runner/comparison三份HTTP200原HTML及SHA;最新入口的308/301亦保持,不当正文成功。本地固定Node24.22.1已核,planning catchup退出0无补遗。
|
||||
|
||||
I27/I28初核:现有构建依赖Node24与dist-server,Python测试需独立pytest8.4.2,Playwright/Electron版本锁在package-lock;没有既有.gitea/.github工作流,GitAtlas Actions版本/启用/runner未知。源码包按目录白名单导出,暂不含.gitea,需要实际Git ZIP核对。历史manual/restricted fixture保留,不能为CI删除旧断言或以原依赖junction宣称干净安装。
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# 统一执行进度
|
||||
|
||||
I27/I28接续收尾:三处Python/推理测试修正d5207dc6已提交并专项23/23;运行时工具广告与已有任务执行契约对齐、研究采用当前开放默认,三个实际文件22/22及真实tool-prefix-observation4/4分别有证据。原首Windows全套1211项1194过17败自然结束,原件保持;提醒并发首失败无最后状态,不能补造唯一根因。最新实际Edge/隐藏Electron7组4图逐张实看通过,第二轮原生PNG滞后不接受为视觉通过,另记字体/两个RAF/原尺寸及真实TCP拒绝证据。当前核改动/限定提交后重新真正npm ci/新Python QA/Electron安装/构建/全套,不将现有专项称最终干净CI或远端job;0真实模型/Key/正式写入,Mnemo只读单独登记,M3迁移增量/结果后回退和历史unknown保持。
|
||||
|
||||
880c88c7已提交最小回放,独立contract已真npm ci73.3s/build18.1s、来源/工作流通过且14指定回归运行中;原Windows全套仍在大记录/Python等阶段。复核冒烟清理从health缺失误推端口关闭,已补真实TCP监听观察和同页事件去重,直接工具8/8,最终记录器专项和实际两端尚待;不提前代签全套/远端。Mnemo最终七原件SHA及五组离线摘要匹配,只读反馈补充,未接通服务或联合验收。
|
||||
|
||||
CI最小回放夹具65份2452465字节完成:112原来源/Git blob前后一致,四engine投影和R原证明/六回执/请求与旧输入相同。三原套件加CI漂移/缺失/逃逸边界35/35,源码包仍排除完整历史档案/会话/凭据;新CI导出后先核夹具。原e75a6427全套正在大记录/Python等阶段,首失败照存;最终干净安装仍待,不以专项或本机结果称远端job通过。
|
||||
|
||||
@@ -23,19 +23,31 @@ fs.writeFileSync(path.join(projectRoot,'README.md'),original,{flag:'wx'});
|
||||
const reservation=net.createServer();await new Promise(resolve=>reservation.listen(0,'127.0.0.1',resolve));const port=reservation.address().port;await new Promise(resolve=>reservation.close(resolve));
|
||||
const controller=new HostController({appRoot,dataRoot,port,nodePath:process.execPath,timeoutMs:60000});
|
||||
const report={schemaVersion:1,passed:false,startedAt:new Date().toISOString(),ownedRoot,port,groups:[],screenshots:[],pageErrors:[],externalRequests:[],scope:'Actual isolated product Microsoft Edge/Electron through locked Playwright and owned source/data only; no model or formal installation.'};
|
||||
let browser,application,electronPid,hostIdentity,stage='host-start';
|
||||
let browser,application,electronPid,hostIdentity,activePage,stage='host-start';
|
||||
const record=(name,detail={})=>report.groups.push({name,passed:true,...detail});
|
||||
const watched=new WeakSet();
|
||||
const watch=(page)=>{if(watched.has(page))return;watched.add(page);page.on('pageerror',error=>report.pageErrors.push(error.message));page.on('request',request=>{const url=new URL(request.url());if(['http:','https:'].includes(url.protocol) && !(url.hostname==='127.0.0.1' && Number(url.port)===port))report.externalRequests.push(request.url());});};
|
||||
const watch=(page)=>{activePage=page;if(watched.has(page))return;watched.add(page);page.on('pageerror',error=>report.pageErrors.push(error.message));page.on('request',request=>{const url=new URL(request.url());if(['http:','https:'].includes(url.protocol) && !(url.hostname==='127.0.0.1' && Number(url.port)===port))report.externalRequests.push(request.url());});};
|
||||
async function capture(page,mode,width,height){
|
||||
const id=mode+'-'+width,file=path.join(evidence,id+'.png');
|
||||
if(mode==='electron'){
|
||||
await application.evaluate(({BrowserWindow},size)=>BrowserWindow.getAllWindows()[0].setContentSize(...size),[width,height]);
|
||||
await page.waitForFunction(size=>innerWidth===size[0] && innerHeight===size[1],[width,height]);
|
||||
}else await page.setViewportSize({width,height});
|
||||
const dialog=page.getByRole('dialog',{name:'模型中心',exact:true});
|
||||
await dialog.getByRole('heading',{name:'新任务默认模型',exact:true}).waitFor({timeout:30000});
|
||||
await dialog.getByRole('combobox',{name:'新任务默认模型',exact:true}).and(page.locator('select:enabled')).waitFor({timeout:30000});
|
||||
const painted=await dialog.evaluate(async element=>{
|
||||
await document.fonts.ready;
|
||||
await Promise.all(element.getAnimations({subtree:true}).filter(animation=>animation.effect?.getTiming().iterations!==Infinity).map(animation=>animation.finished.catch(()=>{})));
|
||||
const frames=[];await new Promise(resolve=>requestAnimationFrame(first=>{frames.push(first);requestAnimationFrame(second=>{frames.push(second);resolve();});}));
|
||||
return{fontStatus:document.fonts.status,frames};
|
||||
});
|
||||
assert.equal(painted.fontStatus,'loaded');assert.ok(painted.frames[1]>painted.frames[0]);
|
||||
if(mode==='electron'){
|
||||
const value=await application.evaluate(async({BrowserWindow})=>{const window=BrowserWindow.getAllWindows()[0];const [width,height]=window.getContentSize();const image=await window.capturePage({x:0,y:0,width,height},{stayHidden:true,stayAwake:true});return{base64:image.toPNG().toString('base64'),visible:window.isVisible(),size:image.getSize()};});
|
||||
assert.equal(value.visible,false);assert.ok(value.size.width>0 && value.size.height>0);fs.writeFileSync(file,Buffer.from(value.base64,'base64'),{flag:'wx'});
|
||||
}else{await page.setViewportSize({width,height});await page.screenshot({path:file,fullPage:false});}
|
||||
writeNewJson(path.join(evidence,id+'.dom.json'),{title:await page.title(),width,height,html:await page.content(),overflow:await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth)});
|
||||
assert.equal(value.visible,false);assert.equal(value.size.width,width);assert.equal(value.size.height,height);fs.writeFileSync(file,Buffer.from(value.base64,'base64'),{flag:'wx'});
|
||||
}else await page.screenshot({path:file,fullPage:false});
|
||||
writeNewJson(path.join(evidence,id+'.dom.json'),{title:await page.title(),width,height,painted,html:await page.content(),overflow:await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth)});
|
||||
assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false,'Document overflows');
|
||||
const bytes=fs.readFileSync(file);assert.equal(bytes.subarray(1,4).toString(),'PNG');assert.ok(bytes.length>1000);
|
||||
report.screenshots.push({file,width,height,sha256:fileDigest(file),bytes:bytes.length});
|
||||
@@ -60,14 +72,32 @@ try{
|
||||
stage='electron';const executable=desktopExecutableIdentity(appRoot).path;
|
||||
application=await _electron.launch({executablePath:executable,args:[path.join(appRoot,'dist-desktop/main.cjs'),'--app-root',appRoot,'--data-root',dataRoot,'--node',process.execPath,'--port',String(port),'--hidden-window'],cwd:appRoot,env:projectEnvironment(),timeout:60000});
|
||||
electronPid=await application.evaluate(()=>process.pid);report.electron={pid:electronPid,executable,sha256:fileDigest(executable),version:await application.evaluate(()=>process.versions.electron)};
|
||||
const window=await application.firstWindow();await userPath(window,'electron',project.id);
|
||||
const window=await application.firstWindow();
|
||||
// Keep this owned QA window hidden while giving its renderer foreground
|
||||
// frame scheduling. This affects capture only and ends with the process.
|
||||
await application.evaluate(({BrowserWindow})=>BrowserWindow.getAllWindows()[0].webContents.setBackgroundThrottling(false));
|
||||
report.electron.capturePolicy={hiddenWindow:true,backgroundThrottling:false,requireLoadedModelCard:true,waitForFontsAndTwoFrames:true};
|
||||
await userPath(window,'electron',project.id);
|
||||
const status=await controller.status();assert.equal(status.identity.pid,hostIdentity.pid);assert.ok(status.desktopWindows.entries.some(entry=>entry.pid===electronPid));
|
||||
record('same owned host and actual registered Electron');
|
||||
const center=await controller.api('/model-center');assert.equal(center.attempts.length,0,'No model request is permitted in CI smoke');
|
||||
assert.deepEqual(fs.readFileSync(path.join(projectRoot,'README.md')),original);assert.deepEqual(report.pageErrors,[]);assert.deepEqual(report.externalRequests,[]);
|
||||
record('original source retained; zero model attempts or outside page requests');
|
||||
report.passed=true;
|
||||
}catch(error){report.failure={stage,name:error.name,message:error.message,stack:error.stack};process.exitCode=1;}
|
||||
}catch(error){
|
||||
report.failure={stage,name:error.name,message:error.message,stack:error.stack};process.exitCode=1;
|
||||
if(activePage&&!activePage.isClosed()){
|
||||
try{
|
||||
const domFile=path.join(evidence,'failure-'+stage+'.html'),imageFile=path.join(evidence,'failure-'+stage+'.png');
|
||||
fs.writeFileSync(domFile,await activePage.content(),{flag:'wx'});
|
||||
if(stage==='electron'&&application){
|
||||
const base64=await application.evaluate(async({BrowserWindow})=>{const window=BrowserWindow.getAllWindows()[0];const [width,height]=window.getContentSize();return(await window.capturePage({x:0,y:0,width,height},{stayHidden:true,stayAwake:true})).toPNG().toString('base64');});
|
||||
fs.writeFileSync(imageFile,Buffer.from(base64,'base64'),{flag:'wx'});
|
||||
}else await activePage.screenshot({path:imageFile,fullPage:true,timeout:10000});
|
||||
report.failureCapture={url:activePage.url(),dom:{file:domFile,bytes:fs.statSync(domFile).size,sha256:fileDigest(domFile)},image:{file:imageFile,bytes:fs.statSync(imageFile).size,sha256:fileDigest(imageFile)}};
|
||||
}catch(captureError){report.failureCaptureError={message:captureError.message};}
|
||||
}
|
||||
}
|
||||
finally{
|
||||
try{if(browser)await browser.close();if(application)await application.close();
|
||||
if(await controller.health())report.hostStop=await controller.stop();
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
export async function openWorkbenchTool(page, name) {
|
||||
const aliases = { '打开模型中心': '选择与管理模型', '项目MCP工具': '项目 MCP 工具' };
|
||||
const direct = page.getByRole('button', { name: aliases[name] ?? name, exact: true });
|
||||
if (await direct.first().isVisible()) { await direct.first().click(); return; }
|
||||
// The sidebar becomes inert after a responsive resize. The persistent
|
||||
// toolbox is the model-center entry at both desktop and narrow widths.
|
||||
if (name !== '打开模型中心' && await direct.first().isVisible()) { await direct.first().click(); return; }
|
||||
await page.getByRole('button', { name: '打开工具箱', exact: true }).click();
|
||||
const toolbox = page.getByRole('dialog', { name: '工具箱', exact: true });
|
||||
const actionName = name === '打开模型中心' ? '模型中心' : aliases[name] ?? name;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Agent Workbench:核心代理能力研究与产品计划
|
||||
|
||||
I27/I28阶段4收尾(接续2026-11-08):来源/入口与前三测试修正已提交;首Windows全套1194/1211,17原失败逐项定位并保留,局部23/23、三个实际文件22/22及tool-prefix4/4分别通过。第三轮实际网页/隐藏Electron7组4图实看通过;第二轮原生画面滞后单列,不重写原报告。下一限定提交runtime/研究/任务广告和提醒/截帧驱动,从最终HEAD重新干净npm ci/新venv/锁定Electron/构建/全部146文件及实际两端;阶段5封存/QA/普通GitAtlas推送待最终结果。正式/真实模型/Key/旧工程不动,M3增量迁移与结果后回退另冻。
|
||||
|
||||
M2第六批I27/I28开始:基线470d6948干净/远端一致,见[CI计划](docs/M2-CI-PLAN.md)。先查GitAtlas实际执行能力,再建立锁定依赖、官方来源/契约、源码身份及构建/安装的可重复入口,独立干净安装验收;不能以缺环境跳过改绿或把本地结果当远端通过。新证据根`.qa/m2-ci-2026-11-07/`,原各批封存只读,不委派/正式操作/真实模型/Key或续旧工程。随后M3统一发行,历史unknown保持。
|
||||
|
||||
M2 I09/I11阶段1–4完成:来源71f18055/核心9e1feeeb/界面ee97aaae,见[验收](docs/QA-M2-NATIVE-CACHE-STATE.md)。880输入/29编译/74runtime、两端各8组/10图、原metadata/cipher/snapshot/history exact,5126原件已封存;source-5为16/16,首127/129与两文件26/26按SHA分别保留。阶段5已封存/回顾并普通增量推送,1a897576远端逐SHA一致,见[回执](docs/gitatlas-m2-native-cache-state-push.json);完成接续最后另提交核对。下一I27/I28 CI,后续M3实际schema2迁移增量及新处理器结果后回退,不删除新账本或移除原保持守卫。正式/真实Key/模型/旧实验/历史unknown不动。
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { fixture, launchWorkbench, compatibleFixture, until, completion, call } from './helpers.mjs';
|
||||
|
||||
test('HTTP settings persist independently of model credentials and inspected advice remains bound to the original session', async t => {
|
||||
test('HTTP settings persist independently of model credentials and inspected advice remains bound to the original session', { timeout: 120000 }, async t => {
|
||||
const f = fixture(t, { modernDefaults: true }); let n = 0;
|
||||
const model = await compatibleFixture(t, () => ({ body: ++n < 5 ? completion([call('read-' + n, 'read_file', { path: 'README.md', offset: n === 4 ? 10 : 0, limit: 10 })]) : completion([], '本机固定流程完成。') }));
|
||||
const foreign = f.store.createSession(f.project.id);
|
||||
@@ -18,7 +18,24 @@ test('HTTP settings persist independently of model credentials and inspected adv
|
||||
const { configRevision: afterRevision, progressRemindersEnabled: afterEnabled, ...actual } = after.config;
|
||||
assert.deepEqual(actual, original); assert.equal(afterEnabled, true); assert.equal(afterRevision, beforeRevision + 1);
|
||||
await host.api('/sessions/' + f.session.id + '/messages', { content: '修改README.md,先读取核对内容;无需测试。' });
|
||||
await until(async () => !['running', 'stopping', 'awaiting_approval'].includes((await host.api('/sessions/' + f.session.id)).status), 20000);
|
||||
// Observe every physical request, then finalization. Five complete turns
|
||||
// must not share a single 20-second wall-clock allowance under CI load.
|
||||
// A stalled phase still fails and reports the actual last run state.
|
||||
const phases = [], waitFor = async predicate => {
|
||||
let current; const started = Date.now();
|
||||
try {
|
||||
await until(async () => {
|
||||
current = await host.api('/sessions/' + f.session.id);
|
||||
return predicate(current);
|
||||
}, 20000);
|
||||
phases.push({ requests: n, status: current.status, elapsedMs: Date.now() - started });
|
||||
} catch (cause) {
|
||||
throw new Error('Reminder fixture phase failed: ' + JSON.stringify({ requests: n, status: current?.status, run: current?.execution.run, phases }), { cause });
|
||||
}
|
||||
};
|
||||
for (let request = 1; request <= 5; request++) await waitFor(() => n >= request);
|
||||
await waitFor(current => !['running', 'stopping', 'awaiting_approval'].includes(current.status));
|
||||
t.diagnostic(JSON.stringify({ reminderRequests: n, phases }));
|
||||
const state = await host.api('/sessions/' + f.session.id), run = state.execution.run;
|
||||
const view = await host.api('/sessions/' + f.session.id + '/progress-reminders?run=' + run.id);
|
||||
assert.equal(n, 5); assert.equal(view.evidenceVerified, true); assert.equal(view.items[0].status, 'resolved');
|
||||
|
||||
Reference in New Issue
Block a user