diff --git a/src/main/assistant/supervision-story-suggestions.test.ts b/src/main/assistant/supervision-story-suggestions.test.ts index b2bb26d2..3540f457 100644 --- a/src/main/assistant/supervision-story-suggestions.test.ts +++ b/src/main/assistant/supervision-story-suggestions.test.ts @@ -5,7 +5,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { DatabaseSync } from 'node:sqlite' import { afterEach, expect, it, vi } from 'vitest' -import { AssistantDatabase } from './assistant-database' +import { ASSISTANT_DATABASE_SCHEMA_VERSION, AssistantDatabase } from './assistant-database' import { extractExperiences } from './supervision-experiences' import { assignStories } from './supervision-stories' import { deriveSuggestions } from './supervision-suggester' @@ -168,6 +168,6 @@ it('upgrades schema 55 suggestions to 56 without losing rows', async () => { cleanups.push(async () => { db.close(); await rm(directory, { recursive: true, force: true }) }) expect(db.supervisionSuggestions().get('keep')).toMatchObject({ kind: 'open_item', title: 'Keep', storyId: null }) const check = new DatabaseSync(path) - expect(check.prepare('PRAGMA user_version').get()!.user_version).toBe(56) + expect(check.prepare('PRAGMA user_version').get()!.user_version).toBe(ASSISTANT_DATABASE_SCHEMA_VERSION) check.close() }) \ No newline at end of file diff --git a/src/main/assistant/supervision-timeline.test.ts b/src/main/assistant/supervision-timeline.test.ts index 2fc15b57..4b6394ed 100644 --- a/src/main/assistant/supervision-timeline.test.ts +++ b/src/main/assistant/supervision-timeline.test.ts @@ -5,7 +5,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { DatabaseSync } from 'node:sqlite' import { afterEach, expect, it, vi } from 'vitest' -import { AssistantDatabase } from './assistant-database' +import { ASSISTANT_DATABASE_SCHEMA_VERSION, AssistantDatabase } from './assistant-database' import { SupervisorService, type SupervisorSummarizerRequest } from './supervisor-service' import type { SupervisionRunRequest } from '../../shared/supervision-contracts' import type { ReviewConfiguration } from './supervision-review-store' @@ -115,7 +115,7 @@ it('upgrades released per-scope progress and duplicated events into the shared t PRAGMA user_version = 52;`) f.db.close() f.db.initialize(process.cwd()) - expect(f.sql.prepare('PRAGMA user_version').get()!.user_version).toBe(56) + expect(f.sql.prepare('PRAGMA user_version').get()!.user_version).toBe(ASSISTANT_DATABASE_SCHEMA_VERSION) expect(f.sql.prepare("SELECT DISTINCT scope FROM review_checkpoints").all().map(row => row.scope)).toEqual(['timeline']) expect(current(f.sql)).toHaveLength(2) await expect(f.run({ kind: 'projects', projectIds: [f.a.id] })).resolves.toMatchObject({ status: 'no_change' })