import { readFileSync } from 'node:fs'; import { describe, expect, it } from 'vitest'; const compose = readFileSync('docker-compose.postgres.yml', 'utf8'); const guidance = readFileSync('AGENTS.md', 'utf8'); describe('canonical local PostgreSQL binding', () => { it('reuses the established ASSESSOR 2.0 Compose project and external volume', () => { expect(compose).toMatch(/^name:\s*assessor-2_0\s*$/m); expect(compose).toMatch(/^\s+name:\s*assessor-2_0_assessor-postgres-data\s*$/m); expect(compose).toMatch(/^\s+external:\s*true\s*$/m); expect(compose).toContain('127.0.0.1:${ASSESSOR_POSTGRES_PORT:-5432}:5432'); }); it('forbids fallback ASSESSOR databases and ports in the project guidance', () => { expect(guidance).toContain('single canonical local ASSESSOR datastore'); expect(guidance).toContain('Never create an alternative ASSESSOR database'); expect(guidance).toContain('instead of spawning or selecting another database'); }); });