fix: preserve model state, isolate commands and harden local HTTP in 1.12.1

This commit is contained in:
Agent Workbench Dev
2026-10-30 23:01:19 +08:00
parent c1e9575259
commit f4bd0ad8dc
26 changed files with 373 additions and 68 deletions
+6 -3
View File
@@ -4,6 +4,9 @@ import assert from 'node:assert/strict';
import { createHash, randomUUID } from 'node:crypto';
import { spawn, execFileSync } from 'node:child_process';
if (process.argv.includes('--help')) { console.log('node scripts/verify-source-package.mjs [--native-engines] - validate independently extracted source after verify-archives.py --extract-source; set the absolute QA Python and archive root.'); process.exit(0); }
if (process.argv.slice(2).some(value => value !== '--native-engines')) throw new Error('Unsupported argument; use --help.');
const workspace = process.cwd();
const evidence = JSON.parse(fs.readFileSync('.qa/archives-validation.json', 'utf8'));
assert.equal(evidence.success, true);
@@ -79,7 +82,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'].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'].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));
@@ -87,7 +90,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'].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'].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));
@@ -95,7 +98,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'].includes(evidence.version)) {
if (['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.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));