HEL-892: document Qwen background removal and simplify eleven workflow summaries

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-30 12:43:30 +08:00
co-authored by multica-agent
parent ec3388a06d
commit 011b8e07b3
79 changed files with 66404 additions and 97 deletions
+11 -3
View File
@@ -2,7 +2,7 @@
import fs from 'node:fs';
import assert from 'node:assert/strict';
const { chromium } = await import(process.env.PLAYWRIGHT_MODULE || 'playwright');
const out = process.env.H3_BROWSER_OUTPUT || '.local-evidence/h3-document/browser';
const out = process.env.H3_BROWSER_OUTPUT || '.local-evidence/background-reading-regression/h3-document/browser';
fs.mkdirSync(out, { recursive: true });
const checks = [], requests = [], errors = [];
function check(condition, name) { assert.ok(condition, name); checks.push(name); console.log('PASS ' + name); }
@@ -10,6 +10,12 @@ const browser = await chromium.launch({ headless: true,
...(process.env.BROWSER_EXECUTABLE ? { executablePath: process.env.BROWSER_EXECUTABLE } : {}) });
try {
const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
await page.route('**/*', route => {
const u=new URL(route.request().url());
if(u.hostname==='fonts.googleapis.com')return route.fulfill({contentType:'text/css',body:''});
if(u.hostname!=='127.0.0.1'||u.pathname==='/api/view') {errors.push('Forbidden request '+u);return route.abort();}
return route.continue();
});
page.on('request', r => { if (r.url().includes('/api/')) requests.push({ method: r.method(), url: r.url() }); });
page.on('pageerror', e => errors.push(e.message));
const records = await (await fetch('http://127.0.0.1:8247/api/workflows')).json();
@@ -33,11 +39,12 @@ try {
await dialog.evaluate(el => Promise.all(el.getAnimations().map(a => a.finished)));
}
let button = await begin(h3.name); await loaded();
await dialog.getByText('核对范围与来源依据', {exact:true}).click();
for (const text of ['按源图声明版本核对,目标环境未核对', '说明未定稿', '未验证实跑', '未检查', '169槽0 → 170.prompt', '170槽8 → 172.source']) {
check((await dialog.innerText()).includes(text), '显示:' + text);
}
const summaryNames = fixed.fields.map(f => `节点 ${f.node_id} · ${f.label}(${f.field})`);
check(await dialog.locator('summary').filter({ hasText: /节点 (169|170) · .*(/ }).count() === 18, '18项中文参数定义没有遗漏');
const summaryNames = fixed.fields.map(f => `节点 ${f.node_id} · ${f.label}`);
check(await dialog.locator('.card').filter({has:page.getByText('固定版本参数说明',{exact:true})}).locator('summary').filter({ hasText: /节点 (169|170) · / }).count() === 18, '18项中文参数定义没有遗漏');
await dialog.getByText('固定版本参数说明', { exact: true }).scrollIntoViewIfNeeded();
await page.screenshot({ path: `${out}/desktop-overview.png` });
// Open each actual parameter and its evidence, compare exact source strings without logging them.
@@ -65,6 +72,7 @@ try {
check(await dialog.getByText('固定版本参数说明', { exact: true }).count() === 0, '读取失败不展示缓存定义');
await page.unroute(`**/api/workflows/${h3.id}`);
await dialog.getByRole('button', { name: '重试', exact: true }).click(); await loaded();
await dialog.getByText('核对范围与来源依据', {exact:true}).click();
check((await dialog.innerText()).includes(fixed.notice), 'GET重试恢复18项定义');
await page.keyboard.press('Escape');
// Close a pending GET, switch to a different document, then deliver the old response.