T-74: M1.1i — Pass 3/4/6 match & conflict report: pure in-memory Markdown + CSV generator and override seed-SQL template (no DB I/O)

This commit is contained in:
Studio 2026-11-27 21:23:56 -05:00
parent 83ec301220
commit 86bf0a68b2
3 changed files with 85 additions and 4 deletions

View file

@ -1037,11 +1037,12 @@ describe('generateOverrideSeedSql & generateOverrideTemplateSql', () => {
// CR/LF source_id is preserved via a single-line PostgreSQL E'...' literal
expect(templateSql).toContain("-- E'BAD\\r\\nDROP''\\\\TABLE override;--',");
// Unstorable NUL-byte source_id gets a diagnostic warning and placeholder instead of silent mangling
// Unstorable NUL-byte source_id gets a diagnostic warning and non-insertable NULL marker instead of silent mangling
expect(templateSql).toContain(
'-- WARNING: Cannot store raw source_id in PostgreSQL (contains NUL byte); correct source_id before applying.'
);
expect(templateSql).toContain("-- 'TODO_CORRECT_SOURCE_ID',");
expect(templateSql).toContain('-- NULL /* TODO: replace with valid source_id */,');
expect(templateSql).not.toContain('TODO_CORRECT_SOURCE_ID');
// Empty conflicts report still produces only comments
const emptyTemplate = generateOverrideTemplateSql(