Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(mentions): pin the pre-mask mention version by symbol in the rescan test (#6740)
garrytan62a583b852b4
diff --git a/test/mentions-pass.test.ts b/test/mentions-pass.test.tsindex 9ca1e6e417..825af99a2b 100644--- a/test/mentions-pass.test.ts+++ b/test/mentions-pass.test.ts@@ -16,7 +16,7 @@import { afterAll, beforeAll, beforeEach, describe, expect, test } from 'bun:test';import type { PGLiteEngine } from '../src/core/pglite-engine.ts';import { extractStaleFromDB } from '../src/commands/extract.ts';-import { countMentionDuePages, runMentionPass } from '../src/core/mentions/pass.ts';+import { MENTION_EXTRACTOR_VERSION, countMentionDuePages, runMentionPass } from '../src/core/mentions/pass.ts';import { buildGazetteer } from '../src/core/by-mention.ts';import { readMentionCoverage } from '../src/core/mentions/coverage.ts';import { mentionIndexUpgradeNotice } from '../src/core/mentions/upgrade-notice.ts';@@ -136,9 +136,9 @@ describe('reconcile scope, off switch and failure', () => {await page(engine, 'notes/n1', 'note', 'n1', 'Weekly notes.\n<!--- acme example:facts:begin -->\n<!--- acme example:facts:end -->');await sweep(engine);expect(await mentionLinks(engine)).toEqual([]);- // The release before the comment mask (MENTION_EXTRACTOR_VERSION 5) wrote this row and stamped the page scanned.+ // The release before the comment mask (the previous MENTION_EXTRACTOR_VERSION) wrote this row and stamped the page scanned.await engine.addLinksBatch([{ from_slug: 'notes/n1', to_slug: 'companies/acme', link_type: 'mentions', link_source: 'mentions', context: 'Acme Example' } as never]);- await engine.executeRaw(`UPDATE page_mention_state SET mention_version = 5 WHERE page_id = (SELECT id FROM pages WHERE slug = 'notes/n1')`);+ await engine.executeRaw(`UPDATE page_mention_state SET mention_version = $1 WHERE page_id = (SELECT id FROM pages WHERE slug = 'notes/n1')`, [MENTION_EXTRACTOR_VERSION - 1]);expect(await mentionLinks(engine)).toEqual(['notes/n1 -> companies/acme']);const r = await sweep(engine);expect(await mentionLinks(engine)).toEqual([]);