diff --git a/apps/server/src/integrations/ai/ai-settings.service.spec.ts b/apps/server/src/integrations/ai/ai-settings.service.spec.ts index 073b4737..38c46e90 100644 --- a/apps/server/src/integrations/ai/ai-settings.service.spec.ts +++ b/apps/server/src/integrations/ai/ai-settings.service.spec.ts @@ -186,7 +186,6 @@ describe('AiSettingsService.reindex progress seed', () => { // pinned to the client poll cap (120s) so a still-pending run can't expire // into a false "done" while the client is still polling (F11). expect(ttl).toBe(120); - expect(ttl).toBeLessThanOrEqual(120); expect(aiQueue.add).toHaveBeenCalledTimes(1); // Seed must precede the enqueue so the first poll already reports done=0. expect(order).toEqual(['start', 'add']); diff --git a/apps/server/test/integration/page-embeddable-ids-lockstep.int-spec.ts b/apps/server/test/integration/page-embeddable-ids-lockstep.int-spec.ts index db16399c..2900254c 100644 --- a/apps/server/test/integration/page-embeddable-ids-lockstep.int-spec.ts +++ b/apps/server/test/integration/page-embeddable-ids-lockstep.int-spec.ts @@ -11,10 +11,11 @@ import { getTestDb, destroyTestDb, createWorkspace, createSpace } from './db'; * ID set while the status endpoint reports the count as the live denominator, so * if the two predicates ever diverge the "done X of Y" counter ends on the wrong * total. Both share the SAME WHERE: a page qualifies iff it is non-deleted AND - * (text_content has a non-whitespace char OR it has a non-deleted embedding row). + * (text_content has a non-whitespace char OR — when text_content is empty — its + * content JSON has a text node OR it has a non-deleted embedding row). * * This is a DB-level invariant: the predicate lives in raw SQL (`text_content ~ - * '[^[:space:]]'`) and an EXISTS subquery, so a unit test with mocked Kysely + * '[^[:space:]]'`, `content::text ~ '"type":"text"'`) and an EXISTS subquery, so a unit test with mocked Kysely * cannot observe it. We seed every boundary case against real Postgres and * assert the returned ID set EQUALS the count (and is exactly the expected set). * A future edit that touches one predicate but not the other turns this red.