716ef407fe
Wire Portal and TKMind proxy to loopback Goose v1.49 via canary env blocks, with verification scripts, Phase 2/3 evidence baselines, and rollback runbooks so local upgrade stays isolated from stable 1.41 and production. Co-authored-by: Cursor <cursoragent@cursor.com>
81 lines
2.3 KiB
JavaScript
81 lines
2.3 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Phase 3 closeout gate: Phase 2 evidence + DeepSeek parity + canary unit tests.
|
|
* Does not authorize 103/105; local loopback only.
|
|
*/
|
|
import { spawnSync } from 'node:child_process';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
|
|
const checks = [
|
|
{ name: 'phase2', script: 'run-goosed-v149-phase2.mjs', required: true },
|
|
{
|
|
name: 'deepseek-parity',
|
|
command: [process.execPath, '--test', 'release-gate/deepseek-production-parity.test.mjs'],
|
|
required: true,
|
|
},
|
|
{
|
|
name: 'goose-canary-unit',
|
|
command: [process.execPath, '--test', 'scripts/goose-v149-canary.test.mjs'],
|
|
required: true,
|
|
},
|
|
{
|
|
name: 'memory-drift-again',
|
|
script: 'compare-goose-v149-memory-manifest.mjs',
|
|
required: true,
|
|
},
|
|
];
|
|
|
|
function runScript(script, extraEnv = {}) {
|
|
const result = spawnSync(process.execPath, [path.join(root, 'scripts', script)], {
|
|
cwd: root,
|
|
env: { ...process.env, ...extraEnv },
|
|
encoding: 'utf8',
|
|
});
|
|
return {
|
|
ok: result.status === 0,
|
|
status: result.status,
|
|
stdout: result.stdout?.trim() ?? '',
|
|
stderr: result.stderr?.trim() ?? '',
|
|
};
|
|
}
|
|
|
|
function runCommand(command, extraEnv = {}) {
|
|
const [bin, ...args] = command;
|
|
const result = spawnSync(bin, args, {
|
|
cwd: root,
|
|
env: { ...process.env, ...extraEnv },
|
|
encoding: 'utf8',
|
|
});
|
|
return {
|
|
ok: result.status === 0,
|
|
status: result.status,
|
|
stdout: result.stdout?.trim() ?? '',
|
|
stderr: result.stderr?.trim() ?? '',
|
|
};
|
|
}
|
|
|
|
const results = [];
|
|
|
|
for (const check of checks) {
|
|
const item = {
|
|
...check,
|
|
...(check.script ? runScript(check.script) : runCommand(check.command)),
|
|
};
|
|
results.push(item);
|
|
console.log(`[goose-v149-phase3] ${item.ok ? 'OK' : 'FAIL'} ${check.name}`);
|
|
if (item.stdout) console.log(item.stdout);
|
|
if (!item.ok && item.stderr) console.error(item.stderr);
|
|
}
|
|
|
|
const failedRequired = results.filter((item) => item.required && !item.ok);
|
|
if (failedRequired.length) {
|
|
console.error(`GOOSE_V149_PHASE3_FAIL: ${failedRequired.map((item) => item.name).join(', ')}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('GOOSE_V149_PHASE3_OK');
|
|
console.log(' next: docs/goose-v149-phase3-closeout.md (merge prep, no 103 until approved)');
|