feat: integrate task-bound REA research and portable runtime
This commit is contained in:
@@ -12,6 +12,7 @@ const protectedFiles = createPythonDeliveryProject(f), source = captureWorkspace
|
||||
f.session.title = 'Python工程检查与交付'; f.store.core.task.get(f.session.taskId).goal = '修复三个Python模块,保护测试与声明,核对实际检查并交付本地Git报告。';
|
||||
f.store.save(f.session); f.store.close();
|
||||
const host = await launchWorkbench(t, f.data, process.env.AGENT_WORKBENCH_TEST_PYTHON ? { AGENT_WORKBENCH_PYTHON_PATH: process.env.AGENT_WORKBENCH_TEST_PYTHON } : {});
|
||||
const proofPrefix = host.bootstrap.version === '1.8.0' ? 'rea-engine' : 'python-engine';
|
||||
assert.notEqual(new URL(host.url).port, '4318'); assert.equal(host.bootstrap.config.hasKey, false);
|
||||
fs.mkdirSync('.qa/screenshots', { recursive: true });
|
||||
const browser = await chromium.launch({ channel: 'msedge', headless: true }), page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
|
||||
@@ -21,7 +22,7 @@ page.on('requestfailed', request => requestFailures.push(request.url() + ': ' +
|
||||
const state = () => host.api(route), panel = () => page.getByLabel('任务记录', { exact: true });
|
||||
const artifact = () => page.getByRole('dialog', { name: '执行结果工件', exact: true });
|
||||
const mark = text => { passed.push(text); console.log('PASS ' + text); };
|
||||
const screenshot = name => page.screenshot({ path: '.qa/screenshots/python-engine-' + name + '.png', scale: 'css' });
|
||||
const screenshot = name => page.screenshot({ path: '.qa/screenshots/' + proofPrefix + '-python-' + name + '.png', scale: 'css' });
|
||||
const choose = (name, selected) => panel().getByLabel('启用检查 ' + name, { exact: true }).setChecked(selected);
|
||||
async function executeChecks() {
|
||||
await panel().getByRole('button', { name: '执行这些检查', exact: true }).click();
|
||||
@@ -119,7 +120,7 @@ try {
|
||||
const result = { success: true, version: host.bootstrap.version, at: new Date().toISOString(), browser: browser.version(), passed, pageErrors, requestFailures,
|
||||
checks: { before: failed.results[0].tests, after: session.execution.checks.at(-1).results[0].tests }, commit: job.commit,
|
||||
scope: 'Independent host and owned fixture. Real Python processes, reviewed API repairs and actual local Git. No configured model requests or production credentials.' };
|
||||
fs.writeFileSync('docs/python-engine-python-ui-validation.json', JSON.stringify(result, null, 2) + '\n'); console.log(JSON.stringify(result, null, 2));
|
||||
fs.writeFileSync('docs/' + proofPrefix + '-python-ui-validation.json', JSON.stringify(result, null, 2) + '\n'); console.log(JSON.stringify(result, null, 2));
|
||||
} catch (error) {
|
||||
await screenshot('python-ui-failure').catch(() => {});
|
||||
fs.writeFileSync('.qa/python-ui-failure-dom.html', await page.content().catch(() => ''));
|
||||
|
||||
Reference in New Issue
Block a user