11 lines
618 B
TypeScript
11 lines
618 B
TypeScript
import assert from "node:assert/strict";
|
|
import { readFile } from "node:fs/promises";
|
|
import test from "node:test";
|
|
|
|
test("migration 003 records explicit OCR recovery decisions", async () => {
|
|
const sql = await readFile(new URL("../../migrations/003_ocr_recovery_audit.sql", import.meta.url), "utf8");
|
|
assert.match(sql, /CREATE TABLE IF NOT EXISTS rag_ocr_recovery_audit/i);
|
|
assert.match(sql, /version_id uuid NOT NULL REFERENCES rag_source_versions\(version_id\)/i);
|
|
assert.match(sql, /recovered_by text NOT NULL/i);
|
|
assert.match(sql, /outcome text NOT NULL CHECK \(outcome IN \('closed_failed'\)\)/i);
|
|
});
|