Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(append-cost): embed the seeds before measuring appends (#7957)
garrytan1ddfcb873ec0
diff --git a/test/large-pages/append-cost.test.ts b/test/large-pages/append-cost.test.tsindex 7c36f3baad..decb885dbe 100644--- a/test/large-pages/append-cost.test.ts+++ b/test/large-pages/append-cost.test.ts@@ -55,6 +55,10 @@ for (const kind of testBackends()) {await brain.seed(BIG, conversationPage(16_000_000, { seed: 2 }));expect((await brain.body(SMALL)).storage).toBe('segmented');expect((await brain.body(BIG)).storage).toBe('segmented');+ // Seeds skip embedding; left unembedded, the first append's embedding effect embeds the whole page and holds the+ // PGLite connection while the next measured append waits on its receipt (#7957).+ await runEmbedCore(brain.engine, { stale: true, quiet: true } as never);+ expect((await brain.engine.executeRaw<{ n: number }>('SELECT count(*)::int AS n FROM content_chunks WHERE embedding IS NULL'))[0]!.n).toBe(0);}, 600_000);afterAll(() => brain.close(), 120_000);