08feae8bef
落地 H5 Session 架构 Patch 1–5(Broker 收口、Router decision、SSE taxonomy、goosed 边界检查), 并新增可选 MEMIND_RUN_STREAM_REPLAY run 事件回放与 H5 假交付 guard;修复 Finish 先于 agent-run gate 导致 UI 永久 loading 的竞态,接入 verify:h5-session-patches 回归脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import { spawnSync } from 'node:child_process';
|
|
import path from 'node:path';
|
|
|
|
const root = path.resolve(new URL('..', import.meta.url).pathname);
|
|
const withRuntime =
|
|
process.argv.includes('--with-runtime') || process.env.MINDSPACE_VERIFY_RUNTIME === '1';
|
|
|
|
function run(label, args) {
|
|
const result = spawnSync(process.execPath, args, {
|
|
cwd: root,
|
|
stdio: 'inherit',
|
|
});
|
|
if (result.status !== 0) {
|
|
throw new Error(`${label} failed with exit code ${result.status ?? 'unknown'}`);
|
|
}
|
|
}
|
|
|
|
run('MindSpace publish + chat finish unit tests', [
|
|
'--test',
|
|
'mindspace-public-finish-sync.test.mjs',
|
|
'mindspace-h5-html-finish-guard.test.mjs',
|
|
'conversation-display.test.mjs',
|
|
'chat-finish-sync.test.mjs',
|
|
]);
|
|
|
|
run('chat finish sync source guards', ['scripts/verify-chat-finish-sync.mjs']);
|
|
|
|
if (withRuntime) {
|
|
run('public finish sync runtime guard', ['scripts/verify-public-finish-sync-runtime.mjs']);
|
|
}
|
|
|
|
console.log(
|
|
withRuntime
|
|
? 'mindspace publish + chat finish regression guards ok (with runtime)'
|
|
: 'mindspace publish + chat finish regression guards ok',
|
|
);
|