import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; /** * Doctrine test — pins the per-identity-label vector-index coverage * invariant so future identity labels added to schema-base.md cannot * silently drift into BM25-only semantic ranking (Task 483). * * Pre-Task-483 the :Organization label carried `embedding` from the * ingest writer but no vector index, so hybrid() fell through to * BM25-only for Organization-only queries (Task 478 made the * fallback honest). Without a coverage gate, the next analogous gap * — a new identity label written with embeddings but no index — * would silently degrade the same way. * * Doctrine: every identity label declared in schema-base.md's * `## Node Types` table is either (a) covered by a * `CREATE VECTOR INDEX … FOR (n: