fix: hand off complete changes and retain verified source context
This commit is contained in:
@@ -19,6 +19,7 @@ const prefixes = Object.freeze({
|
||||
'1.22.1': 'local-files',
|
||||
'1.23.0': 'release-efficiency',
|
||||
'1.24.0': 'existing-results',
|
||||
'1.24.1': 'delivery-reliability',
|
||||
});
|
||||
export function releaseEvidencePrefix(version) {
|
||||
const prefix = prefixes[version];
|
||||
|
||||
@@ -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'].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'].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
@@ -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'].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'].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 = [
|
||||
...(version === '1.24.0' ? [['verify-file-results-ui.mjs', null]] : []),
|
||||
...(['1.23.0', '1.24.0'].includes(version) ? [['verify-release-efficiency-ui.mjs', null]] : []),
|
||||
...(['1.22.1', '1.23.0', '1.24.0'].includes(version) ? [['verify-local-files.mjs', null]] : []),
|
||||
...(['1.22.0', '1.22.1', '1.23.0', '1.24.0'].includes(version)?[['verify-embedded-browser.mjs',null]]:[]),
|
||||
...(['1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0'].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'].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'].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'].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'].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'].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'].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'].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'].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'].includes(version) ? [['verify-browser-ui.mjs', `docs/${prefix}-browser-ui-validation.json`]] : []),
|
||||
...(['1.24.0', '1.24.1'].includes(version) ? [['verify-file-results-ui.mjs', null]] : []),
|
||||
...(['1.23.0', '1.24.0', '1.24.1'].includes(version) ? [['verify-release-efficiency-ui.mjs', null]] : []),
|
||||
...(['1.22.1', '1.23.0', '1.24.0', '1.24.1'].includes(version) ? [['verify-local-files.mjs', null]] : []),
|
||||
...(['1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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']);
|
||||
|
||||
@@ -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'].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'].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');
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { requestMetrics } from '../src/shared/contracts/model-request.mjs';
|
||||
|
||||
if (process.argv.includes('--help')) {
|
||||
console.log('node scripts/verify-delivery-reliability-evidence.mjs — offline verify sealed G bytes, exact original/fixed context, frozen regression, UI/rebuild/installation receipts and preserved state. No model or host calls.');
|
||||
process.exit(0);
|
||||
}
|
||||
assert.equal(process.argv.length, 2);
|
||||
const root = path.resolve('docs/delivery-reliability-g-evidence');
|
||||
const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
||||
const read = file => JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
|
||||
const manifestBytes = fs.readFileSync(path.join(root, 'manifest.json')), manifest = JSON.parse(manifestBytes);
|
||||
assert.equal(manifest.schemaVersion, 1); assert.equal(manifest.version, '1.24.1');
|
||||
assert.match(manifest.sourceCommit, /^[a-f0-9]{40}$/);
|
||||
const paths = new Set(); let bytes = 0;
|
||||
for (const entry of manifest.entries) {
|
||||
assert.ok(!paths.has(entry.path)); paths.add(entry.path);
|
||||
const target = path.resolve(root, entry.path); assert.ok(target.startsWith(root + path.sep));
|
||||
const raw = fs.readFileSync(target); assert.equal(raw.length, entry.bytes, entry.path); assert.equal(hash(raw), entry.sha256, entry.path); bytes += raw.length;
|
||||
}
|
||||
assert.equal(hash(fs.readFileSync('docs/live-original-purge-e-evidence/manifest.json')), manifest.originalEManifestSha256);
|
||||
assert.equal(hash(fs.readFileSync('docs/original-purge-release-f-evidence/manifest.json')), manifest.originalFManifestSha256);
|
||||
const tap = fs.readFileSync(path.join(root, manifest.checks.regression), 'utf8');
|
||||
const total = Number(tap.match(/ℹ tests (\d+)/)?.[1]), passed = Number(tap.match(/ℹ pass (\d+)/)?.[1]), failed = Number(tap.match(/ℹ fail (\d+)/)?.[1]);
|
||||
assert.equal(total, 155); assert.equal(total, passed); assert.equal(failed, 0);
|
||||
function strings(value, output = [], depth = 0) {
|
||||
if (depth > 12) return output;
|
||||
if (typeof value === 'string') {
|
||||
output.push(value);
|
||||
for (const text of new Set([value, ...value.split('\n').filter(line => /^\s*[\[{]/.test(line))])) {
|
||||
try { strings(JSON.parse(text), output, depth + 1); } catch {}
|
||||
}
|
||||
} else if (value && typeof value === 'object') for (const item of Object.values(value)) strings(item, output, depth + 1);
|
||||
return output;
|
||||
}
|
||||
const before = read('context/before/result.json'), after = read('context/final/result.json');
|
||||
assert.equal(before.manifestSha256, manifest.originalEManifestSha256); assert.equal(after.manifestSha256, before.manifestSha256);
|
||||
assert.equal(after.realModelRequests, 0); assert.equal(before.realModelRequests, 0);
|
||||
assert.deepEqual(before.reports.map(report => report.sources.filter(source => source.retained).length), [6, 5, 5, 4, 2, 2]);
|
||||
for (const [index, report] of after.reports.entries()) {
|
||||
assert.equal(report.sources.length, 6); assert.ok(report.sources.every(source => source.retained));
|
||||
assert.equal(report.inputBudget, before.reports[index].inputBudget); assert.equal(report.softTarget, 16000);
|
||||
const original = read('context/before/request-' + report.request + '.json');
|
||||
const fixed = read('context/final/request-' + report.request + '.json');
|
||||
assert.equal(requestMetrics(original.body).estimatedInputTokens, before.reports[index].originalInputTokens);
|
||||
const metrics = requestMetrics(fixed.body); assert.equal(metrics.estimatedInputTokens, report.inputTokens); assert.ok(metrics.estimatedInputTokens <= report.inputBudget);
|
||||
assert.equal(metrics.sha256, fixed.plan.requestSha256);
|
||||
assert.deepEqual(fixed.body.messages[0], original.body.messages[0], 'Complete original fixed goal/context');
|
||||
assert.deepEqual(fixed.body.variants.map(route => route.body.tools), original.body.variants.map(route => route.body.tools), 'Original complete tools');
|
||||
for (const source of report.sources) {
|
||||
const raw = fs.readFileSync(path.join('docs/live-original-purge-e-evidence/baselines/react', source.path), 'utf8');
|
||||
assert.equal(raw.length, source.characters); assert.ok(strings(fixed.body.messages).includes(raw), source.path);
|
||||
}
|
||||
}
|
||||
for (const key of ['sourceUI', 'portableUI']) {
|
||||
const ui = read(manifest.checks[key]); assert.equal(ui.success, true); assert.equal(ui.version, manifest.version);
|
||||
assert.equal(ui.realModelRequests, 0); assert.equal(ui.fixtureRequests, 5); assert.equal(ui.checks.length, 10); assert.deepEqual(ui.errors, []);
|
||||
for (const file of ui.screenshots) assert.ok(paths.has(path.posix.join(path.posix.dirname(manifest.checks[key]), path.basename(file))));
|
||||
}
|
||||
const release = read(manifest.checks.release), rebuild = read(manifest.checks.rebuild), archives = read(manifest.checks.archives), portable = read(manifest.checks.portable), install = read(manifest.checks.installer);
|
||||
assert.equal(release.documentation.sourceCommit, manifest.sourceCommit);
|
||||
assert.equal(rebuild.success, true); assert.equal(rebuild.sourceCommit, manifest.sourceCommit); assert.equal(rebuild.sourceZip.sha256, release.source.sha256);
|
||||
assert.equal(rebuild.compiled.length, 22); assert.deepEqual(rebuild.mismatches, []);
|
||||
assert.equal(archives.success, true); assert.equal(archives.version, manifest.version); assert.equal(archives.archives.length, 3);
|
||||
for (const archive of [release.portable, release.source, release.evidence]) assert.ok(archives.archives.some(record => record.sha256 === archive.sha256));
|
||||
assert.equal(portable.success, true); assert.equal(portable.version, manifest.version); assert.equal(portable.realModel, false);
|
||||
assert.ok(portable.actualRea.length > 0); assert.ok(portable.actualEngine); assert.ok(portable.actualControlled); assert.ok(portable.actualBrowser);
|
||||
assert.equal(install.success, true); assert.equal(install.version, manifest.version); assert.equal(install.realModelRequests, 0);
|
||||
assert.equal(install.results.length, 12); assert.ok(install.results.every(result => result.passed));
|
||||
for (const key of ['formalInstall', 'formalFinal']) {
|
||||
const record = read(manifest.checks[key]); assert.equal(record.success, true); assert.equal(record.version, manifest.version);
|
||||
assert.equal(record.sourceCommit, manifest.sourceCommit); assert.equal(record.pid, 36552); assert.equal(record.hasKey, true);
|
||||
assert.equal(record.retention.originalRows, 'exact'); assert.equal(record.retention.originalExports, 'exact');
|
||||
assert.equal(record.retention.originalArtifactBytes, 'exact'); assert.equal(record.retention.originalModelCenter, 'exact');
|
||||
assert.equal(record.operation.state, 'completed'); assert.equal(record.inspectorClosed, true); assert.equal(record.realModelRequests, 0);
|
||||
}
|
||||
console.log(JSON.stringify({ success: true, version: manifest.version, sourceCommit: manifest.sourceCommit,
|
||||
files: paths.size, bytes, manifestSha256: hash(manifestBytes), regression: { total, passed, failed },
|
||||
originalRetained: before.reports.map(report => report.sources.filter(source => source.retained).length), fixedRetained: after.reports.map(report => report.sources.filter(source => source.retained).length),
|
||||
compiledFiles: rebuild.compiled.length, uiGroups: 20, realModelRequests: 0, scope: 'Offline sealed-byte and actual-receipt verification. No new model calls, task execution, or claim of real-model/Purge success.' }));
|
||||
@@ -0,0 +1,128 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { chromium, expect } from 'playwright/test';
|
||||
import { fixture, compatibleFixture, launchWorkbench, call, completion, until, assertToolPairs } from '../tests/helpers.mjs';
|
||||
|
||||
if (process.argv.includes('--help')) {
|
||||
console.log('node scripts/verify-delivery-reliability-ui.mjs OUTPUT [APP_ROOT] — declared local HTTP model fixture, actual review/continue/check UI and saved budget cases; no real model. OUTPUT must be new.');
|
||||
process.exit(0);
|
||||
}
|
||||
assert.ok(process.argv[2], 'Choose a new output directory.');
|
||||
const output = path.resolve(process.argv[2]);
|
||||
assert.ok(!fs.existsSync(output), 'Keep prior evidence; choose a new directory.');
|
||||
fs.mkdirSync(output, { recursive: true });
|
||||
const appRoot = path.resolve(process.argv[3] ?? '.');
|
||||
const cleanups = [], t = { after: fn => cleanups.push(fn) };
|
||||
const f = fixture(t), cases = {};
|
||||
fs.mkdirSync(path.join(f.projectRoot, 'test'));
|
||||
fs.writeFileSync(path.join(f.projectRoot, 'package.json'), JSON.stringify({ type: 'module', scripts: { test: 'node --test test/*.test.mjs' } }));
|
||||
fs.writeFileSync(path.join(f.projectRoot, 'test/values.test.mjs'), "import test from 'node:test';import assert from 'node:assert/strict';import {left} from '../src/left.mjs';import {right} from '../src/right.mjs';test('left',()=>assert.equal(left,1));test('right',()=>assert.equal(right,2));\n");
|
||||
for (const [name, limitingReason] of [['remaining', 'remaining_token_budget'], ['window', 'context_limit'], ['legacy', null]]) {
|
||||
const root = path.join(f.root, name); fs.mkdirSync(root); fs.writeFileSync(path.join(root, 'README.md'), '# Declared saved-budget UI fixture\n');
|
||||
const project = f.store.addProject(root), session = f.store.createSession(project.id, '预算诊断 ' + name);
|
||||
const goal = '保留原任务和已完成工具;按原拒绝分项核对预算。';
|
||||
const run = f.store.beginRun(session, goal, false, f.store.config);
|
||||
run.budgetPause = { schema: 1, reason: 'engine_input_budget', ...(limitingReason ? { limitingReason } : {}),
|
||||
requiredInputTokens: name === 'window' ? 28000 : 27424, inputBudget: 27552, contextLimit: 32000,
|
||||
outputReservation: 2048, safetyTokens: 2400, runRemainingTokens: 28339, taskRemainingTokens: 28339,
|
||||
remainingTokens: 28339, tokenReservation: { schemaVersion: 1, reservedTokens: 29600, routes: [] } };
|
||||
session.status = 'paused'; f.store.finishRun(session, run, 'engine_input_budget'); cases[name] = { project, session };
|
||||
}
|
||||
f.store.close();
|
||||
let requests = 0, browser, page;
|
||||
const checks = [], errors = [], screenshots = [];
|
||||
const mark = name => { checks.push(name); console.log('PASS ' + name); };
|
||||
const screenshot = async name => { const file = path.join(output, name + '.png'); await page.screenshot({ path: file, fullPage: true }); screenshots.push(file); };
|
||||
try {
|
||||
const model = await compatibleFixture(t, (_route, input) => {
|
||||
if (!input?.messages) return { data: [{ id: 'declared-ui-fixture' }] };
|
||||
requests++; assertToolPairs(input.messages);
|
||||
const values = input.messages.filter(message => message.role === 'tool').map(message => JSON.parse(message.content));
|
||||
if (requests === 1) return completion([
|
||||
call('ui-left', 'propose_file', { path: 'src/left.mjs', content: 'export const left = 1;\n', reason: 'Declared fixture left' }),
|
||||
call('ui-right', 'propose_file', { path: 'src/right.mjs', content: 'export const right = 2;\n', reason: 'Declared fixture right' }),
|
||||
]);
|
||||
if (requests === 2) return completion([
|
||||
call('ui-seal', 'prepare_change_set', { change_ids: values.map(value => value.change_id).filter(Boolean) }),
|
||||
call('ui-same-turn-inspect', 'inspect_session', {}),
|
||||
]);
|
||||
if (requests === 3) return completion([call('ui-check-plan', 'plan_checks', { names: ['test'] })]);
|
||||
if (requests === 4) return completion([call('ui-check-run', 'run_checks', { plan_id: values.findLast(value => value.checks && value.fingerprint).id })]);
|
||||
return completion([], '两份模块已通过实际 Node 测试。');
|
||||
});
|
||||
const host = await launchWorkbench(t, f.data, {}, { appRoot });
|
||||
assert.equal(host.bootstrap.version, JSON.parse(fs.readFileSync(path.join(appRoot, 'package.json'))).version, 'Compiled host and package must agree.');
|
||||
await host.api('/config', { mode: 'compatible', baseUrl: model.baseUrl, model: 'declared-ui-fixture', apiKey: 'SYNTHETIC-QA-ONLY', maxSteps: 6 });
|
||||
browser = await chromium.launch({ channel: 'msedge', headless: true });
|
||||
page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
|
||||
page.on('pageerror', error => errors.push(error.message));
|
||||
page.on('requestfailed', request => { if (request.resourceType() !== 'eventsource') errors.push(request.url() + ': ' + request.failure()?.errorText); });
|
||||
await page.goto(host.url); await page.waitForLoadState('networkidle');
|
||||
async function choose(projectId) {
|
||||
const selector = page.getByLabel('当前项目', { exact: true });
|
||||
if (!await selector.isVisible()) await page.getByRole('button', { name: '展开项目栏', exact: true }).click();
|
||||
await selector.selectOption(projectId);
|
||||
if ((await page.viewportSize()).width <= 940 && await page.locator('.project-sidebar').isVisible()) await page.getByRole('button', { name: '收起项目栏', exact: true }).click();
|
||||
}
|
||||
await choose(f.project.id);
|
||||
await page.getByLabel('任务内容', { exact: true }).fill('完成双模块工程,并在审查应用后继续实际测试。');
|
||||
await page.getByRole('button', { name: '发送任务', exact: true }).click();
|
||||
const route = '/sessions/' + f.session.id;
|
||||
let reviewed;
|
||||
await until(async () => { reviewed = await host.api(route); return reviewed.status === 'needs_review'; }, 30000);
|
||||
assert.equal(requests, 2); assert.equal(reviewed.execution.run.stopReason, 'change_set_review');
|
||||
assert.equal(reviewed.events.find(event => event.toolCallId === 'ui-same-turn-inspect').phase, 'completed');
|
||||
assert.equal(fs.existsSync(path.join(f.projectRoot, 'src')), false);
|
||||
mark('Actual compiled HTTP model loop settles both tools and hands off after exactly two fixture requests without writing files');
|
||||
await page.getByRole('button', { name: '查看任务记录', exact: true }).click();
|
||||
await expect(page.getByLabel('任务记录', { exact: true })).toContainText('完整文件批次已封存,等待审查与应用');
|
||||
await screenshot('desktop-review-handoff');
|
||||
await page.reload(); await page.waitForLoadState('networkidle');
|
||||
assert.equal((await host.api(route)).execution.task.id, reviewed.execution.task.id); assert.equal(requests, 2);
|
||||
mark('Review handoff persists across refresh without another model request');
|
||||
await page.setViewportSize({ width: 390, height: 844 }); await choose(f.project.id);
|
||||
await page.getByRole('button', { name: '查看改动', exact: true }).click();
|
||||
await page.getByRole('button', { name: '审查变更集', exact: true }).click();
|
||||
const dialog = page.getByRole('dialog', { name: '多文件变更集审查', exact: true });
|
||||
await expect(dialog).toContainText('src/left.mjs'); await expect(dialog).toContainText('src/right.mjs');
|
||||
await screenshot('mobile-batch-review');
|
||||
await dialog.getByRole('button', { name: '确认应用全部 2 项', exact: true }).click();
|
||||
await until(async () => (await host.api(route)).execution.changeSets.at(-1).status === 'completed', 30000);
|
||||
await page.keyboard.press('Escape'); await expect(page.getByRole('button', { name: '继续原任务', exact: true })).toBeVisible();
|
||||
await page.getByRole('button', { name: '关闭检视区', exact: true }).click();
|
||||
assert.equal(requests, 2); mark('390px reviewed whole-batch application waits for explicit continuation');
|
||||
await page.getByRole('button', { name: '继续原任务', exact: true }).click();
|
||||
await until(async () => (await host.api(route)).approvals.some(approval => approval.status === 'pending'), 30000);
|
||||
await screenshot('mobile-check-approval');
|
||||
await page.getByRole('button', { name: '确认执行', exact: true }).click();
|
||||
let done;
|
||||
await until(async () => { done = await host.api(route); return done.status === 'completed'; }, 30000);
|
||||
assert.equal(done.execution.task.id, reviewed.execution.task.id); assert.equal(done.execution.checks[0].results[0].tests.passed, 2);
|
||||
assert.equal(requests, 5);
|
||||
assert.equal(done.events.filter(event => ['propose_file', 'prepare_change_set'].includes(event.tool)).length, 3);
|
||||
mark('Explicit same-Task continuation runs two actual Node assertions and never replays proposals or sealing');
|
||||
for (const width of [1440, 390]) {
|
||||
await page.setViewportSize({ width, height: width === 390 ? 844 : 1000 });
|
||||
for (const [name, title] of [['remaining', '原生引擎剩余预算不足'], ['window', '原生引擎上下文窗口不足'], ['legacy', '原生引擎输入或剩余预算不足']]) {
|
||||
await choose(cases[name].project.id);
|
||||
await expect(page.locator('.session-item.selected')).toContainText('预算诊断 ' + name);
|
||||
const panel = page.getByLabel('任务预算诊断', { exact: true });
|
||||
await expect(panel.getByRole('heading', { name: title, exact: true })).toBeVisible();
|
||||
if (name === 'remaining') { await expect(panel).toContainText('输入可容纳于当前上下文窗口'); await expect(panel).toContainText('29,600'); await expect(panel).toContainText('28,339'); }
|
||||
assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 2));
|
||||
await screenshot(width + '-budget-' + name);
|
||||
mark(width + 'px ' + name + ' diagnosis renders actual limit, numbers and historical fallback without overflow');
|
||||
}
|
||||
}
|
||||
assert.deepEqual(errors, []);
|
||||
const result = { success: true, version: (await host.api('/bootstrap')).version, appRoot, checks, errors, screenshots,
|
||||
fixtureRequests: requests, realModelRequests: 0, taskId: done.execution.task.id, runs: done.execution.runs.map(run => ({ id: run.id, status: run.status, stopReason: run.stopReason })),
|
||||
scope: 'Declared local HTTP model fixture with actual engineering tools/checks, persisted review state and seeded diagnostic cases. No real model or user project.', browser: browser.version() };
|
||||
fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ success: true, checks: checks.length, output }));
|
||||
} catch (error) {
|
||||
if (page) await screenshot('failure').catch(() => {});
|
||||
fs.writeFileSync(path.join(output, 'result.json'), JSON.stringify({ success: false, checks, errors, screenshots, error: error.stack, requests }, null, 2) + '\n', { flag: 'wx' });
|
||||
throw error;
|
||||
} finally { if (browser) await browser.close(); for (const cleanup of cleanups.reverse()) await cleanup(); }
|
||||
@@ -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 (version === '1.24.0') {
|
||||
if (['1.24.0', '1.24.1'].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 = [];
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { Store } from '../src/server/store.mjs';
|
||||
import { RequestPlanner, historyGroups, verifyPlanEvidence } from '../src/core/context/request-plan.mjs';
|
||||
|
||||
if (process.argv.includes('--help')) {
|
||||
console.log('node scripts/verify-live-context-retention.mjs OUTPUT [retained|original] — offline replay of sealed E source/context, no model calls. OUTPUT must be a new directory.');
|
||||
process.exit(0);
|
||||
}
|
||||
assert.ok(process.argv[2], 'Choose a new output directory.');
|
||||
const destination = path.resolve(process.argv[2]);
|
||||
assert.ok(!fs.existsSync(destination), 'Keep prior evidence; choose a new directory.');
|
||||
fs.mkdirSync(destination, { recursive: true });
|
||||
const root = path.resolve('docs/live-original-purge-e-evidence');
|
||||
const sha = value => createHash('sha256').update(value).digest('hex');
|
||||
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
|
||||
const manifest = read('manifest.json');
|
||||
for (const entry of manifest.entries) {
|
||||
const raw = fs.readFileSync(path.join(root, entry.path));
|
||||
assert.equal(raw.length, entry.bytes); assert.equal(sha(raw), entry.sha256);
|
||||
}
|
||||
const sample = manifest.samples.find(sample => sample.name === 'react');
|
||||
const exported = read('owned-exports/' + sample.sessionId + '.json');
|
||||
const original = exported.session;
|
||||
const rows = read('receipts/owned-records.json');
|
||||
const originalCore = {};
|
||||
for (const row of rows) (originalCore[row.kind] ??= new Map()).set(row.id, JSON.parse(row.payload));
|
||||
const artifacts = new Map(manifest.artifacts.map(artifact => [artifact.id, artifact]));
|
||||
function rawArtifact(id) { return fs.readFileSync(path.join(root, artifacts.get(id).file), 'utf8'); }
|
||||
const plans = [...originalCore.context_plan.values()].filter(plan => plan.sessionId === sample.sessionId).sort((a, b) => a.requestIndex - b.requestIndex);
|
||||
const reports = [];
|
||||
for (const prior of plans.filter(plan => plan.requestIndex >= 7)) {
|
||||
const store = new Store(path.join(destination, 'request-' + prior.requestIndex));
|
||||
try {
|
||||
for (const [kind, map] of Object.entries(originalCore)) store.core[kind] = structuredClone(map);
|
||||
const readNew = store.artifactStore.read.bind(store.artifactStore);
|
||||
store.artifactStore.read = artifact => artifacts.has(artifact.id) ? rawArtifact(artifact.id) : readNew(artifact);
|
||||
const session = structuredClone(original);
|
||||
store.sessions.set(session.id, session);
|
||||
store.save = () => {}; // Scratch planner records only; never persist original sessions.
|
||||
const project = store.project.bind(store);
|
||||
store.project = id => id === exported.project.id ? exported.project : project(id);
|
||||
session.providerMessages = session.providerMessages.slice(0, prior.originalMessages);
|
||||
session.changes = session.changes.filter(change => change.createdAt <= prior.createdAt);
|
||||
const run = store.core.run.get(prior.runId), task = store.core.task.get(prior.taskId);
|
||||
// Restore this request's exact remaining credits, not the final run's usage.
|
||||
for (const [record, remaining] of [[run, prior.budget.runRemainingTokens], [task, prior.budget.taskRemainingTokens]]) {
|
||||
record.usage = { prompt_tokens: 0, completion_tokens: 0, total_tokens: 0, estimatedUnknownTokens: 0 };
|
||||
record.budget.maxTokens = remaining ?? 0;
|
||||
}
|
||||
run.consumption = []; // Context selection only; no fabricated upstream usage.
|
||||
const request = JSON.parse(rawArtifact(prior.requestArtifactId));
|
||||
const wire = request.variants?.[0].body ?? request;
|
||||
const config = { ...run.model, modelRouting: run.model.routing, streaming: wire.stream, nativeParameters: run.model.nativeParameters ?? {} };
|
||||
const planner = new RequestPlanner(store);
|
||||
const prepared = planner.prepare(session, run, config, { system: request.messages[0].content, tools: wire.tools });
|
||||
assert.equal(prepared.record.budget.inputBudget, prior.budget.inputBudget);
|
||||
assert.ok(prepared.record.estimatedInputTokens <= prepared.record.budget.inputBudget);
|
||||
verifyPlanEvidence(store, session, prepared.record);
|
||||
const sources = [];
|
||||
for (const group of historyGroups(session.providerMessages)) for (const message of group.messages.filter(message => message.role === 'tool')) {
|
||||
const call = group.messages[0].tool_calls.find(call => call.id === message.tool_call_id);
|
||||
const value = JSON.parse(message.content);
|
||||
if (call.function.name === 'read_file' && !value.truncated && value.start_line === 1 && value.end_line === value.total_lines) {
|
||||
sources.push({ path: value.path, content: value.content });
|
||||
}
|
||||
}
|
||||
function strings(value, out = []) {
|
||||
if (typeof value === 'string') {
|
||||
out.push(value);
|
||||
for (const line of [value, ...value.split('\n').filter(line => /^[\[{]/.test(line))]) { try { strings(JSON.parse(line), out); } catch {} }
|
||||
} else if (value && typeof value === 'object') for (const item of Object.values(value)) strings(item, out);
|
||||
return out;
|
||||
}
|
||||
const sent = strings(prepared.messages);
|
||||
const report = { request: prior.requestIndex, originalInputTokens: prior.estimatedInputTokens,
|
||||
inputTokens: prepared.record.estimatedInputTokens, inputBudget: prior.budget.inputBudget,
|
||||
softTarget: prior.budget.targetInputTokens,
|
||||
sources: [...new Map(sources.map(source => [source.path, source])).values()].map(source => ({ path: source.path,
|
||||
characters: source.content.length, retained: sent.some(text => text.includes(source.content)) })) };
|
||||
reports.push(report);
|
||||
fs.writeFileSync(path.join(destination, 'request-' + prior.requestIndex + '.json'), JSON.stringify({ report, plan: prepared.record, body: prepared.body }, null, 2), { flag: 'wx' });
|
||||
} finally { store.close(); }
|
||||
}
|
||||
const result = { schemaVersion: 1, manifestSha256: sha(fs.readFileSync(path.join(root, 'manifest.json'))),
|
||||
scope: 'Offline context-selection counterfactual using original E system/tools/history/source bytes and remaining credits. No model requests or task execution. Historical outcomes unchanged.',
|
||||
realModelRequests: 0, reports };
|
||||
if (process.argv[3] === 'retained') assert.ok(reports.every(report => report.sources.length === 6 && report.sources.every(source => source.retained)));
|
||||
if (process.argv[3] === 'original') {
|
||||
assert.ok(reports.every(report => report.inputTokens === report.originalInputTokens));
|
||||
assert.deepEqual(reports.map(report => report.sources.filter(source => source.retained).length), [6, 5, 5, 4, 2, 2]);
|
||||
}
|
||||
fs.writeFileSync(path.join(destination, 'result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify(result));
|
||||
@@ -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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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'].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 {} } }
|
||||
|
||||
@@ -19,7 +19,7 @@ assert.ok(fs.existsSync(npmCli), 'Use Node with its bundled npm.');
|
||||
const files = (root, relative = '') => fs.readdirSync(path.join(root, relative), { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))
|
||||
.flatMap(entry => entry.isDirectory() ? files(root, path.join(relative, entry.name)) : [path.join(relative, entry.name)]);
|
||||
const digest = file => createHash('sha256').update(fs.readFileSync(file)).digest('hex');
|
||||
const buildFolders = ['dist-client', 'dist-server', ...(['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.23.0', '1.24.0'].includes(evidence.version) ? ['dist-desktop'] : [])];
|
||||
const buildFolders = ['dist-client', 'dist-server', ...(['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.23.0', '1.24.0', '1.24.1'].includes(evidence.version) ? ['dist-desktop'] : [])];
|
||||
const expected = Object.fromEntries(buildFolders.flatMap(folder => files(path.join(workspace, folder)).map(relative => [path.join(folder, relative), digest(path.join(workspace, folder, relative))])));
|
||||
const allowedEnv = /^(path|pathext|systemroot|systemdrive|windir|comspec|temp|tmp|userprofile|homedrive|homepath|home|appdata|localappdata|programfiles(?:\(x86\))?|commonprogramfiles(?:\(x86\))?|lang|lc_all|AGENT_WORKBENCH_TEST_PYTHON|AGENT_WORKBENCH_DEEPSEEK_ROOT|AGENT_WORKBENCH_PURGE_ROOT)$/i;
|
||||
const env = Object.fromEntries(Object.entries(process.env).filter(([key]) => allowedEnv.test(key)));
|
||||
@@ -30,7 +30,7 @@ const directory = path.join(sourceRoot, '.qa', 'package-validation-' + randomUUI
|
||||
fs.mkdirSync(directory, { recursive: true });
|
||||
const inputFolders = ['src', 'tests', 'scripts', ...['benchmarks', 'public', 'examples', 'research'].filter(folder => fs.existsSync(path.join(sourceRoot, folder)))];
|
||||
const inputNames = [...inputFolders.flatMap(folder => files(path.join(sourceRoot, folder)).map(relative => path.join(folder, relative))),
|
||||
'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', ...(['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.23.0', '1.24.0'].includes(evidence.version) ? ['mobile.html'] : []), ...['.gitattributes', '.gitignore', 'Start-Desktop.cmd', 'Start-Workbench.cmd', 'Stop-Workbench.cmd'].filter(name => fs.existsSync(path.join(sourceRoot, name)))].sort();
|
||||
'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', ...(['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.23.0', '1.24.0', '1.24.1'].includes(evidence.version) ? ['mobile.html'] : []), ...['.gitattributes', '.gitignore', 'Start-Desktop.cmd', 'Start-Workbench.cmd', 'Stop-Workbench.cmd'].filter(name => fs.existsSync(path.join(sourceRoot, name)))].sort();
|
||||
const snapshot = () => inputNames.map(relative => ({ path: relative.replaceAll('\\', '/'), bytes: fs.statSync(path.join(sourceRoot, relative)).size, sha256: digest(path.join(sourceRoot, relative)) }));
|
||||
const inputs = snapshot(); fs.writeFileSync(path.join(directory, 'inputs.json'), JSON.stringify(inputs, null, 2));
|
||||
let stage = 'environment preflight', python = null;
|
||||
@@ -83,7 +83,7 @@ try {
|
||||
assert.deepEqual(actualFiles.slice().sort(), Object.keys(expected).sort());
|
||||
for (const [relative, sha256] of Object.entries(expected)) assert.equal(digest(path.join(sourceRoot, relative)), sha256, relative);
|
||||
let actualRea = null;
|
||||
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.23.0', '1.24.0'].includes(evidence.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.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained REA';
|
||||
const reaOutput = await run(['scripts/verify-rea.mjs', '--app-root', sourceRoot, '--contained'], 'rea.log');
|
||||
actualRea = JSON.parse(reaOutput.trim().split('\n').at(-1));
|
||||
@@ -91,7 +91,7 @@ try {
|
||||
assert.ok(actualRea.results.every(item => item.rootExited === true));
|
||||
}
|
||||
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.23.0', '1.24.0'].includes(evidence.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.23.0', '1.24.0', '1.24.1'].includes(evidence.version) && process.argv.includes('--native-engines')) {
|
||||
stage = 'native DeepSeek SDK';
|
||||
const output = await run(['scripts/verify-engines.mjs'], 'engines.log');
|
||||
actualEngine = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -99,7 +99,7 @@ try {
|
||||
assert.equal(actualEngine.modelRequests, 0); assert.equal(actualEngine.rootExited, true); assert.equal(actualEngine.nativeMethods.length, 6);
|
||||
}
|
||||
let actualBrowser = null;
|
||||
if (['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.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['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.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained browser runtime';
|
||||
const output = await run(['scripts/verify-browser.mjs', '--app-root', sourceRoot, '--contained'], 'browser.log');
|
||||
actualBrowser = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -109,7 +109,7 @@ try {
|
||||
assert.equal(actualBrowser.modelRequests, 0);
|
||||
}
|
||||
let actualControlled = 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.23.0', '1.24.0'].includes(evidence.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.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'compiled controlled-engine delivery';
|
||||
const output = await run(['scripts/verify-controlled-release.mjs', '--app-root', sourceRoot], 'controlled-engine.log');
|
||||
actualControlled = JSON.parse(output.trim().split('\n').at(-1));
|
||||
@@ -117,7 +117,7 @@ try {
|
||||
assert.equal(actualControlled.realModelRequests, 0); assert.equal(actualControlled.cases, 4); assert.ok(actualControlled.fixtureModelRequests > 0);
|
||||
}
|
||||
let actualCompanion = null;
|
||||
if (['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.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['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.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained companion gateway and UI';
|
||||
const output = await run(['scripts/verify-companion-ui.mjs', '--app-root', sourceRoot], 'companion-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -128,7 +128,7 @@ try {
|
||||
assert.equal(actualCompanion.passed.length, 7); assert.deepEqual(actualCompanion.errors, []); assert.equal(actualCompanion.realModelRequests, 0);
|
||||
}
|
||||
let actualProtocols = null;
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained model protocols and mobile streams';
|
||||
const output = await run(['scripts/verify-model-protocols-ui.mjs', '--app-root', sourceRoot], 'model-protocols-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -139,7 +139,7 @@ try {
|
||||
assert.equal(actualProtocols.passed.length, 5); assert.deepEqual(actualProtocols.pageErrors, []); assert.deepEqual(actualProtocols.requestFailures, []);
|
||||
}
|
||||
let actualVision = null;
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained screenshot inputs and exact Task budget resume';
|
||||
const output = await run(['scripts/verify-vision-ui.mjs', '--app-root', sourceRoot], 'vision-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -150,7 +150,7 @@ try {
|
||||
assert.equal(actualVision.passed.length, 5); assert.deepEqual(actualVision.pageErrors, []); assert.equal(actualVision.realModelRequests, 0);
|
||||
}
|
||||
let actualProjectCache = null;
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained source-verified parsing cache controls';
|
||||
const output = await run(['scripts/verify-project-cache-ui.mjs', '--app-root', sourceRoot], 'project-cache-ui.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
@@ -161,7 +161,7 @@ try {
|
||||
assert.equal(actualProjectCache.realModelRequests, 0); assert.deepEqual(actualProjectCache.pageErrors, []);
|
||||
}
|
||||
let actualEnvironment = null, actualEnvironmentEngineering = null;
|
||||
if (['1.21.0','1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.21.0','1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'contained environment approval, stop and recovery UI';
|
||||
const output = await run(['scripts/verify-environment-ui.mjs', '--app-root', sourceRoot], 'environment-ui.log');
|
||||
const summary = JSON.parse(output.trim().split(/\r?\n/).findLast(line => line.startsWith('{"success":')));
|
||||
@@ -179,7 +179,7 @@ try {
|
||||
assert.equal(actualEnvironmentEngineering.pythonTests, 2); assert.equal(actualEnvironmentEngineering.realModelRequests, 0);
|
||||
}
|
||||
let actualEmbeddedBrowser = null;
|
||||
if (['1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'actual embedded Electron, Vite and original mobile observation';
|
||||
await run(['scripts/verify-embedded-browser.mjs', '--app-root', sourceRoot], 'embedded-browser.log');
|
||||
actualEmbeddedBrowser = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/embedded-browser-latest.json'), 'utf8'));
|
||||
@@ -189,7 +189,7 @@ try {
|
||||
assert.equal(actualEmbeddedBrowser.realModelRequests, 0); assert.deepEqual(actualEmbeddedBrowser.errors, []);
|
||||
}
|
||||
let actualReleaseEfficiency = null;
|
||||
if (['1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'actual update status Edge/Electron and basic saved HTML flows';
|
||||
const proofs = [];
|
||||
for (const script of ['verify-release-efficiency-ui.mjs', 'verify-local-files.mjs']) {
|
||||
@@ -203,7 +203,7 @@ try {
|
||||
actualReleaseEfficiency = proofs;
|
||||
}
|
||||
let actualFileResults = null;
|
||||
if (evidence.version === '1.24.0') {
|
||||
if (['1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'current file results Edge, Electron and paired mobile observation';
|
||||
await run(['scripts/verify-file-results-ui.mjs'], 'file-results-ui.log');
|
||||
actualFileResults = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/file-results-ui-latest.json'), 'utf8'));
|
||||
@@ -243,14 +243,14 @@ try {
|
||||
for (const key of ['fail', 'cancelled', 'skipped', 'todo']) assert.equal(groupStats[key], 0);
|
||||
}
|
||||
let actualTaskControl = null;
|
||||
if (['1.20.1', '1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.20.1', '1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'task control desktop and 390px';
|
||||
await run(['scripts/verify-task-control-ui.mjs', '--app-root', sourceRoot], 'task-control-ui.log');
|
||||
actualTaskControl = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/task-control-ui-validation.json'), 'utf8'));
|
||||
assert.equal(actualTaskControl.success, true); assert.equal(actualTaskControl.passed.length, 5); assert.equal(actualTaskControl.realModelRequests, 0);
|
||||
}
|
||||
let actualDesktop = null;
|
||||
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.23.0', '1.24.0'].includes(evidence.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.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'actual contained Electron window'; await run(['scripts/verify-desktop-window.mjs'], 'desktop-window.log');
|
||||
const window = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/desktop-window-latest.json'), 'utf8'));
|
||||
assert.equal(window.success, true); assert.equal(path.resolve(window.appRoot), sourceRoot); assert.equal(window.results.length, 7);
|
||||
@@ -264,7 +264,7 @@ try {
|
||||
actualDesktop = { window, ui, projects, scope: 'Independently rebuilt source and its shipped Electron binary; original window/engine/engineering assertions. Own credentials/HTTP fixtures; Windows native picker and complete host crash/stop have separate actual evidence.' };
|
||||
}
|
||||
let actualProtocolEngineering = null;
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'Responses SSE actual Node React Python engineering';
|
||||
await run(['scripts/verify-controlled-projects.mjs', '--responses'], 'responses-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/responses-engineering-location.json'), 'utf8'));
|
||||
@@ -274,7 +274,7 @@ try {
|
||||
assert.deepEqual(actualProtocolEngineering.results.map(value => value.parentCheck.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualVisionEngineering = null;
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'screenshot Task Node React Python engineering';
|
||||
await run(['scripts/verify-vision-projects.mjs'], 'vision-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/vision-engineering-location.json'), 'utf8'));
|
||||
@@ -284,7 +284,7 @@ try {
|
||||
assert.deepEqual(actualVisionEngineering.results.map(value => value.check.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualCacheEngineering = null;
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'cached index original requests and Node React Python engineering';
|
||||
await run(['scripts/verify-project-cache-projects.mjs'], 'project-cache-engineering.log');
|
||||
const location = JSON.parse(fs.readFileSync(path.join(sourceRoot, '.qa/project-cache-engineering-location.json'), 'utf8'));
|
||||
@@ -294,7 +294,7 @@ try {
|
||||
assert.deepEqual(actualCacheEngineering.results.map(value => value.check.results[0].tests.passed), [8, 9, 10]);
|
||||
}
|
||||
let actualEvaluations = null, actualEvaluationEngineering = null;
|
||||
if (['1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0'].includes(evidence.version)) {
|
||||
if (['1.20.0', '1.20.1','1.21.0', '1.22.0', '1.23.0', '1.24.0', '1.24.1'].includes(evidence.version)) {
|
||||
stage = 'compiled fixed engineering evaluations';
|
||||
const output = await run(['scripts/verify-evaluations-release.mjs', '--app-root', sourceRoot], 'evaluations-release.log');
|
||||
const location = [...output.matchAll(/^EVIDENCE (.+)\r?$/gm)].at(-1)?.[1]?.trim();
|
||||
|
||||
Reference in New Issue
Block a user