Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(onboarding): mcp-onboarding leaves a fresh onboarding state for the next file in its shard

time-attack3aa83c1bbe6d
diff --git a/test/helpers/evidence-delivery-fixture.ts b/test/helpers/evidence-delivery-fixture.ts
index 8f7b3dfe59..163291ee32 100644
--- a/test/helpers/evidence-delivery-fixture.ts
+++ b/test/helpers/evidence-delivery-fixture.ts
@@ -66,7 +66,6 @@ export async function captureOffPath(engine: BrainEngine): Promise<Record<string
// keyless corpus) are additive and pinned in test/mcp-notice-channels.test.ts; the off path compares the rest.
const content = res.content.filter(c => !c.text.startsWith('[gbrain notice '));
const { gbrain_notices: _notices, ...meta } = res._meta ?? {};
- if (Array.isArray(_notices) && _notices.length) console.error(`[evidence-fixture] mcp-${name} notices: ${JSON.stringify((_notices as Array<{ code?: string; kind?: string }>).map(n => `${n.code}:${n.kind}`))}`);
out[`mcp-${name}`] = JSON.stringify({ ...res, content, ...(res._meta ? { _meta: meta } : {}) });
}
});
diff --git a/test/mcp-onboarding.test.ts b/test/mcp-onboarding.test.ts
index c138632a5c..7cf38521b3 100644
--- a/test/mcp-onboarding.test.ts
+++ b/test/mcp-onboarding.test.ts
@@ -31,6 +31,9 @@ beforeAll(async () => {
});
afterAll(async () => {
+ // Onboarding state is process-wide: leave a fresh process for the next file in this shard,
+ // or its stdio dispatches inherit this file's warm snapshot and first-run bundle.
+ newProcess();
await engine.disconnect();
});