T-40: M1.1c — Pass 1 exchanges: ISO MIC seed, source-code role classifier and reviewable seed-SQL generator

This commit is contained in:
Studio 2026-11-27 14:56:52 -05:00
parent 2dbfb7e5bc
commit c36f89352c
12 changed files with 1848 additions and 20 deletions

View file

@ -20,6 +20,7 @@ const MASTER_FILES = [
'04-provider-exchange-mapping-schema.sql',
'05-add-visible-column.sql',
'34-security-master.sql',
'35-security-master-exchange-seed.sql',
];
const LEGACY_MASTER_TABLES = [
@ -136,13 +137,13 @@ async function createIsolatedFixture() {
}
describe.skipIf(!url)('fresh PostgreSQL database schema', () => {
test('Case A: init SQL 01-34 contain no CREATE DATABASE/\\c and create all master and research tables', async () => {
test('Case A: init SQL 01-35 contain no CREATE DATABASE/\\c and create all master and research tables', async () => {
const f = await createIsolatedFixture();
const sqlFiles = readdirSync(initDir)
.filter(file => file.endsWith('.sql'))
.sort();
expect(sqlFiles.length).toBeGreaterThanOrEqual(34);
expect(sqlFiles.length).toBeGreaterThanOrEqual(35);
for (const file of sqlFiles) {
const sql = readFileSync(join(initDir, file), 'utf8');
@ -176,7 +177,7 @@ describe.skipIf(!url)('fresh PostgreSQL database schema', () => {
expect(await f.hasColumn('backtest_results', 'canonical_result')).toBe(true);
});
test('Case B: master track creates master tables, records exact 6 files, and is idempotent', async () => {
test('Case B: master track creates master tables, records exact 7 files, and is idempotent', async () => {
const f = await createIsolatedFixture();
const first = await runPostgresMigrations(f.postgres, { track: 'master' });