Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(search): CJK rollback e2e asserts rows, not a page count the dedup headroom decides (#5989)

garrytan8e2c720b935e
diff --git a/test/e2e/cjk-keyword-deadline-postgres.test.ts b/test/e2e/cjk-keyword-deadline-postgres.test.ts
index ccfeaff57d..51b3653af3 100644
--- a/test/e2e/cjk-keyword-deadline-postgres.test.ts
+++ b/test/e2e/cjk-keyword-deadline-postgres.test.ts
@@ -47,7 +47,8 @@ describe.skipIf(!RUN)('CJK keyword arm on Postgres', () => {
cjkKeyword: { deadlineMs: 30_000, fullBudgetMs: 150, onMeta: (m) => metas.push(m) } });
expect(metas).toHaveLength(1);
expect(metas[0]).toMatchObject({ incomplete: true, reason: 'candidate_budget', capped: true });
- expect(rows).toHaveLength(20);
+ // Identical chunk texts tie on score, so the page-grain dedup headroom (innerLimit) decides how many pages survive; any is fine here.
+ expect(rows.length).toBeGreaterThan(0);
expect(rows.every((r) => r.source_id === 'cjk-a')).toBe(true);
const after = await engine.searchKeyword('席位', { sourceId: 'cjk-b' });
expect(after.map((r) => r.slug)).toEqual(['cjkb/seats-1']);